Merge pull request #1024 in YUNIONIO/onecloud from ~QUXUAN/onecloud:feature/qx-oepnstack-stage2 to release/2.6.0

* commit 'f5f2addfd7ea634e598293a37879c251b9eea006':
  避免部署主机失败后未设置external_id而删除主机失败
  rebase 2.6.0
  快照磁盘支持区分公有云私有云
  openstack 同步flavor
  openstack创建
This commit is contained in:
邱剑
2019-02-18 23:02:49 +08:00
62 changed files with 2280 additions and 125 deletions
+1
View File
@@ -36,6 +36,7 @@ type ICloudProvider interface {
GetSysInfo() (jsonutils.JSONObject, error)
GetVersion() string
IsOnPremiseInfrastructure() bool
SyncSkuFromCloud() bool
GetIRegions() []ICloudRegion
GetIRegionById(id string) (ICloudRegion, error)
+4
View File
@@ -115,3 +115,7 @@ func (region *SFakeOnPremiseRegion) CreateILoadBalancer(loadbalancer *SLoadbalan
func (region *SFakeOnPremiseRegion) CreateILoadBalancerAcl(acl *SLoadbalancerAccessControlList) (ICloudLoadbalancerAcl, error) {
return nil, ErrNotSupported
}
func (region *SFakeOnPremiseRegion) GetSkus(zoneId string) ([]ICloudSku, error) {
return nil, ErrNotSupported
}
+1
View File
@@ -11,6 +11,7 @@ import (
type SDiskInfo struct {
StorageType string
SizeGB int
Name string
}
type SManagedVMCreateConfig struct {
+38 -1
View File
@@ -74,6 +74,8 @@ type ICloudRegion interface {
CreateILoadBalancerAcl(acl *SLoadbalancerAccessControlList) (ICloudLoadbalancerAcl, error)
CreateILoadBalancerCertificate(cert *SLoadbalancerCertificate) (ICloudLoadbalancerCertificate, error)
GetSkus(zoneId string) ([]ICloudSku, error)
GetProvider() string
}
@@ -211,7 +213,7 @@ type ICloudVM interface {
GetInstanceType() string
AssignSecurityGroup(secgroupId string) error
AssignSecurityGroups(secgroupIds []string) error
SetSecurityGroups(secgroupIds []string) error
GetHypervisor() string
@@ -522,3 +524,38 @@ type ICloudLoadbalancerAcl interface {
Sync(acl *SLoadbalancerAccessControlList) error
Delete() error
}
type ICloudSku interface {
ICloudResource
GetInstanceTypeFamily() string
GetInstanceTypeCategory() string
GetPrepaidStatus() string
GetPostpaidStatus() string
GetCpuCoreCount() int
GetMemorySizeMB() int
GetOsName() string
GetSysDiskResizable() bool
GetSysDiskType() string
GetSysDiskMinSizeGB() int
GetSysDiskMaxSizeGB() int
GetAttachedDiskType() string
GetAttachedDiskSizeGB() int
GetAttachedDiskCount() int
GetDataDiskTypes() string
GetDataDiskMaxCount() int
GetNicType() string
GetNicMaxCount() int
GetGpuAttachable() bool
GetGpuSpec() string
GetGpuCount() int
GetGpuMaxCount() int
}