From c623f86c7766908130b9d92b7dc47a77f6cb3756 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=88=E8=BD=A9?= Date: Tue, 26 Nov 2024 12:04:09 +0800 Subject: [PATCH] fix(region): support uis (#21686) --- go.mod | 2 +- go.sum | 4 +- pkg/apis/compute/cloudaccount_const.go | 5 + pkg/apis/compute/guest_const.go | 1 + pkg/apis/compute/host_const.go | 2 + pkg/compute/guestdrivers/uis.go | 228 ++++++++++++++++++ pkg/compute/hostdrivers/uis.go | 45 ++++ pkg/compute/regiondrivers/uis.go | 49 ++++ pkg/mcclient/options/base.go | 2 +- pkg/mcclient/options/compute/servers.go | 4 +- vendor/modules.txt | 2 +- .../pkg/apis/compute/cloudaccount_const.go | 1 + .../cloudmux/pkg/apis/compute/guest_const.go | 1 + .../x/cloudmux/pkg/apis/compute/host_const.go | 1 + 14 files changed, 340 insertions(+), 7 deletions(-) create mode 100644 pkg/compute/guestdrivers/uis.go create mode 100644 pkg/compute/hostdrivers/uis.go create mode 100644 pkg/compute/regiondrivers/uis.go diff --git a/go.mod b/go.mod index bed7fa4b644..78cb72152c4 100644 --- a/go.mod +++ b/go.mod @@ -93,7 +93,7 @@ require ( k8s.io/cri-api v0.22.17 k8s.io/klog/v2 v2.20.0 moul.io/http2curl/v2 v2.3.0 - yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20241122072750-91ba50cada6b + yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20241125120153-2a0e6362368b yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32 yunion.io/x/jsonutils v1.0.1-0.20240930100528-1671a2d0d22f yunion.io/x/log v1.0.1-0.20240305175729-7cf2d6cd5a91 diff --git a/go.sum b/go.sum index de461998a54..ffb4196c0e4 100644 --- a/go.sum +++ b/go.sum @@ -1376,8 +1376,8 @@ sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20241122072750-91ba50cada6b h1:ZiDwZXIuH6PvsVu0vtSvdTYQ+FW9QE7g4FTeZUfRAWs= -yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20241122072750-91ba50cada6b/go.mod h1:rj/pb3DitJlQaQD8UW1oxx/KD+PzDZqoywzqRJaFE9A= +yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20241125120153-2a0e6362368b h1:Usnw/w/qSTX5gLJYhSoMCeUifVxs32c4DNVvLA5RmEQ= +yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20241125120153-2a0e6362368b/go.mod h1:rj/pb3DitJlQaQD8UW1oxx/KD+PzDZqoywzqRJaFE9A= yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32 h1:v7POYkQwo1XzOxBoIoRVr/k0V9Y5JyjpshlIFa9raug= yunion.io/x/executor v0.0.0-20230705125604-c5ac3141db32/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws= yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634= diff --git a/pkg/apis/compute/cloudaccount_const.go b/pkg/apis/compute/cloudaccount_const.go index cd4298309f0..835623a31b4 100644 --- a/pkg/apis/compute/cloudaccount_const.go +++ b/pkg/apis/compute/cloudaccount_const.go @@ -73,6 +73,7 @@ const ( CLOUD_PROVIDER_ORACLE = compute.CLOUD_PROVIDER_ORACLE CLOUD_PROVIDER_SANGFOR = compute.CLOUD_PROVIDER_SANGFOR CLOUD_PROVIDER_ZETTAKIT = compute.CLOUD_PROVIDER_ZETTAKIT + CLOUD_PROVIDER_UIS = compute.CLOUD_PROVIDER_UIS CLOUD_PROVIDER_GENERICS3 = compute.CLOUD_PROVIDER_GENERICS3 CLOUD_PROVIDER_CEPH = compute.CLOUD_PROVIDER_CEPH @@ -174,6 +175,7 @@ var ( CLOUD_PROVIDER_ORACLE, CLOUD_PROVIDER_SANGFOR, CLOUD_PROVIDER_ZETTAKIT, + CLOUD_PROVIDER_UIS, } CLOUD_PROVIDER_HOST_TYPE_MAP = map[string][]string{ @@ -278,6 +280,9 @@ var ( CLOUD_PROVIDER_ZETTAKIT: { HOST_TYPE_ZETTAKIT, }, + CLOUD_PROVIDER_UIS: { + HOST_TYPE_UIS, + }, } ) diff --git a/pkg/apis/compute/guest_const.go b/pkg/apis/compute/guest_const.go index 56851c07865..fdc7bddd258 100644 --- a/pkg/apis/compute/guest_const.go +++ b/pkg/apis/compute/guest_const.go @@ -221,6 +221,7 @@ const ( HYPERVISOR_ORACLE = compute.HYPERVISOR_ORACLE HYPERVISOR_SANGFOR = compute.HYPERVISOR_SANGFOR HYPERVISOR_ZETTAKIT = compute.HYPERVISOR_ZETTAKIT + HYPERVISOR_UIS = compute.HYPERVISOR_UIS // HYPERVISOR_DEFAULT = HYPERVISOR_KVM HYPERVISOR_DEFAULT = HYPERVISOR_KVM diff --git a/pkg/apis/compute/host_const.go b/pkg/apis/compute/host_const.go index e9c80c0feb6..96749632af7 100644 --- a/pkg/apis/compute/host_const.go +++ b/pkg/apis/compute/host_const.go @@ -58,6 +58,7 @@ const ( HOST_TYPE_ORACLE = compute.HOST_TYPE_ORACLE HOST_TYPE_SANGFOR = compute.HOST_TYPE_SANGFOR HOST_TYPE_ZETTAKIT = compute.HOST_TYPE_ZETTAKIT + HOST_TYPE_UIS = compute.HOST_TYPE_UIS HOST_TYPE_DEFAULT = HOST_TYPE_HYPERVISOR @@ -157,6 +158,7 @@ var HOST_TYPES = []string{ HOST_TYPE_ORACLE, HOST_TYPE_SANGFOR, HOST_TYPE_ZETTAKIT, + HOST_TYPE_UIS, } var ALL_NIC_TYPES = []compute.TNicType{NIC_TYPE_IPMI, NIC_TYPE_ADMIN, NIC_TYPE_NORMAL} diff --git a/pkg/compute/guestdrivers/uis.go b/pkg/compute/guestdrivers/uis.go new file mode 100644 index 00000000000..b2bc6a2557f --- /dev/null +++ b/pkg/compute/guestdrivers/uis.go @@ -0,0 +1,228 @@ +// Copyright 2019 Yunion +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package guestdrivers + +import ( + "context" + "database/sql" + "fmt" + + "yunion.io/x/cloudmux/pkg/cloudprovider" + "yunion.io/x/log" + "yunion.io/x/pkg/errors" + "yunion.io/x/pkg/util/billing" + "yunion.io/x/pkg/util/cloudinit" + "yunion.io/x/pkg/util/rbacscope" + "yunion.io/x/pkg/utils" + "yunion.io/x/sqlchemy" + + api "yunion.io/x/onecloud/pkg/apis/compute" + "yunion.io/x/onecloud/pkg/cloudcommon/db" + "yunion.io/x/onecloud/pkg/cloudcommon/db/quotas" + "yunion.io/x/onecloud/pkg/cloudcommon/db/taskman" + "yunion.io/x/onecloud/pkg/compute/models" + "yunion.io/x/onecloud/pkg/mcclient" +) + +type SUisGuestDriver struct { + SManagedVirtualizedGuestDriver +} + +func init() { + driver := SUisGuestDriver{} + models.RegisterGuestDriver(&driver) +} + +func (self *SUisGuestDriver) GetHypervisor() string { + return api.HYPERVISOR_UIS +} + +func (self *SUisGuestDriver) GetProvider() string { + return api.CLOUD_PROVIDER_UIS +} + +func (self *SUisGuestDriver) DoScheduleSKUFilter() bool { + return true +} + +func (self *SUisGuestDriver) DoScheduleStorageFilter() bool { + return false +} + +func (self *SUisGuestDriver) GetComputeQuotaKeys(scope rbacscope.TRbacScope, ownerId mcclient.IIdentityProvider, brand string) models.SComputeResourceKeys { + keys := models.SComputeResourceKeys{} + keys.SBaseProjectQuotaKeys = quotas.OwnerIdProjectQuotaKeys(scope, ownerId) + keys.CloudEnv = api.CLOUD_ENV_PRIVATE_CLOUD + keys.Provider = api.CLOUD_PROVIDER_UIS + keys.Brand = api.CLOUD_PROVIDER_UIS + keys.Hypervisor = api.HYPERVISOR_UIS + return keys +} + +func (self *SUisGuestDriver) GetDefaultSysDiskBackend() string { + return "" +} + +func (self *SUisGuestDriver) GetMinimalSysDiskSizeGb() int { + return 20 +} + +func (self *SUisGuestDriver) GetStorageTypes() []string { + storages, _ := models.StorageManager.GetStorageTypesByProvider(self.GetProvider()) + return storages +} + +func (self *SUisGuestDriver) ChooseHostStorage(host *models.SHost, guest *models.SGuest, diskConfig *api.DiskConfig, storageIds []string) (*models.SStorage, error) { + return chooseHostStorage(self, host, diskConfig.Backend, storageIds), nil +} + +func (self *SUisGuestDriver) GetDetachDiskStatus() ([]string, error) { + return []string{api.VM_READY, api.VM_RUNNING}, nil +} + +func (self *SUisGuestDriver) GetAttachDiskStatus() ([]string, error) { + return []string{api.VM_READY, api.VM_RUNNING}, nil +} + +func (self *SUisGuestDriver) GetRebuildRootStatus() ([]string, error) { + return []string{api.VM_READY}, nil +} + +func (self *SUisGuestDriver) GetChangeConfigStatus(guest *models.SGuest) ([]string, error) { + return []string{api.VM_READY}, nil +} + +func (self *SUisGuestDriver) GetDeployStatus() ([]string, error) { + return []string{api.VM_READY, api.VM_RUNNING}, nil +} + +func (self *SUisGuestDriver) ValidateResizeDisk(guest *models.SGuest, disk *models.SDisk, storage *models.SStorage) error { + if !utils.IsInStringArray(guest.Status, []string{api.VM_RUNNING, api.VM_READY}) { + return fmt.Errorf("Cannot resize disk when guest in status %s", guest.Status) + } + return nil +} + +func (self *SUisGuestDriver) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, input *api.ServerCreateInput) (*api.ServerCreateInput, error) { + if len(input.UserData) > 0 { + _, err := cloudinit.ParseUserData(input.UserData) + if err != nil { + return nil, err + } + } + if len(input.Cdrom) > 0 { + image, err := models.CachedimageManager.GetCachedimageById(ctx, userCred, input.Cdrom, false) + if err != nil { + return nil, err + } + if len(image.ExternalId) > 0 { + hosts, err := image.GetHosts() + if err != nil { + return nil, err + } + if len(input.PreferHost) == 0 && len(hosts) == 1 { + input.PreferHost = hosts[0].Id + } + } + } + return input, nil +} + +func (self *SUisGuestDriver) GetGuestInitialStateAfterCreate() string { + return api.VM_RUNNING +} + +func (self *SUisGuestDriver) GetGuestInitialStateAfterRebuild() string { + return api.VM_READY +} + +func (self *SUisGuestDriver) GetInstanceCapability() cloudprovider.SInstanceCapability { + return cloudprovider.SInstanceCapability{ + Hypervisor: self.GetHypervisor(), + Provider: self.GetProvider(), + DefaultAccount: cloudprovider.SDefaultAccount{ + Linux: cloudprovider.SOsDefaultAccount{ + DefaultAccount: api.VM_DEFAULT_LINUX_LOGIN_USER, + }, + Windows: cloudprovider.SOsDefaultAccount{ + DefaultAccount: api.VM_DEFAULT_WINDOWS_LOGIN_USER, + }, + }, + } +} + +func (self *SUisGuestDriver) RemoteDeployGuestSyncHost(ctx context.Context, userCred mcclient.TokenCredential, guest *models.SGuest, host *models.SHost, iVM cloudprovider.ICloudVM) (cloudprovider.ICloudHost, error) { + if hostId := iVM.GetIHostId(); len(hostId) > 0 { + nh, err := db.FetchByExternalIdAndManagerId(models.HostManager, hostId, func(q *sqlchemy.SQuery) *sqlchemy.SQuery { + return q.Equals("manager_id", host.ManagerId) + }) + if err != nil { + log.Debugf("failed to found new hostId(%s) for ivm %s(%s) error: %v", hostId, guest.Name, guest.Id, err) + if errors.Cause(err) != sql.ErrNoRows { + return nil, errors.Wrap(err, "FetchByExternalIdAndManagerId") + } + + // HYPERVISOR_UIS VM被部署到一台全新的宿主机 + zone, err := host.GetZone() + if err != nil { + log.Warningf("host %s GetZone: %s", host.GetId(), err) + } else { + _host, err := models.HostManager.NewFromCloudHost(ctx, userCred, iVM.GetIHost(), host.GetCloudprovider(), zone) + if err != nil { + log.Warningf("NewFromCloudHost %s: %s", iVM.GetIHostId(), err) + } else { + host = _host + } + } + } else { + host = nh.(*models.SHost) + } + } + + if host.GetId() != guest.HostId { + guest.OnScheduleToHost(ctx, userCred, host.GetId()) + } + + return host.GetIHost(ctx) +} + +func (self *SUisGuestDriver) IsSupportedBillingCycle(bc billing.SBillingCycle) bool { + return false +} + +func (self *SUisGuestDriver) IsNeedInjectPasswordByCloudInit() bool { + return false +} + +func (self *SUisGuestDriver) IsSupportSetAutoRenew() bool { + return false +} + +func (self *SUisGuestDriver) RequestSyncSecgroupsOnHost(ctx context.Context, guest *models.SGuest, host *models.SHost, task taskman.ITask) error { + return nil // do nothing, not support securitygroup +} + +func (self *SUisGuestDriver) GetMaxSecurityGroupCount() int { + return 1 +} + +func (self *SUisGuestDriver) RequestGuestHotAddIso(ctx context.Context, guest *models.SGuest, path string, boot bool, task taskman.ITask) error { + task.ScheduleRun(nil) + return nil +} + +func (self *SUisGuestDriver) IsSupportCdrom(guest *models.SGuest) (bool, error) { + return true, nil +} diff --git a/pkg/compute/hostdrivers/uis.go b/pkg/compute/hostdrivers/uis.go new file mode 100644 index 00000000000..9595f71dee3 --- /dev/null +++ b/pkg/compute/hostdrivers/uis.go @@ -0,0 +1,45 @@ +// Copyright 2019 Yunion +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package hostdrivers + +import ( + api "yunion.io/x/onecloud/pkg/apis/compute" + "yunion.io/x/onecloud/pkg/compute/models" +) + +type SUisHostDriver struct { + SManagedVirtualizationHostDriver +} + +func init() { + driver := SUisHostDriver{} + models.RegisterHostDriver(&driver) +} + +func (self *SUisHostDriver) GetHostType() string { + return api.HOST_TYPE_UIS +} + +func (self *SUisHostDriver) GetHypervisor() string { + return api.HYPERVISOR_UIS +} + +func (self *SUisHostDriver) GetProvider() string { + return api.CLOUD_PROVIDER_UIS +} + +func (self *SUisHostDriver) ValidateDiskSize(storage *models.SStorage, sizeGb int) error { + return nil +} diff --git a/pkg/compute/regiondrivers/uis.go b/pkg/compute/regiondrivers/uis.go new file mode 100644 index 00000000000..a5927f3dd12 --- /dev/null +++ b/pkg/compute/regiondrivers/uis.go @@ -0,0 +1,49 @@ +// Copyright 2019 Yunion +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package regiondrivers + +import ( + "yunion.io/x/sqlchemy" + + api "yunion.io/x/onecloud/pkg/apis/compute" + "yunion.io/x/onecloud/pkg/compute/models" +) + +type SUisRegionDriver struct { + SManagedVirtualizationRegionDriver +} + +func init() { + driver := SUisRegionDriver{} + models.RegisterRegionDriver(&driver) +} + +func (self *SUisRegionDriver) GetProvider() string { + return api.CLOUD_PROVIDER_UIS +} + +func (self *SUisRegionDriver) IsSupportedElasticcacheSecgroup() bool { + return false +} + +func (self *SUisRegionDriver) GetMaxElasticcacheSecurityGroupCount() int { + return 1 +} + +func (self *SUisRegionDriver) GetSecurityGroupFilter(vpc *models.SVpc) (func(q *sqlchemy.SQuery) *sqlchemy.SQuery, error) { + return func(q *sqlchemy.SQuery) *sqlchemy.SQuery { + return q.Equals("cloudregion_id", vpc.CloudregionId).Equals("manager_id", vpc.ManagerId) + }, nil +} diff --git a/pkg/mcclient/options/base.go b/pkg/mcclient/options/base.go index 8c522330c68..da6a48f0022 100644 --- a/pkg/mcclient/options/base.go +++ b/pkg/mcclient/options/base.go @@ -245,7 +245,7 @@ type BaseListOptions struct { Manager []string `help:"List objects belonging to the cloud provider" json:"manager,omitempty"` Account string `help:"List objects belonging to the cloud account" json:"account,omitempty"` - Provider []string `help:"List objects from the provider" choices:"OneCloud|VMware|Aliyun|Apsara|Qcloud|Azure|Aws|Huawei|OpenStack|Ucloud|VolcEngine|ZStack|Google|Ctyun|Cloudpods|Nutanix|BingoCloud|IncloudSphere|JDcloud|Proxmox|Ceph|CephFS|Ecloud|HCSO|HCS|HCSOP|H3C|S3|RemoteFile|Ksyun|Baidu|QingCloud|OracleCloud|SangFor|ZettaKit" json:"provider,omitempty"` + Provider []string `help:"List objects from the provider" choices:"OneCloud|VMware|Aliyun|Apsara|Qcloud|Azure|Aws|Huawei|OpenStack|Ucloud|VolcEngine|ZStack|Google|Ctyun|Cloudpods|Nutanix|BingoCloud|IncloudSphere|JDcloud|Proxmox|Ceph|CephFS|Ecloud|HCSO|HCS|HCSOP|H3C|S3|RemoteFile|Ksyun|Baidu|QingCloud|OracleCloud|SangFor|ZettaKit|UIS" json:"provider,omitempty"` Brand []string `help:"List objects belonging to a special brand"` CloudEnv string `help:"Cloud environment" choices:"public|private|onpremise|private_or_onpremise" json:"cloud_env,omitempty"` PublicCloud *bool `help:"List objects belonging to public cloud" json:"public_cloud"` diff --git a/pkg/mcclient/options/compute/servers.go b/pkg/mcclient/options/compute/servers.go index f9531875e90..1f5d6818e19 100644 --- a/pkg/mcclient/options/compute/servers.go +++ b/pkg/mcclient/options/compute/servers.go @@ -44,7 +44,7 @@ type ServerListOptions struct { Gpu *bool `help:"Show gpu servers"` Secgroup string `help:"Secgroup ID or Name"` AdminSecgroup string `help:"AdminSecgroup ID or Name"` - Hypervisor string `help:"Show server of hypervisor" choices:"kvm|esxi|pod|baremetal|aliyun|azure|aws|huawei|ucloud|volcengine|zstack|openstack|google|ctyun|incloudsphere|nutanix|bingocloud|cloudpods|ecloud|jdcloud|remotefile|h3c|hcs|hcso|hcsop|proxmox|ksyun|baidu|cucloud|qingcloud|sangfor|zettakit"` + Hypervisor string `help:"Show server of hypervisor" choices:"kvm|esxi|pod|baremetal|aliyun|azure|aws|huawei|ucloud|volcengine|zstack|openstack|google|ctyun|incloudsphere|nutanix|bingocloud|cloudpods|ecloud|jdcloud|remotefile|h3c|hcs|hcso|hcsop|proxmox|ksyun|baidu|cucloud|qingcloud|sangfor|zettakit|uis"` Region string `help:"Show servers in cloudregion"` WithEip *bool `help:"Show Servers with EIP"` WithoutEip *bool `help:"Show Servers without EIP"` @@ -361,7 +361,7 @@ func (o ServerCreateCommonConfig) Data() (*computeapi.ServerConfigs, error) { type ServerConfigs struct { ServerCreateCommonConfig - Hypervisor string `help:"Hypervisor type" choices:"kvm|pod|esxi|baremetal|container|aliyun|azure|qcloud|aws|huawei|openstack|ucloud|volcengine|zstack|google|ctyun|incloudsphere|bingocloud|cloudpods|ecloud|jdcloud|remotefile|h3c|hcs|hcso|hcsop|proxmox|sangfor|zettakit"` + Hypervisor string `help:"Hypervisor type" choices:"kvm|pod|esxi|baremetal|container|aliyun|azure|qcloud|aws|huawei|openstack|ucloud|volcengine|zstack|google|ctyun|incloudsphere|bingocloud|cloudpods|ecloud|jdcloud|remotefile|h3c|hcs|hcso|hcsop|proxmox|sangfor|zettakit|uis"` Backup bool `help:"Create server with backup server"` BackupHost string `help:"Perfered host where virtual backup server should be created"` AutoSwitchToBackupOnHostDown bool `help:"Auto switch to backup server on host down"` diff --git a/vendor/modules.txt b/vendor/modules.txt index 524b4a17899..6b088646f7a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1785,7 +1785,7 @@ sigs.k8s.io/structured-merge-diff/v4/value # sigs.k8s.io/yaml v1.2.0 ## explicit; go 1.12 sigs.k8s.io/yaml -# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20241122072750-91ba50cada6b +# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20241125120153-2a0e6362368b ## explicit; go 1.21 yunion.io/x/cloudmux/pkg/apis yunion.io/x/cloudmux/pkg/apis/billing diff --git a/vendor/yunion.io/x/cloudmux/pkg/apis/compute/cloudaccount_const.go b/vendor/yunion.io/x/cloudmux/pkg/apis/compute/cloudaccount_const.go index c751d2e51f4..81b4bb3eaa3 100644 --- a/vendor/yunion.io/x/cloudmux/pkg/apis/compute/cloudaccount_const.go +++ b/vendor/yunion.io/x/cloudmux/pkg/apis/compute/cloudaccount_const.go @@ -48,6 +48,7 @@ const ( CLOUD_PROVIDER_ORACLE = "OracleCloud" CLOUD_PROVIDER_SANGFOR = "SangFor" CLOUD_PROVIDER_ZETTAKIT = "ZettaKit" + CLOUD_PROVIDER_UIS = "UIS" CLOUD_PROVIDER_GENERICS3 = "S3" CLOUD_PROVIDER_CEPH = "Ceph" diff --git a/vendor/yunion.io/x/cloudmux/pkg/apis/compute/guest_const.go b/vendor/yunion.io/x/cloudmux/pkg/apis/compute/guest_const.go index 8ed50f62308..92db4b3b7c2 100644 --- a/vendor/yunion.io/x/cloudmux/pkg/apis/compute/guest_const.go +++ b/vendor/yunion.io/x/cloudmux/pkg/apis/compute/guest_const.go @@ -81,6 +81,7 @@ const ( HYPERVISOR_ORACLE = "oracle" HYPERVISOR_SANGFOR = "sangfor" HYPERVISOR_ZETTAKIT = "zettakit" + HYPERVISOR_UIS = "uis" ) const ( diff --git a/vendor/yunion.io/x/cloudmux/pkg/apis/compute/host_const.go b/vendor/yunion.io/x/cloudmux/pkg/apis/compute/host_const.go index def359d8a11..fb320206223 100644 --- a/vendor/yunion.io/x/cloudmux/pkg/apis/compute/host_const.go +++ b/vendor/yunion.io/x/cloudmux/pkg/apis/compute/host_const.go @@ -50,6 +50,7 @@ const ( HOST_TYPE_ORACLE = "oracle" HOST_TYPE_SANGFOR = "sangfor" HOST_TYPE_ZETTAKIT = "zettakit" + HOST_TYPE_UIS = "uis" // # possible status HOST_ONLINE = "online"