compute

package
v0.0.0-...-30877e0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 34 Imported by: 112

Documentation

Index

Constants

View Source
const (
	ACCESS_GROUP_STATUS_AVAILABLE         = "available"
	ACCESS_GROUP_STATUS_DELETING          = "deleting"
	ACCESS_GROUP_STATUS_DELETE_FAILED     = "delete_failed"
	ACCESS_GROUP_STATUS_CREATING          = "creating"
	ACCESS_GROUP_STATUS_SYNC_RULES        = "sync_rules"
	ACCESS_GROUP_STATUS_SYNC_RULES_FAILED = "sync_rules_failed"
	ACCESS_GROUP_STATUS_UNKNOWN           = "unknown"
)
View Source
const (
	BAREMETAL_AGENT_ENABLED  = "enabled"
	BAREMETAL_AGENT_DISABLED = "disabled"
	BAREMETAL_AGENT_OFFLINE  = "offline"
)
View Source
const (
	AgentTypeBaremetal = TAgentType("baremetal")
	AgentTypeEsxi      = TAgentType("esxiagent")
	AgentTypeDefault   = AgentTypeBaremetal
)
View Source
const (
	APP_TYPE_WEB = "web"

	APP_STATUS_READY   = "ready"
	APP_STATUS_UNKNOWN = "unknown"
)
View Source
const (
	BACKUPSTORAGE_TYPE_NFS            = TBackupStorageType("nfs")
	BACKUPSTORAGE_TYPE_OBJECT_STORAGE = TBackupStorageType("object")

	BACKUPSTORAGE_STATUS_ONLINE  = "online"
	BACKUPSTORAGE_STATUS_OFFLINE = "offline"

	BACKUP_STATUS_CREATING                = "creating"
	BACKUP_STATUS_CREATE_FAILED           = "create_failed"
	BACKUP_STATUS_SNAPSHOT                = "snapshot"
	BACKUP_STATUS_SNAPSHOT_FAILED         = "snapshot_failed"
	BACKUP_STATUS_SAVING                  = "saving"
	BACKUP_STATUS_SAVE_FAILED             = "save_failed"
	BACKUP_STATUS_CLEANUP_SNAPSHOT        = "clean_snapshot"
	BACKUP_STATUS_CLEANUP_SNAPSHOT_FAILED = "clean_snapshot_failed"
	BACKUP_STATUS_DELETING                = "deleting"
	BACKUP_STATUS_DELETE_FAILED           = "delete_failed"
	BACKUP_STATUS_READY                   = "ready"
	BACKUP_STATUS_RECOVERY                = "recovery"
	BACKUP_STATUS_RECOVERY_FAILED         = "recovery_failed"
	BACKUP_STATUS_UNKNOWN                 = "unknown"

	BACKUP_EXIST     = "exist"
	BACKUP_NOT_EXIST = "not_exist"
)
View Source
const (
	IPMIUserPrivUser  = "USER"
	IPMIUSERPrivAdmin = "ADMINISTRATOR"
)
View Source
const (
	DISK_CONF_RAID0  = "raid0"
	DISK_CONF_RAID1  = "raid1"
	DISK_CONF_RAID5  = "raid5"
	DISK_CONF_RAID10 = "raid10"
	DISK_CONF_NONE   = "none"

	DEFAULT_DISK_CONF = DISK_CONF_NONE

	DEFAULT_DISK_TYPE = DISK_TYPE_ROTATE

	DISK_DRIVER_MEGARAID    = "MegaRaid"
	DISK_DRIVER_LINUX       = "Linux"
	DISK_DRIVER_HPSARAID    = "HPSARaid"
	DISK_DRIVER_MPT2SAS     = "Mpt2SAS"
	DISK_DRIVER_MARVELRAID  = "MarvelRaid"
	DISK_DRIVER_ADAPTECRAID = "AdaptecRaid"
	DISK_DRIVER_PCIE        = "PCIE"

	HDD_DISK_SPEC_TYPE = "HDD"
	SSD_DISK_SPEC_TYPE = "SSD"
)
View Source
const (
	BUCKET_OPS_STATS_CHANGE = "stats_change"

	BUCKET_STATUS_START_CREATE = "start_create"
	BUCKET_STATUS_CREATING     = "creating"
	BUCKET_STATUS_READY        = compute.BUCKET_STATUS_READY
	BUCKET_STATUS_CREATE_FAIL  = "create_fail"
	BUCKET_STATUS_START_DELETE = "start_delete"
	BUCKET_STATUS_DELETING     = "deleting"
	BUCKET_STATUS_DELETED      = "deleted"
	BUCKET_STATUS_DELETE_FAIL  = "delete_fail"
	BUCKET_STATUS_UNKNOWN      = "unknown"

	BUCKET_UPLOAD_OBJECT_KEY_HEADER          = "X-Yunion-Bucket-Upload-Key"
	BUCKET_UPLOAD_OBJECT_ACL_HEADER          = "X-Yunion-Bucket-Upload-Acl"
	BUCKET_UPLOAD_OBJECT_STORAGECLASS_HEADER = "X-Yunion-Bucket-Upload-Storageclass"
)
View Source
const (
	CACHED_IMAGE_STATUS_INIT         = compute.CACHED_IMAGE_STATUS_INIT
	CACHED_IMAGE_STATUS_SAVING       = compute.CACHED_IMAGE_STATUS_SAVING
	CACHED_IMAGE_STATUS_CACHING      = compute.CACHED_IMAGE_STATUS_CACHING
	CACHED_IMAGE_STATUS_ACTIVE       = compute.CACHED_IMAGE_STATUS_ACTIVE
	CACHED_IMAGE_STATUS_DELETING     = compute.CACHED_IMAGE_STATUS_DELETING
	CACHED_IMAGE_STATUS_CACHE_FAILED = compute.CACHED_IMAGE_STATUS_CACHE_FAILED
	CACHED_IMAGE_STATUS_UNKNOWN      = compute.CACHED_IMAGE_STATUS_UNKNOWN

	DOWNLOAD_SESSION_LENGTH = 3600 * 3 // 3 hour
)
View Source
const (
	CACHED_IMAGE_REFRESH_SECONDS                  = 1     // 1 second
	CACHED_IMAGE_REFERENCE_SESSION_EXPIRE_SECONDS = 86400 // 1 day
)
View Source
const (
	CDN_DOMAIN_STATUS_ONLINE        = compute.CDN_DOMAIN_STATUS_ONLINE
	CDN_DOMAIN_STATUS_OFFLINE       = compute.CDN_DOMAIN_STATUS_OFFLINE
	CDN_DOMAIN_STATUS_DELETING      = "deleting"
	CDN_DOMAIN_STATUS_DELETE_FAILED = "delete_failed"
	CDN_DOMAIN_STATUS_PROCESSING    = compute.CDN_DOMAIN_STATUS_PROCESSING
	CDN_DOMAIN_STATUS_REJECTED      = compute.CDN_DOMAIN_STATUS_REJECTED
	CDN_DOMAIN_STATUS_UNKNOWN       = "unknown"

	CDN_DOMAIN_AREA_MAINLAND       = compute.CDN_DOMAIN_AREA_MAINLAND
	CDN_DOMAIN_AREA_OVERSEAS       = compute.CDN_DOMAIN_AREA_OVERSEAS
	CDN_DOMAIN_AREA_GLOBAL         = compute.CDN_DOMAIN_AREA_GLOBAL
	CDN_DOMAIN_ORIGIN_TYPE_DOMAIN  = "domain"
	CDN_DOMAIN_ORIGIN_TYPE_IP      = "ip"
	CDN_DOMAIN_ORIGIN_TYPE_BUCKET  = compute.CDN_DOMAIN_ORIGIN_TYPE_BUCKET
	CDN_DOMAIN_ORIGIN_THIRED_PARTY = "third_party"

	// Qcloud
	CDN_SERVICE_TYPE_WEB      = "web"      // 静态加速
	CND_SERVICE_TYPE_DOWNLOAD = "download" // 下载加速
	CND_SERVICE_TYPE_MEDIA    = "media"    // 流媒体点播加速
)
View Source
const (
	CLOUD_PROVIDER_INIT          = "init"
	CLOUD_PROVIDER_CONNECTED     = "connected"
	CLOUD_PROVIDER_DISCONNECTED  = "disconnected"
	CLOUD_PROVIDER_START_DELETE  = "start_delete"
	CLOUD_PROVIDER_DELETING      = "deleting"
	CLOUD_PROVIDER_DELETED       = "deleted"
	CLOUD_PROVIDER_DELETE_FAILED = "delete_failed"
	CLOUD_PROVIDER_SYNC_NETWORK  = "sync_network"

	CLOUD_PROVIDER_SYNC_NETWORK_FAILED = "sync_net_failed"

	CLOUD_PROVIDER_SYNC_STATUS_QUEUING = "queuing"
	CLOUD_PROVIDER_SYNC_STATUS_QUEUED  = "queued"
	CLOUD_PROVIDER_SYNC_STATUS_SYNCING = "syncing"
	CLOUD_PROVIDER_SYNC_STATUS_IDLE    = "idle"
	CLOUD_PROVIDER_SYNC_STATUS_ERROR   = "error"

	CLOUD_PROVIDER_ONECLOUD       = compute.CLOUD_PROVIDER_ONECLOUD
	CLOUD_PROVIDER_VMWARE         = compute.CLOUD_PROVIDER_VMWARE
	CLOUD_PROVIDER_NUTANIX        = compute.CLOUD_PROVIDER_NUTANIX
	CLOUD_PROVIDER_ALIYUN         = compute.CLOUD_PROVIDER_ALIYUN
	CLOUD_PROVIDER_APSARA         = compute.CLOUD_PROVIDER_APSARA
	CLOUD_PROVIDER_QCLOUD         = compute.CLOUD_PROVIDER_QCLOUD
	CLOUD_PROVIDER_AZURE          = compute.CLOUD_PROVIDER_AZURE
	CLOUD_PROVIDER_AWS            = compute.CLOUD_PROVIDER_AWS
	CLOUD_PROVIDER_HUAWEI         = compute.CLOUD_PROVIDER_HUAWEI
	CLOUD_PROVIDER_HCSO           = compute.CLOUD_PROVIDER_HCSO
	CLOUD_PROVIDER_HCSOP          = compute.CLOUD_PROVIDER_HCSOP
	CLOUD_PROVIDER_HCS            = compute.CLOUD_PROVIDER_HCS
	CLOUD_PROVIDER_OPENSTACK      = compute.CLOUD_PROVIDER_OPENSTACK
	CLOUD_PROVIDER_UCLOUD         = compute.CLOUD_PROVIDER_UCLOUD
	CLOUD_PROVIDER_VOLCENGINE     = compute.CLOUD_PROVIDER_VOLCENGINE
	CLOUD_PROVIDER_ZSTACK         = compute.CLOUD_PROVIDER_ZSTACK
	CLOUD_PROVIDER_GOOGLE         = compute.CLOUD_PROVIDER_GOOGLE
	CLOUD_PROVIDER_CTYUN          = compute.CLOUD_PROVIDER_CTYUN
	CLOUD_PROVIDER_ECLOUD         = compute.CLOUD_PROVIDER_ECLOUD
	CLOUD_PROVIDER_JDCLOUD        = compute.CLOUD_PROVIDER_JDCLOUD
	CLOUD_PROVIDER_CLOUDPODS      = compute.CLOUD_PROVIDER_CLOUDPODS
	CLOUD_PROVIDER_BINGO_CLOUD    = compute.CLOUD_PROVIDER_BINGO_CLOUD
	CLOUD_PROVIDER_INCLOUD_SPHERE = compute.CLOUD_PROVIDER_INCLOUD_SPHERE
	CLOUD_PROVIDER_PROXMOX        = compute.CLOUD_PROVIDER_PROXMOX
	CLOUD_PROVIDER_REMOTEFILE     = compute.CLOUD_PROVIDER_REMOTEFILE
	CLOUD_PROVIDER_H3C            = compute.CLOUD_PROVIDER_H3C
	CLOUD_PROVIDER_KSYUN          = compute.CLOUD_PROVIDER_KSYUN
	CLOUD_PROVIDER_BAIDU          = compute.CLOUD_PROVIDER_BAIDU
	CLOUD_PROVIDER_CUCLOUD        = compute.CLOUD_PROVIDER_CUCLOUD
	CLOUD_PROVIDER_QINGCLOUD      = compute.CLOUD_PROVIDER_QINGCLOUD
	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_CAS            = compute.CLOUD_PROVIDER_CAS

	CLOUD_PROVIDER_GENERICS3 = compute.CLOUD_PROVIDER_GENERICS3
	CLOUD_PROVIDER_CEPH      = compute.CLOUD_PROVIDER_CEPH
	CLOUD_PROVIDER_XSKY      = compute.CLOUD_PROVIDER_XSKY
	CLOUD_PROVIDER_CEPHFS    = compute.CLOUD_PROVIDER_CEPHFS

	CLOUD_PROVIDER_HEALTH_NORMAL        = compute.CLOUD_PROVIDER_HEALTH_NORMAL        // 远端处于健康状态
	CLOUD_PROVIDER_HEALTH_INSUFFICIENT  = compute.CLOUD_PROVIDER_HEALTH_INSUFFICIENT  // 不足按需资源余额
	CLOUD_PROVIDER_HEALTH_SUSPENDED     = compute.CLOUD_PROVIDER_HEALTH_SUSPENDED     // 远端处于冻结状态
	CLOUD_PROVIDER_HEALTH_ARREARS       = compute.CLOUD_PROVIDER_HEALTH_ARREARS       // 远端处于欠费状态
	CLOUD_PROVIDER_HEALTH_UNKNOWN       = compute.CLOUD_PROVIDER_HEALTH_UNKNOWN       // 未知状态,查询失败
	CLOUD_PROVIDER_HEALTH_NO_PERMISSION = compute.CLOUD_PROVIDER_HEALTH_NO_PERMISSION // 没有权限获取账单信息

	ONECLOUD_BRAND_ONECLOUD = "OneCloud"

	CLOUD_ACCOUNT_WIRE_LEVEL_VCENTER    = "vcenter"
	CLOUD_ACCOUNT_WIRE_LEVEL_DATACENTER = "datacenter"
	CLOUD_ACCOUNT_WIRE_LEVEL_CLUSTER    = "cluster"
)
View Source
const (
	CLOUD_ACCESS_ENV_AWS_GLOBAL          = compute.CLOUD_ACCESS_ENV_AWS_GLOBAL
	CLOUD_ACCESS_ENV_AWS_CHINA           = compute.CLOUD_ACCESS_ENV_AWS_CHINA
	CLOUD_ACCESS_ENV_AZURE_GLOBAL        = compute.CLOUD_ACCESS_ENV_AZURE_GLOBAL
	CLOUD_ACCESS_ENV_AZURE_GERMAN        = compute.CLOUD_ACCESS_ENV_AZURE_GERMAN
	CLOUD_ACCESS_ENV_AZURE_US_GOVERNMENT = compute.CLOUD_ACCESS_ENV_AZURE_US_GOVERNMENT
	CLOUD_ACCESS_ENV_AZURE_CHINA         = compute.CLOUD_ACCESS_ENV_AZURE_CHINA
	CLOUD_ACCESS_ENV_ALIYUN_GLOBAL       = compute.CLOUD_ACCESS_ENV_ALIYUN_GLOBAL
	CLOUD_ACCESS_ENV_ALIYUN_FINANCE      = compute.CLOUD_ACCESS_ENV_ALIYUN_FINANCE
	CLOUD_ACCESS_ENV_CTYUN_CHINA         = compute.CLOUD_ACCESS_ENV_CTYUN_CHINA
	CLOUD_ACCESS_ENV_ECLOUD_CHINA        = compute.CLOUD_ACCESS_ENV_ECLOUD_CHINA
	CLOUD_ACCESS_ENV_JDCLOUD_CHINA       = compute.CLOUD_ACCESS_ENV_JDCLOUD_CHINA
)
View Source
const (
	CLOUD_ENV_PUBLIC_CLOUD  = cloudprovider.CLOUD_ENV_PUBLIC_CLOUD
	CLOUD_ENV_PRIVATE_CLOUD = cloudprovider.CLOUD_ENV_PRIVATE_CLOUD
	CLOUD_ENV_ON_PREMISE    = cloudprovider.CLOUD_ENV_ON_PREMISE

	CLOUD_ENV_PRIVATE_ON_PREMISE = cloudprovider.CLOUD_ENV_PRIVATE_ON_PREMISE
)
View Source
const (
	CLOUD_ACCOUNT_SHARE_MODE_ACCOUNT_DOMAIN  = apis.CLOUD_ACCOUNT_SHARE_MODE_ACCOUNT_DOMAIN
	CLOUD_ACCOUNT_SHARE_MODE_SYSTEM          = apis.CLOUD_ACCOUNT_SHARE_MODE_SYSTEM
	CLOUD_ACCOUNT_SHARE_MODE_PROVIDER_DOMAIN = apis.CLOUD_ACCOUNT_SHARE_MODE_PROVIDER_DOMAIN
)
View Source
const (
	CLOUD_PROVIDER_QUOTA_RANGE_CLOUDREGION   = "cloudregion"
	CLOUD_PROVIDER_QUOTA_RANGE_CLOUDPROVIDER = "cloudprovider"
)
View Source
const (
	CLOUD_REGION_STATUS_INSERVER     = compute.CLOUD_REGION_STATUS_INSERVER
	CLOUD_REGION_STATUS_OUTOFSERVICE = compute.CLOUD_REGION_STATUS_OUTOFSERVICE

	DEFAULT_REGION_ID = "default"
)
View Source
const (
	SERVICE_TYPE    = apis.SERVICE_TYPE_REGION
	SERVICE_VERSION = "v2"
	SERVER_TYPE_V2  = apis.SERVICE_TYPE_REGION + "_" + SERVICE_VERSION
)
View Source
const (
	CLOUD_PROVIDER_ONECLOUD_EN = "YunionCloud"
	CLOUD_PROVIDER_ONECLOUD_CN = "云联壹云"
)
View Source
const (
	CONTAINER_DEV_CPH_AMD_GPU      = "CPH_AMD_GPU"
	CONTAINER_DEV_CPH_AOSP_BINDER  = "CPH_AOSP_BINDER"
	CONTAINER_DEV_NETINT_CA_ASIC   = "NETINT_CA_ASIC"
	CONTAINER_DEV_NETINT_CA_QUADRA = "NETINT_CA_QUADRA"
	CONTAINER_DEV_NVIDIA_GPU       = "NVIDIA_GPU"
	CONTAINER_DEV_NVIDIA_MPS       = "NVIDIA_MPS"
	CONTAINER_DEV_ASCEND_NPU       = "ASCEND_NPU"
	CONTAINER_DEV_VASTAITECH_GPU   = "VASTAITECH_GPU"
)
View Source
const (
	CONTAINER_STATUS_PULLING_IMAGE       = "pulling_image"
	CONTAINER_STATUS_PULL_IMAGE_FAILED   = "pull_image_failed"
	CONTAINER_STATUS_PULLED_IMAGE        = "pulled_image"
	CONTAINER_STATUS_CREATING            = "creating"
	CONTAINER_STATUS_CREATE_FAILED       = "create_failed"
	CONTAINER_STATUS_SAVING_IMAGE        = "saving_image"
	CONTAINER_STATUS_SAVE_IMAGE_FAILED   = "save_image_failed"
	CONTAINER_STATUS_STARTING            = "starting"
	CONTAINER_STATUS_START_FAILED        = "start_failed"
	CONTAINER_STATUS_STOPPING            = "stopping"
	CONTAINER_STATUS_STOP_FAILED         = "stop_failed"
	CONTAINER_STATUS_SYNC_STATUS         = "sync_status"
	CONTAINER_STATUS_SYNC_STATUS_FAILED  = "sync_status_failed"
	CONTAINER_STATUS_UNKNOWN             = "unknown"
	CONTAINER_STATUS_CREATED             = "created"
	CONTAINER_STATUS_EXITED              = "exited"
	CONTAINER_STATUS_CRASH_LOOP_BACK_OFF = "crash_loop_back_off"
	CONTAINER_STATUS_RUNNING             = "running"
	CONTAINER_STATUS_DELETING            = "deleting"
	CONTAINER_STATUS_DELETE_FAILED       = "delete_failed"
	CONTAINER_STATUS_COMMITTING          = "committing"
	CONTAINER_STATUS_COMMIT_FAILED       = "commit_failed"
	// for health check
	CONTAINER_STATUS_PROBING      = "probing"
	CONTAINER_STATUS_PROBE_FAILED = "probe_failed"
	CONTAINER_STATUS_NET_FAILED   = "net_failed"
	// post overlay
	CONTAINER_STATUS_ADD_POST_OVERLY           = "adding_post_overly"
	CONTAINER_STATUS_ADD_POST_OVERLY_FAILED    = "add_post_overly_failed"
	CONTAINER_STATUS_REMOVE_POST_OVERLY        = "removing_post_overly"
	CONTAINER_STATUS_REMOVE_POST_OVERLY_FAILED = "remove_post_overly_failed"
)
View Source
const (
	CONTAINER_METADATA_CRI_ID           = "cri_id"
	CONTAINER_METADATA_RELEASED_DEVICES = "released_devices"
)
View Source
const (
	//实例状态
	DBINSTANCE_INIT                  = compute.DBINSTANCE_INIT       //初始化
	DBINSTANCE_DEPLOYING             = compute.DBINSTANCE_DEPLOYING  //部署中
	DBINSTANCE_RUNNING               = compute.DBINSTANCE_RUNNING    //运行中
	DBINSTANCE_REBOOTING             = compute.DBINSTANCE_REBOOTING  //重启中
	DBINSTANCE_MIGRATING             = compute.DBINSTANCE_MIGRATING  //迁移中
	DBINSTANCE_BACKING_UP            = compute.DBINSTANCE_BACKING_UP //备份中
	DBINSTANCE_BACKING_UP_FAILED     = "backing_up_failed"           //备份失败
	DBINSTANCE_RESTORING             = compute.DBINSTANCE_RESTORING  //备份恢复中
	DBINSTANCE_RESTORE_FAILED        = "restore_failed"
	DBINSTANCE_IMPORTING             = compute.DBINSTANCE_IMPORTING   //数据导入中
	DBINSTANCE_CLONING               = compute.DBINSTANCE_CLONING     //克隆中
	DBINSTANCE_DELETING              = compute.DBINSTANCE_DELETING    //删除中
	DBINSTANCE_DELETE_FAILED         = "delete_failed"                //删除失败
	DBINSTANCE_MAINTENANCE           = compute.DBINSTANCE_MAINTENANCE //维护中
	DBINSTANCE_ISOLATING             = compute.DBINSTANCE_ISOLATING   //隔离中
	DBINSTANCE_ISOLATE               = compute.DBINSTANCE_ISOLATE     //已隔离
	DBINSTANCE_UPGRADING             = compute.DBINSTANCE_UPGRADING   //升级中
	DBINSTANCE_SET_AUTO_RENEW        = "set_auto_renew"               //设置自动续费中
	DBINSTANCE_SET_AUTO_RENEW_FAILED = "set_auto_renew_failed"        //设置自动续费失败
	DBINSTANCE_UNKNOWN               = compute.DBINSTANCE_UNKNOWN
	DBINSTANCE_SYNC_SECGROUP_FAILED  = "sync_secgroup_failed" // 同步安全组失败

	DBINSTANCE_CHANGE_CONFIG        = compute.DBINSTANCE_CHANGE_CONFIG //调整配置
	DBINSTANCE_CHANGE_CONFIG_FAILED = "change_config_failed"           //调整配置失败

	DBINSTANCE_RENEWING     = "renewing"     //续费中
	DBINSTANCE_RENEW_FAILED = "renew_failed" //续费失败

	DBINSTANCE_SYNC_CONFIG = "sync_config" //同步配置

	DBINSTANCE_REBOOT_FAILED = "reboot_failed"                  //重启失败
	DBINSTANCE_CREATE_FAILED = compute.DBINSTANCE_CREATE_FAILED //创建失败

	DBINSTANCE_FAILE = "failed" //操作失败

	DBINSTANCE_UPDATE_TAGS        = "update_tags"
	DBINSTANCE_UPDATE_TAGS_FAILED = "update_tags_fail"

	//备份状态
	DBINSTANCE_BACKUP_READY         = compute.DBINSTANCE_BACKUP_READY         //正常
	DBINSTANCE_BACKUP_CREATING      = compute.DBINSTANCE_BACKUP_CREATING      //创建中
	DBINSTANCE_BACKUP_CREATE_FAILED = compute.DBINSTANCE_BACKUP_CREATE_FAILED //创建失败
	DBINSTANCE_BACKUP_DELETING      = compute.DBINSTANCE_BACKUP_DELETING      //删除中
	DBINSTANCE_BACKUP_DELETE_FAILED = "delete_failed"                         //删除失败
	DBINSTANCE_BACKUP_FAILED        = compute.DBINSTANCE_BACKUP_FAILED        //异常
	DBINSTANCE_BACKUP_UNKNOWN       = compute.DBINSTANCE_BACKUP_UNKNOWN       //未知

	//备份模式
	BACKUP_MODE_AUTOMATED = compute.BACKUP_MODE_AUTOMATED //自动
	BACKUP_MODE_MANUAL    = compute.BACKUP_MODE_MANUAL    //手动

	//实例数据库状态
	DBINSTANCE_DATABASE_CREATING        = compute.DBINSTANCE_DATABASE_CREATING //创建中
	DBINSTANCE_DATABASE_CREATE_FAILE    = "create_failed"                      //创建失败
	DBINSTANCE_DATABASE_RUNNING         = compute.DBINSTANCE_DATABASE_RUNNING  //正常
	DBINSTANCE_DATABASE_GRANT_PRIVILEGE = "grant_privilege"                    //赋予权限中
	DBINSTANCE_DATABASE_DELETING        = compute.DBINSTANCE_DATABASE_DELETING //删除中
	DBINSTANCE_DATABASE_DELETE_FAILED   = "delete_failed"                      //删除失败

	//实例用户状态
	DBINSTANCE_USER_UNAVAILABLE         = compute.DBINSTANCE_USER_UNAVAILABLE //不可用
	DBINSTANCE_USER_AVAILABLE           = compute.DBINSTANCE_USER_AVAILABLE   //正常
	DBINSTANCE_USER_CREATING            = compute.DBINSTANCE_USER_CREATING    //创建中
	DBINSTANCE_USER_CREATE_FAILED       = "create_failed"                     //创建失败
	DBINSTANCE_USER_DELETING            = compute.DBINSTANCE_USER_DELETING    //删除中
	DBINSTANCE_USER_DELETE_FAILED       = "delete_failed"                     //删除失败
	DBINSTANCE_USER_RESET_PASSWD        = "reset_passwd"                      //重置密码中
	DBINSTANCE_USER_GRANT_PRIVILEGE     = "grant_privilege"                   //赋予权限中
	DBINSTANCE_USER_SET_PRIVILEGE       = "set_privilege"                     //设置权限中
	DBINSTANCE_USER_REVOKE_PRIVILEGE    = "revoke_privilege"                  //解除权限中
	DBINSTANCE_USER_RESET_PASSWD_FAILED = "reset_passwd_failed"               //重置密码失败

	//数据库权限
	DATABASE_PRIVILEGE_RW     = compute.DATABASE_PRIVILEGE_RW //读写
	DATABASE_PRIVILEGE_R      = compute.DATABASE_PRIVILEGE_R  //只读
	DATABASE_PRIVILEGE_DDL    = compute.DATABASE_PRIVILEGE_DDL
	DATABASE_PRIVILEGE_DML    = compute.DATABASE_PRIVILEGE_DML
	DATABASE_PRIVILEGE_OWNER  = compute.DATABASE_PRIVILEGE_OWNER
	DATABASE_PRIVILEGE_CUSTOM = compute.DATABASE_PRIVILEGE_CUSTOM //自定义

	DBINSTANCE_TYPE_MYSQL      = compute.DBINSTANCE_TYPE_MYSQL
	DBINSTANCE_TYPE_SQLSERVER  = compute.DBINSTANCE_TYPE_SQLSERVER
	DBINSTANCE_TYPE_POSTGRESQL = compute.DBINSTANCE_TYPE_POSTGRESQL
	DBINSTANCE_TYPE_MARIADB    = compute.DBINSTANCE_TYPE_MARIADB
	DBINSTANCE_TYPE_ORACLE     = compute.DBINSTANCE_TYPE_ORACLE
	DBINSTANCE_TYPE_PPAS       = compute.DBINSTANCE_TYPE_PPAS
	DBINSTANCE_TYPE_PERCONA    = compute.DBINSTANCE_TYPE_PERCONA
	DBINSTANCE_TYPE_AURORA     = compute.DBINSTANCE_TYPE_AURORA

	//阿里云实例类型
	ALIYUN_DBINSTANCE_CATEGORY_BASIC    = compute.ALIYUN_DBINSTANCE_CATEGORY_BASIC    //基础版
	ALIYUN_DBINSTANCE_CATEGORY_HA       = compute.ALIYUN_DBINSTANCE_CATEGORY_HA       //高可用
	ALIYUN_DBINSTANCE_CATEGORY_ALWAYSON = compute.ALIYUN_DBINSTANCE_CATEGORY_ALWAYSON //集群版
	ALIYUN_DBINSTANCE_CATEGORY_FINANCE  = compute.ALIYUN_DBINSTANCE_CATEGORY_FINANCE  //金融版

	//腾讯云实例类型
	QCLOUD_DBINSTANCE_CATEGORY_BASIC   = compute.QCLOUD_DBINSTANCE_CATEGORY_BASIC   //基础版
	QCLOUD_DBINSTANCE_CATEGORY_HA      = compute.QCLOUD_DBINSTANCE_CATEGORY_HA      //高可用
	QCLOUD_DBINSTANCE_CATEGORY_FINANCE = compute.QCLOUD_DBINSTANCE_CATEGORY_FINANCE //金融版
	QCLOUD_DBINSTANCE_CATEGORY_TDSQL   = compute.QCLOUD_DBINSTANCE_CATEGORY_TDSQL   //TDSQL

	//阿里云存储类型
	ALIYUN_DBINSTANCE_STORAGE_TYPE_LOCAL_SSD  = compute.ALIYUN_DBINSTANCE_STORAGE_TYPE_LOCAL_SSD  //本地盘SSD盘
	ALIYUN_DBINSTANCE_STORAGE_TYPE_CLOUD_ESSD = compute.ALIYUN_DBINSTANCE_STORAGE_TYPE_CLOUD_ESSD //ESSD云盘
	ALIYUN_DBINSTANCE_STORAGE_TYPE_CLOUD_SSD  = compute.ALIYUN_DBINSTANCE_STORAGE_TYPE_CLOUD_SSD  //SSD云盘

	//华为云存储类型
	HUAWEI_DBINSTANCE_STORAGE_TYPE_ULTRAHIGH    = compute.HUAWEI_DBINSTANCE_STORAGE_TYPE_ULTRAHIGH //超高IO云硬盘
	HUAWEI_DBINSTANCE_STORAGE_TYPE_ULTRAHIGHPRO = compute.HUAWEI_DBINSTANCE_STORAGE_TYPE_ULTRAHIGHPRO
	HUAWEI_DBINSTANCE_STORAGE_TYPE_COMMON       = compute.HUAWEI_DBINSTANCE_STORAGE_TYPE_COMMON
	HUAWEI_DBINSTANCE_STORAGE_TYPE_HIGH         = compute.HUAWEI_DBINSTANCE_STORAGE_TYPE_HIGH

	//腾讯云
	QCLOUD_DBINSTANCE_STORAGE_TYPE_LOCAL_SSD = compute.QCLOUD_DBINSTANCE_STORAGE_TYPE_LOCAL_SSD //本地盘SSD盘
	QCLOUD_DBINSTANCE_STORAGE_TYPE_CLOUD_SSD = compute.QCLOUD_DBINSTANCE_STORAGE_TYPE_CLOUD_SSD //SSD云盘

	// Azure
	AZURE_DBINSTANCE_STORAGE_TYPE_DEFAULT = compute.AZURE_DBINSTANCE_STORAGE_TYPE_DEFAULT
)
View Source
const (
	DBINSTANCE_SKU_AVAILABLE = compute.DBINSTANCE_SKU_AVAILABLE
	DBINSTANCE_SKU_SOLDOUT   = compute.DBINSTANCE_SKU_SOLDOUT
)
View Source
const (
	DISK_INIT                = compute.DISK_INIT
	DISK_REBUILD             = compute.DISK_REBUILD
	DISK_REBUILD_FAILED      = "rebuild_failed"
	DISK_ALLOC_FAILED        = compute.DISK_ALLOC_FAILED
	DISK_STARTALLOC          = "start_alloc"
	DISK_BACKUP_STARTALLOC   = compute.DISK_BACKUP_STARTALLOC
	DISK_BACKUP_ALLOC_FAILED = compute.DISK_BACKUP_ALLOC_FAILED
	DISK_ALLOCATING          = compute.DISK_ALLOCATING
	DISK_READY               = compute.DISK_READY
	DISK_RESET               = compute.DISK_RESET
	DISK_RESET_FAILED        = compute.DISK_RESET_FAILED
	DISK_DEALLOC             = compute.DISK_DEALLOC
	DISK_DEALLOC_FAILED      = compute.DISK_DEALLOC_FAILED
	DISK_UNKNOWN             = compute.DISK_UNKNOWN
	DISK_DETACHING           = compute.DISK_DETACHING
	DISK_ATTACHING           = compute.DISK_ATTACHING
	DISK_CLONING             = compute.DISK_CLONING // 硬盘克隆

	DISK_START_SAVE = "start_save"
	DISK_SAVING     = compute.DISK_SAVING

	DISK_START_RESIZE  = "start_resize"
	DISK_RESIZING      = compute.DISK_RESIZING
	DISK_RESIZE_FAILED = compute.DISK_RESIZE_FAILED

	DISK_START_MIGRATE = "start_migrate"
	DISK_POST_MIGRATE  = "post_migrate"
	DISK_MIGRATING     = "migrating"
	DISK_MIGRATE_FAIL  = "migrate_failed"
	DISK_IMAGE_CACHING = "image_caching" // 缓存镜像中

	DISK_CLONE      = "clone"
	DISK_CLONE_FAIL = "clone_failed"

	DISK_START_SNAPSHOT       = "start_snapshot"
	DISK_SNAPSHOTING          = "snapshoting"
	DISK_APPLY_SNAPSHOT_FAIL  = "apply_snapshot_failed"
	DISK_CALCEL_SNAPSHOT_FAIL = "cancel_snapshot_failed"

	DISK_TYPE_SYS    = compute.DISK_TYPE_SYS
	DISK_TYPE_SWAP   = compute.DISK_TYPE_SWAP
	DISK_TYPE_DATA   = compute.DISK_TYPE_DATA
	DISK_TYPE_VOLUME = "volume"

	DISK_BACKING_IMAGE = "image"

	DISK_SIZE_AUTOEXTEND = -1

	DISK_NOT_EXIST = "not_exist"
	DISK_EXIST     = "exist"

	DISK_PREALLOCATION_OFF = "off"
	// 精简置备
	DISK_PREALLOCATION_METADATA = "metadata"
	// 厚置备延迟归零
	DISK_PREALLOCATION_FALLOC = "falloc"
	// 厚置备快速归零
	DISK_PREALLOCATION_FULL = "full"
)
View Source
const (
	DISK_META_EXISTING_PATH      = "disk_existing_path"
	DISK_META_LAST_ATTACHED_HOST = "__disk_last_attached_host"
)
View Source
const (
	DISK_DRIVER_VIRTIO = "virtio"
	DISK_DRIVER_SCSI   = "scsi"
	DISK_DRIVER_PVSCSI = "pvscsi"
	DISK_DRIVER_IDE    = "ide"
	DISK_DRIVER_SATA   = "sata"
	DISK_DRIVER_VFIO   = "vfio-pci"
)
View Source
const (
	DNS_RECORDSET_STATUS_AVAILABLE = compute.DNS_RECORDSET_STATUS_AVAILABLE
	DNS_RECORDSET_STATUS_CREATING  = apis.STATUS_CREATING
)
View Source
const (
	DNS_ZONE_STATUS_AVAILABLE     = compute.DNS_ZONE_STATUS_AVAILABLE // 可用
	DNS_ZONE_STATUS_CREATING      = "creating"                        // 创建中
	DNS_ZONE_STATUS_CREATE_FAILE  = "create_failed"                   // 创建失败
	DNS_ZONE_STATUS_DELETING      = "deleting"                        // 删除中
	DNS_ZONE_STATUS_DELETE_FAILED = "delete_failed"                   // 删除失败
	DNS_ZONE_STATUS_UNKNOWN       = compute.DNS_ZONE_STATUS_UNKNOWN   // 未知
)
View Source
const (
	ELASTIC_SEARCH_STATUS_AVAILABLE     = compute.ELASTIC_SEARCH_STATUS_AVAILABLE
	ELASTIC_SEARCH_STATUS_UNAVAILABLE   = compute.ELASTIC_SEARCH_STATUS_UNAVAILABLE
	ELASITC_SEARCH_STATUS_CREATING      = compute.ELASITC_SEARCH_STATUS_CREATING
	ELASTIC_SEARCH_STATUS_DELETING      = compute.ELASTIC_SEARCH_STATUS_DELETING
	ELASTIC_SEARCH_STATUS_DELETE_FAILED = "delete_failed"
	ELASTIC_SEARCH_STATUS_UNKNOWN       = "unknown"
)
View Source
const (
	ELASTIC_SEARCH_UPDATE_TAGS        = "update_tags"
	ELASTIC_SEARCH_UPDATE_TAGS_FAILED = "update_tags_fail"
)
View Source
const (
	ELASTIC_CACHE_STATUS_RUNNING               = compute.ELASTIC_CACHE_STATUS_RUNNING               //(正常)
	ELASTIC_CACHE_STATUS_RESTARTING            = compute.ELASTIC_CACHE_STATUS_RESTARTING            //(重启中)
	ELASTIC_CACHE_STATUS_RESTART_FAILED        = "restart_failed"                                   //(重启失败)
	ELASTIC_CACHE_STATUS_DEPLOYING             = compute.ELASTIC_CACHE_STATUS_DEPLOYING             //(创建中)
	ELASTIC_CACHE_STATUS_CREATE_FAILED         = compute.ELASTIC_CACHE_STATUS_CREATE_FAILED         //(创建失败)
	ELASTIC_CACHE_STATUS_CHANGING              = compute.ELASTIC_CACHE_STATUS_CHANGING              //(修改中)
	ELASTIC_CACHE_STATUS_CHANGE_FAILED         = compute.ELASTIC_CACHE_STATUS_CHANGE_FAILED         //(修改失败)
	ELASTIC_CACHE_STATUS_INACTIVE              = compute.ELASTIC_CACHE_STATUS_INACTIVE              //(被禁用)
	ELASTIC_CACHE_STATUS_FLUSHING              = compute.ELASTIC_CACHE_STATUS_FLUSHING              //(清除中)
	ELASTIC_CACHE_STATUS_FLUSHING_FAILED       = "flushing_failed"                                  //(清除失败)
	ELASTIC_CACHE_STATUS_RELEASING             = compute.ELASTIC_CACHE_STATUS_RELEASING             //(释放中)
	ELASTIC_CACHE_STATUS_RELEASED              = compute.ELASTIC_CACHE_STATUS_RELEASED              //(已释放)
	ELASTIC_CACHE_STATUS_RELEASE_FAILED        = "release_failed"                                   //(释放失败)
	ELASTIC_CACHE_STATUS_TRANSFORMING          = compute.ELASTIC_CACHE_STATUS_TRANSFORMING          //(转换中)
	ELASTIC_CACHE_STATUS_UNAVAILABLE           = compute.ELASTIC_CACHE_STATUS_UNAVAILABLE           //(服务停止)
	ELASTIC_CACHE_STATUS_ERROR                 = compute.ELASTIC_CACHE_STATUS_ERROR                 //(删除失败)
	ELASTIC_CACHE_STATUS_MIGRATING             = compute.ELASTIC_CACHE_STATUS_MIGRATING             //(迁移中)
	ELASTIC_CACHE_STATUS_BACKUPRECOVERING      = compute.ELASTIC_CACHE_STATUS_BACKUPRECOVERING      //(备份恢复中)
	ELASTIC_CACHE_STATUS_MINORVERSIONUPGRADING = compute.ELASTIC_CACHE_STATUS_MINORVERSIONUPGRADING //(小版本升级中)
	ELASTIC_CACHE_STATUS_NETWORKMODIFYING      = compute.ELASTIC_CACHE_STATUS_NETWORKMODIFYING      //(网络变更中)
	ELASTIC_CACHE_STATUS_SSLMODIFYING          = compute.ELASTIC_CACHE_STATUS_SSLMODIFYING          //(SSL变更中)
	ELASTIC_CACHE_STATUS_MAJORVERSIONUPGRADING = compute.ELASTIC_CACHE_STATUS_MAJORVERSIONUPGRADING //(大版本升级中,可正常访问)
	ELASTIC_CACHE_STATUS_UNKNOWN               = compute.ELASTIC_CACHE_STATUS_UNKNOWN               //(未知状态)
	ELASTIC_CACHE_STATUS_DELETING              = compute.ELASTIC_CACHE_STATUS_DELETING              // (删除)
	ELASTIC_CACHE_STATUS_SNAPSHOTTING          = compute.ELASTIC_CACHE_STATUS_SNAPSHOTTING          //(快照)
	ELASTIC_CACHE_STATUS_SYNCING               = "syncing"                                          //(同步中)
	ELASTIC_CACHE_STATUS_SYNC_FAILED           = "sync_failed"                                      //(同步失败)
	ELASTIC_CACHE_RENEWING                     = "renewing"                                         //(续费中)
	ELASTIC_CACHE_RENEW_FAILED                 = "renew_failed"                                     //(续费失败)
	ELASTIC_CACHE_SET_AUTO_RENEW               = "set_auto_renew"                                   //(设置自动续费)
	ELASTIC_CACHE_SET_AUTO_RENEW_FAILED        = "set_auto_renew_failed"                            //(设置自动续费失败)

	ELASTIC_CACHE_ENGINE_REDIS     = compute.ELASTIC_CACHE_ENGINE_REDIS
	ELASTIC_CACHE_ENGINE_MEMCACHED = compute.ELASTIC_CACHE_ENGINE_MEMCACHED
)
View Source
const (
	ELASTIC_CACHE_ACCOUNT_STATUS_AVAILABLE     = compute.ELASTIC_CACHE_ACCOUNT_STATUS_AVAILABLE   // 正常可用
	ELASTIC_CACHE_ACCOUNT_STATUS_UNAVAILABLE   = compute.ELASTIC_CACHE_ACCOUNT_STATUS_UNAVAILABLE // 不可用
	ELASTIC_CACHE_ACCOUNT_STATUS_CREATING      = compute.ELASTIC_CACHE_ACCOUNT_STATUS_CREATING
	ELASTIC_CACHE_ACCOUNT_STATUS_MODIFYING     = compute.ELASTIC_CACHE_ACCOUNT_STATUS_MODIFYING // 修改中
	ELASTIC_CACHE_ACCOUNT_STATUS_CREATE_FAILED = "create_failed"                                //(创建失败)
	ELASTIC_CACHE_ACCOUNT_STATUS_DELETING      = compute.ELASTIC_CACHE_ACCOUNT_STATUS_DELETING  // 删除中
	ELASTIC_CACHE_ACCOUNT_STATUS_DELETE_FAILED = "delete_failed"                                // 删除失败
	ELASTIC_CACHE_ACCOUNT_STATUS_DELETED       = compute.ELASTIC_CACHE_ACCOUNT_STATUS_DELETED   // 已删除
)
View Source
const (
	ELASTIC_CACHE_UPDATE_TAGS        = "update_tags"
	ELASTIC_CACHE_UPDATE_TAGS_FAILED = "update_tags_fail"
)
View Source
const (
	ELASTIC_CACHE_ACCOUNT_TYPE_NORMAL = compute.ELASTIC_CACHE_ACCOUNT_TYPE_NORMAL // 普通账号
	ELASTIC_CACHE_ACCOUNT_TYPE_ADMIN  = compute.ELASTIC_CACHE_ACCOUNT_TYPE_ADMIN  // 管理账号
)
View Source
const (
	ELASTIC_CACHE_ACCOUNT_PRIVILEGE_READ  = compute.ELASTIC_CACHE_ACCOUNT_PRIVILEGE_READ  // 只读
	ELASTIC_CACHE_ACCOUNT_PRIVILEGE_WRITE = compute.ELASTIC_CACHE_ACCOUNT_PRIVILEGE_WRITE // 读写
	ELASTIC_CACHE_ACCOUNT_PRIVILEGE_REPL  = compute.ELASTIC_CACHE_ACCOUNT_PRIVILEGE_REPL  // 复制,复制权限支持读写,且支持使用SYNC/PSYNC命令。
)
View Source
const (
	ELASTIC_CACHE_BACKUP_STATUS_CREATING       = compute.ELASTIC_CACHE_BACKUP_STATUS_CREATING // 备份中
	ELASTIC_CACHE_BACKUP_STATUS_RESTORING      = compute.ELASTIC_CACHE_BACKUP_STATUS_RESTORING
	ELASTIC_CACHE_BACKUP_STATUS_COPYING        = compute.ELASTIC_CACHE_BACKUP_STATUS_COPYING
	ELASTIC_CACHE_BACKUP_STATUS_CREATE_EXPIRED = compute.ELASTIC_CACHE_BACKUP_STATUS_CREATE_EXPIRED //(备份文件已过期)
	ELASTIC_CACHE_BACKUP_STATUS_CREATE_DELETED = compute.ELASTIC_CACHE_BACKUP_STATUS_CREATE_DELETED //(备份文件已删除)
	ELASTIC_CACHE_BACKUP_STATUS_DELETING       = compute.ELASTIC_CACHE_BACKUP_STATUS_DELETING       // 删除中
	ELASTIC_CACHE_BACKUP_STATUS_SUCCESS        = compute.ELASTIC_CACHE_BACKUP_STATUS_SUCCESS        // 备份成功
	ELASTIC_CACHE_BACKUP_STATUS_FAILED         = compute.ELASTIC_CACHE_BACKUP_STATUS_FAILED         // 备份失败
	ELASTIC_CACHE_BACKUP_STATUS_UNKNOWN        = compute.ELASTIC_CACHE_BACKUP_STATUS_UNKNOWN        // 未知
)
View Source
const (
	ELASTIC_CACHE_BACKUP_TYPE_FULL        = compute.ELASTIC_CACHE_BACKUP_TYPE_FULL        // 全量备份
	ELASTIC_CACHE_BACKUP_TYPE_INCREMENTAL = compute.ELASTIC_CACHE_BACKUP_TYPE_INCREMENTAL // 增量备份
)
View Source
const (
	ELASTIC_CACHE_BACKUP_MODE_AUTOMATED = compute.ELASTIC_CACHE_BACKUP_MODE_AUTOMATED // 自动备份
	ELASTIC_CACHE_BACKUP_MODE_MANUAL    = compute.ELASTIC_CACHE_BACKUP_MODE_MANUAL    // 手动触发备份
)
View Source
const (
	ELASTIC_CACHE_ACL_STATUS_AVAILABLE     = compute.ELASTIC_CACHE_ACL_STATUS_AVAILABLE // 正常可用
	ELASTIC_CACHE_ACL_STATUS_CREATING      = "creating"                                 // 创建中
	ELASTIC_CACHE_ACL_STATUS_CREATE_FAILED = "create_failed"                            //(创建失败)
	ELASTIC_CACHE_ACL_STATUS_DELETING      = "deleting"                                 // 删除中
	ELASTIC_CACHE_ACL_STATUS_DELETE_FAILED = "delete_failed"                            // 删除失败
	ELASTIC_CACHE_ACL_STATUS_UPDATING      = "updating"                                 // 更新中
	ELASTIC_CACHE_ACL_STATUS_UPDATE_FAILED = "update_failed"                            // 更新失败
)
View Source
const (
	ELASTIC_CACHE_PARAMETER_STATUS_AVAILABLE     = compute.ELASTIC_CACHE_PARAMETER_STATUS_AVAILABLE // 正常可用
	ELASTIC_CACHE_PARAMETER_STATUS_UPDATING      = "updating"                                       // 更新中
	ELASTIC_CACHE_PARAMETER_STATUS_UPDATE_FAILED = "update_failed"                                  // 更新失败
)
View Source
const (
	ELASTIC_CACHE_ARCH_TYPE_SINGLE  = compute.ELASTIC_CACHE_ARCH_TYPE_SINGLE  // 单副本
	ELASTIC_CACHE_ARCH_TYPE_MASTER  = compute.ELASTIC_CACHE_ARCH_TYPE_MASTER  // 主备
	ELASTIC_CACHE_ARCH_TYPE_CLUSTER = compute.ELASTIC_CACHE_ARCH_TYPE_CLUSTER // 集群
	ELASTIC_CACHE_ARCH_TYPE_RWSPLIT = compute.ELASTIC_CACHE_ARCH_TYPE_RWSPLIT // 读写分离
)
View Source
const (
	ELASTIC_CACHE_NODE_TYPE_SINGLE = compute.ELASTIC_CACHE_NODE_TYPE_SINGLE
	ELASTIC_CACHE_NODE_TYPE_DOUBLE = compute.ELASTIC_CACHE_NODE_TYPE_DOUBLE
	ELASTIC_CACHE_NODE_TYPE_THREE  = compute.ELASTIC_CACHE_NODE_TYPE_THREE
	ELASTIC_CACHE_NODE_TYPE_FOUR   = compute.ELASTIC_CACHE_NODE_TYPE_FOUR
	ELASTIC_CACHE_NODE_TYPE_FIVE   = compute.ELASTIC_CACHE_NODE_TYPE_FIVE
	ELASTIC_CACHE_NODE_TYPE_SIX    = compute.ELASTIC_CACHE_NODE_TYPE_SIX
)
View Source
const (
	EIP_MODE_INSTANCE_PUBLICIP = compute.EIP_MODE_INSTANCE_PUBLICIP
	EIP_MODE_STANDALONE_EIP    = compute.EIP_MODE_STANDALONE_EIP

	EIP_ASSOCIATE_TYPE_SERVER       = compute.EIP_ASSOCIATE_TYPE_SERVER
	EIP_ASSOCIATE_TYPE_NAT_GATEWAY  = compute.EIP_ASSOCIATE_TYPE_NAT_GATEWAY
	EIP_ASSOCIATE_TYPE_LOADBALANCER = compute.EIP_ASSOCIATE_TYPE_LOADBALANCER
	EIP_ASSOCIATE_TYPE_UNKNOWN      = compute.EIP_ASSOCIATE_TYPE_UNKNOWN

	EIP_ASSOCIATE_TYPE_INSTANCE_GROUP = compute.EIP_ASSOCIATE_TYPE_INSTANCE_GROUP

	EIP_STATUS_READY           = compute.EIP_STATUS_READY
	EIP_STATUS_UNKNOWN         = compute.EIP_STATUS_UNKNOWN
	EIP_STATUS_ALLOCATE        = compute.EIP_STATUS_ALLOCATE
	EIP_STATUS_ALLOCATE_FAIL   = compute.EIP_STATUS_ALLOCATE_FAIL
	EIP_STATUS_DEALLOCATE      = compute.EIP_STATUS_DEALLOCATE
	EIP_STATUS_DEALLOCATE_FAIL = "deallocate_fail"
	EIP_STATUS_ASSOCIATE       = compute.EIP_STATUS_ASSOCIATE
	EIP_STATUS_ASSOCIATE_FAIL  = "associate_fail"
	EIP_STATUS_DISSOCIATE      = compute.EIP_STATUS_DISSOCIATE
	EIP_STATUS_DISSOCIATE_FAIL = "dissociate_fail"

	EIP_STATUS_CHANGE_BANDWIDTH = "change_bandwidth"

	EIP_CHARGE_TYPE_BY_TRAFFIC   = compute.EIP_CHARGE_TYPE_BY_TRAFFIC
	EIP_CHARGE_TYPE_BY_BANDWIDTH = compute.EIP_CHARGE_TYPE_BY_BANDWIDTH

	INSTANCE_ASSOCIATE_EIP         = "associate_eip"
	INSTANCE_ASSOCIATE_EIP_FAILED  = "associate_eip_failed"
	INSTANCE_DISSOCIATE_EIP        = "dissociate_eip"
	INSTANCE_DISSOCIATE_EIP_FAILED = "dissociate_eip_failed"
)
View Source
const (
	EXTERNAL_PROJECT_STATUS_AVAILABLE   = compute.EXTERNAL_PROJECT_STATUS_AVAILABLE   // 可用
	EXTERNAL_PROJECT_STATUS_UNAVAILABLE = compute.EXTERNAL_PROJECT_STATUS_UNAVAILABLE // 不可用
	EXTERNAL_PROJECT_STATUS_CREATING    = compute.EXTERNAL_PROJECT_STATUS_CREATING    // 创建中
	EXTERNAL_PROJECT_STATUS_DELETING    = compute.EXTERNAL_PROJECT_STATUS_DELETING    // 删除中
	EXTERNAL_PROJECT_STATUS_UNKNOWN     = compute.EXTERNAL_PROJECT_STATUS_UNKNOWN     // 未知
)
View Source
const (
	// 可用
	NAS_STATUS_AVAILABLE = compute.NAS_STATUS_AVAILABLE
	// 不可用
	NAS_STATUS_UNAVAILABLE = compute.NAS_STATUS_UNAVAILABLE
	// 扩容中
	NAS_STATUS_EXTENDING = compute.NAS_STATUS_EXTENDING
	// 创建中
	NAS_STATUS_CREATING = compute.NAS_STATUS_CREATING
	// 创建失败
	NAS_STATUS_CREATE_FAILED = compute.NAS_STATUS_CREATE_FAILED
	// 未知
	NAS_STATUS_UNKNOWN = compute.NAS_STATUS_UNKNOWN
	// 删除中
	NAS_STATUS_DELETING      = compute.NAS_STATUS_DELETING
	NAS_STATUS_DELETE_FAILED = "delete_failed"

	NAS_UPDATE_TAGS        = "update_tags"
	NAS_UPDATE_TAGS_FAILED = "update_tags_fail"
)
View Source
const (
	GLOBAL_VPC_STATUS_AVAILABLE = compute.GLOBAL_VPC_STATUS_AVAILABLE
	GLOBAL_VPC_STATUS_UNKNOWN   = compute.GLOBAL_VPC_STATUS_UNKNOWN
)
View Source
const (
	VM_INIT                  = compute.VM_INIT
	VM_UNKNOWN               = compute.VM_UNKNOWN
	VM_SCHEDULE              = "schedule"
	VM_SCHEDULE_FAILED       = "sched_fail"
	VM_CREATE_NETWORK        = "network"
	VM_NETWORK_FAILED        = "net_fail"
	VM_DEVICE_FAILED         = "dev_fail"
	VM_CREATE_FAILED         = compute.VM_CREATE_FAILED
	VM_CREATE_DISK           = "disk"
	VM_DISK_FAILED           = "disk_fail"
	VM_SECURITY_GROUP_FAILED = "security_group_fail"
	VM_IMAGE_CACHING         = "image_caching" // 缓存镜像中
	VM_START_DEPLOY          = "start_deploy"
	VM_DEPLOYING             = compute.VM_DEPLOYING
	VM_DEPLOY_FAILED         = compute.VM_DEPLOY_FAILED
	VM_READY                 = compute.VM_READY
	VM_START_START           = compute.VM_START_START
	VM_STARTING              = compute.VM_STARTING
	VM_START_FAILED          = "start_fail" // # = ready
	VM_RUNNING               = compute.VM_RUNNING
	VM_START_STOP            = compute.VM_START_STOP
	VM_STOPPING              = compute.VM_STOPPING
	VM_STOP_FAILED           = "stop_fail" // # = running
	VM_RENEWING              = "renewing"
	VM_RENEW_FAILED          = "renew_failed"
	VM_ATTACH_DISK           = "attach_disk"
	VM_DETACH_DISK           = "detach_disk"
	VM_UNSYNC                = "unsync"

	VM_START_RESCUE        = "start_rescue"
	VM_RESCUE              = "rescue"
	VM_STOP_RESCUE         = "stop_rescue"
	VM_START_RESCUE_FAILED = "start_rescue_failed"
	VM_STOP_RESCUE_FAILED  = "stop_rescue_failed"

	VM_BACKUP_STARTING         = "backup_starting"
	VM_BACKUP_STOPING          = "backup_stopping"
	VM_BACKUP_CREATING         = "backup_creating"
	VM_BACKUP_START_FAILED     = "backup_start_failed"
	VM_BACKUP_CREATE_FAILED    = "backup_create_fail"
	VM_DEPLOYING_BACKUP        = "deploying_backup"
	VM_DEPLOYING_BACKUP_FAILED = "deploging_backup_fail"
	VM_DELETING_BACKUP         = "deleting_backup"
	VM_BACKUP_DELETE_FAILED    = "backup_delete_fail"
	VM_SWITCH_TO_BACKUP        = "switch_to_backup"
	VM_SWITCH_TO_BACKUP_FAILED = "switch_to_backup_fail"

	VM_ATTACH_DISK_FAILED = "attach_disk_fail"
	VM_DETACH_DISK_FAILED = "detach_disk_fail"

	VM_START_SUSPEND  = "start_suspend"
	VM_SUSPENDING     = compute.VM_SUSPENDING
	VM_SUSPEND        = compute.VM_SUSPEND
	VM_SUSPEND_FAILED = "suspend_failed"

	VM_RESUMING      = compute.VM_RESUMING
	VM_RESUME_FAILED = "resume_failed"

	VM_START_DELETE = "start_delete"
	VM_DELETE_FAIL  = "delete_fail"
	VM_DELETING     = compute.VM_DELETING

	VM_DEALLOCATED = compute.VM_DEALLOCATED

	VM_START_MIGRATE  = "start_migrate"
	VM_MIGRATING      = compute.VM_MIGRATING
	VM_LIVE_MIGRATING = "live_migrating"
	VM_MIGRATE_FAILED = "migrate_failed"

	VM_CHANGE_FLAVOR      = compute.VM_CHANGE_FLAVOR
	VM_CHANGE_FLAVOR_FAIL = "change_flavor_fail"
	VM_REBUILD_ROOT       = compute.VM_REBUILD_ROOT
	VM_REBUILD_ROOT_FAIL  = "rebuild_root_fail"

	VM_START_SNAPSHOT           = "snapshot_start"
	VM_SNAPSHOT                 = "snapshot"
	VM_SNAPSHOT_DELETE          = "snapshot_delete"
	VM_BLOCK_STREAM             = "block_stream"
	VM_BLOCK_STREAM_FAIL        = "block_stream_fail"
	VM_SNAPSHOT_SUCC            = "snapshot_succ"
	VM_SNAPSHOT_FAILED          = "snapshot_failed"
	VM_DISK_RESET               = "disk_reset"
	VM_DISK_RESET_FAIL          = "disk_reset_failed"
	VM_DISK_CHANGE_STORAGE      = "disk_change_storage"
	VM_DISK_CHANGE_STORAGE_FAIL = "disk_change_storage_fail"

	VM_START_INSTANCE_SNAPSHOT   = "start_instance_snapshot"
	VM_INSTANCE_SNAPSHOT_FAILED  = "instance_snapshot_failed"
	VM_START_SNAPSHOT_RESET      = "start_snapshot_reset"
	VM_SNAPSHOT_RESET_FAILED     = "snapshot_reset_failed"
	VM_SNAPSHOT_AND_CLONE_FAILED = "clone_from_snapshot_failed"

	VM_START_INSTANCE_BACKUP  = "start_instance_backup"
	VM_INSTANCE_BACKUP_FAILED = "instance_backup_failed"

	VM_SYNC_CONFIG = compute.VM_SYNC_CONFIG
	VM_SYNC_FAIL   = "sync_fail"

	VM_SYNC_TRAFFIC_LIMIT        = "sync_traffic_limit"
	VM_SYNC_TRAFFIC_LIMIT_FAILED = "sync_traffic_limit_failed"

	VM_START_RESIZE_DISK  = "start_resize_disk"
	VM_RESIZE_DISK        = "resize_disk"
	VM_RESIZE_DISK_FAILED = "resize_disk_fail"

	VM_START_SAVE_DISK  = "start_save_disk"
	VM_SAVE_DISK        = "save_disk"
	VM_SAVE_DISK_FAILED = "save_disk_failed"

	VM_RESTORING_SNAPSHOT = "restoring_snapshot"
	VM_RESTORE_DISK       = "restore_disk"
	VM_RESTORE_STATE      = "restore_state"
	VM_RESTORE_FAILED     = "restore_failed"

	VM_ASSOCIATE_EIP         = INSTANCE_ASSOCIATE_EIP
	VM_ASSOCIATE_EIP_FAILED  = INSTANCE_ASSOCIATE_EIP_FAILED
	VM_DISSOCIATE_EIP        = INSTANCE_DISSOCIATE_EIP
	VM_DISSOCIATE_EIP_FAILED = INSTANCE_DISSOCIATE_EIP_FAILED

	// 公网IP转换Eip中(EIP转换中)
	VM_START_EIP_CONVERT  = "start_eip_convert"
	VM_EIP_CONVERT_FAILED = "eip_convert_failed"

	// 设置自动续费
	VM_SET_AUTO_RENEW        = "set_auto_renew"
	VM_SET_AUTO_RENEW_FAILED = "set_auto_renew_failed"

	VM_REMOVE_STATEFILE = "remove_state"

	VM_IO_THROTTLE      = "io_throttle"
	VM_IO_THROTTLE_FAIL = "io_throttle_fail"

	VM_ADMIN = "admin"

	VM_IMPORT        = "import"
	VM_IMPORT_FAILED = "import_fail"

	VM_CONVERT        = "convert"
	VM_CONVERTING     = "converting"
	VM_CONVERT_FAILED = "convert_failed"
	VM_CONVERTED      = "converted"

	VM_TEMPLATE_SAVING      = "tempalte_saving"
	VM_TEMPLATE_SAVE_FAILED = "template_save_failed"

	VM_UPDATE_TAGS        = "update_tags"
	VM_UPDATE_TAGS_FAILED = "update_tags_fail"

	VM_RESTART_NETWORK        = "restart_network"
	VM_RESTART_NETWORK_FAILED = "restart_network_failed"

	VM_SYNC_ISOLATED_DEVICE_FAILED = "sync_isolated_device_failed"

	VM_QGA_SET_PASSWORD        = "qga_set_password"
	VM_QGA_COMMAND_EXECUTING   = "qga_command_executing"
	VM_QGA_EXEC_COMMAND_FAILED = "qga_exec_command_failed"
	VM_QGA_SYNC_OS_INFO        = "qga_sync_os_info"

	VM_QGA_SET_NETWORK        = "qga_set_network"
	VM_QGA_SET_NETWORK_FAILED = "qga_set_network_failed"

	SHUTDOWN_STOP             = "stop"
	SHUTDOWN_TERMINATE        = "terminate"
	SHUTDOWN_STOP_RELEASE_GPU = "stop_release_gpu"

	HYPERVISOR_KVM       = "kvm"
	HYPERVISOR_POD       = "pod"
	HYPERVISOR_BAREMETAL = "baremetal"
	HYPERVISOR_ESXI      = compute.HYPERVISOR_ESXI
	HYPERVISOR_HYPERV    = "hyperv"
	HYPERVISOR_XEN       = "xen"

	HYPERVISOR_ALIYUN         = compute.HYPERVISOR_ALIYUN
	HYPERVISOR_APSARA         = compute.HYPERVISOR_APSARA
	HYPERVISOR_QCLOUD         = compute.HYPERVISOR_QCLOUD
	HYPERVISOR_AZURE          = compute.HYPERVISOR_AZURE
	HYPERVISOR_AWS            = compute.HYPERVISOR_AWS
	HYPERVISOR_HUAWEI         = compute.HYPERVISOR_HUAWEI
	HYPERVISOR_HCS            = compute.HYPERVISOR_HCS
	HYPERVISOR_HCSO           = compute.HYPERVISOR_HCSO
	HYPERVISOR_HCSOP          = compute.HYPERVISOR_HCSOP
	HYPERVISOR_OPENSTACK      = compute.HYPERVISOR_OPENSTACK
	HYPERVISOR_UCLOUD         = compute.HYPERVISOR_UCLOUD
	HYPERVISOR_VOLCENGINE     = compute.HYPERVISOR_VOLCENGINE
	HYPERVISOR_ZSTACK         = compute.HYPERVISOR_ZSTACK
	HYPERVISOR_GOOGLE         = compute.HYPERVISOR_GOOGLE
	HYPERVISOR_CTYUN          = compute.HYPERVISOR_CTYUN
	HYPERVISOR_ECLOUD         = compute.HYPERVISOR_ECLOUD
	HYPERVISOR_JDCLOUD        = compute.HYPERVISOR_JDCLOUD
	HYPERVISOR_NUTANIX        = compute.HYPERVISOR_NUTANIX
	HYPERVISOR_BINGO_CLOUD    = compute.HYPERVISOR_BINGO_CLOUD
	HYPERVISOR_INCLOUD_SPHERE = compute.HYPERVISOR_INCLOUD_SPHERE
	HYPERVISOR_PROXMOX        = compute.HYPERVISOR_PROXMOX
	HYPERVISOR_REMOTEFILE     = compute.HYPERVISOR_REMOTEFILE
	HYPERVISOR_H3C            = compute.HYPERVISOR_H3C
	HYPERVISOR_KSYUN          = compute.HYPERVISOR_KSYUN
	HYPERVISOR_BAIDU          = compute.HYPERVISOR_BAIDU
	HYPERVISOR_CUCLOUD        = compute.HYPERVISOR_CUCLOUD
	HYPERVISOR_QINGCLOUD      = compute.HYPERVISOR_QINGCLOUD
	HYPERVISOR_ORACLE         = compute.HYPERVISOR_ORACLE
	HYPERVISOR_SANGFOR        = compute.HYPERVISOR_SANGFOR
	HYPERVISOR_ZETTAKIT       = compute.HYPERVISOR_ZETTAKIT
	HYPERVISOR_UIS            = compute.HYPERVISOR_UIS
	HYPERVISOR_CAS            = compute.HYPERVISOR_CAS

	//	HYPERVISOR_DEFAULT = HYPERVISOR_KVM
	HYPERVISOR_DEFAULT = HYPERVISOR_KVM
)
View Source
const (
	VM_POWER_STATES_ON      = "on"
	VM_POWER_STATES_OFF     = "off"
	VM_POWER_STATES_UNKNOWN = "unknown"
)
View Source
const (
	VM_SHUTDOWN_MODE_KEEP_CHARGING = "keep_charging"
	VM_SHUTDOWN_MODE_STOP_CHARGING = "stop_charging"
)
View Source
const (
	QGA_STATUS_UNKNOWN   = "unknown"
	QGA_STATUS_AVAILABLE = "available"
)
View Source
const (
	CPU_MODE_QEMU = "qemu"
	CPU_MODE_HOST = "host"
)
View Source
const (
	VM_MACHINE_TYPE_PC  = "pc"
	VM_MACHINE_TYPE_Q35 = "q35"

	VM_MACHINE_TYPE_ARM_VIRT = "virt"

	VM_VDI_PROTOCOL_VNC   = "vnc"
	VM_VDI_PROTOCOL_SPICE = "spice"

	VM_VIDEO_STANDARD = "std"
	VM_VIDEO_QXL      = "qxl"
	VM_VIDEO_VIRTIO   = "virtio"
)
View Source
const (
	VM_DEFAULT_WINDOWS_LOGIN_USER         = compute.VM_DEFAULT_WINDOWS_LOGIN_USER
	VM_DEFAULT_LINUX_LOGIN_USER           = compute.VM_DEFAULT_LINUX_LOGIN_USER
	VM_AWS_DEFAULT_LOGIN_USER             = compute.VM_AWS_DEFAULT_LOGIN_USER
	VM_AWS_DEFAULT_WINDOWS_LOGIN_USER     = compute.VM_AWS_DEFAULT_WINDOWS_LOGIN_USER
	VM_JDCLOUD_DEFAULT_WINDOWS_LOGIN_USER = compute.VM_JDCLOUD_DEFAULT_WINDOWS_LOGIN_USER
	VM_AZURE_DEFAULT_LOGIN_USER           = compute.VM_AZURE_DEFAULT_LOGIN_USER
	VM_ZSTACK_DEFAULT_LOGIN_USER          = compute.VM_ZSTACK_DEFAULT_LOGIN_USER

	VM_METADATA_APP_TAGS            = "app_tags"
	VM_METADATA_CREATE_PARAMS       = "create_params"
	VM_METADATA_LOGIN_ACCOUNT       = "login_account"
	VM_METADATA_LOGIN_KEY           = "login_key"
	VM_METADATA_LAST_LOGIN_KEY      = "last_login_key"
	VM_METADATA_LOGIN_KEY_TIMESTAMP = "login_key_timestamp"
	VM_METADATA_OS_ARCH             = "os_arch"
	VM_METADATA_OS_DISTRO           = "os_distribution"
	VM_METADATA_OS_NAME             = "os_name"
	VM_METADATA_OS_VERSION          = "os_version"
	VM_METADATA_CGROUP_CPUSET       = "cgroup_cpuset"
	VM_METADATA_ENABLE_MEMCLEAN     = "enable_memclean"
	VM_METADATA_HOTPLUG_CPU_MEM     = "hotplug_cpu_mem"
	VM_METADATA_HOT_REMOVE_NIC      = "hot_remove_nic"
	VM_METADATA_START_VMEM_MB       = "start_vmem_mb"
	VM_METADATA_START_VCPU_COUNT    = "start_vcpu_count"

	VM_METADATA_RELEASED_DEVICES = "released_devices"

	VM_METADATA_CPU_NUMA_PIN = "__cpu_numa_pin"
)
View Source
const (
	GuestForwardProtoTCP = "tcp"
	GuestForwardProtoUDP = "udp"
)
View Source
const (
	SERVER_META_CONVERT_FROM_ESXI      = "__server_convert_from_esxi"
	SERVER_META_CONVERT_FROM_CLOUDPODS = "__server_convert_from_cloudpods"
	SERVER_META_CONVERTED_SERVER       = "__server_converted_to"
	DISK_META_REMOTE_ACCESS_PATH       = "__remote_access_path"
)
View Source
const (
	MIRROR_JOB            = "__mirror_job_status"
	MIRROR_JOB_READY      = "ready"
	MIRROR_JOB_FAILED     = "failed"
	MIRROR_JOB_INPROGRESS = "inprogress"
	QUORUM_CHILD_INDEX    = "__quorum_child_index"

	DISK_CLONE_TASK_ID = "__disk_clone_task_id"

	SSH_PORT = "__ssh_port"
)
View Source
const (
	GUEST_RESCUE_INITRAMFS = "initramfs"
	GUEST_RESCUE_KERNEL    = "kernel"
)

Rescue constants are used for rescue mode

View Source
const (
	MethodDirect       = "direct"
	MethodEIP          = "eip"
	MethodDNAT         = "dnat"
	MethodProxyForward = "proxy_forward"
)
View Source
const (
	GUEST_PORT_MAPPING_RANGE_START = 20000
	GUEST_PORT_MAPPING_RANGE_END   = 25000
)
View Source
const (
	GT_READY   = "ready"
	GT_INVALID = "invalid"
)
View Source
const (
	HOST_TYPE_BAREMETAL  = "baremetal"
	HOST_TYPE_HYPERVISOR = "hypervisor" // KVM
	HOST_TYPE_CONTAINER  = "container"
	HOST_TYPE_KVM        = "kvm"
	HOST_TYPE_ESXI       = compute.HOST_TYPE_ESXI // # VMWare vSphere ESXi
	HOST_TYPE_HYPERV     = "hyperv"               // # Microsoft Hyper-V
	HOST_TYPE_XEN        = "xen"                  // # XenServer

	HOST_TYPE_ALIYUN         = compute.HOST_TYPE_ALIYUN
	HOST_TYPE_APSARA         = compute.HOST_TYPE_APSARA
	HOST_TYPE_AWS            = compute.HOST_TYPE_AWS
	HOST_TYPE_QCLOUD         = compute.HOST_TYPE_QCLOUD
	HOST_TYPE_AZURE          = compute.HOST_TYPE_AZURE
	HOST_TYPE_HUAWEI         = compute.HOST_TYPE_HUAWEI
	HOST_TYPE_HCSO           = compute.HOST_TYPE_HCSO
	HOST_TYPE_HCSOP          = compute.HOST_TYPE_HCSOP
	HOST_TYPE_HCS            = compute.HOST_TYPE_HCS
	HOST_TYPE_OPENSTACK      = compute.HOST_TYPE_OPENSTACK
	HOST_TYPE_UCLOUD         = compute.HOST_TYPE_UCLOUD
	HOST_TYPE_VOLCENGINE     = compute.HOST_TYPE_VOLCENGINE
	HOST_TYPE_ZSTACK         = compute.HOST_TYPE_ZSTACK
	HOST_TYPE_GOOGLE         = compute.HOST_TYPE_GOOGLE
	HOST_TYPE_CTYUN          = compute.HOST_TYPE_CTYUN
	HOST_TYPE_ECLOUD         = compute.HOST_TYPE_ECLOUD
	HOST_TYPE_JDCLOUD        = compute.HOST_TYPE_JDCLOUD
	HOST_TYPE_CLOUDPODS      = compute.HOST_TYPE_CLOUDPODS
	HOST_TYPE_NUTANIX        = compute.HOST_TYPE_NUTANIX
	HOST_TYPE_BINGO_CLOUD    = compute.HOST_TYPE_BINGO_CLOUD
	HOST_TYPE_INCLOUD_SPHERE = compute.HOST_TYPE_INCLOUD_SPHERE
	HOST_TYPE_PROXMOX        = compute.HOST_TYPE_PROXMOX
	HOST_TYPE_REMOTEFILE     = compute.HOST_TYPE_REMOTEFILE
	HOST_TYPE_H3C            = compute.HOST_TYPE_H3C
	HOST_TYPE_KSYUN          = compute.HOST_TYPE_KSYUN
	HOST_TYPE_BAIDU          = compute.HOST_TYPE_BAIDU
	HOST_TYPE_CUCLOUD        = compute.HOST_TYPE_CUCLOUD
	HOST_TYPE_QINGCLOUD      = compute.HOST_TYPE_QINGCLOUD
	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_CAS            = compute.HOST_TYPE_CAS

	HOST_TYPE_DEFAULT = HOST_TYPE_HYPERVISOR

	// # possible status
	HOST_ONLINE   = compute.HOST_ONLINE
	HOST_ENABLED  = "online"
	HOST_OFFLINE  = compute.HOST_OFFLINE
	HOST_DISABLED = "offline"

	NIC_TYPE_IPMI       = compute.NIC_TYPE_IPMI
	NIC_TYPE_ADMIN      = compute.NIC_TYPE_ADMIN
	NIC_TYPE_NORMAL     = compute.NIC_TYPE_NORMAL
	NIC_TYPE_INFINIBAND = compute.TNicType("infiniband")

	BAREMETAL_INIT           = "init"
	BAREMETAL_PREPARE        = "prepare"
	BAREMETAL_PREPARE_FAIL   = "prepare_fail"
	BAREMETAL_READY          = compute.BAREMETAL_READY
	BAREMETAL_RUNNING        = compute.BAREMETAL_RUNNING
	BAREMETAL_MAINTAINING    = "maintaining"
	BAREMETAL_START_MAINTAIN = "start_maintain"
	BAREMETAL_MAINTAIN_FAIL  = "maintain_fail"
	BAREMETAL_DELETING       = "deleting"
	BAREMETAL_DELETE         = "delete"
	BAREMETAL_DELETE_FAIL    = "delete_fail"
	BAREMETAL_UNKNOWN        = compute.BAREMETAL_UNKNOWN
	BAREMETAL_SYNCING_STATUS = "syncing_status"
	BAREMETAL_SYNC           = "sync"
	BAREMETAL_SYNC_FAIL      = "sync_fail"
	BAREMETAL_START_CONVERT  = "start_convert"
	BAREMETAL_CONVERTING     = "converting"
	BAREMETAL_START_FAIL     = "start_fail"
	BAREMETAL_STOP_FAIL      = "stop_fail"

	BAREMETAL_START_PROBE = "start_probe"
	BAREMETAL_PROBING     = "probing"
	BAREMETAL_PROBE_FAIL  = "probe_fail"

	BAREMETAL_START_INSERT_ISO = "start_insert"
	BAREMETAL_INSERTING_ISO    = "inserting_iso"
	BAREMETAL_INSERT_FAIL      = "insert_fail"

	BAREMETAL_START_EJECT_ISO = "start_eject"
	BAREMETAL_EJECTING_ISO    = "ejecting_iso"
	BAREMETAL_EJECT_FAIL      = "eject_fail"

	HOST_STATUS_RUNNING = BAREMETAL_RUNNING
	HOST_STATUS_READY   = BAREMETAL_READY
	HOST_STATUS_UNKNOWN = BAREMETAL_UNKNOWN
)
View Source
const (
	BAREMETAL_CDROM_ACTION_INSERT = "insert"
	BAREMETAL_CDROM_ACTION_EJECT  = "eject"
)
View Source
const (
	HostResourceTypeShared         = "shared"
	HostResourceTypeDefault        = HostResourceTypeShared
	HostResourceTypePrepaidRecycle = "prepaid"
	HostResourceTypeDedicated      = "dedicated"
)
View Source
const (
	BOOT_MODE_PXE = "pxe"
	BOOT_MODE_ISO = "iso"
)
View Source
const (
	HOST_HEALTH_PREFIX              = "/onecloud/kvm/host/health"
	HOST_HEALTH_STATUS_RUNNING      = "running"
	HOST_HEALTH_STATUS_RECONNECTING = "reconnecting"
	HOST_HEALTH_STATUS_UNKNOWN      = "unknown"
	HOST_HEALTH_LOCK_PREFIX         = "host-health"
)
View Source
const (
	HOSTMETA_AUTO_MIGRATE_ON_HOST_DOWN     = "__auto_migrate_on_host_down"
	HOSTMETA_AUTO_MIGRATE_ON_HOST_SHUTDOWN = "__auto_migrate_on_host_shutdown"
	HOSTMETA_HOST_ERRORS                   = "__host_errors"
)
View Source
const (
	HOSTMETA_RESERVED_CPUS_INFO = "reserved_cpus_info"
	HOSTMETA_RESERVED_CPUS_RATE = "reserved_cpus_rate"
)
View Source
const (
	HostVpcBridge = "__vpc_bridge__"
	HostTapBridge = "__tap_bridge__"
)
View Source
const (
	INSTANCE_BACKUP_STATUS_CREATING        = "creating"
	INSTANCE_BACKUP_STATUS_CREATE_FAILED   = "create_failed"
	INSTANCE_BACKUP_STATUS_DELETING        = "deleting"
	INSTANCE_BACKUP_STATUS_DELETE_FAILED   = "delete_failed"
	INSTANCE_BACKUP_STATUS_RECOVERY        = "recovery"
	INSTANCE_BACKUP_STATUS_RECOVERY_FAILED = "recovery_failed"
	INSTANCE_BACKUP_STATUS_READY           = "ready"
	INSTANCE_BACKUP_STATUS_PACK            = "pack"
	INSTANCE_BACKUP_STATUS_PACK_FAILED     = "pack_failed"

	INSTANCE_BACKUP_STATUS_CREATING_FROM_PACKAGE      = "creating_from_package"
	INSTANCE_BACKUP_STATUS_CREATE_FROM_PACKAGE_FAILED = "create_from_package_failed"

	INSTANCE_BACKUP_STATUS_SNAPSHOT        = "snapshot"
	INSTANCE_BACKUP_STATUS_SNAPSHOT_FAILED = "snapshot_failed"
	INSTANCE_BACKUP_STATUS_SAVING          = "saving"
	INSTANCE_BACKUP_STATUS_SAVE_FAILED     = "save_failed"
)
View Source
const (
	INTER_VPC_NETWORK_STATUS_AVAILABLE          = compute.INTER_VPC_NETWORK_STATUS_AVAILABLE
	INTER_VPC_NETWORK_STATUS_CREATING           = compute.INTER_VPC_NETWORK_STATUS_CREATING
	INTER_VPC_NETWORK_STATUS_CREATE_FAILED      = "create_failed"
	INTER_VPC_NETWORK_STATUS_DELETE_FAILED      = "delete_failed"
	INTER_VPC_NETWORK_STATUS_DELETING           = compute.INTER_VPC_NETWORK_STATUS_DELETING
	INTER_VPC_NETWORK_STATUS_ACTIVE             = "active"
	INTER_VPC_NETWORK_STATUS_ADDVPC             = "add_vpc"
	INTER_VPC_NETWORK_STATUS_ADDVPC_FAILED      = "add_vpc_failed"
	INTER_VPC_NETWORK_STATUS_REMOVEVPC          = "remove_vpc"
	INTER_VPC_NETWORK_STATUS_REMOVEVPC_FAILED   = "remove_vpc_failed"
	INTER_VPC_NETWORK_STATUS_UPDATEROUTE        = "update_route"
	INTER_VPC_NETWORK_STATUS_UPDATEROUTE_FAILED = "update_route_failed"
	INTER_VPC_NETWORK_STATUS_UNKNOWN            = compute.INTER_VPC_NETWORK_STATUS_UNKNOWN
)
View Source
const (
	INTER_VPCNETWORK_ATTACHED_INSTAMCE_TYPE_VPC = "VPC"
	INTER_VPCNETWORK_ATTACHED_INSTAMCE_TYPE_VBR = "VBR" // 边界路由器
)
View Source
const (
	PCIEVersion1       = "1.0"
	PCIEVersion2       = "2.0"
	PCIEVersion3       = "3.0"
	PCIEVersion4       = "4.0"
	PCIEVersion5       = "5.0"
	PCIEVersion6       = "6.0"
	PCIEVersion7       = "7.0"
	PCIEVersionUnknown = "unknown"
)
View Source
const (
	DIRECT_PCI_TYPE  = "PCI"
	GPU_HPC_TYPE     = "GPU-HPC" // # for compute
	GPU_VGA_TYPE     = "GPU-VGA" // # for display
	SRIOV_VGPU_TYPE  = "SRIOV-VGPU"
	LEGACY_VGPU_TYPE = "LEGACY-VGPU"
	USB_TYPE         = "USB"
	NIC_TYPE         = "NIC"     // nic sriov
	NVME_PT_TYPE     = "NVME-PT" // nvme passthrough

	NVIDIA_VENDOR_ID = "10de"
	AMD_VENDOR_ID    = "1002"
)
View Source
const (
	ISOLATED_DEVICE_MODEL_METADATA_BANDWIDTH = "bandwidth"
	ISOLATED_DEVICE_MODEL_METADATA_MEMORY_MB = "memory_mb"
	ISOLATED_DEVICE_MODEL_METADATA_TFLOPS    = "tflops"
)
View Source
const (
	KAFKA_STATUS_AVAILABLE     = compute.KAFKA_STATUS_AVAILABLE
	KAFKA_STATUS_UNAVAILABLE   = compute.KAFKA_STATUS_UNAVAILABLE
	KAFKA_STATUS_CREATING      = compute.KAFKA_STATUS_CREATING
	KAFKA_STATUS_DELETING      = compute.KAFKA_STATUS_DELETING
	KAFKA_STATUS_DELETE_FAILED = "delete_failed"
	KAFKA_STATUS_UNKNOWN       = compute.KAFKA_STATUS_UNKNOWN
	KAFKA_UPDATE_TAGS          = "update_tags"
	KAFKA_UPDATE_TAGS_FAILED   = "update_tags_fail"
)
View Source
const (
	KEYPAIRE_SCHEME_RSA = "RSA"
	KEYPAIRE_SCHEME_DSA = "DSA"
)
View Source
const (
	KUBE_CLUSTER_STATUS_RUNNING  = "running"
	KUBE_CLUSTER_STATUS_CREATING = "creating"
	KUBE_CLUSTER_STATUS_ABNORMAL = "abnormal"
	// 升级中
	KUBE_CLUSTER_STATUS_UPDATING = "updating"
	// 升级失败
	KUBE_CLUSTER_STATUS_UPDATING_FAILED = "updating_failed"
	// 伸缩中
	KUBE_CLUSTER_STATUS_SCALING = "scaling"
	// 停止
	KUBE_CLUSTER_STATUS_STOPPED = "stopped"
)
View Source
const (
	DeployMethodYum  = "yum"
	DeployMethodCopy = "copy"
)
View Source
const (
	LB_STATUS_ENABLED  = compute.LB_STATUS_ENABLED
	LB_STATUS_DISABLED = compute.LB_STATUS_DISABLED

	LB_STATUS_INIT = compute.LB_STATUS_INIT

	LB_CREATING      = apis.STATUS_CREATING
	LB_CREATE_FAILED = apis.STATUS_CREATE_FAILED

	LB_SYNC_CONF        = compute.LB_SYNC_CONF
	LB_SYNC_CONF_FAILED = "sync_conf_failed"

	LB_STATUS_DELETING      = apis.STATUS_DELETING
	LB_STATUS_DELETE_FAILED = apis.STATUS_DELETE_FAILED
	LB_STATUS_DELETED       = compute.LB_STATUS_DELETED

	LB_STATUS_START_FAILED = compute.LB_STATUS_START_FAILED
	LB_STATUS_STOP_FAILED  = "stop_failed"

	LB_UPDATE_TAGS        = "update_tags"
	LB_UPDATE_TAGS_FAILED = "update_tags_fail"

	LB_STATUS_UNKNOWN = compute.LB_STATUS_UNKNOWN
)

Load balancer status transition (for spec status)

                create          start           stop            delete
init            running         -               -               -
running		-		-		stopped		stopped
stopped		-		running		-		-

Each entity will have spec and runtime version. Spec version will increment on entity attribute update. Runtime version will be filled by the scheduler to the newest spec it has seen and committed

When spec and runtime version differ, scheduler will set runtime version to "configuring", "stopping" and will finally transition to a terminal state.

In the case of instance has PendingDeleted marked, it is also the scheduler's duty to make the runtime status to stopped and finally the entity in question

View Source
const (
	//默认后端服务器组
	LB_BACKENDGROUP_TYPE_DEFAULT = compute.LB_BACKENDGROUP_TYPE_DEFAULT
	//普通后端服务器组
	LB_BACKENDGROUP_TYPE_NORMAL = compute.LB_BACKENDGROUP_TYPE_NORMAL
	//主备后端服务器组
	LB_BACKENDGROUP_TYPE_MASTER_SLAVE = compute.LB_BACKENDGROUP_TYPE_MASTER_SLAVE
)
View Source
const (
	LB_ALIYUN_SPEC_SHAREABLE = "" //性能共享型
	LB_ALIYUN_SPEC_S1_SMALL  = "slb.s1.small"
	LB_ALIYUN_SPEC_S2_SMALL  = "slb.s2.small"
	LB_ALIYUN_SPEC_S3_SMALL  = "slb.s3.small"
	LB_ALIYUN_SPEC_S2_MEDIUM = "slb.s2.medium"
	LB_ALIYUN_SPEC_S3_MEDIUM = "slb.s3.medium"
	LB_ALIYUN_SPEC_S3_LARGE  = "slb.s3.large"

	LB_AWS_SPEC_APPLICATION = "application"
	LB_AWS_SPEC_NETWORK     = "network"
)
View Source
const (
	LB_MbpsMin = 0
	LB_MbpsMax = 10000
)
View Source
const (
	LB_ADDR_TYPE_INTRANET = compute.LB_ADDR_TYPE_INTRANET
	LB_ADDR_TYPE_INTERNET = compute.LB_ADDR_TYPE_INTERNET
)

Load Balancer network type (vpc or classic) determines viable backend servers (they should be from the same network type as the load balancer).

Load Balancer address type (intranet or internet) determins the scope the service provided by load balancer can be accessed. If it's intranet, then it will only be accessible from the specified network. If it's internet, then it's public and can be accessed from outside the cloud region

View Source
const (
	LB_NETWORK_TYPE_CLASSIC = compute.LB_NETWORK_TYPE_CLASSIC
	LB_NETWORK_TYPE_VPC     = compute.LB_NETWORK_TYPE_VPC
)
View Source
const (
	LB_LISTENER_TYPE_TCP              = compute.LB_LISTENER_TYPE_TCP
	LB_LISTENER_TYPE_UDP              = compute.LB_LISTENER_TYPE_UDP
	LB_LISTENER_TYPE_TCP_UDP          = compute.LB_LISTENER_TYPE_TCP_UDP
	LB_LISTENER_TYPE_HTTP             = compute.LB_LISTENER_TYPE_HTTP
	LB_LISTENER_TYPE_HTTPS            = compute.LB_LISTENER_TYPE_HTTPS
	LB_LISTENER_TYPE_TERMINATED_HTTPS = compute.LB_LISTENER_TYPE_TERMINATED_HTTPS
)

TODO https_direct sni

View Source
const (
	LB_ACL_TYPE_BLACK = compute.LB_ACL_TYPE_BLACK
	LB_ACL_TYPE_WHITE = compute.LB_ACL_TYPE_WHITE
)
View Source
const (
	LB_TLS_CERT_FINGERPRINT_ALGO_SHA1   = compute.LB_TLS_CERT_FINGERPRINT_ALGO_SHA1
	LB_TLS_CERT_FINGERPRINT_ALGO_SHA256 = compute.LB_TLS_CERT_FINGERPRINT_ALGO_SHA256
)
View Source
const (
	LB_TLS_CERT_PUBKEY_ALGO_RSA   = "RSA"
	LB_TLS_CERT_PUBKEY_ALGO_ECDSA = "ECDSA"
)
View Source
const (
	LB_TLS_CIPHER_POLICY_1_0        = "tls_cipher_policy_1_0"
	LB_TLS_CIPHER_POLICY_1_1        = "tls_cipher_policy_1_1"
	LB_TLS_CIPHER_POLICY_1_2        = "tls_cipher_policy_1_2"
	LB_TLS_CIPHER_POLICY_1_2_strict = "tls_cipher_policy_1_2_strict"
	LB_TLS_CIPHER_POLICY_deault     = ""
)

TODO may want extra for legacy apps

View Source
const (
	LB_STICKY_SESSION_TYPE_INSERT = compute.LB_STICKY_SESSION_TYPE_INSERT
	LB_STICKY_SESSION_TYPE_SERVER = compute.LB_STICKY_SESSION_TYPE_SERVER
)
View Source
const (
	LB_HEALTH_CHECK_PING  = compute.LB_HEALTH_CHECK_PING
	LB_HEALTH_CHECK_TCP   = compute.LB_HEALTH_CHECK_TCP
	LB_HEALTH_CHECK_UDP   = compute.LB_HEALTH_CHECK_UDP
	LB_HEALTH_CHECK_HTTP  = compute.LB_HEALTH_CHECK_HTTP
	LB_HEALTH_CHECK_HTTPS = compute.LB_HEALTH_CHECK_HTTPS
)

TODO maybe https check when field need comes ;)

View Source
const (
	LB_HEALTH_CHECK_HTTP_CODE_1xx     = compute.LB_HEALTH_CHECK_HTTP_CODE_1xx
	LB_HEALTH_CHECK_HTTP_CODE_2xx     = compute.LB_HEALTH_CHECK_HTTP_CODE_2xx
	LB_HEALTH_CHECK_HTTP_CODE_3xx     = compute.LB_HEALTH_CHECK_HTTP_CODE_3xx
	LB_HEALTH_CHECK_HTTP_CODE_4xx     = compute.LB_HEALTH_CHECK_HTTP_CODE_4xx
	LB_HEALTH_CHECK_HTTP_CODE_5xx     = compute.LB_HEALTH_CHECK_HTTP_CODE_5xx
	LB_HEALTH_CHECK_HTTP_CODE_DEFAULT = compute.LB_HEALTH_CHECK_HTTP_CODE_DEFAULT
)
View Source
const (
	LB_REDIRECT_OFF = compute.LB_REDIRECT_OFF
	LB_REDIRECT_RAW = compute.LB_REDIRECT_RAW
)
View Source
const (
	LB_REDIRECT_CODE_301 = compute.LB_REDIRECT_CODE_301 // Moved Permanently
	LB_REDIRECT_CODE_302 = compute.LB_REDIRECT_CODE_302 // Found
	LB_REDIRECT_CODE_307 = compute.LB_REDIRECT_CODE_307 // Temporary Redirect
)
View Source
const (
	LB_REDIRECT_SCHEME_IDENTITY = ""
	LB_REDIRECT_SCHEME_HTTP     = "http"
	LB_REDIRECT_SCHEME_HTTPS    = "https"
)
View Source
const (
	LB_BOOL_ON  = compute.LB_BOOL_ON
	LB_BOOL_OFF = compute.LB_BOOL_OFF
)
View Source
const (
	LB_SCHEDULER_RR  = compute.LB_SCHEDULER_RR  // round robin
	LB_SCHEDULER_WRR = compute.LB_SCHEDULER_WRR // weighted round robin
	LB_SCHEDULER_WLC = compute.LB_SCHEDULER_WLC // weighted least connection
	LB_SCHEDULER_SCH = compute.LB_SCHEDULER_SCH // source-ip-based consistent hash
	LB_SCHEDULER_TCH = compute.LB_SCHEDULER_TCH // 4-tuple-based consistent hash
	LB_SCHEDULER_QCH = compute.LB_SCHEDULER_QCH
	LB_SCHEDULER_MH  = compute.LB_SCHEDULER_MH // maglev consistent hash
	LB_SCHEDULER_NOP = "nop"                   // aws noop
)

TODO

- qch, quic connection id - mh, maglev consistent hash

View Source
const (
	LB_SENDPROXY_OFF       = "off"
	LB_SENDPROXY_V1        = "v1"
	LB_SENDPROXY_V2        = "v2"
	LB_SENDPROXY_V2_SSL    = "v2-ssl"
	LB_SENDPROXY_V2_SSL_CN = "v2-ssl-cn"
)
View Source
const (
	LB_BACKEND_GUEST = compute.LB_BACKEND_GUEST
	LB_BACKEND_HOST  = compute.LB_BACKEND_HOST
	LB_BACKEND_IP    = compute.LB_BACKEND_IP
)

TODO raw type

View Source
const (
	LB_BACKEND_ROLE_DEFAULT = compute.LB_BACKEND_ROLE_DEFAULT
	LB_BACKEND_ROLE_MASTER  = compute.LB_BACKEND_ROLE_MASTER
	LB_BACKEND_ROLE_SLAVE   = compute.LB_BACKEND_ROLE_SLAVE
)
View Source
const (
	LB_CHARGE_TYPE_BY_TRAFFIC   = compute.LB_CHARGE_TYPE_BY_TRAFFIC
	LB_CHARGE_TYPE_BY_BANDWIDTH = compute.LB_CHARGE_TYPE_BY_BANDWIDTH
)
View Source
const (
	LB_HA_STATE_MASTER  = "MASTER"
	LB_HA_STATE_BACKUP  = "BACKUP"
	LB_HA_STATE_FAULT   = "FAULT"
	LB_HA_STATE_STOP    = "STOP"
	LB_HA_STATE_UNKNOWN = "UNKNOWN"
)
View Source
const (
	LBAGENT_QUERY_ORIG_KEY = "_orig"
	LBAGENT_QUERY_ORIG_VAL = "lbagent"
)
View Source
const (
	LB_ASSOCIATE_TYPE_LISTENER = "listener"
	LB_ASSOCIATE_TYPE_RULE     = "rule"
)
View Source
const (
	MODELARTS_POOL_STATUS_RUNNING              = "running"
	MODELARTS_POOL_STATUS_ABNORMAL             = "abnormal"
	MODELARTS_POOL_STATUS_CREATING             = "creating"
	MODELARTS_POOL_STATUS_CREATE_FAILED        = "create_failed"
	MODELARTS_POOL_STATUS_DELETING             = "deleting"
	MODELARTS_POOL_STATUS_DELETE_FAILED        = "delete_failed"
	MODELARTS_POOL_STATUS_CHANGE_CONFIG        = "change_config"
	MODELARTS_POOL_STATUS_CHANGE_CONFIG_FAILED = "change_config_failed"
	MODELARTS_POOL_STATUS_ERROR                = "error"
	MODELARTS_POOL_STATUS_UNKNOWN              = "unknown"
	MODELARTS_POOL_STATUS_TIMEOUT              = "timeout"
)
View Source
const (
	MODELARTS_POOL_SKU_AVAILABLE = compute.MODELARTS_POOL_SKU_AVAILABLE
	MODELARTS_POOL_SKU_SOLDOUT   = compute.MODELARTS_POOL_SKU_SOLDOUT
)
View Source
const (
	MONGO_DB_STATUS_CREATING      = compute.MONGO_DB_STATUS_CREATING
	MONGO_DB_STATUS_RUNNING       = compute.MONGO_DB_STATUS_RUNNING
	MONGO_DB_STATUS_DEPLOY        = compute.MONGO_DB_STATUS_DEPLOY
	MONGO_DB_STATUS_CHANGE_CONFIG = compute.MONGO_DB_STATUS_CHANGE_CONFIG
	MONGO_DB_STATUS_DELETING      = compute.MONGO_DB_STATUS_DELETING
	MONGO_DB_STATUS_DELETE_FAILED = "delete_failed"
	MONGO_DB_STATUS_REBOOTING     = compute.MONGO_DB_STATUS_REBOOTING
	MONGO_DB_STATUS_UNKNOWN       = "unknown"

	MONGO_DB_ENGINE_WIRED_TIGER = compute.MONGO_DB_ENGINE_WIRED_TIGER
	MONGO_DB_ENGINE_ROCKS       = compute.MONGO_DB_ENGINE_ROCKS

	MONGO_DB_ENGINE_VERSION_40 = "4.0"
	MONGO_DB_ENGINE_VERSION_36 = "3.6"
	MONGO_DB_ENGINE_VERSION_32 = "3.2"

	// 分片
	MONGO_DB_CATEGORY_SHARDING = compute.MONGO_DB_CATEGORY_SHARDING
	// 副本集
	MONGO_DB_CATEGORY_REPLICATE = compute.MONGO_DB_CATEGORY_REPLICATE
)
View Source
const (
	MOUNT_TARGET_STATUS_AVAILABLE     = compute.MOUNT_TARGET_STATUS_AVAILABLE
	MOUNT_TARGET_STATUS_UNAVAILABLE   = compute.MOUNT_TARGET_STATUS_UNAVAILABLE
	MOUNT_TARGET_STATUS_CREATING      = compute.MOUNT_TARGET_STATUS_CREATING
	MOUNT_TARGET_STATUS_CREATE_FAILED = "create_failed"
	MOUNT_TARGET_STATUS_DELETING      = compute.MOUNT_TARGET_STATUS_DELETING
	MOUNT_TARGET_STATUS_DELETE_FAILED = "delete_failed"
	MOUNT_TARGET_STATUS_UNKNOWN       = "unknown"
)
View Source
const (
	NAS_SKU_AVAILABLE = "available"
	NAS_SKU_SOLDOUT   = "soldout"
)
View Source
const (
	NAT_SKU_AVAILABLE = compute.NAT_SKU_AVAILABLE
	NAT_SKU_SOLDOUT   = compute.NAT_SKU_SOLDOUT

	ALIYUN_NAT_SKU_DEFAULT = compute.ALIYUN_NAT_SKU_DEFAULT
)
View Source
const (
	NAT_STAUTS_AVAILABLE             = compute.NAT_STAUTS_AVAILABLE     // 可用
	NAT_STATUS_ALLOCATE              = compute.NAT_STATUS_ALLOCATE      // 创建中
	NAT_STATUS_DEPLOYING             = compute.NAT_STATUS_DEPLOYING     // 配置中
	NAT_STATUS_UNKNOWN               = compute.NAT_STATUS_UNKNOWN       // 未知状态
	NAT_STATUS_CREATE_FAILED         = compute.NAT_STATUS_CREATE_FAILED // 创建失败
	NAT_STATUS_DELETED               = "deleted"                        // 删除
	NAT_STATUS_DELETING              = compute.NAT_STATUS_DELETING      // 删除中
	NAT_STATUS_DELETE_FAILED         = "delete_failed"                  // 删除失败
	NAT_STATUS_SET_AUTO_RENEW        = "set_auto_renew"                 // 设置自动续费中
	NAT_STATUS_SET_AUTO_RENEW_FAILED = "set_auto_renew_failed"          // 设置自动续费失败
	NAT_STATUS_RENEWING              = "renewing"                       // 续费中
	NAT_STATUS_RENEW_FAILED          = "renew_failed"                   // 续费失败
)
View Source
const (
	TapFlowVSwitch  = "vswitch"
	TapFlowGuestNic = "vnic"

	TapFlowDirectionIn   = "IN"
	TapFlowDirectionOut  = "OUT"
	TapFlowDirectionBoth = "BOTH"

	TapFlowIdMin = 0x10
	TapFlowIdMax = 0x7fff
)
View Source
const (
	TapServiceHost  = "host"
	TapServiceGuest = "guest"
)
View Source
const (
	AddressTypeIPv4 = TAddressType("ipv4")
	AddressTypeIPv6 = TAddressType("ipv6")
)
View Source
const (
	NETWORK_TYPE_VPC     = compute.NETWORK_TYPE_VPC
	NETWORK_TYPE_CLASSIC = compute.NETWORK_TYPE_CLASSIC
)
View Source
const (

	// in mbps, maximal is 100Tbps
	MAX_BANDWIDTH = 100000000

	NETWORK_TYPE_GUEST     = TNetworkType(compute.NETWORK_TYPE_GUEST)
	NETWORK_TYPE_BAREMETAL = TNetworkType("baremetal")
	NETWORK_TYPE_CONTAINER = TNetworkType("container")
	NETWORK_TYPE_PXE       = TNetworkType("pxe")
	NETWORK_TYPE_IPMI      = TNetworkType("ipmi")
	NETWORK_TYPE_EIP       = TNetworkType("eip")
	NETWORK_TYPE_HOSTLOCAL = TNetworkType("hostlocal")

	STATIC_ALLOC = "static"

	MAX_NETWORK_NAME_LEN = 11

	EXTRA_DNS_UPDATE_TARGETS = "__extra_dns_update_targets"

	NETWORK_STATUS_INIT          = "init"
	NETWORK_STATUS_PENDING       = compute.NETWORK_STATUS_PENDING
	NETWORK_STATUS_AVAILABLE     = compute.NETWORK_STATUS_AVAILABLE
	NETWORK_STATUS_UNAVAILABLE   = compute.NETWORK_STATUS_UNAVAILABLE
	NETWORK_STATUS_FAILED        = "failed"
	NETWORK_STATUS_UNKNOWN       = "unknown"
	NETWORK_STATUS_START_DELETE  = "start_delete"
	NETWORK_STATUS_DELETING      = compute.NETWORK_STATUS_DELETING
	NETWORK_STATUS_DELETED       = "deleted"
	NETWORK_STATUS_DELETE_FAILED = "delete_failed"
)
View Source
const (
	NETWORK_DRIVER_VIRTIO  = "virtio"
	NETWORK_DRIVER_E1000   = "e1000"
	NETWORK_DRIVER_VMXNET3 = "vmxnet3"
	NETWORK_DRIVER_VFIO    = "vfio-pci"
)
View Source
const (
	NETWORK_INTERFACE_ASSOCIATE_TYPE_SERVER       = compute.NETWORK_INTERFACE_ASSOCIATE_TYPE_SERVER
	NETWORK_INTERFACE_ASSOCIATE_TYPE_RESERVED     = compute.NETWORK_INTERFACE_ASSOCIATE_TYPE_RESERVED
	NETWORK_INTERFACE_ASSOCIATE_TYPE_LOADBALANCER = compute.NETWORK_INTERFACE_ASSOCIATE_TYPE_LOADBALANCER
	NETWORK_INTERFACE_ASSOCIATE_TYPE_VIP          = compute.NETWORK_INTERFACE_ASSOCIATE_TYPE_VIP
	NETWORK_INTERFACE_ASSOCIATE_TYPE_DHCP         = compute.NETWORK_INTERFACE_ASSOCIATE_TYPE_DHCP

	NETWORK_INTERFACE_STATUS_INIT      = "init"
	NETWORK_INTERFACE_STATUS_CREATING  = compute.NETWORK_INTERFACE_STATUS_CREATING
	NETWORK_INTERFACE_STATUS_AVAILABLE = compute.NETWORK_INTERFACE_STATUS_AVAILABLE
	NETWORK_INTERFACE_STATUS_DISABLED  = compute.NETWORK_INTERFACE_STATUS_DISABLED
	NETWORK_INTERFACE_STATUS_ATTACHING = compute.NETWORK_INTERFACE_STATUS_ATTACHING
	NETWORK_INTERFACE_STATUS_DETACHING = compute.NETWORK_INTERFACE_STATUS_DETACHING
	NETWORK_INTERFACE_STATUS_DELETING  = compute.NETWORK_INTERFACE_STATUS_DELETING
	NETWORK_INTERFACE_STATUS_UNKNOWN   = compute.NETWORK_INTERFACE_STATUS_UNKNOWN
)
View Source
const (
	POD_STATUS_CREATING_CONTAINER              = "creating_container"
	POD_STATUS_CREATE_CONTAINER_FAILED         = "create_container_failed"
	POD_STATUS_STARTING_CONTAINER              = "starting_container"
	POD_STATUS_START_CONTAINER_FAILED          = "start_container_failed"
	POD_STATUS_STOPPING_CONTAINER              = "stopping_container"
	POD_STATUS_STOP_CONTAINER_FAILED           = "stop_container_failed"
	POD_STATUS_DELETING_CONTAINER              = "deleting_container"
	POD_STATUS_DELETE_CONTAINER_FAILED         = "delete_container_failed"
	POD_STATUS_SYNCING_CONTAINER_STATUS        = "syncing_container_status"
	POD_STATUS_SYNCING_CONTAINER_STATUS_FAILED = "sync_container_status_failed"
	POD_STATUS_CRASH_LOOP_BACK_OFF             = "crash_loop_back_off"
	POD_STATUS_CONTAINER_EXITED                = "container_exited"
)
View Source
const (
	POD_METADATA_CRI_ID        = "cri_id"
	POD_METADATA_CRI_CONFIG    = "cri_config"
	POD_METADATA_PORT_MAPPINGS = "port_mappings"
)
View Source
const (
	PodPortMappingProtocolTCP = "tcp"
	PodPortMappingProtocolUDP = "udp"
)
View Source
const (
	POD_PORT_MAPPING_RANGE_START = 20000
	POD_PORT_MAPPING_RANGE_END   = 25000
)
View Source
const (
	POLICY_DEFINITION_STATUS_READY   = "ready"
	POLICY_DEFINITION_STATUS_UNKNOWN = "unknown"

	POLICY_DEFINITION_CATEGORY_CLOUDREGION = "cloudregion"
	POLICY_DEFINITION_CATEGORY_TAG         = "tag"

	POLICY_DEFINITION_CONDITION_IN       = "in"
	POLICY_DEFINITION_CONDITION_NOT_IN   = "not_in"
	POLICY_DEFINITION_CONDITION_CONTAINS = "contains"
	POLICY_DEFINITION_CONDITION_EXCEPT   = "except"
)
View Source
const (
	PROJECT_MAPPING_STATUS_AVAILABLE = "available"

	MAPPING_CONDITION_AND = "and"
	MAPPING_CONDITION_OR  = "or"
)
View Source
const (
	RESERVEDIP_TABLE          = "reservedips_tbl"
	RESERVEDIP_RESOURCE_TYPE  = "reservedip"
	RESERVEDIP_RESOURCE_TYPES = "reservedips"

	RESERVEDIP_STATUS_ONLINE  = "online"
	RESERVEDIP_STATUS_OFFLINE = "offline"
	RESERVEDIP_STATUS_UNKNOWN = "unknown"
)
View Source
const (
	ROUTE_TABLE_UPDATING     = "updating"
	ROUTE_TABLE_UPDATEFAILED = "update_falied"
	ROUTE_TABLE_AVAILABLE    = compute.ROUTE_TABLE_AVAILABLE
	ROUTE_TABLE_UNKNOWN      = "unknown"
)
View Source
const (
	ROUTE_TABLE_TYPE_VPC = "VPC" // VPC路由器
	ROUTE_TABLE_TYPE_VBR = "VBR" // 边界路由器
)
View Source
const (
	NEXT_HOP_TYPE_INSTANCE   = compute.NEXT_HOP_TYPE_INSTANCE   // ECS实例。
	NEXT_HOP_TYPE_VPCPEERING = compute.NEXT_HOP_TYPE_VPCPEERING // vpc对等连接

	NEXT_HOP_TYPE_IP = compute.NEXT_HOP_TYPE_IP
)
View Source
const (
	EXPANSION_BALANCED = "balanced" //均衡分布

	SHRINK_EARLIEST_CREATION_FIRST        = "earliest"        //最早创建优先
	SHRINK_LATEST_CREATION_FIRST          = "latest"          //最晚创建优先
	SHRINK_CONFIG_EARLIEST_CREATION_FIRST = "config_earliest" //最早配置最早创建优先
	SHRINK_CONFIG_LATEST_CREATION_FIRST   = "config_latest"   //最早配置最晚创建优先

	HEALTH_CHECK_MODE_NORMAL       = "normal"
	HEALTH_CHECK_MODE_LOADBALANCER = "loadbalancer"

	TRIGGER_ALARM  = "alarm"  // 告警
	TRIGGER_TIMING = "timing" // 定时
	TRIGGER_CYCLE  = "cycle"  // 周期定时

	ACTION_ADD    = "add"    // 增加
	ACTION_REMOVE = "remove" // 减少
	ACTION_SET    = "set"    // 设置

	UNIT_ONE     = "s" // 个
	UNIT_PERCENT = "%" // 百分之

	INDICATOR_CPU        = "cpu"        // CPU利用率
	INDICATOR_MEM        = "mem"        // 内存利用率
	INDICATOR_DISK_READ  = "disk_read"  // 磁盘读速率
	INDICATOR_DISK_WRITE = "disk_write" // 磁盘写速率
	INDICATOR_FLOW_INTO  = "flow_into"  // 网络入流量
	INDICATOR_FLOW_OUT   = "flow_out"   // 网络出流量

	WRAPPER_MAX  = "max"     // 最大值
	WRAPPER_MIN  = "min"     //最小值
	WRAPPER_AVER = "average" // 平均值

	OPERATOR_GT = "gt" // 大于
	OPERATOR_LT = "lt" // 小于

	TIMER_TYPE_ONCE  = "once"
	TIMER_TYPE_HOUR  = "hour"
	TIMER_TYPE_DAY   = "day"
	TIMER_TYPE_WEEK  = "week"
	TIMER_TYPE_MONTH = "month"

	// 加入中 和 加入失败 的不算是 ScalingGroup 的机器
	SG_GUEST_STATUS_JOINING        = "joining"        // 加入中
	SG_GUEST_STATUS_READY          = "ready"          // 正常
	SG_GUEST_STATUS_REMOVING       = "removing"       // 移除中
	SG_GUEST_STATUS_REMOVE_FAILED  = "remove_failed"  // 移除失败
	SG_GUEST_STATUS_PENDING_REMOVE = "pending_remove" // 机器进入回收站

	// 只有ready状态是正常的
	SG_STATUS_READY              = "ready"              // 正常
	SG_STATUS_DELETING           = "deleting"           // 删除中
	SG_STATUS_WAIT_ACTIVITY_OVER = "wait_activity_over" // 正在等待伸缩活动完毕
	SG_STATUS_DESTROY_INSTANCE   = "destroy_instance"   // 正在销毁伸缩组内实例
	SG_STATUS_DELETE_FAILED      = "delete_failed"      // 删除失败
	SG_STATUS_CREATE_FAILED      = "create_failed"
	SG_STATUS_DELETED            = "deleted" // 删除

	SP_STATUS_READY         = "ready" // 正常
	SP_STATUS_CREATING      = "creating"
	SP_STATUS_CREATE_FAILED = "create_failed" // 创建失败
	SP_STATUS_DELETING      = "deleting"      // 删除中
	SP_STATUS_DELETE_FAILED = "delete_failed" // 删除失败

	SA_STATUS_WAIT         = "wait"         // 等待中
	SA_STATUS_EXEC         = "execution"    // 执行中
	SA_STATUS_SUCCEED      = "succeed"      // 成功
	SA_STATUS_PART_SUCCEED = "part_succeed" // 部分成功
	SA_STATUS_FAILED       = "failed"       // 失败
	SA_STATUS_REJECT       = "reject"       // 拒绝
)
View Source
const (
	STRATEGY_REQUIRE = "require"
	STRATEGY_EXCLUDE = "exclude"
	STRATEGY_PREFER  = "prefer"
	STRATEGY_AVOID   = "avoid"

	// # container used aggregate
	CONTAINER_AGGREGATE = "container"
)
View Source
const (
	SECGROUP_STATUS_READY = compute.SECGROUP_STATUS_READY

	SECGROUP_DEFAULT_ID = "default"
)
View Source
const (
	SkuCategoryGeneralPurpose      = compute.SkuCategoryGeneralPurpose      // 通用型
	SkuCategoryBurstable           = compute.SkuCategoryBurstable           // 突发性能型
	SkuCategoryComputeOptimized    = compute.SkuCategoryComputeOptimized    // 计算优化型
	SkuCategoryMemoryOptimized     = compute.SkuCategoryMemoryOptimized     // 内存优化型
	SkuCategoryStorageIOOptimized  = compute.SkuCategoryStorageIOOptimized  // 存储IO优化型
	SkuCategoryHardwareAccelerated = compute.SkuCategoryHardwareAccelerated // 硬件加速型
	SkuCategoryHighStorage         = compute.SkuCategoryHighStorage         // 高存储型
	SkuCategoryHighMemory          = compute.SkuCategoryHighMemory          // 高内存型
)
View Source
const (
	SkuStatusAvailable    = compute.SkuStatusAvailable
	SkuStatusSoldout      = compute.SkuStatusSoldout
	SkuStatusCreating     = "creating"
	SkuStatusCreatFailed  = "create_failed"
	SkuStatusDeleting     = "deleting"
	SkuStatusDeleteFailed = "delete_failed"
	SkuStatusUnknown      = "unknown"
	SkuStatusReady        = compute.SkuStatusReady
)
View Source
const (
	// create by
	SNAPSHOT_MANUAL = "manual"
	SNAPSHOT_AUTO   = "auto"

	SNAPSHOT_CREATING      = compute.SNAPSHOT_CREATING
	SNAPSHOT_ROLLBACKING   = compute.SNAPSHOT_ROLLBACKING
	SNAPSHOT_FAILED        = compute.SNAPSHOT_FAILED
	SNAPSHOT_READY         = compute.SNAPSHOT_READY
	SNAPSHOT_DELETE_FAILED = compute.SNAPSHOT_DELETE_FAILED
	SNAPSHOT_DELETING      = compute.SNAPSHOT_DELETING
	SNAPSHOT_UNKNOWN       = compute.SNAPSHOT_UNKNOWN

	INSTANCE_SNAPSHOT_READY         = compute.INSTANCE_SNAPSHOT_READY
	INSTANCE_SNAPSHOT_UNKNOWN       = "unknown"
	INSTANCE_SNAPSHOT_FAILED        = "instance_snapshot_create_failed"
	INSTANCE_SNAPSHOT_START_DELETE  = "instance_snapshot_start_delete"
	INSTANCE_SNAPSHOT_DELETE_FAILED = "instance_snapshot_delete_failed"
	INSTANCE_SNAPSHOT_RESET         = "instance_snapshot_reset"

	SNAPSHOT_EXIST     = "exist"
	SNAPSHOT_NOT_EXIST = "not_exist"
)
View Source
const (
	SNAPSHOT_POLICY_APPLY         = "applying"
	SNAPSHOT_POLICY_APPLY_FAILED  = "apply_failed"
	SNAPSHOT_POLICY_CANCEL        = "canceling"
	SNAPSHOT_POLICY_CANCEL_FAILED = "cancel_failed"
)
View Source
const (
	STORAGE_LOCAL     = compute.STORAGE_LOCAL
	STORAGE_BAREMETAL = "baremetal"
	STORAGE_SHEEPDOG  = "sheepdog"
	STORAGE_RBD       = compute.STORAGE_RBD
	STORAGE_DOCKER    = "docker"
	STORAGE_NAS       = compute.STORAGE_NAS
	STORAGE_VSAN      = "vsan"
	STORAGE_NFS       = compute.STORAGE_NFS
	STORAGE_GPFS      = "gpfs"
	STORAGE_CIFS      = compute.STORAGE_CIFS
	STORAGE_NVME_PT   = "nvme_pt" // nvme passthrough
	STORAGE_NVME      = "nvme"    // nvme sriov
	STORAGE_LVM       = "lvm"
	STORAGE_CLVM      = "clvm" // clustered lvm
	STORAGE_SLVM      = "slvm" // shared lvm

	STORAGE_PUBLIC_CLOUD     = compute.STORAGE_PUBLIC_CLOUD
	STORAGE_CLOUD_EFFICIENCY = compute.STORAGE_CLOUD_EFFICIENCY
	STORAGE_CLOUD_SSD        = compute.STORAGE_CLOUD_SSD
	STORAGE_CLOUD_ESSD_PL0   = compute.STORAGE_CLOUD_ESSD_PL0 // 增强型(Enhanced)SSD 云盘, 单盘最高随机读写IOPS 1万
	STORAGE_CLOUD_ESSD       = compute.STORAGE_CLOUD_ESSD     // 增强型(Enhanced)SSD 云盘, 单盘最高随机读写IOPS 5万
	STORAGE_CLOUD_ESSD_PL2   = compute.STORAGE_CLOUD_ESSD_PL2 // 单盘最高随机读写IOPS 10万
	STORAGE_CLOUD_ESSD_PL3   = compute.STORAGE_CLOUD_ESSD_PL3 // 单盘最高随机读写IOPS 100万
	STORAGE_CLOUD_AUTO       = compute.STORAGE_CLOUD_AUTO     // ESSD AutoPL
	STORAGE_CLOUD_ESSD_ENTRY = "cloud_essd_entry"             // ESSD Entry云盘
	STORAGE_EPHEMERAL_SSD    = compute.STORAGE_EPHEMERAL_SSD  // 单块本地SSD盘, 容量最大不能超过800 GiB
	STORAGE_LOCAL_HDD_PRO    = compute.STORAGE_LOCAL_HDD_PRO  // 实例规格族d1ne和d1搭载的SATA HDD本地盘
	STORAGE_LOCAL_SSD_PRO    = compute.STORAGE_LOCAL_SSD_PRO  // 实例规格族i2、i2g、i1、ga1和gn5等搭载的NVMe

	//Azure hdd and ssd storagetype
	STORAGE_STANDARD_LRS          = compute.STORAGE_STANDARD_LRS
	STORAGE_STANDARDSSD_LRS       = compute.STORAGE_STANDARDSSD_LRS
	STORAGE_PREMIUM_LRS           = compute.STORAGE_PREMIUM_LRS
	STORAGE_AZURE_BASIC           = compute.STORAGE_AZURE_BASIC
	STORAGE_AZURE_GENERAL_PURPOSE = compute.STORAGE_AZURE_GENERAL_PURPOSE

	// aws storage type
	STORAGE_GP2_SSD      = compute.STORAGE_GP2_SSD      // aws general purpose ssd
	STORAGE_GP3_SSD      = compute.STORAGE_GP3_SSD      // aws General Purpose SSD (gp3)
	STORAGE_IO1_SSD      = compute.STORAGE_IO1_SSD      // aws Provisioned IOPS SSD
	STORAGE_IO2_SSD      = compute.STORAGE_IO2_SSD      // aws Provisioned IOPS 2 SSD
	STORAGE_ST1_HDD      = compute.STORAGE_ST1_HDD      // aws Throughput Optimized HDD
	STORAGE_SC1_HDD      = compute.STORAGE_SC1_HDD      // aws Cold HDD
	STORAGE_STANDARD_HDD = compute.STORAGE_STANDARD_HDD // aws Magnetic volumes

	// qcloud storage type
	// STORAGE_CLOUD_SSD ="cloud_ssd"
	STORAGE_LOCAL_BASIC   = compute.STORAGE_LOCAL_BASIC
	STORAGE_LOCAL_SSD     = compute.STORAGE_LOCAL_SSD
	STORAGE_LOCAL_PRO     = compute.STORAGE_LOCAL_PRO
	STORAGE_CLOUD_BASIC   = compute.STORAGE_CLOUD_BASIC
	STORAGE_CLOUD_PREMIUM = compute.STORAGE_CLOUD_PREMIUM //高性能云硬盘
	STORAGE_CLOUD_HSSD    = compute.STORAGE_CLOUD_HSSD    //增强型SSD云硬盘

	// huawei storage type
	STORAGE_HUAWEI_SSD   = compute.STORAGE_HUAWEI_SSD   // 超高IO云硬盘
	STORAGE_HUAWEI_SAS   = compute.STORAGE_HUAWEI_SAS   // 高IO云硬盘
	STORAGE_HUAWEI_SATA  = compute.STORAGE_HUAWEI_SATA  // 普通IO云硬盘
	STORAGE_HUAWEI_GPSSD = compute.STORAGE_HUAWEI_GPSSD // 通用型SSD
	STORAGE_HUAWEI_ESSD  = compute.STORAGE_HUAWEI_ESSD  // 急速型SSD

	// openstack
	STORAGE_OPENSTACK_ISCSI = compute.STORAGE_OPENSTACK_ISCSI
	STORAGE_OPENSTACK_NOVA  = compute.STORAGE_OPENSTACK_NOVA

	// Ucloud storage type
	STORAGE_UCLOUD_CLOUD_NORMAL         = compute.STORAGE_UCLOUD_CLOUD_NORMAL         // 普通云盘
	STORAGE_UCLOUD_CLOUD_SSD            = compute.STORAGE_UCLOUD_CLOUD_SSD            // SSD云盘
	STORAGE_UCLOUD_LOCAL_NORMAL         = compute.STORAGE_UCLOUD_LOCAL_NORMAL         // 普通本地盘
	STORAGE_UCLOUD_LOCAL_SSD            = compute.STORAGE_UCLOUD_LOCAL_SSD            // SSD本地盘
	STORAGE_UCLOUD_EXCLUSIVE_LOCAL_DISK = compute.STORAGE_UCLOUD_EXCLUSIVE_LOCAL_DISK // 独享本地盘

	// VolcEngine storage types
	STORAGE_VOLC_CLOUD_FLEXPL = compute.STORAGE_VOLCENGINE_FlexPL // 极速型SSD云盘, FlexPL规格
	STORAGE_VOLC_CLOUD_PL0    = compute.STORAGE_VOLCENGINE_PL0    //极速型SSD云盘, PL0规格
	STORAGE_VOLC_CLOUD_PTSSD  = compute.STORAGE_VOLCENGINE_PTSSD  // 性能型SSD, 上一代产品

	// Zstack storage type
	STORAGE_ZSTACK_LOCAL_STORAGE = compute.STORAGE_ZSTACK_LOCAL_STORAGE
	STORAGE_ZSTACK_CEPH          = compute.STORAGE_ZSTACK_CEPH
	STORAGE_ZSTACK_SHARED_BLOCK  = compute.STORAGE_ZSTACK_SHARED_BLOCK

	// Google storage type
	STORAGE_GOOGLE_LOCAL_SSD   = compute.STORAGE_GOOGLE_LOCAL_SSD   //本地SSD暂存盘 (最多8个)
	STORAGE_GOOGLE_PD_STANDARD = compute.STORAGE_GOOGLE_PD_STANDARD //标准永久性磁盘
	STORAGE_GOOGLE_PD_SSD      = compute.STORAGE_GOOGLE_PD_SSD      //SSD永久性磁盘
	STORAGE_GOOGLE_PD_BALANCED = compute.STORAGE_GOOGLE_PD_BALANCED //平衡永久性磁盘

	// ctyun storage type
	STORAGE_CTYUN_SSD  = compute.STORAGE_CTYUN_SSD  // 超高IO云硬盘
	STORAGE_CTYUN_SAS  = compute.STORAGE_CTYUN_SAS  // 高IO云硬盘
	STORAGE_CTYUN_SATA = compute.STORAGE_CTYUN_SATA // 普通IO云硬盘

	// jd cloud storage type
	STORAGE_JDCLOUD_GP1 = compute.STORAGE_JDCLOUD_GP1 // 通用型SSD云硬盘
	STORAGE_JDCLOUD_IO1 = compute.STORAGE_JDCLOUD_IO1 // 性能型SSD云硬盘
	STORAGE_JDCLOUD_STD = compute.STORAGE_JDCLOUD_STD // 容量型HDD云硬盘
	STORAGE_JDCLOUD_SSD = compute.STORAGE_JDCLOUD_SSD // SSD云硬盘
	STORAGE_JDCLOUD_PHD = compute.STORAGE_JDCLOUD_PHD // HDD云硬盘

	STORAGE_ECLOUD_CAPEBS = compute.STORAGE_ECLOUD_CAPEBS // 容量盘
	STORAGE_ECLOUD_EBS    = compute.STORAGE_ECLOUD_EBS    // 性能盘
	STORAGE_ECLOUD_SSD    = compute.STORAGE_ECLOUD_SSD    // 高性能盘
	STORAGE_ECLOUD_SSDEBS = compute.STORAGE_ECLOUD_SSDEBS // 性能优化盘
	STORAGE_ECLOUD_SYSTEM = compute.STORAGE_ECLOUD_SYSTEM // 系统盘

	STORAGE_BAIDU_SSD              = compute.STORAGE_BAIDU_SSD
	STORAGE_BAIDU_PREMIUM_SSD      = compute.STORAGE_BAIDU_PREMIUM_SSD
	STORAGE_BAIDU_HDD              = compute.STORAGE_BAIDU_HDD
	STORAGE_BAIDU_ENHANCED_SSD_PL1 = compute.STORAGE_BAIDU_ENHANCED_SSD_PL1
	STORAGE_BAIDU_ENHANCED_SSD_PL2 = compute.STORAGE_BAIDU_ENHANCED_SSD_PL2
	STORAGE_BAIDU_ENHANCED_SSD_PL3 = compute.STORAGE_BAIDU_ENHANCED_SSD_PL3

	// zettakit
	STORAGE_ZETTAKIT_NORMAL = compute.STORAGE_ZETTAKIT_NORMAL
)
View Source
const (
	STORAGE_ENABLED = "enabled"
	// STORAGE_DISABLED = "disabled"
	STORAGE_OFFLINE = compute.STORAGE_OFFLINE // 离线
	STORAGE_ONLINE  = compute.STORAGE_ONLINE  // 在线
	STORAGE_UNMOUNT = "unmount"               // 待挂载

	DISK_TYPE_ROTATE = compute.DISK_TYPE_ROTATE
	DISK_TYPE_SSD    = compute.DISK_TYPE_SSD
	DISK_TYPE_HYBRID = compute.DISK_TYPE_HYBRID
)
View Source
const (
	RBD_DEFAULT_MON_TIMEOUT   = 5       //5 seconds 连接超时时间
	RBD_DEFAULT_OSD_TIMEOUT   = 20 * 60 //20 minute 操作超时时间
	RBD_DEFAULT_MOUNT_TIMEOUT = 2 * 60  //CephFS挂载超时时间, 目前未使用
)
View Source
const (
	STORAGE_METADATA_VENDOR    = "vendor"
	STORAGE_METADATA_MODEL     = "model"
	STORAGE_METADATA_BANDWIDTH = "bandwidth"
)
View Source
const (
	TABLESTORE_STATUS_RUNNING = compute.TABLESTORE_STATUS_RUNNING
	TABLESTORE_STATUS_UNKNOWN = compute.TABLESTORE_STATUS_UNKNOWN
)
View Source
const (
	VPC_PEERING_CONNECTION_STATUS_CREATING       = compute.VPC_PEERING_CONNECTION_STATUS_CREATING
	VPC_PEERING_CONNECTION_STATUS_CREATE_FAILED  = "create_failed"
	VPC_PEERING_CONNECTION_STATUS_DELETE_FAILED  = "delete_failed"
	VPC_PEERING_CONNECTION_STATUS_PENDING_ACCEPT = compute.VPC_PEERING_CONNECTION_STATUS_PENDING_ACCEPT
	VPC_PEERING_CONNECTION_STATUS_ACTIVE         = compute.VPC_PEERING_CONNECTION_STATUS_ACTIVE
	VPC_PEERING_CONNECTION_STATUS_DELETING       = compute.VPC_PEERING_CONNECTION_STATUS_DELETING
	VPC_PEERING_CONNECTION_STATUS_UNKNOWN        = compute.VPC_PEERING_CONNECTION_STATUS_UNKNOWN
)
View Source
const (
	VPC_STATUS_PENDING       = compute.VPC_STATUS_PENDING
	VPC_STATUS_AVAILABLE     = compute.VPC_STATUS_AVAILABLE
	VPC_STATUS_UNAVAILABLE   = compute.VPC_STATUS_UNAVAILABLE
	VPC_STATUS_FAILED        = compute.VPC_STATUS_FAILED
	VPC_STATUS_START_DELETE  = "start_delete"
	VPC_STATUS_DELETING      = compute.VPC_STATUS_DELETING
	VPC_STATUS_DELETE_FAILED = "delete_failed"
	VPC_STATUS_DELETED       = "deleted"
	VPC_STATUS_UNKNOWN       = compute.VPC_STATUS_UNKNOWN

	MAX_VPC_PER_REGION = 3

	DEFAULT_VPC_ID = compute.DEFAULT_VPC_ID
	NORMAL_VPC_ID  = compute.NORMAL_VPC_ID // 没有关联VPC的安全组,统一使用normal

	CLASSIC_VPC_NAME = "-"
)
View Source
const (
	VPC_EXTERNAL_ACCESS_MODE_DISTGW     = "distgw"                              // distgw only
	VPC_EXTERNAL_ACCESS_MODE_EIP_DISTGW = "eip-distgw"                          // eip when available, distgw otherwise
	VPC_EXTERNAL_ACCESS_MODE_EIP        = compute.VPC_EXTERNAL_ACCESS_MODE_EIP  // eip only
	VPC_EXTERNAL_ACCESS_MODE_NONE       = compute.VPC_EXTERNAL_ACCESS_MODE_NONE // no external access
)
View Source
const (
	VpcInterExtMask = 30

	VpcInterExtMac1 = "ee:ee:ee:ee:ee:f0"
	VpcInterExtMac2 = "ee:ee:ee:ee:ee:f1"
)
View Source
const (
	VpcMappedIPMask = 17

	VpcMappedGatewayMac = "ee:ee:ee:ee:ee:ee"
)
View Source
const (
	VpcEipGatewayIPMask = 17

	VpcEipGatewayMac = "ee:ee:ee:ee:ee:ef"

	VpcEipGatewayMac3 = "ee:ee:ee:ee:ee:f0"
)
View Source
const (
	WAF_ACTION_ALLOW      = "Allow"
	WAF_ACTION_BLOCK      = "Block"
	WAF_ACTION_PREVENTION = "Prevention"
	WAF_ACTION_DETECTION  = "Detection"

	WAF_STATUS_AVAILABLE     = compute.WAF_STATUS_AVAILABLE
	WAF_STATUS_DELETING      = compute.WAF_STATUS_DELETING
	WAF_STATUS_DELETE_FAILED = "delete_failed"
	WAF_STATUS_CREATING      = "creating"
	WAF_STATUS_CREATE_FAILED = compute.WAF_STATUS_CREATE_FAILED
	WAF_STATUS_UPDATING      = compute.WAF_STATUS_UPDATING
	WAF_STATUS_UNKNOWN       = "unknown"
)
View Source
const (
	WAF_RULE_STATUS_AVAILABLE     = "available"
	WAF_RULE_STATUS_DELETING      = "deleting"
	WAF_RULE_STATUS_CREATING      = "creating"
	WAF_RULE_STATUS_CREATE_FAILED = "create_failed"
	WAF_RULE_STATUS_DELETE_FAILED = "delete_failed"
	WAF_RULE_STATUS_UPDATING      = "updating"
	WAF_RULE_STATUS_UPDATE_FAILED = "update_failed"
	WAF_RULE_STATUS_UNKNOWN       = "unknown"
)
View Source
const (
	WIRE_STATUS_AVAILABLE            = compute.WIRE_STATUS_AVAILABLE
	WIRE_STATUS_READY_DEPRECATED     = "ready"
	WIRE_STATUS_MERGE_NETWORK        = "merge_network"
	WIRE_STATUS_MERGE_NETWORK_FAILED = "merge_network_failed"
)
View Source
const (
	ZONE_INIT    = "init"
	ZONE_ENABLE  = compute.ZONE_ENABLE
	ZONE_DISABLE = compute.ZONE_DISABLE
	ZONE_SOLDOUT = compute.ZONE_SOLDOUT
)
View Source
const (
	ACCESS_MAC_ANY = "00:00:00:00:00:00"
)
View Source
const (
	BAREMETAL_SERVER_METATA_ROOT_DISK_MATCHER = "baremetal_root_disk_matcher"
)
View Source
const BASE_INSTANCE_SNAPSHOT_ID = "__base_instance_snapshot_id"
View Source
const (
	BackupStorageOffline = "backup storage offline"
)
View Source
const (
	CONTAINER_STORAGE_LOCAL_RAW = "local_raw"
)
View Source
const MAX_WINDOWS_COMPUTER_NAME_LENGTH = 15

windows allow a maximal length of 15 http://support.microsoft.com/kb/909264

View Source
const (
	NetworkAddressParentTypeGuestnetwork = "guestnetwork"
)
View Source
const (
	NetworkAddressTypeSubIP = "sub_ip"
)
View Source
const VPC_OVN_ENCAP_COST = 60

IP: 20 UDP: 8 GENEVE HDR: 8 + 4x total: 36 + 4x

View Source
const (
	VPC_PROVIDER_OVN = "ovn"
)

Variables

View Source
var (
	CLOUD_PROVIDER_VALID_STATUS        = []string{CLOUD_PROVIDER_CONNECTED}
	CLOUD_PROVIDER_VALID_HEALTH_STATUS = []string{CLOUD_PROVIDER_HEALTH_NORMAL, CLOUD_PROVIDER_HEALTH_NO_PERMISSION}
	PRIVATE_CLOUD_PROVIDERS            = []string{
		CLOUD_PROVIDER_NUTANIX, CLOUD_PROVIDER_BINGO_CLOUD, CLOUD_PROVIDER_CLOUDPODS,
		CLOUD_PROVIDER_ZSTACK, CLOUD_PROVIDER_OPENSTACK, CLOUD_PROVIDER_APSARA,
		CLOUD_PROVIDER_HCSO, CLOUD_PROVIDER_HCS, CLOUD_PROVIDER_HCSOP,
		CLOUD_PROVIDER_INCLOUD_SPHERE, CLOUD_PROVIDER_PROXMOX, CLOUD_PROVIDER_REMOTEFILE,
		CLOUD_PROVIDER_H3C, CLOUD_PROVIDER_SANGFOR, CLOUD_PROVIDER_ZSTACK, CLOUD_PROVIDER_UIS,
		CLOUD_PROVIDER_ZETTAKIT, CLOUD_PROVIDER_CAS,
	}
	PUBLIC_CLOUD_PROVIDERS = []string{
		CLOUD_PROVIDER_ALIYUN,
		CLOUD_PROVIDER_AWS,
		CLOUD_PROVIDER_AZURE,
		CLOUD_PROVIDER_BAIDU,
		CLOUD_PROVIDER_CTYUN,
		CLOUD_PROVIDER_CUCLOUD,
		CLOUD_PROVIDER_ECLOUD,
		CLOUD_PROVIDER_HUAWEI,
		CLOUD_PROVIDER_QCLOUD,
		CLOUD_PROVIDER_UCLOUD,
		CLOUD_PROVIDER_GOOGLE,
		CLOUD_PROVIDER_KSYUN,
		CLOUD_PROVIDER_QINGCLOUD,
		CLOUD_PROVIDER_JDCLOUD,
		CLOUD_PROVIDER_VOLCENGINE,
		CLOUD_PROVIDER_ORACLE,
	}

	CLOUD_PROVIDERS = []string{
		CLOUD_PROVIDER_ONECLOUD,
		CLOUD_PROVIDER_VMWARE,
		CLOUD_PROVIDER_ALIYUN,
		CLOUD_PROVIDER_APSARA,
		CLOUD_PROVIDER_QCLOUD,
		CLOUD_PROVIDER_AZURE,
		CLOUD_PROVIDER_AWS,
		CLOUD_PROVIDER_HUAWEI,
		CLOUD_PROVIDER_HCSO,
		CLOUD_PROVIDER_HCSOP,
		CLOUD_PROVIDER_HCS,
		CLOUD_PROVIDER_OPENSTACK,
		CLOUD_PROVIDER_UCLOUD,
		CLOUD_PROVIDER_VOLCENGINE,
		CLOUD_PROVIDER_ZSTACK,
		CLOUD_PROVIDER_GOOGLE,
		CLOUD_PROVIDER_CTYUN,
		CLOUD_PROVIDER_ECLOUD,
		CLOUD_PROVIDER_JDCLOUD,
		CLOUD_PROVIDER_CLOUDPODS,
		CLOUD_PROVIDER_NUTANIX,
		CLOUD_PROVIDER_BINGO_CLOUD,
		CLOUD_PROVIDER_INCLOUD_SPHERE,
		CLOUD_PROVIDER_PROXMOX,
		CLOUD_PROVIDER_REMOTEFILE,
		CLOUD_PROVIDER_H3C,
		CLOUD_PROVIDER_KSYUN,
		CLOUD_PROVIDER_BAIDU,
		CLOUD_PROVIDER_CUCLOUD,
		CLOUD_PROVIDER_QINGCLOUD,
		CLOUD_PROVIDER_ORACLE,
		CLOUD_PROVIDER_SANGFOR,
		CLOUD_PROVIDER_ZETTAKIT,
		CLOUD_PROVIDER_UIS,
		CLOUD_PROVIDER_CAS,
	}

	CLOUD_PROVIDER_HOST_TYPE_MAP = map[string][]string{
		CLOUD_PROVIDER_ONECLOUD: {
			HOST_TYPE_KVM,
			HOST_TYPE_BAREMETAL,
			HOST_TYPE_HYPERVISOR,
		},
		CLOUD_PROVIDER_VMWARE: {
			HOST_TYPE_ESXI,
		},
		CLOUD_PROVIDER_ALIYUN: {
			HOST_TYPE_ALIYUN,
		},
		CLOUD_PROVIDER_APSARA: {
			HOST_TYPE_APSARA,
		},
		CLOUD_PROVIDER_QCLOUD: {
			HOST_TYPE_QCLOUD,
		},
		CLOUD_PROVIDER_AZURE: {
			HOST_TYPE_AZURE,
		},
		CLOUD_PROVIDER_AWS: {
			HOST_TYPE_AWS,
		},
		CLOUD_PROVIDER_HUAWEI: {
			HOST_TYPE_HUAWEI,
		},
		CLOUD_PROVIDER_HCSO: {
			HOST_TYPE_HCSO,
		},
		CLOUD_PROVIDER_HCSOP: {
			HOST_TYPE_HCSOP,
		},
		CLOUD_PROVIDER_HCS: {
			HOST_TYPE_HCS,
		},
		CLOUD_PROVIDER_OPENSTACK: {
			HOST_TYPE_OPENSTACK,
		},
		CLOUD_PROVIDER_UCLOUD: {
			HOST_TYPE_UCLOUD,
		},
		CLOUD_PROVIDER_VOLCENGINE: {
			HOST_TYPE_VOLCENGINE,
		},
		CLOUD_PROVIDER_ZSTACK: {
			HOST_TYPE_ZSTACK,
		},
		CLOUD_PROVIDER_GOOGLE: {
			HOST_TYPE_GOOGLE,
		},
		CLOUD_PROVIDER_CTYUN: {
			HOST_TYPE_CTYUN,
		},
		CLOUD_PROVIDER_ECLOUD: {
			HOST_TYPE_ECLOUD,
		},
		CLOUD_PROVIDER_JDCLOUD: {
			HOST_TYPE_JDCLOUD,
		},
		CLOUD_PROVIDER_CLOUDPODS: {
			HOST_TYPE_CLOUDPODS,
		},
		CLOUD_PROVIDER_NUTANIX: {
			HOST_TYPE_NUTANIX,
		},
		CLOUD_PROVIDER_BINGO_CLOUD: {
			HOST_TYPE_BINGO_CLOUD,
		},
		CLOUD_PROVIDER_INCLOUD_SPHERE: {
			HOST_TYPE_INCLOUD_SPHERE,
		},
		CLOUD_PROVIDER_PROXMOX: {
			HOST_TYPE_PROXMOX,
		},
		CLOUD_PROVIDER_REMOTEFILE: {
			HOST_TYPE_REMOTEFILE,
		},
		CLOUD_PROVIDER_H3C: {
			HOST_TYPE_H3C,
		},
		CLOUD_PROVIDER_KSYUN: {
			HOST_TYPE_KSYUN,
		},
		CLOUD_PROVIDER_BAIDU: {
			HOST_TYPE_BAIDU,
		},
		CLOUD_PROVIDER_CUCLOUD: {
			HOST_TYPE_CUCLOUD,
		},
		CLOUD_PROVIDER_QINGCLOUD: {
			HOST_TYPE_QINGCLOUD,
		},
		CLOUD_PROVIDER_ORACLE: {
			HOST_TYPE_ORACLE,
		},
		CLOUD_PROVIDER_SANGFOR: {
			HOST_TYPE_SANGFOR,
		},
		CLOUD_PROVIDER_ZETTAKIT: {
			HOST_TYPE_ZETTAKIT,
		},
		CLOUD_PROVIDER_UIS: {
			HOST_TYPE_UIS,
		},
		CLOUD_PROVIDER_CAS: {
			HOST_TYPE_CAS,
		},
	}
)
View Source
var (
	ALIYUN_MYSQL_DENY_KEYWORKD []string = []string{}/* 691 elements not displayed */

	ALIYUN_SQL_SERVER_DENY_KEYWORD []string = []string{}/* 198 elements not displayed */

	RW_PRIVILEGE_SET = []string{
		"SELECT", "INSERT", "UPDATE", "DELETE", "CREATE",
		"DROP", "REFERENCES", "INDEX", "ALTER", "CREATE TEMPORARY TABLES",
		"LOCK TABLES", "EXECUTE", "CREATE VIEW", "SHOW VIEW", "CREATE ROUTINE",
		"ALTER ROUTINE", "EVENT", "TRIGGER", "PROCESS", "REPLICATION SLAVE",
		"REPLICATION CLIENT",
	}
	R_PRIVILEGE_SET = []string{"SELECT", "LOCK TABLES", "SHOW VIEW", "PROCESS", "REPLICATION SLAVE", "REPLICATION CLIENT"}
)
View Source
var (
	DISK_TYPES          = []string{DISK_TYPE_ROTATE, DISK_TYPE_SSD, DISK_TYPE_HYBRID}
	STORAGE_LOCAL_TYPES = []string{
		STORAGE_LOCAL, STORAGE_NVME_PT, STORAGE_NVME, STORAGE_LVM,
		STORAGE_BAREMETAL, STORAGE_UCLOUD_LOCAL_NORMAL, STORAGE_UCLOUD_LOCAL_SSD, STORAGE_UCLOUD_EXCLUSIVE_LOCAL_DISK,
		STORAGE_EPHEMERAL_SSD, STORAGE_LOCAL_BASIC, STORAGE_LOCAL_SSD, STORAGE_LOCAL_PRO, STORAGE_OPENSTACK_NOVA,
		STORAGE_ZSTACK_LOCAL_STORAGE, STORAGE_GOOGLE_LOCAL_SSD,
	}
	STORAGE_SUPPORT_TYPES = STORAGE_LOCAL_TYPES
	STORAGE_ALL_TYPES     = []string{
		STORAGE_LOCAL, STORAGE_BAREMETAL, STORAGE_SHEEPDOG,
		STORAGE_RBD, STORAGE_DOCKER, STORAGE_NAS, STORAGE_VSAN,
		STORAGE_NFS, STORAGE_GPFS, STORAGE_CIFS, STORAGE_NVME_PT, STORAGE_NVME, STORAGE_LVM,
	}
	STORAGE_TYPES = []string{STORAGE_LOCAL, STORAGE_BAREMETAL, STORAGE_SHEEPDOG,
		STORAGE_RBD, STORAGE_DOCKER, STORAGE_NAS, STORAGE_VSAN, STORAGE_NFS,
		STORAGE_PUBLIC_CLOUD, STORAGE_CLOUD_SSD, STORAGE_CLOUD_ESSD, STORAGE_CLOUD_ESSD_PL2, STORAGE_CLOUD_ESSD_PL3,
		STORAGE_EPHEMERAL_SSD, STORAGE_CLOUD_EFFICIENCY,
		STORAGE_STANDARD_LRS, STORAGE_STANDARDSSD_LRS, STORAGE_PREMIUM_LRS,
		STORAGE_GP2_SSD, STORAGE_GP3_SSD, STORAGE_IO1_SSD, STORAGE_ST1_HDD, STORAGE_SC1_HDD, STORAGE_STANDARD_HDD,
		STORAGE_LOCAL_BASIC, STORAGE_LOCAL_SSD, STORAGE_CLOUD_BASIC, STORAGE_CLOUD_PREMIUM,
		STORAGE_HUAWEI_SSD, STORAGE_HUAWEI_SAS, STORAGE_HUAWEI_SATA,
		STORAGE_OPENSTACK_ISCSI, STORAGE_UCLOUD_CLOUD_NORMAL, STORAGE_UCLOUD_CLOUD_SSD,
		STORAGE_UCLOUD_LOCAL_NORMAL, STORAGE_UCLOUD_LOCAL_SSD, STORAGE_UCLOUD_EXCLUSIVE_LOCAL_DISK,
		STORAGE_ZSTACK_LOCAL_STORAGE, STORAGE_ZSTACK_CEPH, STORAGE_ZSTACK_LOCAL_STORAGE, STORAGE_GPFS, STORAGE_CIFS,
		STORAGE_NVME_PT, STORAGE_NVME, STORAGE_LVM, STORAGE_CLVM, STORAGE_SLVM,
	}

	HOST_STORAGE_LOCAL_TYPES = []string{STORAGE_LOCAL, STORAGE_BAREMETAL, STORAGE_ZSTACK_LOCAL_STORAGE, STORAGE_OPENSTACK_NOVA}

	STORAGE_LIMITED_TYPES = []string{STORAGE_LOCAL, STORAGE_BAREMETAL, STORAGE_NAS, STORAGE_RBD,
		STORAGE_NFS, STORAGE_GPFS, STORAGE_VSAN, STORAGE_CIFS, STORAGE_CLVM, STORAGE_SLVM}

	SHARED_FILE_STORAGE = []string{STORAGE_NFS, STORAGE_GPFS}
	FIEL_STORAGE        = []string{STORAGE_LOCAL, STORAGE_NFS, STORAGE_GPFS, STORAGE_LVM, STORAGE_CLVM, STORAGE_SLVM}

	// supported shared storage types
	SHARED_STORAGE = []string{STORAGE_NFS, STORAGE_GPFS, STORAGE_RBD, STORAGE_CLVM, STORAGE_SLVM}
)
View Source
var AWS_APPLICATION_LB_LISTENER_TYPES = choices.NewChoices(
	LB_LISTENER_TYPE_HTTP,
	LB_LISTENER_TYPE_HTTPS,
)

aws_application_lb_listener

View Source
var AWS_NETWORK_LB_LISTENER_TYPES = choices.NewChoices(
	LB_LISTENER_TYPE_TCP,
	LB_LISTENER_TYPE_UDP,
)

aws_network_lb_listener

View Source
var ComputeI18nTable = i18n.Table{}

huawei backend group protocal choices

View Source
var ID_VENDOR_MAP = map[string]string{
	NVIDIA_VENDOR_ID: "NVIDIA",
	AMD_VENDOR_ID:    "AMD",
}
View Source
var InstanceFamilies = compute.InstanceFamilies
View Source
var KEYPAIR_SCHEMAS = []string{
	KEYPAIRE_SCHEME_RSA,
}
View Source
var LB_ALIYUN_COMMON_SCHEDULER_TYPES = choices.NewChoices(
	LB_SCHEDULER_RR,
	LB_SCHEDULER_WRR,
	LB_SCHEDULER_WLC,
)
View Source
var LB_HEALTH_CHECK_TYPES_UDP = choices.NewChoices(
	LB_HEALTH_CHECK_UDP,
)
View Source
var LB_REDIRECT_TYPES = []string{
	LB_REDIRECT_OFF,
	LB_REDIRECT_RAW,
}
View Source
var NetworkAddressTypes = choices.NewChoices(
	NetworkAddressTypeSubIP,
)
View Source
var VALID_GPU_TYPES = []string{GPU_HPC_TYPE, GPU_VGA_TYPE}
View Source
var VENDOR_ID_MAP = map[string]string{
	"NVIDIA": NVIDIA_VENDOR_ID,
	"AMD":    AMD_VENDOR_ID,
}

Functions

func AppendMetricTags

func AppendMetricTags(ret map[string]string, res ...IMetricResource) map[string]string

func GetCloudEnv

func GetCloudEnv(provider, accessUrl string) string

func IsDiskTypeMatch

func IsDiskTypeMatch(t1, t2 string) bool

func IsInNetworkTypes

func IsInNetworkTypes(netType TNetworkType, types []TNetworkType) bool

func ValidatePodLogOptions

func ValidatePodLogOptions(opts *PodLogOptions) error

func VpcEipGatewayCidr

func VpcEipGatewayCidr() netutils.IPV4Prefix

func VpcEipGatewayIP

func VpcEipGatewayIP() netutils.IPV4Addr

func VpcEipGatewayIP3

func VpcEipGatewayIP3() netutils.IPV4Addr

func VpcInterCidr

func VpcInterCidr() netutils.IPV4Prefix

func VpcInterExtIP1

func VpcInterExtIP1() netutils.IPV4Addr

func VpcInterExtIP2

func VpcInterExtIP2() netutils.IPV4Addr

func VpcMappedCidr

func VpcMappedCidr() netutils.IPV4Prefix

func VpcMappedGatewayIP

func VpcMappedGatewayIP() netutils.IPV4Addr

func VpcMappedHostIPEnd

func VpcMappedHostIPEnd() netutils.IPV4Addr

func VpcMappedHostIPStart

func VpcMappedHostIPStart() netutils.IPV4Addr

func VpcMappedIPEnd

func VpcMappedIPEnd() netutils.IPV4Addr

func VpcMappedIPStart

func VpcMappedIPStart() netutils.IPV4Addr

func VpcOvnEncapCostStr

func VpcOvnEncapCostStr() string

Types

type AccessGroupFilterListInput

type AccessGroupFilterListInput struct {
	// 权限组Id
	AccessGroupId string `json:"access_group_id"`

	// 以权限组排序
	OrderByAccessGroup string `json:"order_by_access_group"`
}

type AccessGroupResourceInfo

type AccessGroupResourceInfo struct {
	// 权限组名称
	AccessGroup string `json:"access_group"`
}

type AccessGroupRuleCreateInput

type AccessGroupRuleCreateInput struct {
	apis.ResourceBaseCreateInput

	Priority       int
	Source         string
	RWAccessType   string
	UserAccessType string
	Description    string
	AccessGroupId  string
}

type AccessGroupRuleDetails

type AccessGroupRuleDetails struct {
	apis.ResourceBaseDetails

	AccessGroupResourceInfo
}

type AccessGroupRuleListInput

type AccessGroupRuleListInput struct {
	apis.ResourceBaseListInput

	AccessGroupFilterListInput
}

type AccessGroupRuleUpdateInput

type AccessGroupRuleUpdateInput struct {
	Priority       *int
	Source         string
	RWAccessType   string
	UserAccessType string
	Description    string
}

type AppBackup

type AppBackup struct {
	Id   string
	Name string
	Type string
}

type AppBackupOutput

type AppBackupOutput struct {
	Data         []AppBackup
	BackupConfig struct {
		Enabled               bool
		FrequencyInterval     int
		FrequencyUnit         string
		RetentionPeriodInDays int
	}
}

type AppCertificate

type AppCertificate struct {
	Id          string
	Name        string
	SubjectName string
	Issuer      string
	IssueDate   time.Time
	Thumbprint  string
	ExpireTime  time.Time
}

type AppCertificateOutput

type AppCertificateOutput struct {
	Data []AppCertificate
}

type AppDomain

type AppDomain struct {
	Id       string
	Name     string
	Status   string
	SslState string
}

type AppDomainOutput

type AppDomainOutput struct {
	Data []AppDomain
}

type AppEnvironmentDetails

type AppEnvironmentDetails struct {
	apis.VirtualResourceDetails
}

type AppEnvironmentListInput

type AppEnvironmentListInput struct {
	apis.VirtualResourceListInput
	apis.ExternalizedResourceBaseListInput

	AppId        string
	InstanceType string
}

type AppHybirdConnection

type AppHybirdConnection struct {
	Id        string
	Name      string
	Hostname  string
	Namespace string
	Port      int
}

type AppHybirdConnectionOutput

type AppHybirdConnectionOutput struct {
	Data []AppHybirdConnection
}

type AttachNetworkInput

type AttachNetworkInput struct {
	// 添加的网卡的配置
	// required: false
	Nets []*NetworkConfig `json:"nets"`

	// 添加的网卡的配置
	// required: false
	NetDesc []string `json:"net_desc"`

	// 添加后不立即同步配置
	DisableSyncConfig *bool `json:"disable_sync_config"`
}

type BackupInfo

type BackupInfo struct {
	// 备份主机所在宿主机名称
	BackupHostName string `json:"backup_host_name"`
	// 备份主机所在宿主机状态
	BackupHostStatus string `json:"backup_host_status"`
	// 主备机同步状态
	BackupGuestSyncStatus string `json:"backup_guest_sync_status"`
}

type BackupStorageCreateInput

type BackupStorageCreateInput struct {
	apis.EnabledStatusInfrasResourceBaseCreateInput

	// description: storage type
	// enum: ["nfs"]
	StorageType string `json:"storage_type"`

	SBackupStorageAccessInfo

	// description: Capacity size in MB
	CapacityMb int `json:"capacity_mb"`
}

type BackupStorageListInput

type BackupStorageListInput struct {
	apis.EnabledStatusInfrasResourceBaseListInput

	// filter by server_id
	ServerId string `json:"server_id"`
	// filter by disk_id
	DiskId string `json:"disk_id"`
}

type BackupstorageFilterListInput

type BackupstorageFilterListInput struct {
	BackupstorageFilterListInputBase
}

type BackupstorageFilterListInputBase

type BackupstorageFilterListInputBase struct {
	BackupstorageResourceInput

	// 以备份存储名称排序
	// pattern:asc|desc
	OrderByBackupstorage string `json:"order_by_backupstorage"`
}

type BackupstorageResourceInfo

type BackupstorageResourceInfo struct {
	// 备份存储名称
	Backupstorage string `json:"backupstorage"`

	// 备份存储类型
	BackupstorageType TBackupStorageType `json:"backupstorage_type"`

	// 备份存储状态
	BackupstorageStatus string `json:"backupstorage_status"`
}

type BackupstorageResourceInput

type BackupstorageResourceInput struct {
	// 备份存储(ID或Name)
	BackupstorageId string `json:"backupstorage_id"`
	// swagger:ignore
	// Deprecated
	// filter by backupstorage_id
	Backupstorage string `json:"backupstorage" yunion-deprecated-by:"backupstorage_id"`
}

type BaremetalDiskConfig

type BaremetalDiskConfig struct {
	//Index int `json:"index"`
	// disk type
	Type string `json:"type"` // ssd / rotate
	// raid config
	Conf         string  `json:"conf"`  // raid配置
	Count        int64   `json:"count"` // 连续几块
	Range        []int64 `json:"range"` // 指定几块
	Splits       string  `json:"splits"`
	Size         []int64 `json:"size"` //
	Adapter      *int    `json:"adapter,omitempty"`
	Driver       string  `json:"driver"`
	Cachedbadbbu *bool   `json:"cachedbadbbu,omitempty"`
	Strip        *int64  `json:"strip,omitempty"`
	RA           *bool   `json:"ra,omitempty"`
	WT           *bool   `json:"wt,omitempty"`
	Direct       *bool   `json:"direct,omitempty"`
}

type BaremetalRootDiskMatcher

type BaremetalRootDiskMatcher struct {
	Device      string                      `json:"device"`
	SizeMB      int64                       `json:"size_mb"`
	SizeMBRange *RootDiskMatcherSizeMBRange `json:"size_mb_range"`
}

type BaremetalagentCreateInput

type BaremetalagentCreateInput struct {
	apis.StandaloneResourceCreateInput

	ZoneResourceInput

	AccessIp   string `json:"access_ip"`
	ManagerUri string `json:"manager_uri"`
	AgentType  string `json:"agent_type"`
	Version    string `json:"version"`
}

type BaremetalagentListInput

type BaremetalagentListInput struct {
	apis.StandaloneResourceListInput
	ZonalFilterListInput

	// 以状态过滤
	Status []string `json:"status"`
	// 以IP地址过滤
	AccessIp []string `json:"access_ip"`
	// 以AgentType过滤
	AgentType []string `json:"agent_type"`
}

type BaremetalagentUpdateInput

type BaremetalagentUpdateInput struct {
	apis.StandaloneResourceBaseUpdateInput

	ZoneResourceInput

	AccessIp   string `json:"access_ip"`
	ManagerUri string `json:"manager_uri"`
	AgentType  string `json:"agent_type"`
	Version    string `json:"version"`
}

type BatchConvertToKvmCheckInput

type BatchConvertToKvmCheckInput struct {
	GuestIds []string `json:"guest_ids"`
}

type BucketAclInput

type BucketAclInput struct {
	BucketObjectsActionInput

	Acl cloudprovider.TBucketACLType
}

func (*BucketAclInput) Validate

func (input *BucketAclInput) Validate() error

type BucketCORSRule

type BucketCORSRule struct {
	AllowedMethods []string
	// 允许的源站,可以是*
	AllowedOrigins []string
	AllowedHeaders []string
	MaxAgeSeconds  int
	ExposeHeaders  []string
	// 规则区别标识
	Id string
}

type BucketCORSRuleDeleteInput

type BucketCORSRuleDeleteInput struct {
	Id []string
}

type BucketCORSRules

type BucketCORSRules struct {
	Data []BucketCORSRule `json:"data"`
}

func (*BucketCORSRules) Validate

func (input *BucketCORSRules) Validate() error

type BucketCreateInput

type BucketCreateInput struct {
	apis.SharableVirtualResourceCreateInput
	CloudregionResourceInput
	CloudproviderResourceInput

	StorageClass string `json:"storage_class"`
}

type BucketDetails

type BucketDetails struct {
	apis.SharableVirtualResourceDetails
	ManagedResourceInfo
	CloudregionResourceInfo

	SBucket

	// 访问URL列表
	AccessUrls []cloudprovider.SBucketAccessUrl `json:"access_urls"`
}

func (BucketDetails) GetMetricPairs

func (self BucketDetails) GetMetricPairs() map[string]string

func (BucketDetails) GetMetricTags

func (self BucketDetails) GetMetricTags() map[string]string

type BucketGetAclInput

type BucketGetAclInput struct {
	// 对象KEY
	// required:false
	Key string `json:"key"`
}

type BucketGetAclOutput

type BucketGetAclOutput struct {
	// ACL
	Acl string `json:"acl"`
}

type BucketGetObjectsInput

type BucketGetObjectsInput struct {
	// Prefix
	Prefix string `json:"prefix"`
	// 是否模拟列举目录模式
	Recursive *bool `json:"recursive"`
	// 分页标识
	PagingMarker string `json:"paging_marker"`
	// 最大输出条目数
	Limit *int `json:"limit"`
}

type BucketGetObjectsOutput

type BucketGetObjectsOutput struct {
	// 对象列表
	Data []cloudprovider.SCloudObject `json:"data"`
	// 排序字段,总是key
	// example: key
	MarkerField string `json:"marker_field"`
	// 排序顺序,总是降序
	// example: DESC
	MarkerOrder string `json:"marker_order"`
	// 下一页请求的paging_marker标识
	NextMarker string `json:"next_marker"`
}

type BucketListInput

type BucketListInput struct {
	apis.SharableVirtualResourceListInput
	apis.ExternalizedResourceBaseListInput

	ManagedResourceListInput
	RegionalFilterListInput

	// STORAGE_CLASS
	StorageClass []string `json:"storage_class"`

	// 位置
	Location []string `json:"location"`

	// ACL
	Acl []string `json:"acl"`
}

type BucketMetadataInput

type BucketMetadataInput struct {
	BucketObjectsActionInput

	Metadata http.Header
}

func (*BucketMetadataInput) Validate

func (input *BucketMetadataInput) Validate() error

type BucketObjectsActionInput

type BucketObjectsActionInput struct {
	Key []string
}

type BucketPerformDeleteInput

type BucketPerformDeleteInput struct {
	// 待删除对象KEY
	// required:true
	Keys []string `json:"keys"`
}

type BucketPerformMakedirInput

type BucketPerformMakedirInput struct {
	// 目录对象KEY
	// required:true
	Key string `json:"key"`
}

type BucketPerformTempUrlInput

type BucketPerformTempUrlInput struct {
	// 访问对象方法
	Method string `json:"method"`
	// 对象KEY
	// required:true
	Key string `json:"key"`
	// 过期时间,单位秒
	ExpireSeconds *int `json:"expire_seconds"`
}

type BucketPerformTempUrlOutput

type BucketPerformTempUrlOutput struct {
	// 生成的临时URL
	Url string `json:"url"`
}

type BucketPolicy

type BucketPolicy struct {
	Data []BucketPolicyStatement
}

type BucketPolicyDeleteInput

type BucketPolicyDeleteInput struct {
	Id []string
}

type BucketPolicyStatement

type BucketPolicyStatement struct {
	// 授权的目标主体
	Principal map[string][]string `json:"Principal,omitempty"`
	// 授权的行为
	Action []string `json:"Action,omitempty"`
	// Allow|Deny
	Effect string `json:"Effect,omitempty"`
	// 被授权的资源地址
	Resource []string `json:"Resource,omitempty"`
	// 触发授权的条件
	Condition map[string]map[string]interface{} `json:"Condition,omitempty"`

	// 解析字段,主账号id:子账号id
	PrincipalId []string
	// map[主账号id:子账号id]子账号name
	PrincipalNames map[string]string

	// Read|ReadWrite|FullControl
	CannedAction string
	// 资源路径
	ResourcePath []string
	// 根据index 生成
	Id string
}

type BucketPolicyStatementInput

type BucketPolicyStatementInput struct {
	// 主账号id:子账号id
	PrincipalId []string
	// Read|ReadWrite|FullControl
	CannedAction string
	// Allow|Deny
	Effect string
	// 被授权的资源地址,/*
	ResourcePath []string
	// ip 条件
	IpEquals    []string
	IpNotEquals []string
}

func (*BucketPolicyStatementInput) Validate

func (input *BucketPolicyStatementInput) Validate() error

type BucketRefererConf

type BucketRefererConf struct {
	// Referer Type
	// enmu: Black-List, White-List
	RefererType string
	// 域名列表
	DomainList []string
	// 是否允许空referer 访问
	AllowEmptyRefer bool

	// 是否开启
	Enabled bool `json:"enabled"`
}

func (*BucketRefererConf) Validate

func (input *BucketRefererConf) Validate() error

type BucketSyncstatusInput

type BucketSyncstatusInput struct {
}

type BucketUpdateInput

type BucketUpdateInput struct {
	apis.SharableVirtualResourceBaseUpdateInput
}

type BucketWebsiteConf

type BucketWebsiteConf struct {
	// 主页
	Index string
	// 错误时返回的文档
	ErrorDocument string
	// http或https
	Protocol string

	Rules []BucketWebsiteRoutingRule
	// 访问网站url
	Url string
}

func (*BucketWebsiteConf) Validate

func (input *BucketWebsiteConf) Validate() error

type BucketWebsiteRoutingRule

type BucketWebsiteRoutingRule struct {
	ConditionErrorCode string
	ConditionPrefix    string

	RedirectProtocol         string
	RedirectReplaceKey       string
	RedirectReplaceKeyPrefix string
}

type CAGuestNet

type CAGuestNet struct {
	// description: Host 的 Name
	Name   string    `json:"name"`
	IPNets []CAIPNet `json:"ip_nets"`
}

type CAHostNet

type CAHostNet struct {
	// description: Host 的 Name
	Name string `json:"name"`
	// description: IP
	IP string `json:"ip"`
	// description: 合适的已有网络
	SuitableNetwork string `json:"suitable_network,allowempty"`
}

type CAIPNet

type CAIPNet struct {
	// description: IP
	IP     string `json:"ip"`
	VlanID int32  `json:"vlan_id"`
	// description: 合适的已有网络
	SuitableNetwork string `json:"suitable_network,allowempty"`
}

type CANetConf

type CANetConf struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	CASimpleNetConf
}

type CAPWire

type CAPWire struct {
	Id            string       `json:"id"`
	Name          string       `json:"name"`
	Distributed   bool         `json:"distributed"`
	Hosts         []SimpleHost `json:"hosts"`
	HostNetworks  []CANetConf  `json:"host_networks"`
	GuestNetworks []CANetConf  `json:"guest_networks"`
}

type CASimpleNetConf

type CASimpleNetConf struct {
	GuestIpStart string `json:"guest_ip_start"`
	GuestIpEnd   string `json:"guest_ip_end"`
	GuestIpMask  int8   `json:"guest_ip_mask"`
	GuestGateway string `json:"guest_gateway"`
	VlanID       int32  `json:"vlan_id"`
}

type CAWireConf

type CAWireConf struct {
	// Zoneids to be selected
	ZoneIds []string `json:"zone_ids"`
	// description: wire name
	Name string `json:"name"`
	// description: wire description
	Description string `json:"description"`
}

type CAWireNet

type CAWireNet struct {
	SuggestedWire CAWireConf  `json:"suggested_wire"`
	SuitableWire  string      `json:"suitable_wire,allowempty"`
	Hosts         []CAHostNet `json:"hosts"`
	// description: 没有合适的已有网络,推荐的网络配置
	HostSuggestedNetworks []CANetConf `json:"host_suggested_networks"`
}

type CDNDomainCreateInput

type CDNDomainCreateInput struct {
	apis.EnabledStatusInfrasResourceBaseCreateInput

	// 源站信息
	// required: true
	Origins *cloudprovider.SCdnOrigins

	// 服务类型
	// required: true
	// enmu: web, download, media
	ServiceType string `json:"service_type"`
	// 加速区域
	// enmu: mainland, overseas, global
	// requrired: true
	Area string `json:"area"`

	CloudproviderResourceInput
	DeletePreventableCreateInput
}

type CDNDomainDetails

type CDNDomainDetails struct {
	apis.VirtualResourceDetails
	ManagedResourceInfo
}

type CacheImageInput

type CacheImageInput struct {
	Image   string `json:"image" yunion-deprecated-by:"image_id"`
	ImageId string `json:"image_id"`
	IsForce bool   `json:"is_force"`
	Format  string `json:"format"`

	// swagger: ignore
	Zone string `json:"zone"`
	// swagger: ignore
	OsType string `json:"os_type"`
	// swagger: ignore
	OsArch string `json:"os_arch"`
	// swagger: ignore
	OsDistribution string `json:"os_distribution"`
	// swagger: ignore
	OsFullVersion string `json:"os_full_version"`
	// swagger: ignore
	OsVersion string `json:"os_version"`
	// swagger: ignore
	ImageName string `json:"image_name"`

	// swagger: ignore
	ServerId string `json:"server_id"`
	// swagger: ignore
	ParentTaskId string `json:"parent_task_id"`
	// swagger: ignore
	SourceHostId string `json:"source_host_id"`
	// swagger: ignore
	SrcUrl string `json:"src_url"`
	// swagger: ignore
	StoragecacheId string `json:"storagecache_id"`
	// swagger: ignore
	Checksum string `json:"checksum"`
	// swagger: ignore
	SkipChecksumIfExists bool `json:"skip_checksum_if_exists"`
}

type CachedImageManagerCacheImageInput

type CachedImageManagerCacheImageInput struct {
	ImageId string `json:"image_id"`
}

type CachedImageSetClassMetadataInput

type CachedImageSetClassMetadataInput struct {
	ClassMetadata map[string]string `json:"class_metadata"`
}

type CachedImageUncacheImageInput

type CachedImageUncacheImageInput struct {
	// 存储缓存名Id
	// required: true
	StoragecacheId string `json:"storagecache_id"`

	// 是否强制清除缓存
	// default: false
	IsForce bool `json:"is_force"`
}

type CachedimageDetails

type CachedimageDetails struct {
	apis.SharableVirtualResourceDetails

	SCachedimage

	// 镜像状态, 和info里面的status一致
	// example: active
	Status string `json:"status"`

	// 操作系统类型
	// example: FreeBSD
	OsType string `json:"os_type"`

	// 操作系统发行版
	// example: FreeBSD
	OsDistribution string `json:"os_distribution"`

	// 操作系统版本
	// example: 11
	OsVersion string `json:"os_version"`

	// 虚拟化类型
	Hypervisor string `json:"hypervisor"`

	// 此镜像被使用次数
	// example: 0
	CachedimageUsage
}

type CachedimageListInput

type CachedimageListInput struct {
	apis.SharableVirtualResourceListInput
	apis.ExternalizedResourceBaseListInput

	CloudproviderResourceListInput
	CloudregionResourceListInput
	ZoneResourceInput

	// 镜像类型,可能值为: system(公有云公共镜像), customized(自定义镜像)
	// example: system
	ImageType []string `json:"image_type"`

	// filter by host schedtag
	HostSchedtagId string `json:"host_schedtag_id"`

	// valid cachedimage
	Valid bool `json:"valid"`
}

type CachedimageUsage

type CachedimageUsage struct {
	// 此镜像被使用次数
	// example: 0
	CachedCount int `json:"cached_count"`
}

type CapabilityListInput

type CapabilityListInput struct {
	// 根据该云平台的功能对云账号或云订阅进行过滤
	Capability []string `json:"capability"`
	// swagger:ignore
	// Deprecated
	// filter by HasObjectStorage
	HasObjectStorage *bool `json:"has_object_storage"`
}

func (*CapabilityListInput) AfterUnmarshal

func (input *CapabilityListInput) AfterUnmarshal()

type CdnDomain

type CdnDomain struct {
	// cdn加速域名
	Domain string
	// 状态 rejected(域名未审核)|processing(部署中)|online|offline
	Status string
	// 区域 mainland|overseas|global
	Area string
	// cdn Cname
	Cname string
	// 源站
	Origin string
	// 源站类型 domain|ip|bucket
	OriginType string
}

type CdnDomains

type CdnDomains struct {
	Data []CdnDomain `json:"data"`
}

type Cdrom

type Cdrom struct {
	Ordinal   int    `json:"ordinal"`
	Detail    string `json:"detail"`
	Name      string `json:"name"`
	BootIndex int8   `json:"boot_index"`
}

type CloudaccountCreateInput

type CloudaccountCreateInput struct {
	apis.EnabledStatusInfrasResourceBaseCreateInput

	// 指定云平台
	// Qcloud: 腾讯云
	// Ctyun: 天翼云
	// enum: ["VMware", "Aliyun", "Qcloud", "Azure", "Aws", "Huawei", "OpenStack", "Ucloud", "ZStack", "Google", "Ctyun", "JDcloud"]
	Provider string `json:"provider"`
	// swagger:ignore
	AccountId string

	// 跳过重复账号注册检查
	SkipDuplicateAccountCheck bool

	// 指定云平台品牌, 此参数默认和provider相同
	// requried: false
	//
	//
	//
	// | provider | 支持的参数 |
	// | -------- | ---------- |
	// | VMware | VMware |
	// | Aliyun | Aliyun |
	// | Qcloud | Qcloud |
	// | Azure | Azure |
	// | Aws | Aws |
	// | Huawei | Huawei |
	// | OpenStack | OpenStack |
	// | Ucloud | Ucloud |
	// | ZStack | ZStack |
	// | Google | Google |
	// | Ctyun | Ctyun |
	Brand string `json:"brand"`

	// swagger:ignore
	IsPublicCloud bool
	// swagger:ignore
	IsOnPremise bool

	apis.ProjectizedResourceInput

	// 自动根据云上项目或订阅创建本地项目, OpenStack此参数为true
	// default: false
	AutoCreateProject *bool `json:"auto_create_project"`

	// 额外信息,例如账单的access key
	Options *jsonutils.JSONDict `json:"options"`

	proxyapi.ProxySettingResourceInput

	cloudprovider.SCloudaccount
	cloudprovider.SCloudaccountCredential

	// 是否启用SAML认证
	// default: false
	SAMLAuth *bool `json:"saml_auth"`

	// VMware 账号有zone属性
	Zone string `json:"zone"`

	// 仅当show_sub_accounts=true并且dry_run=true时才返回sub accounts 信息, 且不会创建云账号
	ShowSubAccounts bool `json:"show_sub_accounts"`

	// swagger:ignore
	SubAccounts *cloudprovider.SubAccounts

	ReadOnly bool `json:"read_only"`

	SProjectMappingResourceInput

	// 是否立即开始同步资源
	StartSync *bool `json:"start_sync"`

	// 跳过指定资源同步
	SkipSyncResources SkipSyncResources `json:"skip_sync_resources"`

	// 货币类型
	// enmu: CNY, USD
	Currency string `json:"currency"`

	EnableAutoSyncResource *bool `json:"enable_auto_sync_resource"`
}

type CloudaccountDetail

type CloudaccountDetail struct {
	apis.EnabledStatusInfrasResourceBaseDetails
	SCloudaccount

	// 同步时间间隔
	// example: 3600
	SyncIntervalSeconds int `json:"sync_interval_seconds"`

	// 同步状态
	SyncStatus2 string `json:"sync_stauts2"`

	// 云账号环境类型
	// public: 公有云
	// private: 私有云
	// onpremise: 本地IDC
	// example: public
	CloudEnv string `json:"cloud_env"`

	apis.ProjectizedResourceInfo

	SAccountUsage

	ProxySetting proxyapi.SProxySetting `json:"proxy_setting"`

	ProjectMappingResourceInfo

	// 上次同步耗时
	LastSyncCost string
}

func (CloudaccountDetail) GetMetricPairs

func (self CloudaccountDetail) GetMetricPairs() map[string]string

func (CloudaccountDetail) GetMetricTags

func (self CloudaccountDetail) GetMetricTags() map[string]string

type CloudaccountListInput

type CloudaccountListInput struct {
	apis.EnabledStatusInfrasResourceBaseListInput

	ManagedResourceListInput

	CapabilityListInput

	SyncableBaseResourceListInput

	// 账号健康状态
	HealthStatus []string `json:"health_status"`

	ReadOnly *bool `json:"read_only"`

	// 共享模式
	ShareMode []string `json:"share_mode"`

	// 代理
	ProxySetting string `json:"proxy_setting"`
	// swagger:ignore
	ProxySettingId string `json:"proxy_setting_id" yunion-deprecated-by:"proxy_setting"`

	// 按宿主机数量排序
	// pattern:asc|desc
	OrderByHostCount string `json:"order_by_host_count"`
	// 按虚拟机数量排序
	// pattern:asc|desc
	OrderByGuestCount string `json:"order_by_guest_count"`
}

type CloudaccountPerformPrepareNetsInput

type CloudaccountPerformPrepareNetsInput struct {
	CloudaccountCreateInput

	WireLevelForVmware string `json:"wire_level_for_vmware"`
	Dvs                bool   `json:"dvs"`
}

type CloudaccountPerformPrepareNetsOutput

type CloudaccountPerformPrepareNetsOutput struct {
	CAWireNets []CAWireNet  `json:"wire_networks"`
	Hosts      []CAGuestNet `json:"hosts"`
	// Guests     []CAGuestNet `json:"guests"`
	Wires    []CAPWire `json:"wires"`
	VSwitchs []VSwitch `json:"vswitchs"`
}

type CloudaccountPerformPublicInput

type CloudaccountPerformPublicInput struct {
	apis.PerformPublicDomainInput

	// 共享模式,可能值为provider_domain, system
	// example: provider_domain
	ShareMode string `json:"share_mode"`
}

type CloudaccountProjectMappingInput

type CloudaccountProjectMappingInput struct {
	AutoCreateProject            bool `json:"auto_create_project"`
	AutoCreateProjectForProvider bool `json:"auto_create_project_for_provider"`

	ProjectId string `json:"project_id"`

	// 同步策略Id, 若不传此参数则解绑
	// 绑定同步策略要求当前云账号此刻未绑定其他同步策略
	ProjectMappingId string `json:"project_mapping_id"`

	EnableProjectSync  *bool `json:"enable_project_sync"`
	EnableResourceSync *bool `json:"enable_resource_sync"`
}

type CloudaccountResourceInfo

type CloudaccountResourceInfo struct {
	CloudenvResourceInfo

	// 云账号名称
	// example: google-account
	Account string `json:"account,omitempty"`

	// 云账号状态
	AccountStatus string `json:"account_status,omitempty"`
	// 云账号监控状态
	AccountHealthStatus string `json:"account_health_status,omitempty"`
	AccountReadOnly     bool   `json:"account_read_only,omitempty"`
}

type CloudaccountShareModeInput

type CloudaccountShareModeInput struct {
	apis.Meta

	ShareMode string
}

func (CloudaccountShareModeInput) Validate

func (i CloudaccountShareModeInput) Validate() error

type CloudaccountSyncSkusInput

type CloudaccountSyncSkusInput struct {
	Resource string
	Force    bool

	CloudregionResourceInput
	CloudproviderResourceInput
}

type CloudaccountSyncVMwareNetworkInput

type CloudaccountSyncVMwareNetworkInput struct {
	Zone string `help:"zone Id or Name" json:"zone"`
}

type CloudaccountUpdateInput

type CloudaccountUpdateInput struct {
	apis.EnabledStatusInfrasResourceBaseUpdateInput

	// 待更新的options key/value
	Options *jsonutils.JSONDict `json:"options"`
	// 带删除的options key
	RemoveOptions []string `json:"remove_options"`

	SAMLAuth *bool `json:"saml_auth"`

	proxyapi.ProxySettingResourceInput

	// 临时清除缺失的权限提示,云账号权限缺失依然会自动刷新
	CleanLakeOfPermissions bool `json:"clean_lake_of_permissions"`

	SkipSyncResources       *SkipSyncResources `json:"skip_sync_resources"`
	AddSkipSyncResources    []string           `json:"add_skip_sync_resources"`
	RemoveSkipSyncResources []string           `json:"remove_skip_sync_resources"`

	ReadOnly bool `json:"read_only"`

	Currency string `json:"currency"`

	EnableAutoSyncResource *bool `json:"enable_auto_sync_resource"`
}

type CloudenvResourceInfo

type CloudenvResourceInfo struct {
	// 云平台名称
	// example: Google
	Provider string `json:"provider,omitempty"`

	// 云平台品牌
	// example: Google
	Brand string `json:"brand,omitempty"`

	// 云环境
	// example: public
	CloudEnv string `json:"cloud_env,omitempty"`

	// Environment
	Environment string `json:"environment,omitempty"`
}

type CloudenvResourceListInput

type CloudenvResourceListInput struct {
	// 列出指定云平台的资源,支持的云平台如下
	//
	// | Provider  | 开始支持版本 | 平台                                |
	// |-----------|------------|-------------------------------------|
	// | OneCloud  | 0.0        | OneCloud内置私有云,包括KVM和裸金属管理 |
	// | VMware    | 1.2        | VMware vCenter                      |
	// | OpenStack | 2.6        | OpenStack M版本以上私有云             |
	// | ZStack    | 2.10       | ZStack私有云                         |
	// | Aliyun    | 2.0        | 阿里云                               |
	// | Aws       | 2.3        | Amazon AWS                          |
	// | Azure     | 2.2        | Microsoft Azure                     |
	// | Google    | 2.13       | Google Cloud Platform               |
	// | Qcloud    | 2.3        | 腾讯云                               |
	// | Huawei    | 2.5        | 华为公有云                           |
	// | Ucloud    | 2.7        | UCLOUD                               |
	// | Ctyun     | 2.13       | 天翼云                               |
	// | S3        | 2.11       | 通用s3对象存储                        |
	// | Ceph      | 2.11       | Ceph对象存储                         |
	// | Xsky      | 2.11       | XSKY启明星辰Ceph对象存储              |
	//
	// enum: ["OneCloud","VMware","Aliyun","Qcloud","Azure","Aws","Huawei","OpenStack","Ucloud","ZStack","Google","Ctyun","S3","Ceph","Xsky"]
	Providers []string `json:"providers"`
	// swagger:ignore
	// Deprecated
	Provider []string `json:"provider" yunion-deprecated-by:"providers"`

	Brands []string `json:"brands"`
	// swagger:ignore
	// Deprecated
	Brand []string `json:"brand" yunion-deprecated-by:"brands"`

	// 列出指定云环境的资源,支持云环境如下:
	//
	// | CloudEnv  | 说明   |
	// |-----------|--------|
	// | public    | 公有云  |
	// | private   | 私有云  |
	// | onpremise | 本地IDC |
	//
	// enum: ["public","private","onpremise"]
	CloudEnv string `json:"cloud_env"`

	// swagger:ignore
	// Deprecated
	// description: this param will be deprecate at 3.0
	PublicCloud *bool `json:"public_cloud"`
	// swagger:ignore
	// Deprecated
	// description: this param will be deprecate at 3.0
	IsPublic *bool `json:"is_public"`

	// swagger:ignore
	// Deprecated
	// description: this param will be deprecate at 3.0
	PrivateCloud *bool `json:"private_cloud"`
	// swagger:ignore
	// Deprecated
	// description: this param will be deprecate at 3.0
	IsPrivate *bool `json:"is_private"`

	// swagger:ignore
	// Deprecated
	// description: this param will be deprecate at 3.0
	IsOnPremise *bool `json:"is_on_premise"`

	// 以平台名称排序
	// pattern:asc|desc
	OrderByProvider string `json:"order_by_provider"`

	// 以平台品牌排序
	// pattern:asc|desc
	OrderByBrand string `json:"order_by_brand"`
}

type CloudproviderCreateInput

type CloudproviderCreateInput struct {
}

type CloudproviderDetails

type CloudproviderDetails struct {
	apis.EnabledStatusStandaloneResourceDetails
	apis.ProjectizedResourceInfo

	ProxySetting proxyapi.SProxySetting `json:"proxy_setting"`

	SCloudprovider

	// 云账号名称
	// example: google-account
	Cloudaccount string `json:"cloudaccount"`
	// 子订阅同步状态
	SyncStatus2 string `json:"sync_status2"`
	// 支持服务列表
	Capabilities []string `json:"capabilities"`

	SCloudproviderUsage

	// 子订阅品牌信息
	Brand string `json:"brand"`

	ReadOnly bool `json:"read_only"`

	ProjectMappingResourceInfo

	// 上次同步耗时
	LastSyncCost string
}

type CloudproviderGetCannedAclInput

type CloudproviderGetCannedAclInput struct {
	CloudregionResourceInput
}

type CloudproviderGetCannedAclOutput

type CloudproviderGetCannedAclOutput struct {
	// Bucket支持的预置ACL列表
	BucketCannedAcls []string `json:"bucket_canned_acls"`
	// Object支持的预置ACL列表
	ObjectCannedAcls []string `json:"object_canned_acls"`
}

type CloudproviderGetStorageClassInput

type CloudproviderGetStorageClassInput struct {
	CloudregionResourceInput
}

type CloudproviderGetStorageClassOutput

type CloudproviderGetStorageClassOutput struct {
	// 对象存储存储类型
	StorageClasses []string `json:"storage_classes"`
}

type CloudproviderListInput

type CloudproviderListInput struct {
	apis.EnabledStatusStandaloneResourceListInput

	ManagedResourceListInput
	apis.ProjectizedResourceListInput

	apis.ExternalizedResourceBaseListInput

	UsableResourceListInput

	CloudregionResourceInput

	ZoneResourceInput

	CapabilityListInput

	SyncableBaseResourceListInput

	ReadOnly *bool `json:"read_only"`

	// 账号健康状态
	HealthStatus []string `json:"health_status"`

	// filter by host schedtag
	HostSchedtagId string `json:"host_schedtag_id"`
}

type CloudproviderQuotaListInput

type CloudproviderQuotaListInput struct {
	apis.StandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput

	ManagedResourceListInput
	RegionalFilterListInput

	// 配额类型
	QuotaType string `json:"quota_type"`

	// 配额范围
	QuotaRange string `json:"quota_range"`
}

type CloudproviderResourceInput

type CloudproviderResourceInput struct {
	// 列出关联指定云订阅(ID或Name)的资源
	CloudproviderId string `json:"cloudprovider_id"`
	// List objects belonging to the cloud provider
	// swagger:ignore
	// Deprecated
	// description: this param will be deprecate at 3.0
	Manager string `json:"manager" yunion-deprecated-by:"cloudprovider_id"`
	// swagger:ignore
	// Deprecated
	// description: this param will be deprecate at 3.0
	ManagerId string `json:"manager_id" yunion-deprecated-by:"cloudprovider_id"`
	// swagger:ignore
	// Deprecated
	// description: this param will be deprecate at 3.0
	Cloudprovider string `json:"cloudprovider" yunion-deprecated-by:"cloudprovider_id"`
}

云订阅输入参数

type CloudproviderResourceListInput

type CloudproviderResourceListInput struct {
	// 列出关联指定云订阅(ID或Name)的资源
	CloudproviderId []string `json:"cloudprovider_id"`
	// List objects belonging to the cloud provider
	// swagger:ignore
	// Deprecated
	// description: this param will be deprecate at 3.0
	Manager string `json:"manager" yunion-deprecated-by:"cloudprovider_id"`
	// swagger:ignore
	// Deprecated
	// description: this param will be deprecate at 3.0
	ManagerId string `json:"manager_id" yunion-deprecated-by:"cloudprovider_id"`
	// swagger:ignore
	// Deprecated
	// description: this param will be deprecate at 3.0
	Cloudprovider string `json:"cloudprovider" yunion-deprecated-by:"cloudprovider_id"`
}

type CloudproviderSync

type CloudproviderSync struct {
	// 指定区域启用或禁用同步
	// default: false
	Enabled bool `json:"enabled"`
	// 指定区域信息
	CloudregionIds []string `json:"cloudregion_ids"`
}

type CloudproviderUpdateInput

type CloudproviderUpdateInput struct {
	apis.EnabledStatusStandaloneResourceBaseUpdateInput
}

type CloudproviderregionDetails

type CloudproviderregionDetails struct {
	apis.JointResourceBaseDetails
	CloudregionResourceInfo

	Cloudprovider string `json:"cloudprovider"`

	// 云账号Id
	// example: fa4aaf88-aed8-422d-84e7-56dea533b364
	CloudaccountId string `json:"cloudaccount_id"`
	// 云账号名称
	// example: googl-account
	Cloudaccount string `json:"cloudaccount"`

	// 云账号所在域Id
	// example: 0df40413-eb69-49c7-895e-618ddeb80f55
	CloudaccountDomainId string `json:"cloudaccount_domain_id"`

	// 云订阅同步状态
	CloudproviderSyncStatus string `json:"cloudprovider_sync_status"`

	// 支持服务列表
	Capabilities []string `json:"capabilities"`

	// 上次同步耗时
	LastSyncCost string `json:"last_sync_cost"`
}

type CloudproviderschedtagDetails

type CloudproviderschedtagDetails struct {
	SchedtagJointResourceDetails

	// cloudprovider name
	Cloudprovider string `json:"cloudprovider"`
}

type CloudproviderschedtagListInput

type CloudproviderschedtagListInput struct {
	SchedtagJointsListInput
}

type CloudregionDetails

type CloudregionDetails struct {
	apis.EnabledStatusStandaloneResourceDetails

	SCloudregionUsage

	SCloudregion

	// 云类型, public, private or onpremise
	// example: public
	CloudEnv string `json:"cloud_env"`
}

type CloudregionListInput

type CloudregionListInput struct {
	apis.EnabledStatusStandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput
	apis.DomainizedResourceListInput

	ManagedResourceListInput
	UsableResourceListInput
	UsableVpcResourceListInput

	CapabilityListInput

	// 过滤位于指定城市的区域
	City string `json:"city"`
	// 过滤提供特定服务的区域
	Service string `json:"service"`

	// 云环境
	Environment []string `json:"environment"`
	// 按可用区数量排序
	// pattern:asc|desc
	OrderByZoneCount string `json:"order_by_zone_count"`
	// 按vpc数量排序
	// pattern:asc|desc
	OrderByVpcCount string `json:"order_by_vpc_count"`
	// 按虚拟机数量排序
	// pattern:asc|desc
	OrderByGuestCount string `json:"order_by_guest_count"`
}

type CloudregionPurgeInput

type CloudregionPurgeInput struct {
	// 云订阅Id, 若region底下不存在任何资源,会删除当前region
	// required: true
	ManagerId string `json:"manager_id"`
}

type CloudregionResourceInfo

type CloudregionResourceInfo struct {
	// 区域的名称
	// example: Default
	Region string `json:"region"`

	// 区域的名称
	Cloudregion string `json:"cloudregion"`

	// 区域的Id
	// example: default
	RegionId string `json:"region_id"`

	// 纳管云区域的组合Id(平台+Id)
	// example: ZStack/59e7bc87-a6b3-4c39-8f02-c68e8243d4e4
	RegionExternalId string `json:"region_external_id"`

	// 纳管云区域的Id
	// example: 59e7bc87-a6b3-4c39-8f02-c68e8243d4e4
	RegionExtId string `json:"region_ext_id"`
}

type CloudregionResourceInput

type CloudregionResourceInput struct {
	// 区域名称或ID
	CloudregionId string `json:"cloudregion_id"`
	// swagger:ignore
	// Deprecated
	// description: this param will be deprecate at 3.0
	Cloudregion string `json:"cloudregion" yunion-deprecated-by:"cloudregion_id"`
	// swagger:ignore
	// Deprecated
	// description: this param will be deprecate at 3.0
	Region string `json:"region" yunion-deprecated-by:"cloudregion_id"`
	// swagger:ignore
	// Deprecated
	// description: this param will be deprecate at 3.0
	RegionId string `json:"region_id" yunion-deprecated-by:"cloudregion_id"`
}

type CloudregionResourceListInput

type CloudregionResourceListInput struct {
	// 区域名称或ID
	CloudregionId []string `json:"cloudregion_id"`
	// swagger:ignore
	// Deprecated
	// description: this param will be deprecate at 3.0
	Cloudregion string `json:"cloudregion" yunion-deprecated-by:"cloudregion_id"`
	// swagger:ignore
	// Deprecated
	// description: this param will be deprecate at 3.0
	Region string `json:"region" yunion-deprecated-by:"cloudregion_id"`
	// swagger:ignore
	// Deprecated
	// description: this param will be deprecate at 3.0
	RegionId string `json:"region_id" yunion-deprecated-by:"cloudregion_id"`
}

type CloudregionSkuSyncInput

type CloudregionSkuSyncInput struct {
	SkuSyncInput

	// 同步资源类型
	// choices: serversku|elasticcachesku|dbinstance_sku
	Resource string `json:"resource"`
}

type CloudregionschedtagDetails

type CloudregionschedtagDetails struct {
	SchedtagJointResourceDetails

	Cloudregion string `json:"cloudregion"`
}

type CloudregionschedtagListInput

type CloudregionschedtagListInput struct {
	SchedtagJointsListInput
	RegionalFilterListInput
}

type ContainerCommitExternalRegistry

type ContainerCommitExternalRegistry struct {
	// e.g.: registry.cn-beijing.aliyuncs.com/yunionio
	Url string `json:"url"`
	// authentication configuration
	Auth *apis.ContainerPullImageAuthConfig `json:"auth"`
}

type ContainerCommitInput

type ContainerCommitInput struct {
	// Container registry id from kubeserver
	RegistryId       string                           `json:"registry_id"`
	ExternalRegistry *ContainerCommitExternalRegistry `json:"external_registry"`
	// image name
	ImageName string `json:"image_name"`
	// image tag
	Tag string `json:"tag"`
}

type ContainerCommitOutput

type ContainerCommitOutput struct {
	Repository string `json:"repository"`
}

type ContainerCreateInput

type ContainerCreateInput struct {
	apis.VirtualResourceCreateInput

	GuestId string        `json:"guest_id"`
	Spec    ContainerSpec `json:"spec"`
	// swagger:ignore
	SkipTask bool `json:"skip_task"`
}

type ContainerDevice

type ContainerDevice struct {
	Type           apis.ContainerDeviceType `json:"type"`
	IsolatedDevice *ContainerIsolatedDevice `json:"isolated_device"`
	Host           *ContainerHostDevice     `json:"host"`
}

type ContainerExecInfoOutput

type ContainerExecInfoOutput struct {
	HostUri     string `json:"host_uri"`
	PodId       string `json:"pod_id"`
	ContainerId string `json:"container_id"`
}

type ContainerExecInput

type ContainerExecInput struct {
	Command []string `json:"command"`
	Tty     bool     `json:"tty"`
	SetIO   bool     `json:"set_io"`
	Stdin   bool     `json:"stdin"`
	Stdout  bool     `json:"stdout"`
}

type ContainerExecSyncInput

type ContainerExecSyncInput struct {
	Command []string `json:"command"`
	// Timeout in seconds to stop the command, 0 mean run forever.
	// default: 0
	Timeout int64 `json:"timeout"`
}

type ContainerExecSyncResponse

type ContainerExecSyncResponse struct {
	Stdout   string `json:"stdout"`
	Stderr   string `json:"stderr"`
	ExitCode int32  `json:"exit_code"`
}

type ContainerHostDevice

type ContainerHostDevice struct {
	// Path of the device within the container.
	ContainerPath string `json:"container_path"`
	// Path of the device on the host.
	HostPath string `json:"host_path"`
	// Cgroups permissions of the device, candidates are one or more of
	// * r - allows container to read from the specified device.
	// * w - allows container to write to the specified device.
	// * m - allows container to create device files that do not yet exist.
	Permissions string `json:"permissions"`
}

type ContainerIsolatedDevice

type ContainerIsolatedDevice struct {
	Index *int   `json:"index"`
	Id    string `json:"id"`
}

type ContainerListInput

type ContainerListInput struct {
	apis.VirtualResourceListInput
	GuestId string `json:"guest_id"`
}

type ContainerPerformStatusInput

type ContainerPerformStatusInput struct {
	apis.PerformStatusInput
	RestartCount   int        `json:"restart_count"`
	StartedAt      *time.Time `json:"started_at"`
	LastFinishedAt *time.Time `json:"last_finished_at"`
}

type ContainerResourcesSetInput

type ContainerResourcesSetInput struct {
	apis.ContainerResources
	DisableLimitCheck bool `json:"disable_limit_check"`
}

type ContainerSaveVolumeMountToImageInput

type ContainerSaveVolumeMountToImageInput struct {
	Name         string `json:"name"`
	GenerateName string `json:"generate_name"`
	Notes        string `json:"notes"`
	Index        int    `json:"index"`
}

type ContainerSpec

type ContainerSpec struct {
	apis.ContainerSpec
	// Volume mounts
	VolumeMounts []*apis.ContainerVolumeMount `json:"volume_mounts"`
	Devices      []*ContainerDevice           `json:"devices"`
}

func (*ContainerSpec) IsZero

func (c *ContainerSpec) IsZero() bool

func (*ContainerSpec) String

func (c *ContainerSpec) String() string

type ContainerStopInput

type ContainerStopInput struct {
	Timeout int  `json:"timeout"`
	Force   bool `json:"force"`
}

type ContainerSyncStatusResponse

type ContainerSyncStatusResponse struct {
	Status       string    `json:"status"`
	StartedAt    time.Time `json:"started_at"`
	RestartCount int       `json:"restart_count"`
}

type ContainerUpdateInput

type ContainerUpdateInput struct {
	apis.VirtualResourceBaseUpdateInput
	Spec ContainerSpec `json:"spec"`
}

type ContainerVolumeMountAddPostOverlayInput

type ContainerVolumeMountAddPostOverlayInput struct {
	Index       int                                         `json:"index"`
	PostOverlay []*apis.ContainerVolumeMountDiskPostOverlay `json:"post_overlay"`
}

type ContainerVolumeMountRemovePostOverlayInput

type ContainerVolumeMountRemovePostOverlayInput struct {
	Index       int                                         `json:"index"`
	PostOverlay []*apis.ContainerVolumeMountDiskPostOverlay `json:"post_overlay"`
	UseLazy     bool                                        `json:"use_lazy"`
	ClearLayers bool                                        `json:"clear_layers"`
}

type ConvertToKvmInput

type ConvertToKvmInput struct {
	apis.Meta

	// target hypervisor
	TargetHypervisor string `json:"target_hypervisor"`
	// 指定转换的宿主机
	PreferHost string `json:"prefer_host"`

	// dest guest network configs
	Networks []*NetworkConfig `json:"networks"`

	// deploy telegraf after convert
	DeployTelegraf bool `json:"deploy_telegraf"`
}

type CycleTimerCreateInput

type CycleTimerCreateInput struct {

	// description: 周期类型
	// enum: ["day","week","month"]
	CycleType string `json:"cycle_type"`

	CycleHour int `json:"cycle_hour"`
	// description: 分(0-59)
	// example: 13
	Minute int `json:"minute"`

	// description: 时(0-23)
	// example: 13
	Hour int `json:"hour"`

	// description: 每周的周几; 1-7, 1: Monday, 7: Sunday
	// example: [1,3,5,7]
	WeekDays []int `json:"week_days"`

	// description: 每月的哪几天; 1-31
	// example: [1,4,31]
	MonthDays []int `json:"month_days"`

	// description: 开始时间
	StartTime time.Time `json:"start_time"`

	// description: 截止时间
	EndTime time.Time `json:"end_time"`
}

type CycleTimerDetails

type CycleTimerDetails struct {
	// description: 周期类型:按天/周/月
	CycleType string `json:"cycle_type"`
	// description: 分钟
	Minute int `json:"minute"`
	// description: 小时
	Hour int `json:"hour"`
	// description: 每周的几天
	WeekDays []int `json:"week_days"`
	// description: 每月的几天
	MonthDays []int `json:"month_days"`
	// description: 此周期任务的开始时间
	StartTime time.Time `json:"start_time"`
	// description: 此周期任务的截止时间
	EndTime time.Time `json:"end_time"`
}

type DBInstanceAccountCreateInput

type DBInstanceAccountCreateInput struct {
	apis.StatusStandaloneResourceCreateInput

	// rds实例名称或Id,建议使用Id
	//
	//
	//
	// | 平台        |支持Rds引擎                |
	// | ----        |-------                    |
	// | Aliyun      |MySQL, MariaBD, SQLServer  |
	// | 华为云      |MySQL, MariaBD             |
	// | 腾讯云      |MySQL                      |
	// required: true
	// 阿里云SQL Server 2017集群版不支持创建账号
	// 实例状态必须是运行中
	DBInstance string `json:"dbinstance"`
	// swagger:ignore
	DBInstanceId string `json:"dbinstance_id"`

	// 账号密码,若不指定,则会随机生成
	// required: false
	Password string `json:"password"`

	// 账号权限
	// required: false
	Privileges []SDBInstanceAccountPrivilege `json:"privileges"`
}

type DBInstanceAccountDetails

type DBInstanceAccountDetails struct {
	apis.StatusStandaloneResourceDetails
	apis.ProjectizedResourceInfo
	DBInstanceResourceInfo

	SDBInstanceAccount

	// 账号权限列表
	DBInstanceprivileges []DBInstancePrivilege `json:"dbinstanceprivileges,allowempty"`

	ProjectId string `json:"tenant_id"`
}

type DBInstanceAccountUpdateInput

type DBInstanceAccountUpdateInput struct {
	apis.StatusStandaloneResourceBaseUpdateInput
}

type DBInstanceAutoRenewInput

type DBInstanceAutoRenewInput struct {
	// 是否自动续费
	AutoRenew bool `json:"auto_renew"`
}

type DBInstanceBackupCreateInput

type DBInstanceBackupCreateInput struct {
	apis.VirtualResourceCreateInput

	// Rds实例名称或Id, 建议使用Id
	// required: true
	DBInstance string `json:"dbinstance"`
	// swagger:ignore
	DBInstanceId string `json:"dbinstance_id"`

	// 需要备份的Rds数据库列表
	// required: false
	Databases []string `json:"databases"`
	// swagger:ignore
	DBNames string

	// swagger:ignore
	Engine string
	// swagger:ignore
	EngineVersion string
	// swagger:ignore
	CloudregionId string
	// swagger:ignore
	BackupMode string
	// swagger:ignore
	ManagerId string
}

type DBInstanceBackupListInput

type DBInstanceBackupListInput struct {
	apis.VirtualResourceListInput
	apis.ExternalizedResourceBaseListInput
	ManagedResourceListInput
	RegionalFilterListInput

	DBInstanceFilterListInputBase

	// RDS引擎
	// example: MySQL
	Engine []string `json:"engine"`

	// RDS引擎版本
	// example: 5.7
	EngineVersion []string `json:"engine_version"`

	// 备份模式
	BackupMode []string `json:"backup_mode"`

	// 数据库名称
	DBNames string `json:"db_names"`
}

type DBInstanceCreateInput

type DBInstanceCreateInput struct {
	apis.VirtualResourceCreateInput
	DeletePreventableCreateInput

	// Ip子网名称或Id,建议使用Id
	// 谷歌云并不实际使用Ip子网,仅仅通过Ip子网确定Vpc
	// required: true
	NetworkId string `json:"network_id"`
	// swagger:ignore
	Network string `json:"network" yunion-deprecated-by:"network_id"`

	// Ip子网内的地址,不填则按照ip子网的地址分配策略分配一个ip
	// required: false
	Address string `json:"address"`

	// rds实例名称或Id,建议使用Id
	// 创建只读实例时此参数必传
	MasterInstance string `json:"master_instance"`
	// swagger:ignore
	MasterInstanceId string

	// 安全组Id列表
	//
	//
	// | 云平台      | 最大支出安全组数量 |
	// |-------------|----------          |
	// | 腾讯云      | 5                  |
	// | 华为云      | 1                  |
	// | 阿里云      | 不支持             |
	SecgroupIds []string `json:"secgroup_ids"`
	// swagger:ignore
	Secgroup string `json:"secgroup" yunion-deprecated-by:"secgroup_ids"`

	// 主可用区名称或Id, 此参数从指定的套餐所在的可用区获取
	Zone1 string `json:"zone1"`

	// 次可用区名称或Id, 此参数从指定的套餐所在的可用区获取
	Zone2 string `json:"zone2"`

	// 三节点可用区名称或Id,, 此参数从指定的套餐所在的可用区获取
	Zone3 string `json:"zone3"`

	// swagger:ignore
	ZoneId string

	// swagger:ignore
	CloudregionId string

	// swagger:ignore
	VpcId string

	// swagger:ignore
	ManagerId string

	// 包年包月时间周期
	Duration string `json:"duration"`

	// 是否自动续费(仅包年包月时生效)
	// default: false
	AutoRenew bool `json:"auto_renew"`

	// swagger:ignore
	ExpiredAt time.Time `json:"expired_at"`

	// 计费方式
	// enum: ["postpaid", "prepaid"]
	BillingType string
	// swagger:ignore
	BillingCycle string

	// 套餐名称, 若此参数不填, 则必须有vmem_size_mb及vcpu_count参数
	// 套餐列表可以通过 dbinstancesku 获取
	InstanceType string `json:"instance_type"`

	// rds引擎
	// enum: ["MySQL", "SQLServer", "PostgreSQL", "MariaDB", "Oracle", "PPAS"]
	// required: true
	Engine string `json:"engine"`

	// rds引擎版本
	// 根据各个引擎版本各不相同
	// required: true
	EngineVersion string `json:"engine_version"`

	// rds类型
	//
	//
	//
	// | 平台        | 支持类型    | 说明 |
	// | -----       | ------    | --- |
	// | 华为云      |ha, single, replica| ha: 高可用, single: 单机, replica: 只读|
	// | 阿里云      |basic, high_availability, always_on, finance|basic: 基础版, high_availability: 高可用, always_on: 集群版, finance: 金融版, 三节点|
	// | Google      |Zonal, Regional | Zonal: 单区域, Regional: 区域级|
	// | 腾讯云      |fe, ha, basic | ha: 高可用, basic: 基础版, fe: 金融版|
	// required: true
	Category string `json:"category"`

	// rds存储类型
	//
	//
	//
	// | 平台    | 支持类型    | 说明 |
	// | -----   | ------    | --- |
	// | 华为云  |SSD, SAS, SATA| |
	// | 阿里云  |local_ssd, cloud_essd, cloud_ssd| |
	// | Google  |PD_SSD, PD_HDD| PD_SSD: SSD, PD_HDD: HDD|
	// | 腾讯云  |cloud_ssd, local_ssd| |
	// required: true
	StorageType string `json:"storage_type"`

	// rds存储大小
	// 可参考rds套餐的大小范围和步长情况
	// required: true
	DiskSizeGB int `json:"disk_size_gb"`

	// 指定连接端口
	Port int `json:"port"`

	// rds初始化密码
	// 阿里云不需要此参数
	// 华为云会默认创建一个用户,若不传此参数, 则为随机密码
	// 谷歌云会默认创建一个用户,若不传此参数, 则为随机密码
	// 腾讯云会默认创建一个用户,若不传此参数, 则为随机密码
	Password string `json:"password"`

	// 是否不设置初始密码
	// 华为云不支持此参数
	// 谷歌云仅mysql支持此参数
	ResetPassword *bool `json:"reset_password"`

	// rds实例cpu大小
	// 若指定实例套餐,此参数将根据套餐设置
	VcpuCount int `json:"vcpu_count"`

	// rds实例内存大小
	// 若指定实例套餐,此参数将根据套餐设置
	VmemSizeMb int `json:"vmem_size_mb"`

	// 从备份中创建新实例
	DBInstancebackupId string `json:"dbinstancebackup_id"`

	// 多可用区部署
	MultiAZ bool `json:"multi_az"`
}

type DBInstanceDatabaseCreateInput

type DBInstanceDatabaseCreateInput struct {
	apis.StatusStandaloneResourceCreateInput

	// rds实例名称或Id,建议使用Id
	//
	//
	//
	// | 平台        |支持Rds引擎                |
	// | ----        |-------                    |
	// | Aliyun      |MySQL, MariaBD, SQLServer  |
	// | 华为云      |MySQL, MariaBD             |
	// | 腾讯云      |                           |
	// required: true
	// 阿里云SQL Server 2017集群版不支持创建数据库
	// 阿里云只读实例不支持创建数据库
	// 实例状态必须是运行中
	DBInstance string `json:"dbinstance"`
	// swagger:ignore
	DBInstanceId string `json:"dbinstance_id"`

	// 数据库字符集
	// required: true
	CharacterSet string `json:"character_set"`

	// 赋予账号权限
	// required: false
	Accounts []SDBInstanceDatabasePrivilege `json:"accounts"`
}

type DBInstanceDatabaseListInput

type DBInstanceDatabaseListInput struct {
	apis.StatusStandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput

	DBInstanceFilterListInput

	// 数据库字符集
	CharacterSet []string `json:"character_set"`
}

type DBInstanceDatabaseUpdateInput

type DBInstanceDatabaseUpdateInput struct {
	apis.StatusStandaloneResourceBaseUpdateInput
}

type DBInstanceDetails

type DBInstanceDetails struct {
	apis.VirtualResourceDetails
	CloudregionResourceInfo
	ManagedResourceInfo

	VpcResourceInfoBase

	SDBInstance

	Secgroups []apis.StandaloneShortDesc `json:"secgroups"`

	// 安全组名称
	// example: Default
	Secgroup string `json:"secgroup"`
	// iops
	// example: 0
	Iops int `json:"iops"`
	// IP子网名称, 若有多个以 ',' 分隔
	// example: test-network
	Network string `json:"network"`

	// 内网IP地址, 若有多个以 ',' 分隔
	IpAddrs string `json:"ip_addrs"`

	// Zone1名称
	Zone1Name string `json:"zone1_name"`
	// Zone2名称
	Zone2Name string `json:"zone2_name"`
	// Zone3名称
	Zone3Name string `json:"zone3_name"`

	Databases []apis.IdNameDetails `json:"databases"`
}

func (DBInstanceDetails) GetMetricPairs

func (self DBInstanceDetails) GetMetricPairs() map[string]string

func (DBInstanceDetails) GetMetricTags

func (self DBInstanceDetails) GetMetricTags() map[string]string

type DBInstanceFilterListInput

type DBInstanceFilterListInput struct {
	DBInstanceFilterListInputBase

	VpcFilterListInput
}

type DBInstanceFilterListInputBase

type DBInstanceFilterListInputBase struct {
	DBInstanceResourceInput

	// 以RDS实例名字排序
	OrderByDBInstance string `json:"order_by_dbinstance"`
}

type DBInstanceListInput

type DBInstanceListInput struct {
	apis.VirtualResourceListInput
	apis.ExternalizedResourceBaseListInput
	apis.DeletePreventableResourceBaseListInput

	VpcFilterListInput

	ZoneResourceInput

	MasterInstance string `json:"master_instance"`

	VcpuCount int `json:"vcpu_count"`

	VmemSizeMb int `json:"vmem_size_mb"`

	StorageType string `json:"storage_type"`

	Category string `json:"category"`

	Engine string `json:"engine"`

	EngineVersion string `json:"engine_version"`

	InstanceType string `json:"instance_type"`

	// 通过IP搜索RDS实例
	IpAddr []string `json:"ip_addr"`

	// 通过安全组Id过滤RDS实例
	SecgroupId string `json:"secgroup_id"`
}

type DBInstanceNetworkListInput

type DBInstanceNetworkListInput struct {
	DBInstanceJoinListInput

	NetworkFilterListInput
}

type DBInstanceParameterListInput

type DBInstanceParameterListInput struct {
	apis.StandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput
	DBInstanceFilterListInput

	// 参数名称
	Key []string `json:"key"`

	// 参数值
	Value []string `json:"value"`
}

type DBInstancePrivilege

type DBInstancePrivilege struct {
	// 数据库名称
	Database string `json:"database"`
	// 账号名称
	Account string `json:"account"`
	// 数据库Id
	DBInstancedatabaseId string `json:"dbinstancedatabase_id"`
	// 权限
	Privileges string `json:"privileges"`
}

type DBInstancePrivilegeListInput

type DBInstancePrivilegeListInput struct {
	apis.ResourceBaseListInput
	apis.ExternalizedResourceBaseListInput

	// filter by dbinstanceaccount
	Dbinstanceaccount string `json:"dbinstanceaccount"`
	// filter by dbinstancedatabase
	Dbinstancedatabase string `json:"dbinstancedatabase"`

	// 权限
	Privilege []string `json:"privilege"`
}

type DBInstanceRemoteUpdateInput

type DBInstanceRemoteUpdateInput struct {
	// 是否覆盖替换所有标签
	ReplaceTags *bool `json:"replace_tags" help:"replace all remote tags"`
}

type DBInstanceResourceInfo

type DBInstanceResourceInfo struct {
	DBInstanceResourceInfoBase

	// 归属VPC ID
	VpcId string `json:"vpc_id"`

	VpcResourceInfo
}

type DBInstanceResourceInfoBase

type DBInstanceResourceInfoBase struct {
	// RDS实例名称
	DBInstance string `json:"dbinstance"`
}

type DBInstanceResourceInput

type DBInstanceResourceInput struct {
	// RDS实例(ID or Name)
	DBInstanceId string `json:"dbinstance_id"`

	// swagger:ignore
	// Deprecated
	DBInstance string `json:"dbinstance" yunion-deprecated-by:"dbinstance_id"`
}

type DBInstanceSecgroupDetails

type DBInstanceSecgroupDetails struct {
	apis.VirtualJointResourceBaseDetails

	// RDS名称
	DBInstance string `json:"dbinstance"`
	// 安全组名称
	Secgroup string `json:"secgroup"`
}

type DBInstanceSecgroupListInput

type DBInstanceSecgroupListInput struct {
	DBInstanceJoinListInput

	SecgroupFilterListInput
}

type DBInstanceSetSecgroupInput

type DBInstanceSetSecgroupInput struct {
	SecgroupIds []string `json:"secgroup_ids"`
}

type DBInstanceSkuDetails

type DBInstanceSkuDetails struct {
	apis.EnabledStatusStandaloneResourceDetails
	CloudregionResourceInfo

	SDBInstanceSku

	// 云环境
	CloudEnv string `json:"cloud_env"`

	Zone1Name string `json:"zone1_name"`
	Zone2Name string `json:"zone2_name"`
	Zone3Name string `json:"zone3_name"`
}

type DBInstanceSkuListInput

type DBInstanceSkuListInput struct {
	apis.EnabledStatusStandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput
	apis.DomainizedResourceListInput

	ManagedResourceListInput

	RegionalFilterListInput
	billing.BillingResourceListInput

	// StorageType
	StorageType []string `json:"storage_type"`

	VcpuCount []int `json:"vcpu_count"`

	VmemSizeMb []int `json:"vmem_size_mb"`

	Category []string `json:"category"`

	Engine []string `json:"engine"`

	EngineVersion []string `json:"engine_version"`

	Zone1 []string `json:"zone1"`
	Zone2 []string `json:"zone2"`
	Zone3 []string `json:"zone3"`
}

type DBInstancedatabaseDetails

type DBInstancedatabaseDetails struct {
	apis.StatusStandaloneResourceDetails
	apis.ProjectizedResourceInfo
	DBInstanceResourceInfo

	SDBInstanceDatabase

	// 数据库权限
	DBInstanceprivileges []DBInstancePrivilege `json:"dbinstanceprivileges"`
	ProjectId            string                `json:"tenant_id"`
}

type DeletePreventableCreateInput

type DeletePreventableCreateInput struct {
	//删除保护,创建的资源默认不允许删除
	//default: true
	DisableDelete *bool `json:"disable_delete"`
}

type DeployConfig

type DeployConfig struct {
	Action  string `json:"action"`
	Path    string `json:"path"`
	Content string `json:"content"`
}

type DiskAdapterSpec

type DiskAdapterSpec map[string][]*DiskSpec

type DiskAllocateFromBackupInput

type DiskAllocateFromBackupInput struct {
	BackupId                string
	BackupStorageId         string
	BackupStorageAccessInfo *jsonutils.JSONDict
	DiskConfig              *DiskConfig           `json:"disk_config"`
	BackupAsTar             *DiskBackupAsTarInput `json:"backup_as_tar"`
}

type DiskAllocateInput

type DiskAllocateInput struct {
	Format        string
	DiskSizeMb    int
	ImageId       string
	ImageFormat   string
	FsFormat      string
	FsFeatures    *DiskFsFeatures
	Rebuild       bool
	BackingDiskId string
	SnapshotId    string

	BackupId string
	Backup   *DiskAllocateFromBackupInput

	SnapshotUrl        string
	SnapshotOutOfChain bool
	Protocol           string
	SrcDiskId          string
	SrcPool            string
	ExistingPath       string

	// vmware
	HostIp    string
	Datastore vcenter.SVCenterAccessInfo

	// encryption
	Encryption  bool
	EncryptInfo apis.SEncryptInfo
}

type DiskBackupAsTarInput

type DiskBackupAsTarInput struct {
	IncludeFiles       []string `json:"include_files"`
	ExcludeFiles       []string `json:"exclude_files"`
	ContainerId        string   `json:"container_id"`
	IgnoreNotExistFile bool     `json:"ignore_not_exist_file"`
}

type DiskBackupCreateInput

type DiskBackupCreateInput struct {
	apis.VirtualResourceCreateInput
	apis.EncryptedResourceCreateInput

	// description: disk id
	DiskId string `json:"disk_id"`
	// swagger: ignore
	BackStorageId string `json:"back_storage_id" yunion-deprecated-by:"backup_storage_id"`
	// description: backup storage id
	BackupStorageId string `json:"backup_storage_id"`
	// swagger: ignore
	CloudregionId string `json:"cloudregion_id"`
	// swagger:ignore
	ManagerId   string                `json:"manager_id"`
	BackupAsTar *DiskBackupAsTarInput `json:"backup_as_tar"`
}

type DiskBackupDetails

type DiskBackupDetails struct {
	apis.VirtualResourceDetails
	ManagedResourceInfo
	CloudregionResourceInfo
	apis.EncryptedResourceDetails

	// description: disk name
	DiskName string `json:"disk_name"`
	// description: backup storage name
	BackupStorageName string `json:"backup_storage_name"`
	// description: 是否是子备份
	IsSubBackup bool `json:"is_sub_backup"`

	SDiskBackup
}

type DiskBackupListInput

type DiskBackupListInput struct {
	apis.VirtualResourceListInput
	ManagedResourceListInput
	RegionalFilterListInput
	apis.MultiArchResourceBaseListInput
	// description: disk id
	DiskId string `json:"disk_id"`
	// description: backup storage id
	BackupStorageId string `json:"backup_storage_id"`
	// description: 是否为主机备份的一部分
	IsInstanceBackup *bool `json:"is_instance_backup"`
	// 按硬盘名称排序
	OrderByDiskName string `json:"order_by_disk_name"`
}

type DiskBackupPackMetadata

type DiskBackupPackMetadata struct {
	OsArch     string
	SizeMb     int
	DiskSizeMb int
	DiskType   string
	// 操作系统类型
	OsType     string
	DiskConfig *SBackupDiskConfig
}

type DiskBackupRecoveryInput

type DiskBackupRecoveryInput struct {
	// description: name of disk
	Name string
}

type DiskBackupSyncstatusInput

type DiskBackupSyncstatusInput struct {
}

type DiskConfig

type DiskConfig struct {
	apis.Meta

	// 挂载到虚拟机的磁盘顺序, -1代表不挂载任何虚拟机
	// default: -1
	Index     int   `json:"index"`
	BootIndex *int8 `json:"boot_index"`

	// 镜像ID,通过镜像创建磁盘,创建虚拟机时第一块磁盘需要指定此参数
	// required: false
	ImageId string `json:"image_id"`

	// 镜像加密key ID
	ImageEncryptKeyId string `json:"image_encrypt_key_id"`

	// 快照ID,通过快照创建磁盘,此参数必须加上 'snapshot-' 前缀
	// example: snapshot-3140cecb-ccc4-4865-abae-3a5ba8c69d9b
	// requried: false
	SnapshotId string `json:"snapshot_id"`

	BackupId string `json:"backup_id"`

	// 磁盘类型
	// enum: ["sys", "data", "swap"]
	DiskType string `json:"disk_type"`

	Schedtags []*SchedtagConfig `json:"schedtags"`

	// 磁盘大小,单位Mb
	// 若创建裸金属服务器是, -1代表自动向后扩展存储
	// requried:true
	SizeMb int `json:"size"`

	// 文件系统,仅kvm支持自动格式化磁盘,私有云和公有云此参数不会生效
	// enum: ["swap", "ext2", "ext3", "ext4", "xfs", "ntfs", "fat", "hfsplus"]
	// requried: false
	Fs string `json:"fs"`

	// 文件系统特性
	FsFeatures *DiskFsFeatures `json:"fs_features"`

	// 磁盘存储格式
	// enum: ["qcow2", "raw", "docker", "iso", "vmdk", "vmdkflatver1", "vmdkflatver2", "vmdkflat", "vmdksparse", "vmdksparsever1", "vmdksparsever2", "vmdksepsparse", "vhd"]
	// requried: false
	Format string `json:"format"`

	// 磁盘驱动方式
	// enum: ["virtio", "ide", "scsi", "sata", "pvscsi"]
	// requried: false
	Driver string `json:"driver"`

	// 磁盘缓存模式
	// enum: ["writeback", "none", "writethrough"]
	// requried: false
	Cache string `json:"cache"`

	// 挂载点,必须以 '/' 开头,例如 /opt 仅KVM此参数有效
	// requried: false
	Mountpoint string `json:"mountpoint"`

	// 操作系统CPU架构
	// required: false
	OsArch string `json:"os_arch"`

	//后端存储类型,若指定了存储ID,此参数会根据存储设置,若不指定,则作为调度的一个参考
	//
	//
	//
	//  | 平台           |  存储类型             |    中文        |    数据盘     |    系统盘          |    可否扩容      |    可否单独创建      |    扩容步长      |    说明    |
	//  |----            |    ----               |    ----        |    -----      |    -----           |    -------       |    -----------       |    -------       |    -----   |
	//  |Esxi            |local                  |本地盘          |1-500GB        |30~500GB            |    是            |    否                |    1G            |            |
	//  |Esxi            |nas                    |NAS盘           |30-3072GB      |30~500GB            |    是            |    否                |    1G            |            |
	//  |Esxi            |vsan                   |VSAN盘          |30-3072GB      |30~500GB            |    是            |    否                |    1G            |            |
	//  |KVM             |local                  |本地盘盘        |1-500GB        |30~500GB            |    是            |    否                |    1G            |            |
	//  |KVM             |rbd                    |云硬盘          |1-3072GB       |30~500GB            |    是            |    是                |    1G            |            |
	//  |Azure           |standard_lrs           |标准 HDD        |1-4095GB       |30~4095GB           |    是            |    是                |    1G            |            |
	//  |Azure           |standardssd_lrs        |标准 SSD        |1-4095GB       |30~4095GB           |    是            |    是                |    1G            |            |
	//  |Azure           |premium_lrs            |高级SSD         |1-4095GB       |30~4095GB           |    是            |    是                |    1G            |            |
	//  |AWS             |gp2                    |通用型SSD       |1-16384GB      |20~16384GB          |    是            |    是                |    1G            |            |
	//  |AWS             |io1                    |预配置 IOPS SSD |4-16384GB      |20-16384GB          |    是            |    是                |    1G            |            |
	//  |AWS             |st1                    |吞吐优化HDD     |500-16384GB    |不支持              |    是            |    是                |    1G            |            |
	//  |AWS             |sc1                    |Cold HDD        |500-16384GB    |不支持              |    是            |    是                |    1G            |            |
	//  |AWS             |standard               |磁介质          |1-1024GB       |20-1024GB           |    是            |    是                |    1G            |            |
	//  |腾讯云          |cloud_ssd              |SSD云硬盘       |10-16000GB     |50~500GB            |    是            |    是                |    10G           |            |
	//  |腾讯云          |cloud_basic            |普通云硬盘      |10-16000GB     |50~500GB            |    是            |    是                |    10G           |            |
	//  |腾讯云          |cloud_preium           |高性能云硬盘    |10-16000GB     |50~1024GB           |    是            |    是                |    10G           |            |
	//  |腾讯云          |local_basic            |普通本地盘      |10-1600GB      |不支持              |    否            |    否                |                  |            |
	//  |腾讯云          |local_ssd              |SSD本地盘       |10-7000GB      |部分区域套餐支持    |    否            |    否                |                  |            |
	//  |腾讯云          |local_pro              |HDD本地盘       |跟随套餐       |部分区域套餐支持    |    否            |    否                |                  |            |
	//  |华为云或天翼云  |SSD                    |超高IO云硬盘    |10-32768GB     |40~1024GB           |    是            |    是                |    1G            |            |
	//  |华为云或天翼云  |SAS                    |高IO云硬盘      |10-32768GB     |40~1024GB           |    是            |    是                |    1G            |            |
	//  |华为云或天翼云  |SATA                   |普通IO云硬盘    |10-32768GB     |40~1024GB           |    是            |    是                |    1G            |            |
	//  |OpenStack       |nova                   |nova            |不支持         |30-500GB            |    否            |    否                |                  |            |
	//  |OpenStack       |自定义                 |...             |无限制         |无限制              |    是            |    是                |    1G            |            |
	//  |Ucloud          |CLOUD_NORMAL           |普通云盘        |20-8000GB      |不支持              |    是            |    是                |    1G            |            |
	//  |Ucloud          |CLOUD_SSD              |SSD云盘         |20-4000GB      |20-500GB            |    是            |    是                |    1G            |            |
	//  |Ucloud          |LOCAL_NORMAL           |普通本地盘      |               |                    |    是            |    是                |    1G            |            |
	//  |Ucloud          |LOCAL_SSD              |SSD本地盘       |               |                    |    是            |    是                |    1G            |            |
	//  |Ucloud          |EXCLUSIVE_LOCAL_DISK   |独享本地盘      |               |                    |    是            |    是                |    1G            |            |
	//  |ZStack          |localstorage           |本地盘          |               |                    |    是            |    是                |    1G            |            |
	//  |ZStack          |ceph                   |云硬盘          |               |                    |    是            |    是                |    1G            |            |
	//  |Google          |local-ssd              |本地SSD暂存盘   |375GB          |不支持              |    否            |    否                |                  |    跟随实例创建,一次最多添加8个        |
	//  |Google          |pd-standard            |标准永久性磁盘  |10-65536GB     |10-65536GB          |    是            |    是                |    1G            |            |
	//  |Google          |pd-ssd                 |SSD永久性磁盘   |10-65536GB     |10-65536GB          |    是            |    是                |    1G            |            |
	Backend string `json:"backend"`

	//介质类型
	//rotate: 机械盘
	//ssd: 固态硬盘
	//hybird: 混合盘
	//emum: [rotate, ssd, hybrid]
	//default: hybird
	Medium string `json:"medium"`

	//swagger:ignore
	ImageProperties map[string]string `json:"image_properties"`

	//存储ID, 指定存储后,磁盘会在此存储上创建
	//存储列表可以参数 storage 列表API
	//required: false
	Storage string `json:"storage_id"`

	//swagger:ignore
	DiskId string `json:"disk_id"`

	//swagger:ignore
	ExistingPath string `json:"existing_path"`

	// requried:false
	Iops int `json:"iops"`

	// 磁盘吞吐量, 仅对aws gp3生效
	// 范围: 125-1000
	Throughput int `json:"throughput"`

	// NVNe device
	NVMEDevice *IsolatedDeviceConfig `json:"nvme_device"`

	// 预分配策略:
	// off: 关闭预分配,默认关闭
	// metadata: 精简置备
	// falloc: 厚置备延迟置零
	// full: 厚置备快速置零
	// default: off
	Preallocation string `json:"preallocation"`
}

type DiskCreateInput

type DiskCreateInput struct {
	apis.VirtualResourceCreateInput
	apis.EncryptedResourceCreateInput

	*DiskConfig

	// 调度使用指定的云账号
	PreferManager string `json:"prefer_manager_id"`

	// 此参数仅适用于未指定storage时进行调度到指定区域创建磁盘
	// required: false
	PreferRegion string `json:"prefer_region_id"`

	// 此参数仅适用于未指定storage时进行调度到指定可用区区创建磁盘
	// required: false
	PreferZone string `json:"prefer_zone_id"`

	// swagger:ignore
	PreferWire string `json:"prefer_wire_id"`

	// 此参数仅适用于未指定storage时进行调度到指定可用区区创建磁盘
	// required: false
	PreferHost string `json:"prefer_host_id"`

	// 此参数仅适用于未指定storage时进行调度到指定平台创建磁盘
	// default: kvm
	// enum: ["kvm", "openstack", "esxi", "aliyun", "aws", "qcloud", "azure", "huawei", "ucloud", "zstack", "google", "ctyun"]
	Hypervisor string `json:"hypervisor"`
}

func (*DiskCreateInput) ToServerCreateInput

func (req *DiskCreateInput) ToServerCreateInput() *ServerCreateInput

ToServerCreateInput used by disk schedule

type DiskDeleteInput

type DiskDeleteInput struct {
	SkipRecycle      *bool
	EsxiFlatFilePath string
	CleanSnapshots   bool
}

type DiskDetails

type DiskDetails struct {
	apis.VirtualResourceDetails
	StorageResourceInfo
	apis.EncryptedResourceDetails

	SDisk

	// 所挂载的虚拟机
	Guests []SimpleGuest `json:"guests"`
	// 所挂载的虚拟机
	Guest string `json:"guest"`
	// 所挂载虚拟机的数量
	GuestCount int `json:"guest_count"`
	// 所挂载虚拟机状态
	GuestStatus string `json:"guest_status"`

	// 自动清理时间
	AutoDeleteAt time.Time `json:"auto_delete_at"`
	// 自动快照策略状态
	SnapshotpolicyStatus string `json:"snapshotpolicy_status,allowempty"`

	// 自动快照策略
	Snapshotpolicies []SimpleSnapshotPolicy `json:"snapshotpolicies"`
}

type DiskDriverSpec

type DiskDriverSpec map[string]DiskAdapterSpec

type DiskFilterListInput

type DiskFilterListInput struct {
	StorageFilterListInput

	DiskFilterListInputBase
}

type DiskFilterListInputBase

type DiskFilterListInputBase struct {
	DiskResourceInput

	// 以磁盘名称排序
	// pattern:asc|desc
	OrderByDisk string `json:"order_by_disk"`
}

type DiskFsExt4Features

type DiskFsExt4Features struct {
	CaseInsensitive bool `json:"case_insensitive"`
}

type DiskFsFeatures

type DiskFsFeatures struct {
	Ext4 *DiskFsExt4Features `json:"ext4"`
}

func (*DiskFsFeatures) IsZero

func (d *DiskFsFeatures) IsZero() bool

func (*DiskFsFeatures) String

func (d *DiskFsFeatures) String() string

type DiskListInput

type DiskListInput struct {
	apis.VirtualResourceListInput
	apis.ExternalizedResourceBaseListInput
	apis.MultiArchResourceBaseListInput
	apis.AutoDeleteResourceBaseListInput
	billing.BillingResourceListInput
	StorageFilterListInput

	SnapshotPolicyFilterListInput
	ServerFilterListInput

	// filter disk by whether it is being used
	Unused *bool `json:"unused"`

	// swagger:ignore
	// Deprecated
	// filter by disk type
	Type string `json:"type" yunion-deprecated-by:"disk_type"`
	// 过滤指定disk_type的磁盘列表,可能的值为:sys, data, swap. volume
	//
	// | disk_type值 | 说明 |
	// |-------------|----------|
	// | sys         | 虚拟机系统盘    |
	// | data        | 虚拟机数据盘    |
	// | swap        | 虚拟机内存交换盘 |
	// | volume      | 容器volumn盘   |
	//
	DiskType string `json:"disk_type"`

	DiskFormat string `json:"disk_format"`

	DiskSize int `json:"disk_size"`

	FsFormat string `json:"fs_format"`

	OrderByServer string `json:"order_by_server" choices:"asc|desc"`

	OrderByGuestCount string `json:"order_by_guest_count" choices:"asc|desc"`
	// 镜像
	ImageId string `json:"image_id"`
	// swagger:ignore
	// Deprecated
	Template string `json:"template" yunion-deprecated-by:"image_id"`
	// swagger:ignore
	// Deprecated
	TemplateId string `json:"template_id" yunion-deprecated-by:"image_id"`

	// 快照
	SnapshotId string `json:"snapshot_id"`
	// swagger:ignore
	// Deprecated
	Snapshot string `json:"snapshot" yunion-deprecated-by:"snapshot_id"`

	// 根据虚拟机状态过滤
	GuestStatus string `json:"guest_status"`
}

type DiskMigrateInput

type DiskMigrateInput struct {
	TargetStorageId string `json:"target_storage_id"`
}

type DiskRebuildInput

type DiskRebuildInput struct {
	BackupId   *string `json:"backup_id,allowempty"`
	TemplateId *string `json:"template_id,allowempty"`
}

type DiskResetInput

type DiskResetInput struct {
	SnapshotId string `json:"snapshot_id"`
	AutoStart  bool   `json:"auto_start"`
}

type DiskResizeInput

type DiskResizeInput struct {
	// default unit: Mb
	// example: 1024; 40G; 1024M
	Size string `json:"size"`
}

func (DiskResizeInput) SizeMb

func (self DiskResizeInput) SizeMb() (int, error)

type DiskResizeSpec

type DiskResizeSpec struct {
	DiskId    string
	SizeMb    int
	OldSizeMb int
}

type DiskResourceInfo

type DiskResourceInfo struct {
	DiskResourceInfoBase

	// 存储ID
	StorageId string `json:"storage_id"`

	StorageResourceInfo
}

type DiskResourceInfoBase

type DiskResourceInfoBase struct {
	// 磁盘名称
	Disk string `json:"disk"`
}

type DiskResourceInput

type DiskResourceInput struct {
	// 虚拟磁盘(ID或Name)
	DiskId string `json:"disk_id"`
	// swagger:ignore
	// Deprecated
	// filter by disk_id
	Disk string `json:"disk" yunion-deprecated-by:"disk_id"`
}

type DiskSaveInput

type DiskSaveInput struct {
	Name   string
	Format string

	// swagger: ignore
	ImageId string
}

type DiskSnapshotpolicyInput

type DiskSnapshotpolicyInput struct {
	SnapshotpolicyId string `json:"snapshotpolicy_id"`
}

type DiskSpec

type DiskSpec struct {
	apis.Meta

	Type       string `json:"type"`
	Size       int64  `json:"size"`
	StartIndex int    `json:"start_index"`
	EndIndex   int    `json:"end_index"`
	Count      int    `json:"count"`
}

type DiskSyncstatusInput

type DiskSyncstatusInput struct {
}

type DiskUpdateInput

type DiskUpdateInput struct {
	apis.VirtualResourceBaseUpdateInput

	// 磁盘类型
	DiskType string `json:"disk_type"`
}

type DnsRecordCreateInput

type DnsRecordCreateInput struct {
	apis.EnabledStatusStandaloneResourceCreateInput

	DnsZoneId  string `json:"dns_zone_id"`
	DnsType    string `json:"dns_type"`
	DnsValue   string `json:"dns_value"`
	TTL        int64  `json:"ttl"`
	MxPriority int64  `json:"mx_priority"`

	PolicyType  string `json:"policy_type"`
	PolicyValue string `json:"policy_value"`
}

type DnsRecordDetails

type DnsRecordDetails struct {
	apis.EnabledStatusStandaloneResourceDetails
	SDnsRecord

	DnsZone string `json:"dns_zone"`
}

type DnsRecordDisableInput

type DnsRecordDisableInput struct {
	apis.PerformDisableInput
}

type DnsRecordEnableInput

type DnsRecordEnableInput struct {
	apis.PerformEnableInput
}

type DnsRecordUpdateInput

type DnsRecordUpdateInput struct {
	apis.EnabledStatusStandaloneResourceBaseUpdateInput

	DnsType    string `json:"dns_type"`
	DnsValue   string `json:"dns_value"`
	TTL        *int64 `json:"ttl"`
	MxPriority *int64 `json:"mx_priority"`
}

type DnsZoneAddVpcsInput

type DnsZoneAddVpcsInput struct {
	// VPC id列表
	VpcIds []string `json:"vpc_ids"`
}

type DnsZoneCreateInput

type DnsZoneCreateInput struct {
	apis.SharableVirtualResourceCreateInput

	CloudproviderResourceInput

	// 区域类型
	//
	//
	// | 类型            | 说明    |
	// |----------       |---------|
	// | PublicZone      | 公有    |
	// | PrivateZone     | 私有    |
	ZoneType string `json:"zone_type"`

	// VPC id列表, 仅在zone_type为PrivateZone时生效, vpc列表必须属于同一个账号
	VpcIds []string `json:"vpc_ids"`
}

type DnsZoneDetails

type DnsZoneDetails struct {
	apis.SharableVirtualResourceDetails
	ManagedResourceInfo
	SDnsZone

	// Dns记录数量
	DnsRecordCount int `json:"dns_record_count"`
	// 关联vpc数量
	VpcCount int `json:"vpc_count"`
}

type DnsZoneFilterListBase

type DnsZoneFilterListBase struct {
	DnsZoneId string `json:"dns_zone_id"`
	ManagedResourceListInput
}

type DnsZoneListInput

type DnsZoneListInput struct {
	apis.SharableVirtualResourceListInput

	ManagedResourceListInput

	// 区域类型
	//
	//
	// | 类型            | 说明    |
	// |----------       |---------|
	// | PublicZone      | 公有    |
	// | PrivateZone     | 私有    |
	ZoneType string `json:"zone_type"`

	// Filter dns zone By vpc
	VpcId string `json:"vpc_id"`
}

type DnsZonePurgeInput

type DnsZonePurgeInput struct {
}

type DnsZoneRemoveVpcsInput

type DnsZoneRemoveVpcsInput struct {
	// VPC id列表
	VpcIds []string `json:"vpc_ids"`
}

type DnsZoneSyncStatusInput

type DnsZoneSyncStatusInput struct {
}

type DynamicschedtagListInput

type DynamicschedtagListInput struct {
	apis.StandaloneResourceListInput
	SchedtagFilterListInput

	// filter by enabled status
	Enabled *bool `json:"enabled"`
}

type ELasticcacheResourceInput

type ELasticcacheResourceInput struct {
	// 弹性缓存实例(ID or Name)
	ElasticcacheId string `json:"elasticcache_id"`

	// swagger:ignore
	// Deprecated
	Elasticcache string `json:"elasticcache" yunion-deprecated-by:"elasticcache_id"`
}

type ElasticDissociateInput

type ElasticDissociateInput struct {
	// 注意: 若关联到aws NAT网关后,目前没办法解除关联关系
	// 是否解绑后自动删除弹性公网IP
	// default: false
	AutoDelete bool `json:"auto_delete"`
}

type ElasticSearchAccessInfoInput

type ElasticSearchAccessInfoInput struct {
}

type ElasticSearchCreateInput

type ElasticSearchCreateInput struct {
}

资源创建参数, 目前仅占位

type ElasticcacheAccountListInput

type ElasticcacheAccountListInput struct {
	apis.StatusStandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput

	ElasticcacheFilterListInput

	// 账号类型 normal |admin
	AccountType []string `json:"account_type"`

	// 账号权限 read | write | repl(复制, 复制权限支持读写,且开放SYNC/PSYNC命令)
	AccountPrivilege []string `json:"account_privilege"`
}

type ElasticcacheAclListInput

type ElasticcacheAclListInput struct {
	apis.StandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput

	ElasticcacheFilterListInput

	// Ip地址白名单列表
	IpList string `json:"ip_list"`
}

type ElasticcacheBackupListInput

type ElasticcacheBackupListInput struct {
	apis.StatusStandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput

	ElasticcacheFilterListInput

	// 备份类型, 全量|增量额
	BackupType []string `json:"backup_type"`

	// 备份模式,自动|手动
	BackupMode []string `json:"backup_mode"`
}

type ElasticcacheCreateInput

type ElasticcacheCreateInput struct {
	apis.VirtualResourceCreateInput

	// 安全组列表
	// 腾讯云需要传此参数
	// required: false
	ElasticcacheSecgroupsInput

	// 主可用区名称或Id
	ZoneId string `json:"zone_id"`

	// swagger: ignore
	Zone string `json:"zone" yunion-deprecated-by:"zone_id"`

	// 备可用区名称或Id列表, split by: ,
	// 默认副本与主可用区一致
	// 支持此参数的云厂商: 腾讯云
	// required: false
	SlaveZones string `json:"slave_zones"`

	// Ip子网名称或Id,建议使用Id
	// required: true
	NetworkId string `json:"network_id"`

	// swagger: ignore
	Network string `json:"network" yunion-deprecated-by:"network_id"`

	// 网络类型
	//  enum: ["vpc", "cLassic"]
	// required: true
	NetworkType string `json:"network_type"`

	// 弹性缓存Engine
	//  enum: ["redis", "memcached"]
	// required: true
	Engine string `json:"engine"`

	// 弹性缓存Engine版本
	// required: false
	EngineVersion string `json:"engine_version"`

	// 实例规格
	// required: false
	InstanceType string `json:"instance_type"`

	NodeType string `json:"node_type"`

	// swagger: ignore
	MemorySizeMb int `json:"memory_size_mb" yunion-deprecated-by:"capacity_mb"`

	// 初始密码
	// required: false
	Password string `json:"password"`

	ResetPassword bool `json:"reset_password"`

	// 安全组名称或Id
	// default: default
	SecgroupIds []string `json:"secgroup_ids"`

	// 内网IP
	// 阿里云、华为云此参数可选,其它公有云该参数无效
	// required: false
	PrivateIp string `json:"private_ip"`

	// swagger:ignore
	VpcId string

	// swagger:ignore
	ManagerId string

	// 包年包月时间周期
	Duration string `json:"duration"`

	// 是否自动续费(仅包年包月时生效)
	// default: false
	AutoRenew bool `json:"auto_renew"`

	// swagger:ignore
	ExpiredAt time.Time `json:"expired_at"`

	// 计费方式
	// enum: ["postpaid", "prepaid"]
	BillingType string
	// swagger:ignore
	BillingCycle string

	// 弹性缓存维护时间段
	// 华为云此参数可选,其它云该参数无效
	// enum: ["22:00:00", "02:00:00", "06:00:00", "10:00:00", "14:00:00", "18:00:00"]
	// required: false
	MaintainStartTime string `json:"maintain_start_time"`

	LocalCategory string `json:"local_category"`

	CapacityMb int `json:"capacity_mb"`

	CloudregionId string `json:"cloudregion_id"`
}

type ElasticcacheDetails

type ElasticcacheDetails struct {
	apis.VirtualResourceDetails
	VpcResourceInfo
	ZoneResourceInfoBase

	SElasticcache

	// IP子网名称
	Network string `json:"network"`

	// 关联安全组列表
	Secgroups []apis.StandaloneShortDesc `json:"secgroups"`

	// 备可用区列表
	SlaveZoneInfos []apis.StandaloneShortDesc `json:"slave_zone_infos"`
}

func (ElasticcacheDetails) GetMetricPairs

func (self ElasticcacheDetails) GetMetricPairs() map[string]string

func (ElasticcacheDetails) GetMetricTags

func (self ElasticcacheDetails) GetMetricTags() map[string]string

type ElasticcacheFilterListInput

type ElasticcacheFilterListInput struct {
	ELasticcacheResourceInput

	// 以弹性缓存实例名称排序
	OrderByElasticcache string `json:"order_by_elasticcache"`

	VpcFilterListInput

	ZonalFilterListBase
}

type ElasticcacheJointBaseUpdateInput

type ElasticcacheJointBaseUpdateInput struct {
	apis.VirtualJointResourceBaseUpdateInput
}

type ElasticcacheJointResourceDetails

type ElasticcacheJointResourceDetails struct {
	apis.VirtualJointResourceBaseDetails

	// 弹性缓存实例名称
	Elasticcache string `json:"elasticcache"`
	// 弹性缓存实例ID
	ElasticcacheId string `json:"elasticcache_id"`
}

type ElasticcacheListInput

type ElasticcacheListInput struct {
	apis.VirtualResourceListInput
	apis.ExternalizedResourceBaseListInput
	apis.DeletePreventableResourceBaseListInput
	VpcFilterListInput
	ZonalFilterListBase

	// 实例规格
	// example: redis.master.micro.default
	InstanceType []string `json:"instance_type"`

	// 对应Sku
	LocalCategory []string `json:"local_category"`

	// 类型
	// single(单副本) | double(双副本) | readone (单可读) | readthree (3可读) | readfive(5只读)
	NodeType []string `json:"node_type"`

	// 后端存储引擎
	// Redis | Memcache
	// example: redis
	Engine []string `json:"engine"`

	// 后端存储引擎版本
	// example: 4.0
	EngineVersion []string `json:"engine_version"`

	// 网络类型, CLASSIC(经典网络)  VPC(专有网络)
	// example: CLASSIC
	NetworkType []string `json:"network_type"`

	NetworkFilterListBase

	//  内网DNS
	PrivateDNS []string `json:"private_dns"`

	//  内网IP地址
	PrivateIpAddr []string `json:"private_ip_addr"`

	// 内网访问端口
	PrivateConnectPort []int `json:"private_connect_port"`

	// 公网DNS
	PublicDNS []string `json:"public_dns"`

	// 公网IP地址
	PublicIpAddr []string `json:"public_ip_addr"`

	// 外网访问端口
	PublicConnectPort []int `json:"public_connect_port"`

	// 访问密码? on (开启密码)|off (免密码访问)
	AuthMode []string `json:"auth_mode"`

	// 通过安全组Id过滤缓存实例
	SecgroupId string `json:"secgroup_id"`
}

type ElasticcacheParameterListInput

type ElasticcacheParameterListInput struct {
	apis.StandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput

	ElasticcacheFilterListInput

	// 参数名称
	Key []string `json:"key"`

	// 参数值
	Value []string `json:"value"`
}

type ElasticcacheRemoteUpdateInput

type ElasticcacheRemoteUpdateInput struct {
	// 是否覆盖替换所有标签
	ReplaceTags *bool `json:"replace_tags" help:"replace all remote tags"`
}

type ElasticcacheResourceInfo

type ElasticcacheResourceInfo struct {
	// 弹性缓存实例名称
	Elasticcache string `json:"elasticcache"`

	// 引擎
	Engine string `json:"engine"`
	// 引擎版本
	EngineVersion string `json:"engine_version"`

	// 归属VPC ID
	VpcId string `json:"vpc_id"`

	VpcResourceInfo

	// 归属Zone ID
	ZoneId string `json:"zone_id"`

	ZoneResourceInfoBase
}

type ElasticcacheSecgroupsInput

type ElasticcacheSecgroupsInput struct {
	// 安全组Id列表
	// 实例必须处于运行状态
	//
	//
	// | 平台         | 最多绑定安全组数量    |
	// |-------------|-------------------    |
	// | 腾讯云       | 10                     |
	// | 华为云       | 不支持安全组            |
	// | 阿里云       | 不支持安全组            |
	SecgroupIds []string `json:"secgroup_ids"`
}

type ElasticcacheSkuListInput

type ElasticcacheSkuListInput struct {
	apis.StatusStandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput

	ManagedResourceListInput

	UsableResourceListInput
	billing.BillingResourceListInput

	ZonalFilterListInput

	// filter sku by memory size in MB
	MemorySizeMb int `json:"memory_size_mb"`

	InstanceSpec []string `json:"instance_spec"`

	EngineArch []string `json:"engine_arch"`

	LocalCategory []string `json:"local_category"`

	PrepaidStatus []string `json:"prepaid_status"`

	PostpaidStatus []string `json:"postpaid_sStatus"`

	// 引擎 redis|memcached
	Engine []string `json:"engine"`

	// 引擎版本 3.0
	EngineVersion []string `json:"engine_version"`

	// CPU 架构 x86|ARM
	CpuArch []string `json:"cpu_arch"`

	// 存储类型 DRAM|SCM
	StorageType []string `json:"storage_type"`

	// standrad|enhanced
	PerformanceType []string `json:"performance_type"`

	// single(单副本) | double(双副本) | readone (单可读) | readthree (3可读) | readfive(5只读)
	NodeType []string `json:"node_type"`
}

type ElasticcacheSyncstatusInput

type ElasticcacheSyncstatusInput struct {
}

type ElasticcachesecgroupDetails

type ElasticcachesecgroupDetails struct {
	ElasticcacheJointResourceDetails

	SElasticcachesecgroup

	// 安全组名称
	Secgroup string `json:"secgroup"`
}

type ElasticcachesecgroupListInput

type ElasticcachesecgroupListInput struct {
	ElasticcacheJointsListInput
	SecgroupFilterListInput
}

type ElasticipAssociateInput

type ElasticipAssociateInput struct {
	// 待绑定实例Id
	InstanceId string `json:"instance_id"`
	// swagger:ignore
	InstanceExternalId string `json:"instance_external_id"`

	// swagger:ignore
	Instance string `json:"instance" yunion-deprecated-by:"instance_id"`

	// 实例类型
	// enmu: server, natgateway
	// default: server
	InstanceType string `json:"instance_type"`

	// EIP映射的内网IP地址,可选
	IpAddr string `json:"ip_addr"`
}

type ElasticipDetails

type ElasticipDetails struct {
	apis.VirtualResourceDetails
	ManagedResourceInfo
	CloudregionResourceInfo

	SElasticip

	// 绑定资源名称
	AssociateName string `json:"associate_name"`
}

func (ElasticipDetails) GetMetricTags

func (self ElasticipDetails) GetMetricTags() map[string]string

type ElasticipListInput

type ElasticipListInput struct {
	apis.VirtualResourceListInput
	apis.ExternalizedResourceBaseListInput

	ManagedResourceListInput
	RegionalFilterListInput
	UsableResourceListInput

	// filter usable eip for given associate type
	// enmu: server, natgateway
	UsableEipForAssociateType string `json:"usable_eip_for_associate_type"`
	// filter usable eip for given associate id
	UsableEipForAssociateId string `json:"usable_eip_for_associate_id"`

	NetworkFilterListBase

	// 标识弹性或非弹性
	// | Mode       | 说明       |
	// |------------|------------|
	// | public_ip  | 公网IP     |
	// | elastic_ip | 弹性公公网网IP |
	//
	// example: elastic_ip
	Mode string `json:"mode"`

	// 是否已关联资源
	IsAssociated *bool `json:"is_associated"`

	// IP地址
	IpAddr []string `json:"ip_addr"`

	// 绑定资源类型
	AssociateType []string `json:"associate_type"`

	// 绑定资源名称,模糊查询
	AssociateName []string `json:"associate_name"`

	// 绑定资源Id
	AssociateId []string `json:"associate_id"`

	// 计费类型: 流量、带宽
	// example: bandwidth
	ChargeType []string `json:"charge_type"`

	// 目前只有华为云此字段是必需填写的
	BgpType []string `json:"bgp_type"`

	// 是否跟随主机删除而自动释放
	AutoDellocate *bool `json:"auto_dellocate"`
	// 按ip地址排序
	// pattern:asc|desc
	OrderByIp string `json:"order_by_ip"`
}

type ElasticipRemoteUpdateInput

type ElasticipRemoteUpdateInput struct {
	// 是否覆盖替换所有标签
	ReplaceTags *bool `json:"replace_tags" help:"replace all remote tags"`
}

type ElasticipSyncstatusInput

type ElasticipSyncstatusInput struct {
}

type EnrollmentAccountQuery

type EnrollmentAccountQuery struct {
}

type ExternalProjectChangeProjectInput

type ExternalProjectChangeProjectInput struct {
	apis.DomainizedResourceInput
	apis.ProjectizedResourceInput
}

type ExternalProjectCreateInput

type ExternalProjectCreateInput struct {
	apis.VirtualResourceCreateInput

	ManagerId string `json:"manager_id"`

	// swagger:ignore
	ExternalId string `json:"external_id"`
}

type FileSystemCreateInput

type FileSystemCreateInput struct {
	apis.SharableVirtualResourceCreateInput
	// 协议类型
	// enum: ["NFS", "SMB", "CPFS"]
	Protocol string `json:"protocol"`

	// 文件系统类型
	// enmu: extreme, standard, cpfs
	FileSystemType string `json:"file_system_type"`

	// 容量大小
	Capacity int64 `json:"capacity"`

	// IP子网Id
	NetworkId string `json:"network_id"`

	// 存储类型
	// enmu: performance, capacity, standard, advance, advance_100, advance_200
	StorageType string `json:"storage_type"`

	// 可用区Id, 若不指定IP子网,此参数必填
	ZoneId string `json:"zone_id"`

	//swagger:ignore
	CloudregionId string `json:"cloudregion_id"`

	// 订阅Id, 若传入network_id此参数可忽略
	ManagerId string `json:"manager_id"`

	// 包年包月时间周期
	Duration string `json:"duration"`

	// 是否自动续费(仅包年包月时生效)
	// default: false
	AutoRenew bool `json:"auto_renew"`

	// 到期释放时间,仅后付费支持
	ExpiredAt time.Time `json:"expired_at"`

	// 计费方式
	// enum: ["postpaid", "prepaid"]
	BillingType string `json:"billing_type"`
	// swagger:ignore
	BillingCycle string `json:"billing_cycle"`
}

type FileSystemRemoteUpdateInput

type FileSystemRemoteUpdateInput struct {
	// 是否覆盖替换所有标签
	ReplaceTags *bool `json:"replace_tags" help:"replace all remote tags"`
}

type FileSystemSetQuotaInput

type FileSystemSetQuotaInput struct {
	MaxGb    *int64
	MaxFiles *int64
}

type FileSystemSyncstatusInput

type FileSystemSyncstatusInput struct {
}

type Floppy

type Floppy struct {
	Ordinal int    `json:"ordinal"`
	Detail  string `json:"detail"`
}

type ForwardDetails

type ForwardDetails struct {
	ProxyAgentId    string
	ProxyEndpointId string
}

type GetKubeConfigInput

type GetKubeConfigInput struct {
	// 是否获取内网kubeconfig, 默认false即获取外网kubeconfig
	Private bool `json:"private"`
	// kubeconfig 到期时间
	// 阿里云: 15(15分钟)~4320(3天)
	// 腾讯云不传此参数默认时效是20年
	ExpireMinutes int `json:"expire_minutes"`
}

type GetNetworkAddressesInput

type GetNetworkAddressesInput struct {
	// 获取资源的范围,例如 project|domain|system
	Scope string `json:"scope"`
}

type GetNetworkAddressesOutput

type GetNetworkAddressesOutput struct {
	// IP子网地址记录
	Addresses []SNetworkUsedAddress `json:"addresses"`

	// IPv6子网地址记录
	Addresses6 []SNetworkUsedAddress `json:"addresses6"`
}

type GetNetworkAvailableAddressesInput

type GetNetworkAvailableAddressesInput struct {
}

type GetNetworkAvailableAddressesOutput

type GetNetworkAvailableAddressesOutput struct {
	// IP子网地址记录
	Addresses []string `json:"addresses"`

	// IPv6子网地址记录
	Addresses6 []string `json:"addresses6"`
}

type GlobalVpcCreateInput

type GlobalVpcCreateInput struct {
	apis.EnabledStatusInfrasResourceBaseCreateInput

	// 目前仅支持谷歌云创建
	CloudproviderResourceInput
}

type GlobalVpcDetails

type GlobalVpcDetails struct {
	apis.EnabledStatusInfrasResourceBaseDetails
	ManagedResourceInfo

	SGlobalVpc

	// vpc数量
	VpcCount int `json:"vpc_count"`
}

type GlobalVpcListInput

type GlobalVpcListInput struct {
	apis.EnabledStatusInfrasResourceBaseListInput
	apis.ExternalizedResourceBaseListInput

	ManagedResourceListInput
	// 以关联的vpc数量排序
	// pattern:asc|desc
	OrderByVpcCount string `json:"order_by_vpc_count"`
}

type GlobalVpcResourceInfo

type GlobalVpcResourceInfo struct {
	// 全局VPC名称
	Globalvpc string `json:"globalvpc"`
}

type GlobalVpcResourceInput

type GlobalVpcResourceInput struct {
	// GlobalVpc ID or Name
	GlobalvpcId string `json:"globalvpc_id"`

	// swagger:ignore
	// Deprecated
	Globalvpc string `json:"globalvpc" yunion-deprecated-by:"globalvpc_id"`
}

type GlobalVpcResourceListInput

type GlobalVpcResourceListInput struct {
	GlobalVpcResourceInput

	// 以GlobalVpc的名称排序
	// pattern:asc|desc
	OrderByGlobalvpc string `json:"order_by_globalvpc"`
}

type GlobalvpcUpdateInput

type GlobalvpcUpdateInput struct {
	apis.EnabledStatusInfrasResourceBaseUpdateInput
}

type GroupAttachNetworkInput

type GroupAttachNetworkInput struct {
	// network id or name
	NetworkId string `json:"network_id" help:"The network to attach, optional"`

	// candidate IPv4 addr
	IpAddr string `json:"ip_addr" help:"The ipv4 address to use, optional"`

	// candidate IPv6 addr
	Ip6Addr string `json:"ip6_addr" help:"The ipv6 address to use, optional"`

	// Allocation direction
	AllocDir IPAllocationDirection `json:"alloc_dir" help:"ip allocation direction, optional"`

	// Reserved
	Reserved *bool `json:"reserved" help:"the address is allocated from reserved addresses"`

	// Required Designed IP
	RequireDesignatedIp *bool `json:"require_designated_ip" help:"fail if the designed ip is not available"`

	// allocate ipv6 address
	RequireIPv6 bool `json:"require_ipv6" help:"fail if no ipv6 address allocated"`
}

type GroupDetachNetworkInput

type GroupDetachNetworkInput struct {
	// candidate IPaddr, can be either IPv4 or IPv6 address
	IpAddr string `json:"ip_addr" help:"Ip address to detach, empty if detach all networks"`
}

type GroupFilterListInput

type GroupFilterListInput struct {
	GroupResourceInput

	// 按组名排序
	OrderByGroup string `json:"order_by_group"`
}

type GroupJointResourceDetails

type GroupJointResourceDetails struct {
	apis.VirtualJointResourceBaseDetails

	// 主机组的名称
	Instancegroup string `json:"instance_group"`
}

type GroupResourceInfo

type GroupResourceInfo struct {
	// 实例组名称
	Group string `json:"group"`
}

type GroupResourceInput

type GroupResourceInput struct {
	// 实例组(ID或Name)
	GroupId string `json:"group_id"`
	// swagger:ignore
	// Deprecated
	// Filter by instance group Id
	Group string `json:"group" yunion-deprecated-by:"group_id"`
}

type GroupguestDetails

type GroupguestDetails struct {
	GroupJointResourceDetails

	Server string
	Guest  string

	SGroupguest
}

type GroupguestListInput

type GroupguestListInput struct {
	GroupJointsListInput
	ServerFilterListInput

	// 标签
	Tag []string `json:"tag"`
}

type GroupnetworkDetails

type GroupnetworkDetails struct {
	GroupJointResourceDetails

	SGroupnetwork

	// IP子网名称
	Network string `json:"network"`

	// EipAddr if eip is associated with this groupnetwork
	EipAddr string `json:"eip_addr"`
}

type GroupnetworkListInput

type GroupnetworkListInput struct {
	GroupJointsListInput

	NetworkFilterListInput

	// IP地址
	IpAddr []string `json:"ip_addr"`

	// IPv6地址
	Ip6Addr []string `json:"ip6_addr"`
}

type GuestAddSecgroupInput

type GuestAddSecgroupInput struct {
	// 安全组Id列表
	// 实例必须处于运行,休眠或者关机状态
	//
	//
	// | 平台        | 最多绑定安全组数量    |
	// |-------------|-------------------    |
	// | Azure       | 1                    |
	// | VMware      | 不支持安全组            |
	// | Baremetal   | 不支持安全组            |
	// | ZStack      | 1                    |
	// | 其他        | 5                    |
	SecgroupIds []string `json:"secgroup_ids"`
}

type GuestAddSubIpsInfo

type GuestAddSubIpsInfo struct {
	Count  int      `json:"count"`
	SubIps []string `json:"sub_ips"`

	Reserved bool `json:"reserved"`

	AllocDir IPAllocationDirection `json:"alloc_dir"`
}

type GuestAddSubIpsInput

type GuestAddSubIpsInput struct {
	ServerNetworkInfo

	GuestAddSubIpsInfo
}

type GuestAssignSecgroupInput

type GuestAssignSecgroupInput struct {
	// 安全组Id
	// 实例必须处于运行,休眠或者关机状态
	SecgroupId string `json:"secgroup_id"`

	// swagger:ignore
	// Deprecated
	Secgrp string `json:"secgrp" yunion-deprecated-by:"secgroup_id"`

	// swagger:ignore
	// Deprecated
	Secgroup string `json:"secgroup" yunion-deprecated-by:"secgroup_id"`
}

type GuestAutoRenewInput

type GuestAutoRenewInput struct {

	// 设置自动续费
	// default: false
	// 自动续费分为本地和云上两种模式
	// 若公有云本身支持自动续费功能, 则使用云上设置
	// 若公有云本身不支持自动续费, 则在本地周期(默认三小时)检查快过期虚拟机并进行续费,续费周期根据设置,请避免使用特殊的计费周期,避免续费失败
	AutoRenew bool `json:"auto_renew"`
	// 续费周期
	// example: 1Y, 1M, 1W
	// default: 1M
	// 腾讯云仅支持1M
	// 阿里云支持 1, 2, 3Y, 1, 2, 3, 6, 12M, 1, 2, 3, 4W
	Duration string `json:"duration"`
}

type GuestBatchMigrateParams

type GuestBatchMigrateParams struct {
	Id              string
	LiveMigrate     bool
	SkipCpuCheck    bool
	SkipKernelCheck bool
	EnableTLS       *bool
	RescueMode      bool
	OldStatus       string
	MaxBandwidthMb  *int64
	QuciklyFinish   *bool
}

type GuestBatchMigrateRequest

type GuestBatchMigrateRequest struct {
	apis.Meta

	GuestIds []string `json:"guest_ids"`

	PreferHostId string `json:"prefer_host_id"`
	// Deprecated
	// swagger:ignore
	PreferHost      string `json:"prefer_host" yunion-deprecated-by:"prefer_host_id"`
	SkipCpuCheck    bool   `json:"skip_cpu_check"`
	SkipKernelCheck bool   `json:"skip_kernel_check"`
	EnableTLS       *bool  `json:"enable_tls"`
	MaxBandwidthMb  *int64 `json:"max_bandwidth_mb"`
	QuciklyFinish   *bool  `json:"quickly_finish"`
}

type GuestDiskDetails

type GuestDiskDetails struct {
	GuestJointResourceDetails

	SGuestdisk

	// 磁盘名称
	Disk string

	// 存储类型
	// example: local
	StorageType string `json:"storage_type"`
	// 磁盘大小, 单位Mb
	// example: 10240
	DiskSize int `json:"disk_size"`
	// 磁盘状态
	// example: ready
	Status string `json:"status"`
	// 磁盘类型
	// example: data
	DiskType string `json:"disk_type"`
	// 介质类型
	// example: ssd
	MediumType string `json:"medium_type"`
}

type GuestDiskInfo

type GuestDiskInfo struct {
	Id            string `json:"id"`
	Name          string `json:"name"`
	FsFormat      string `json:"fs,omitempty"`
	DiskType      string `json:"disk_type"`
	Index         int8   `json:"index"`
	BootIndex     int8   `json:"boot_index"`
	SizeMb        int    `json:"size"`
	DiskFormat    string `json:"disk_format"`
	Driver        string `json:"driver"`
	CacheMode     string `json:"cache_mode"`
	AioMode       string `json:"aio_mode"`
	MediumType    string `json:"medium_type"`
	StorageType   string `json:"storage_type"`
	Iops          int    `json:"iops"`
	Bps           int    `json:"bps"`
	ImageId       string `json:"image_id,omitempty"`
	Image         string `json:"image,omitemtpy"`
	StorageId     string `json:"storage_id"`
	Preallocation string `json:"preallocation"`
}

GuestDiskInfo describe the information of disk on the guest.

func (GuestDiskInfo) ShortDesc

func (self GuestDiskInfo) ShortDesc() string

type GuestHaveAgentInput

type GuestHaveAgentInput struct {
}

type GuestHaveAgentOutput

type GuestHaveAgentOutput struct {
	Have bool
}

type GuestJointBaseUpdateInput

type GuestJointBaseUpdateInput struct {
	apis.VirtualJointResourceBaseUpdateInput
}

type GuestJointResourceDetails

type GuestJointResourceDetails struct {
	apis.VirtualJointResourceBaseDetails

	// 云主机名称
	Guest string `json:"guest"`
	// 云主机名称
	Server string `json:"server"`
}

type GuestJsonDesc

type GuestJsonDesc struct {
	Name           string `json:"name"`
	Hostname       string `json:"hostname"`
	Description    string `json:"description"`
	UUID           string `json:"uuid"`
	Mem            int    `json:"mem"`
	CpuSockets     int    `json:"cpu_sockets"`
	Cpu            int    `json:"cpu"`
	Vga            string `json:"vga"`
	Vdi            string `json:"vdi"`
	Machine        string `json:"machine"`
	Bios           string `json:"bios"`
	BootOrder      string `json:"boot_order"`
	SrcIpCheck     bool   `json:"src_ip_check"`
	SrcMacCheck    bool   `json:"src_mac_check"`
	IsMaster       *bool  `json:"is_master"`
	IsSlave        *bool  `json:"is_slave"`
	IsVolatileHost bool   `json:"is_volatile_host"`
	HostId         string `json:"host_id"`
	// 宿主机管理IP
	HostAccessIp string `json:"host_access_ip"`
	// 宿主机公网IP(如果有)
	HostEIP string `json:"host_eip"`

	IsolatedDevices []*IsolatedDeviceJsonDesc `json:"isolated_devices"`

	CpuNumaPin []SCpuNumaPin `json:"cpu_numa_pin"`

	Domain string `json:"domain"`

	Nics  []*GuestnetworkJsonDesc `json:"nics"`
	Disks []*GuestdiskJsonDesc    `json:"disks"`

	Cdrom  *GuestcdromJsonDesc   `json:"cdrom"`
	Cdroms []*GuestcdromJsonDesc `json:"cdroms"`

	Floppys []*GuestfloppyJsonDesc `json:"floppys"`

	Tenant        string `json:"tenant"`
	TenantId      string `json:"tenant_id"`
	DomainId      string `json:"domain_id"`
	ProjectDomain string `json:"project_domain"`

	Keypair string `json:"keypair"`
	Pubkey  string `json:"pubkey"`

	NetworkRoles []string `json:"network_roles"`

	Secgroups          []*SecgroupJsonDesc `json:"secgroups"`
	SecurityRules      string              `json:"security_rules"`
	AdminSecurityRules string              `json:"admin_security_rules"`

	ExtraOptions jsonutils.JSONObject `json:"extra_options"`

	Kvm string `json:"kvm"`

	Zone   string `json:"zone"`
	ZoneId string `json:"zone_id"`

	OsName string `json:"os_name"`

	Metadata       map[string]string `json:"metadata"`
	UserData       string            `json:"user_data"`
	PendingDeleted bool              `json:"pending_deleted"`

	ScalingGroupId string `json:"scaling_group_id"`

	// baremetal
	DiskConfig  jsonutils.JSONObject    `json:"disk_config"`
	NicsStandby []*GuestnetworkJsonDesc `json:"nics_standby"`

	// esxi
	InstanceSnapshotInfo struct {
		InstanceSnapshotId string `json:"instance_snapshot_id"`
		InstanceId         string `json:"instance_id"`
	} `json:"instance_snapshot_info"`
	EnableEsxiSwap bool `json:"enable_esxi_swap"`

	EncryptKeyId string `json:"encrypt_key_id,omitempty"`

	IsDaemon bool `json:"is_daemon"`

	LightMode bool `json:"light_mode"`

	Hypervisor string                `json:"hypervisor"`
	Containers []*host.ContainerDesc `json:"containers"`
}

type GuestLiveMigrateInput

type GuestLiveMigrateInput struct {
	// swagger: ignore
	PreferHost string `json:"prefer_host" yunion-deprecated-by:"prefer_host_id"`
	// 指定期望的迁移目标宿主机
	PreferHostId string `json:"prefer_host_id"`
	// 是否跳过CPU检查,默认要做CPU检查
	SkipCpuCheck *bool `json:"skip_cpu_check"`
	// 是否跳过kernel检查
	SkipKernelCheck *bool `json:"skip_kernel_check"`
	// 是否启用 tls
	EnableTLS *bool `json:"enable_tls"`

	// 迁移带宽限制
	MaxBandwidthMb *int64 `json:"max_bandwidth_mb"`
	// 快速完成,内存同步一定周期后调整 downtime
	QuicklyFinish         *bool `json:"quickly_finish"`
	KeepDestGuestOnFailed *bool `json:"keep_dest_guest_on_failed"`
}

type GuestMakeSshableCmdOutput

type GuestMakeSshableCmdOutput struct {
	ShellCmd string
}

type GuestMakeSshableInput

type GuestMakeSshableInput struct {
	User       string
	PrivateKey string
	Password   string
	Port       int
}

type GuestMakeSshableOutput

type GuestMakeSshableOutput struct {
	AnsiblePlaybookId string
}

type GuestMigrateInput

type GuestMigrateInput struct {
	// swagger: ignore
	PreferHost   string `json:"prefer_host" yunion-deprecated-by:"prefer_host_id"`
	PreferHostId string `json:"prefer_host_id"`
	AutoStart    bool   `json:"auto_start"`
	IsRescueMode bool   `json:"rescue_mode"`
}

type GuestPerformStartInput

type GuestPerformStartInput struct {
	// 指定启动虚拟机的Qemu版本,可选值:2.12.1, 4.2.0
	// 仅适用于KVM虚拟机
	QemuVersion string `json:"qemu_version"`
}

type GuestPortMapping

type GuestPortMapping struct {
	Protocol      GuestPortMappingProtocol   `json:"protocol"`
	Port          int                        `json:"port"`
	HostPort      *int                       `json:"host_port,omitempty"`
	HostIp        string                     `json:"host_ip"`
	HostPortRange *GuestPortMappingPortRange `json:"host_port_range,omitempty"`
	// whitelist for remote ips
	RemoteIps []string `json:"remote_ips"`
}

type GuestPortMappingPortRange

type GuestPortMappingPortRange struct {
	Start int `json:"start"`
	End   int `json:"end"`
}

type GuestPortMappingProtocol

type GuestPortMappingProtocol string
const (
	GuestPortMappingProtocolTCP GuestPortMappingProtocol = "tcp"
	GuestPortMappingProtocolUDP GuestPortMappingProtocol = "udp"
)

type GuestPortMappings

type GuestPortMappings []*GuestPortMapping

func (GuestPortMappings) IsZero

func (g GuestPortMappings) IsZero() bool

func (GuestPortMappings) String

func (g GuestPortMappings) String() string

type GuestPublicipToEipInput

type GuestPublicipToEipInput struct {
	// 转换完成后是否自动启动
	// default: false
	AutoStart bool `json:"auto_start"`
}

type GuestResourceInfo

type GuestResourceInfo struct {
	// 虚拟机名称
	Guest string `json:"guest"`

	// 虚拟机状态
	GuestStatus string `json:"guest_status"`

	// 宿主机ID
	HostId string `json:"host_id"`

	HostResourceInfo
}

type GuestRevokeSecgroupInput

type GuestRevokeSecgroupInput struct {
	// 安全组Id列表
	// 实例必须处于运行,休眠或者关机状态
	SecgroupIds []string `json:"secgroup_ids"`
}

type GuestSaveToTemplateInput

type GuestSaveToTemplateInput struct {
	// The name of guest template
	Name string `json:"name"`
	// The generate name of guest template
	GenerateName string `json:"generate_name"`
}

type GuestSetPortMappingsInput

type GuestSetPortMappingsInput struct {
	PortMappings []*PodPortMapping `json:"port_mappings"`
}

type GuestSetSecgroupInput

type GuestSetSecgroupInput struct {
	// 安全组Id列表
	// 实例必须处于运行,休眠或者关机状态
	//
	//
	// | 平台         | 最多绑定安全组数量    |
	// |-------------|-------------------    |
	// | Azure       | 1                    |
	// | VMware      | 不支持安全组            |
	// | Baremetal   | 不支持安全组            |
	// | ZStack         | 1                    |
	// | 其他         | 5                    |
	SecgroupIds []string `json:"secgroup_ids"`
}

type GuestSetSshportInput

type GuestSetSshportInput struct {
	Port int
}

type GuestSshableMethodData

type GuestSshableMethodData struct {
	Method string
	Host   string
	Port   int

	Sshable bool
	Reason  string

	ForwardDetails ForwardDetails
}

type GuestSshableOutput

type GuestSshableOutput struct {
	User      string
	PublicKey string

	MethodTried []GuestSshableMethodData
}

type GuestSshportOutput

type GuestSshportOutput struct {
	Port int
}

type GuestSyncFixNicsInput

type GuestSyncFixNicsInput struct {
	// 需要修正的IP地址列表
	Ip []string `json:"ip"`
}

type GuestTemplateConfigInfo

type GuestTemplateConfigInfo struct {
	Metadata             map[string]string      `json:"metadata"`
	Secgroup             string                 `json:"secgroup"`
	Sku                  GuestTemplateSku       `json:"sku"`
	Disks                []GuestTemplateDisk    `json:"disks"`
	Keypair              string                 `json:"keypair"`
	Nets                 []GuestTemplateNetwork `json:"nets"`
	IsolatedDeviceConfig []IsolatedDeviceConfig `json:"isolated_device_config"`
	Image                string                 `json:"image"`
	ResetPassword        bool                   `json:"reset_password"`
}

type GuestTemplateDetails

type GuestTemplateDetails struct {
	apis.SharableVirtualResourceDetails
	CloudregionResourceInfo
	VpcResourceInfo
	SGuestTemplate

	Secgroups []string `json:"secgroups"`
	Zone      string   `json:"zone"`
	ZoneId    string   `json:"zone_id"`
	Brand     string   `json:"brand"`

	ConfigInfo GuestTemplateConfigInfo `json:"config_info"`
}

type GuestTemplateDisk

type GuestTemplateDisk struct {
	Backend  string `json:"backend"`
	DiskType string `json:"disk_type"`
	Index    int    `json:"index"`
	SizeMb   int    `json:"size_mb"`
}

type GuestTemplateFilterListInput

type GuestTemplateFilterListInput struct {
	// 主机镜像
	GuestTemplateId string `json:"guest_template_id"`
	// swagger:ignore
	// Deprecated
	GuestTemplate string `json:"guest_template" yunion-deprecated-by:"guest_template_id"`
}

type GuestTemplateInput

type GuestTemplateInput struct {
	// description: the content of guest template
	// required: true
	Content *jsonutils.JSONDict `json:"content"`

	VmemSize      int    `json:"vmem_size"`
	VcpuCount     int    `json:"vcpu_count"`
	OsType        string `json:"os_type"`
	Hypervisor    string `json:"hypervisor"`
	CloudregionId string `json:"cloudregion_id"`
	VpcId         string `json:"vpc_id"`
	ImageType     string `json:"image_type"`
	ImageId       string `json:"image_id"`
	InstanceType  string `json:"instance_type"`
	BillingType   string `json:"billing_type"`
}

type GuestTemplateListInput

type GuestTemplateListInput struct {
	apis.SharableVirtualResourceListInput
	RegionalFilterListInput
	VpcFilterListInput
	BillingType string `json:"billing_type"`
	Brand       string `json:"brand"`
}

type GuestTemplateNetwork

type GuestTemplateNetwork struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	GuestIpStart string `json:"guest_ip_start"`
	GuestIpEnd   string `json:"guest_ip_end"`
	VlanId       int    `json:"vlan_id"`
	VpcId        string `json:"vpc_id"`
	VpcName      string `json:"vpc_name"`
}

type GuestTemplatePublicInput

type GuestTemplatePublicInput struct {
	apis.Meta

	// description: the scope about public operator
	// required: true
	// example: system
	Scope string `json:"scope"`
}

type GuestTemplateResourceInfo

type GuestTemplateResourceInfo struct {
	// 主机模板名称
	GuestTemplate string `json:"guest_template"`

	// 主机模板ID
	GuestTemplateId string `json:"guest_template_id"`
}

type GuestTemplateSku

type GuestTemplateSku struct {
	Name                 string `json:"name"`
	CpuCoreCount         int    `json:"cpu_core_count"`
	MemorySizeMb         int    `json:"memory_size_mb"`
	InstanceTypeCategory string `json:"instance_type_category"`
	InstanceTypeFamily   string `json:"instance_type_family"`
}

type GuestTemplateValidateInput

type GuestTemplateValidateInput struct {
	apis.Meta

	// description: the hypervisor about guest template
	Hypervisor string `json:"hypervisor"`

	CloudregionId string `json:"cloudregion_id"`
}

type GuestUpdateSubIpsInput

type GuestUpdateSubIpsInput struct {
	GuestAddSubIpsInput

	RemoveSubIps []string `json:"remove_sub_ips"`
}

type GuestcdromJsonDesc

type GuestcdromJsonDesc struct {
	Ordinal   int    `json:"ordinal"`
	ImageId   string `json:"image_id"`
	Path      string `json:"path"`
	Name      string `json:"name"`
	Size      int64  `json:"size"`
	BootIndex int8   `json:"boot_index"`
}

type GuestdiskJsonDesc

type GuestdiskJsonDesc struct {
	DiskId        string `json:"disk_id"`
	Driver        string `json:"driver"`
	CacheMode     string `json:"cache_mode"`
	AioMode       string `json:"aio_mode"`
	Iops          int    `json:"iops"`
	Throughput    int    `json:"throughput"`
	Bps           int    `json:"bps"`
	Size          int    `json:"size"`
	TemplateId    string `json:"template_id"`
	ImagePath     string `json:"image_path"`
	StorageId     string `json:"storage_id"`
	StorageType   string `json:"storage_type"`
	Migrating     bool   `json:"migrating"`
	Path          string `json:"path"`
	Format        string `json:"format"`
	Index         int8   `json:"index"`
	BootIndex     *int8  `json:"boot_index"`
	MergeSnapshot bool   `json:"merge_snapshot"`
	Fs            string `json:"fs"`
	Mountpoint    string `json:"mountpoint"`
	Dev           string `json:"dev"`
	IsSSD         bool   `json:"is_ssd"`
	NumQueues     uint8  `json:"num_queues"`

	// esxi
	ImageInfo struct {
		ImageType          string `json:"image_type"`
		ImageExternalId    string `json:"image_external_id"`
		StorageCacheHostIp string `json:"storage_cache_host_ip"`
	} `json:"image_info"`
	Preallocation string `json:"preallocation"`

	TargetStorageId string `json:"target_storage_id"`

	EsxiFlatFilePath string `json:"esxi_flat_file_path"`
	Url              string `json:"url"`
}

type GuestdiskListInput

type GuestdiskListInput struct {
	GuestJointsListInput

	DiskFilterListInput

	Driver []string `json:"driver"`

	CacheMode []string `json:"cache_mode"`

	AioMode []string `json:"aio_mode"`
}

type GuestdiskUpdateInput

type GuestdiskUpdateInput struct {
	GuestJointBaseUpdateInput

	Driver string `json:"driver"`

	CacheMode string `json:"cache_mode"`

	AioMode string `json:"aio_mode"`

	Iops *int `json:"iops"`

	Bps *int `json:"bps"`

	Index *int8 `json:"index"`
}

type GuestfloppyJsonDesc

type GuestfloppyJsonDesc struct {
	Ordinal int    `json:"ordinal"`
	ImageId string `json:"image_id"`
	Path    string `json:"path"`
	Name    string `json:"name"`
	Size    int64  `json:"size"`
}

type GuestnetworkBaseDesc

type GuestnetworkBaseDesc struct {
	Net            string               `json:"net"`
	NetId          string               `json:"net_id"`
	Mac            string               `json:"mac"`
	Virtual        bool                 `json:"virtual"`
	Ip             string               `json:"ip"`
	Gateway        string               `json:"gateway"`
	Dns            string               `json:"dns"`
	Domain         string               `json:"domain"`
	Ntp            string               `json:"ntp"`
	Routes         jsonutils.JSONObject `json:"routes"`
	Ifname         string               `json:"ifname"`
	Masklen        int8                 `json:"masklen"`
	Vlan           int                  `json:"vlan"`
	Bw             int                  `json:"bw"`
	Mtu            int16                `json:"mtu"`
	Index          int                  `json:"index"`
	RxTrafficLimit int64                `json:"rx_traffic_limit"`
	TxTrafficLimit int64                `json:"tx_traffic_limit"`
	NicType        compute.TNicType     `json:"nic_type"`

	Ip6      string `json:"ip6"`
	Gateway6 string `json:"gateway6"`
	Masklen6 uint8  `json:"masklen6"`

	// 是否为缺省路由网关
	IsDefault bool `json:"is_default"`

	Bridge    string `json:"bridge"`
	WireId    string `json:"wire_id"`
	Interface string `json:"interface"`

	Vpc struct {
		Id           string `json:"id"`
		Provider     string `json:"provider"`
		MappedIpAddr string `json:"mapped_ip_addr"`
	} `json:"vpc"`

	Networkaddresses jsonutils.JSONObject `json:"networkaddresses"`

	VirtualIps   []string          `json:"virtual_ips"`
	PortMappings GuestPortMappings `json:"port_mappings"`
}

type GuestnetworkDetails

type GuestnetworkDetails struct {
	GuestJointResourceDetails

	SGuestnetwork

	// IP子网名称
	Network string `json:"network"`
	// 所属Wire
	WireId string `json:"wire_id"`

	// EipAddr associate with this guestnetwork
	EipAddr string `json:"eip_addr"`

	NetworkAddresses []NetworkAddrConf `json:"network_addresses"`
}

type GuestnetworkJsonDesc

type GuestnetworkJsonDesc struct {
	GuestnetworkBaseDesc

	Driver    string `json:"driver"`
	NumQueues int    `json:"num_queues"`
	Vectors   *int   `json:"vectors"`

	ExternalId string `json:"external_id"`
	TeamWith   string `json:"team_with"`
	Manual     *bool  `json:"manual"`

	UpscriptPath   string `json:"upscript_path"`
	DownscriptPath string `json:"downscript_path"`

	// baremetal
	Rate        int    `json:"rate"`
	BaremetalId string `json:"baremetal_id"`

	LinkUp bool `json:"link_up"`
}

type GuestnetworkListInput

type GuestnetworkListInput struct {
	GuestJointsListInput

	NetworkFilterListInput

	MacAddr []string `json:"mac_addr"`

	IpAddr []string `json:"ip_addr"`

	Ip6Addr []string `json:"ip6_addr"`

	Driver []string `json:"driver"`

	Ifname []string `json:"ifname"`

	TeamWith []string `json:"team_with"`
}

type GuestnetworkShortDesc

type GuestnetworkShortDesc struct {
	// IP地址
	IpAddr string `json:"ip_addr"`
	// 是否为外网网卡
	// Deprecated
	IsExit bool `json:"is_exit"`
	// IPv6地址
	Ip6Addr string `json:"ip6_addr"`
	// Mac地址
	Mac string `json:"mac"`
	// Bonding的配对网卡MAC
	TeamWith string `json:"team_with"`
	// 所属Vpc
	VpcId string `json:"vpc_id"`
	// 所属Network
	NetworkId string `json:"network_id"`
	// 附属IP
	SubIps string `json:"sub_ips"`
	// 端口映射
	PortMappings GuestPortMappings `json:"port_mappings"`
}

type GuestnetworkUpdateInput

type GuestnetworkUpdateInput struct {
	GuestJointBaseUpdateInput

	Driver string `json:"driver"`

	BwLimit *int `json:"bw_limit"`

	Index *int8 `json:"index"`

	IsDefault    *bool             `json:"is_default"`
	PortMappings GuestPortMappings `json:"port_mappings"`
}

type GuestsecgroupDetails

type GuestsecgroupDetails struct {
	GuestJointResourceDetails

	SGuestsecgroup

	// 安全组名称
	Secgroup string `json:"secgroup"`
}

type GuestsecgroupListInput

type GuestsecgroupListInput struct {
	GuestJointsListInput
	SecgroupFilterListInput
}

type HostAccessAttributes

type HostAccessAttributes struct {
	// 物理机管理URI
	ManagerUri string `json:"manager_uri"`

	// 物理机管理口IP
	AccessIp string `json:"access_ip"`

	// 物理机管理口MAC
	AccessMac string `json:"access_mac"`

	// 物理机管理口IP子网
	AccessNet string `json:"access_net"`
	// 物理机管理口二次网络
	AccessWire string `json:"access_wire"`

	// 公网IP
	PublicIp *string `json:"public_ip"`
}

type HostAddNetifInput

type HostAddNetifInput struct {
	HostNetifInput

	// Deprecated
	Wire string `json:"wire" yunion-deprecated-by:"wire_id"`

	WireId string `json:"wire_id"`

	IpAddr string `json:"ip_addr"`

	Rate int `json:"rate"`

	NicType cloudmux.TNicType `json:"nic_type"`

	Index int `json:"index"`

	LinkUp string `json:"link_up"`

	Mtu int16 `json:"mtu"`

	Reset *bool `json:"reset"`

	Interface *string `json:"interface"`

	Bridge *string `json:"bridge"`

	Reserve *bool `json:"reserve"`

	RequireDesignatedIp *bool `json:"require_designated_ip"`
}

type HostAutoMigrateInput

type HostAutoMigrateInput struct {
	AutoMigrateOnHostDown     string `json:"auto_migrate_on_host_down"`
	AutoMigrateOnHostShutdown string `json:"auto_migrate_on_host_shutdown"`
}

type HostBackupstorageCreateInput

type HostBackupstorageCreateInput struct {
	apis.JoinResourceBaseCreateInput
	BackupstorageId string `json:"backupstorage_id"`
	HostId          string `json:"host_id"`
}

type HostBackupstorageDetails

type HostBackupstorageDetails struct {
	HostJointResourceDetails

	SHostBackupstorage

	// 存储名称
	Backupstorage string `json:"backupstorage"`
	// 存储大小
	CapacityMb int64 `json:"capacity_mb"`
	// 存储类型
	// example: local
	StorageType TBackupStorageType `json:"storage_type"`
	// 是否启用
	Enabled bool `json:"enabled"`
}

type HostBackupstorageListInput

type HostBackupstorageListInput struct {
	HostJointsListInput

	BackupstorageFilterListInput
}

type HostCreateInput

type HostCreateInput struct {
	apis.EnabledStatusInfrasResourceBaseCreateInput

	ZoneResourceInput
	HostnameInput

	HostAccessAttributes
	HostSizeAttributes
	HostIpmiAttributes

	// 新建带IPMI信息的物理机时不进行IPMI信息探测
	NoProbe *bool `json:"no_probe"`

	// 物理机不带 BMC 控制器
	NoBMC bool `json:"no_bmc"`

	// host uuid
	Uuid string `json:"uuid"`

	// Host类型
	HostType string `json:"host_type"`

	// 是否为裸金属
	IsBaremetal *bool `json:"is_baremetal"`

	// 机架
	Rack string `json:"rack"`
	// 机位
	Slots string `json:"slots"`

	// 系统信息
	SysInfo jsonutils.JSONObject `json:"sys_info"`

	// 物理机序列号信息
	SN string `json:"sn"`

	// host服务软件版本
	Version string `json:"version"`
	// OVN软件版本
	OvnVersion string `json:"ovn_version"`

	// 是否为导入的宿主机
	IsImport *bool `json:"is_import"`

	// 是否允许PXE启动
	EnablePxeBoot *bool `json:"enable_pxe_boot"`

	// 主机启动模式, 可能值位PXE和ISO
	BootMode string `json:"boot_mode"`
}

type HostDetails

type HostDetails struct {
	apis.EnabledStatusInfrasResourceBaseDetails
	ManagedResourceInfo
	ZoneResourceInfo

	SHost

	Schedtags []SchedtagShortDescDetails `json:"schedtags"`

	ServerId             string `json:"server_id"`
	Server               string `json:"server"`
	ServerIps            string `json:"server_ips"`
	ServerPendingDeleted bool   `json:"server_pending_deleted"`
	// 网卡数量
	NicCount int `json:"nic_count"`
	// 网卡详情
	NicInfo []*types.SNic `json:"nic_info"`
	// CPU超分比
	CpuCommit int `json:"cpu_commit"`
	// 内存超分比
	MemCommit int `json:"mem_commit"`
	// 云主机数量
	// example: 10
	Guests int `json:"guests,allowempty"`
	// 主备云主机数量
	// example: 10
	BackupGuests int `json:"backup_guests,allowempty"`
	// 非系统云主机数量
	// example: 0
	NonsystemGuests int `json:"nonsystem_guests,allowempty"`
	// 运行状态云主机数量
	// example: 2
	RunningGuests int `json:"running_guests,allowempty"`
	// 关机状态云主机数量
	// example: 2
	ReadyGuests int `json:"ready_guests,allowempty"`
	// 其他状态云主机数量
	// example: 2
	OtherGuests int `json:"other_guests,allowempty"`
	// 回收站中云主机数量
	// example: 2
	PendingDeletedGuests int `json:"pending_deleted_guests,allowempty"`
	// CPU超分率
	CpuCommitRate float64 `json:"cpu_commit_rate"`
	// 内存超分率
	MemCommitRate float64 `json:"mem_commit_rate"`
	// CPU超售比
	CpuCommitBound float32 `json:"cpu_commit_bound"`
	// 内存超售比
	MemCommitBound float32 `json:"mem_commit_bound"`
	// 存储大小
	Storage int64 `json:"storage"`
	// 已使用存储大小
	StorageUsed int64 `json:"storage_used"`
	// 实际已使用存储大小
	ActualStorageUsed int64 `json:"actual_storage_used"`
	// 浪费存储大小(异常磁盘存储大小)
	StorageWaste int64 `json:"storage_waste"`
	// 虚拟存储大小
	StorageVirtual int64 `json:"storage_virtual"`
	// 可用存储大小
	StorageFree int64 `json:"storage_free"`
	// 存储超分率
	StorageCommitRate float64 `json:"storage_commit_rate"`

	Spec              *jsonutils.JSONDict `json:"spec"`
	IsPrepaidRecycle  bool                `json:"is_prepaid_recycle"`
	CanPrepare        bool                `json:"can_prepare"`
	PrepareFailReason string              `json:"prepare_fail_reason"`
	// 允许开启宿主机健康检查
	AllowHealthCheck          bool `json:"allow_health_check"`
	AutoMigrateOnHostDown     bool `json:"auto_migrate_on_host_down"`
	AutoMigrateOnHostShutdown bool `json:"auto_migrate_on_host_shutdown"`

	// reserved resource for isolated device
	ReservedResourceForGpu *IsolatedDeviceReservedResourceInput `json:"reserved_resource_for_gpu"`
	// isolated device count
	IsolatedDeviceCount     int
	IsolatedDeviceTypeCount map[string]int

	// host init warnning
	SysWarn string `json:"sys_warn"`
	// host init error info
	SysError string `json:"sys_error"`
}

func (HostDetails) GetMetricPairs

func (self HostDetails) GetMetricPairs() map[string]string

func (HostDetails) GetMetricTags

func (self HostDetails) GetMetricTags() map[string]string

type HostDisableNetifInput

type HostDisableNetifInput struct {
	HostNetifInput

	Reserve *bool `json:"reserve"`
}

type HostEnableNetifInput

type HostEnableNetifInput struct {
	HostNetifInput

	// Deprecated
	Network   string `json:"network" yunion-deprecated-by:"network_id"`
	NetworkId string `json:"network_id"`

	IpAddr string `json:"ip_addr"`

	AllocDir string `json:"alloc_dir"`

	NetType TNetworkType `json:"net_type"`

	Reserve *bool `json:"reserve"`

	RequireDesignatedIp *bool `json:"require_designated_ip"`
}

type HostError

type HostError struct {
	Type    string
	Id      string
	Name    string
	Content string
	Time    time.Time
}

type HostFilterListInputBase

type HostFilterListInputBase struct {
	HostResourceInput

	// 以宿主机序列号过滤
	HostSN []string `json:"host_sn"`

	// 以宿主机对接二层网络过滤
	HostWireId string `json:"host_wire_id"`

	// 以宿主机名称排序
	OrderByHost string `json:"order_by_host"`

	// 以宿主机序列号名称排序
	OrderByHostSN string `json:"order_by_host_sn"`
}

type HostIpmiAttributes

type HostIpmiAttributes struct {
	// username
	IpmiUsername string `json:"ipmi_username"`
	// password
	IpmiPassword string `json:"ipmi_password"`
	// ip address
	IpmiIpAddr string `json:"ipmi_ip_addr"`
	// presence
	IpmiPresent *bool `json:"ipmi_present"`
	// lan channel
	IpmiLanChannel *uint8 `json:"ipmi_lan_channel"`
	// verified
	IpmiVerified *bool `json:"ipmi_verified"`
	// Redfish API support
	IpmiRedfishApi *bool `json:"ipmi_redfish_api"`
	// Cdrom boot support
	IpmiCdromBoot *bool `json:"ipmi_cdrom_boot"`
	// ipmi_pxe_boot
	IpmiPxeBoot *bool `json:"ipmi_pxe_boot"`
}

type HostIsolatedDeviceModelDetails

type HostIsolatedDeviceModelDetails struct {
	SHostJointsBase
	HostJointResourceDetails
	// 宿主机Id
	HostId string `json:"host_id"`
	// 存储Id
	IsolatedDeviceModelId string `json:"isolated_device_model_id"`

	Model             string
	VendorId          string
	DeviceId          string
	DevType           string
	HotPluggable      bool
	DisableAutoDetect bool
}

type HostJointResourceDetails

type HostJointResourceDetails struct {
	apis.JointResourceBaseDetails

	// HostJointResourceDetailsBase
	HostResourceInfo
}

type HostJointResourceDetailsBase

type HostJointResourceDetailsBase struct {
	// 宿主机名称
	Host string `json:"host"`
	// 裸金属服务器名称
	// Deprecated
	Baremetal string `json:"baremetal" yunion-deprecated-by:"host"`
}

type HostJointsListInput

type HostJointsListInput struct {
	apis.JointResourceBaseListInput

	HostFilterListInput
}

type HostListInput

type HostListInput struct {
	apis.EnabledStatusInfrasResourceBaseListInput
	apis.ExternalizedResourceBaseListInput

	ManagedResourceListInput
	ZonalFilterListInput
	WireFilterListInput
	SchedtagFilterListInput

	StorageFilterListInput
	UsableResourceListInput
	BackupstorageFilterListInput

	// filter by ResourceType
	ResourceType string `json:"resource_type"`
	// filter by mac of any network interface
	AnyMac string `json:"any_mac"`
	// filter by ip of any network interface
	AnyIp []string `json:"any_ip"`
	// filter storages not attached to this host
	StorageNotAttached *bool `json:"storage_not_attached"`
	// filter by Hypervisor
	Hypervisor string `json:"hypervisor"`
	// filter host that is empty
	IsEmpty *bool `json:"is_empty"`
	// filter host that is baremetal
	Baremetal *bool `json:"baremetal"`

	// 机架
	Rack []string `json:"rack"`
	// 机位
	Slots []string `json:"slots"`
	// 管理口MAC
	AccessMac []string `json:"access_mac"`
	// 管理口Ip地址
	AccessIp []string `json:"access_ip"`
	// 物理机序列号信息
	SN []string `json:"sn"`
	// CPU大小
	CpuCount []int `json:"cpu_count"`
	// 内存大小,单位Mb
	MemSize []int `json:"mem_size"`
	// 存储类型(磁盘类型,sdd, rotate, hybrid)
	StorageType []string `json:"storage_type"`
	// 宿主机绑定存储类型
	HostStorageType []string `json:"host_storage_type"`
	// IPMI地址
	IpmiIp []string `json:"ipmi_ip"`
	// 宿主机状态
	// example: online
	HostStatus []string `json:"host_status"`
	// 宿主机类型
	HostType []string `json:"host_type"`
	// host服务软件版本
	Version []string `json:"version"`
	// OVN软件版本
	OvnVersion []string `json:"ovn_version"`
	// 是否处于维护状态
	IsMaintenance *bool `json:"is_maintenance"`
	// 是否为导入的宿主机
	IsImport *bool `json:"is_import"`
	// 是否允许PXE启动
	EnablePxeBoot *bool `json:"enable_pxe_boot"`
	// 主机UUID
	Uuid []string `json:"uuid"`
	// 主机启动模式, 可能值位PXE和ISO
	BootMode []string `json:"boot_mode"`
	// 虚拟机所在的二层网络
	ServerIdForNetwork string `json:"server_id_for_network"`
	// 宿主机 cpu 架构
	CpuArchitecture []string `json:"cpu_architecture"`
	OsArch          []string `json:"os_arch"`

	// 按虚拟机数量排序
	// enum: ["asc","desc"]
	OrderByServerCount string `json:"order_by_server_count"`
	// 按存储大小排序
	// enmu: asc,desc
	OrderByStorage string `json:"order_by_storage"`

	// 按存储超分率排序
	// enmu: asc,desc
	OrderByStorageCommitRate string `json:"order_by_storage_commit_rate"`

	// 按cpu超分率排序
	// enmu: asc,desc
	OrderByCpuCommitRate string `json:"order_by_cpu_commit_rate"`

	// 按内存超分率排序
	// enmu: asc,desc
	OrderByMemCommitRate string `json:"order_by_mem_commit_rate"`

	// 按本地存储分配大小排序
	// enmu: asc,desc
	OrderByStorageUsed string `json:"order_by_storage_used"`

	// 按cpu分配大小排序
	// enmu: asc,desc
	OrderByCpuCommit string `json:"order_by_cpu_commit"`

	// 按内存分配大小排序
	// enmu: asc,desc
	OrderByMemCommit string `json:"order_by_mem_commit"`
}

type HostLoginInfo

type HostLoginInfo struct {
	apis.Meta

	Username string `json:"username"`
	Password string `json:"password"`
	Ip       string `json:"ip"`
}

type HostLoginInfoInput

type HostLoginInfoInput struct {
}

type HostLoginInfoOutput

type HostLoginInfoOutput struct {
	Ip       string `json:"ip"`
	Username string `json:"username"`
	Password string `json:"password"`
}

type HostNetifInput

type HostNetifInput struct {
	Mac string `json:"mac"`

	VlanId int `json:"vlan_id"`
}

type HostOfflineInput

type HostOfflineInput struct {
	UpdateHealthStatus *bool `json:"update_health_status"`
	Reason             string
}

type HostPerformStartInput

type HostPerformStartInput struct {
}

type HostRegisterMetadata

type HostRegisterMetadata struct {
	apis.Meta

	OnKubernetes                 bool   `json:"on_kubernetes"`
	Hostname                     string `json:"hostname"`
	SysError                     string `json:"sys_error,allowempty"`
	SysWarn                      string `json:"sys_warn,allowempty"`
	RootPartitionTotalCapacityMB int64  `json:"root_partition_total_capacity_mb"`
	RootPartitionUsedCapacityMB  int64  `json:"root_partition_used_capacity_mb"`
}

type HostRemoveNetifInput

type HostRemoveNetifInput struct {
	HostNetifInput

	Reserve *bool `json:"reserve"`
}

type HostReserveCpusInput

type HostReserveCpusInput struct {
	Cpus                    string
	Mems                    string
	DisableSchedLoadBalance *bool    `json:"disable_sched_load_balance"`
	ProcessesPrefix         []string `json:"processes_prefix"`
}

type HostResourceInfo

type HostResourceInfo struct {
	// 归属云订阅ID
	ManagerId string `json:"manager_id"`

	ManagedResourceInfo

	// 归属可用区ID
	ZoneId string `json:"zone_id"`

	ZoneResourceInfo

	// 宿主机名称
	Host string `json:"host"`

	// 宿主机序列号
	HostSN string `json:"host_sn"`

	// 宿主是否启用
	HostEnabled bool `json:"host_enabled"`

	// 宿主机状态
	HostStatus string `json:"host_status"`

	HostResourceType string `json:"host_resource_type"`

	// 宿主机计费类型
	HostBillingType string `json:"host_billing_type"`

	// 宿主机服务状态`
	HostServiceStatus string `json:"host_service_status"`

	// 宿主机类型
	HostType string `json:"host_type"`

	// 宿主机管理IP
	HostAccessIp string `json:"host_access_ip"`
	// 宿主机公网IP(如果有)
	HostEIP string `json:"host_eip"`
}

type HostResourceInput

type HostResourceInput struct {
	// 宿主机或物理机(ID或Name)
	HostId string `json:"host_id"`
	// swagger:ignore
	// Deprecated
	// filter by host_id
	Host string `json:"host" yunion-deprecated-by:"host_id"`
}

type HostSizeAttributes

type HostSizeAttributes struct {
	// CPU核数
	CpuCount *int `json:"cpu_count"`
	// 物理CPU颗数
	NodeCount *int8 `json:"node_count"`
	// CPU描述信息
	CpuDesc string `json:"cpu_desc"`
	// CPU频率
	CpuMhz *int `json:"cpu_mhz"`
	// CPU缓存大小,单位KB
	CpuCache string `json:"cpu_cache"`
	// 预留CPU大小
	CpuReserved *int `json:"cpu_reserved"`
	// CPU超分比
	CpuCmtbound *float32 `json:"cpu_cmtbound"`
	// CPUMicrocode
	CpuMicrocode string `json:"cpu_microcode"`
	// CPU架构
	CpuArchitecture string `json:"cpu_architecture"`

	// 内存大小(单位MB)
	MemSize string `json:"mem_size"`
	// 预留内存大小(单位MB)
	MemReserved string `json:"mem_reserved"`
	// 内存超分比
	MemCmtbound *float32 `json:"mem_cmtbound"`
	// 页大小
	PageSizeKB *int `json:"page_size_kb"`

	// 存储大小,单位Mb
	StorageSize *int `json:"storage_size"`
	// 存储类型
	StorageType string `json:"storage_type"`
	// 存储驱动类型
	StorageDriver string `json:"storage_driver"`
	// 存储详情
	StorageInfo jsonutils.JSONObject `json:"storage_info"`
}

type HostSpec

type HostSpec struct {
	apis.Meta

	Cpu             int                  `json:"cpu"`
	Mem             int                  `json:"mem"`
	NicCount        int                  `json:"nic_count"`
	Manufacture     string               `json:"manufacture"`
	Model           string               `json:"model"`
	Disk            DiskDriverSpec       `json:"disk"`
	Driver          string               `json:"driver"`
	IsolatedDevices []IsolatedDeviceSpec `json:"isolated_devices"`
}

type HostStorageCreateInput

type HostStorageCreateInput struct {
	apis.JoinResourceBaseCreateInput
	StorageId  string `json:"storage_id"`
	HostId     string `json:"host_id"`
	MountPoint string `json:"mount_point"`
}

type HostSyncErrorsInput

type HostSyncErrorsInput struct {
	HostErrors []HostError
}

type HostTopologyOutput

type HostTopologyOutput struct {
	Name       string                      `json:"name"`
	Id         string                      `json:"id"`
	Status     string                      `json:"status"`
	HostStatus string                      `json:"host_status"`
	HostType   string                      `json:"host_type"`
	Networks   []HostnetworkTopologyOutput `json:"networks"`
	Schedtags  []SchedtagShortDescDetails  `json:"schedtags"`
	Storages   []StorageShortDesc          `json:"storages"`
}

type HostUpdateInput

type HostUpdateInput struct {
	apis.EnabledStatusInfrasResourceBaseUpdateInput

	HostAccessAttributes
	HostSizeAttributes
	HostIpmiAttributes
	HostnameInput

	// IPMI info
	IpmiInfo jsonutils.JSONObject `json:"ipmi_info"`

	// 机架
	Rack string `json:"rack"`
	// 机位
	Slots string `json:"slots"`

	// 系统信息
	SysInfo jsonutils.JSONObject `json:"sys_info"`
	// 物理机序列号信息
	SN string `json:"sn"`

	// 宿主机类型
	HostType string `json:"host_type"`

	// host服务软件版本
	Version string `json:"version"`
	// OVN软件版本
	OvnVersion string `json:"ovn_version"`
	// 是否为裸金属
	IsBaremetal *bool `json:"is_baremetal"`

	// 是否允许PXE启动
	EnablePxeBoot *bool `json:"enable_pxe_boot"`

	// 主机UUID
	Uuid string `json:"uuid"`

	// 主机启动模式, 可能值位PXE和ISO
	BootMode string `json:"boot_mode"`

	EnableNumaAllocate *bool `json:"enable_numa_allocate"`
}

type HostnameInput

type HostnameInput struct {
	// 主机名
	// 点号(.)和短横线(-)不能作为 HostName 的首尾字符,不能连续使用
	// 字符长度2-60个字符
	// Windows: 字符长度2-15, 允许大小写英文字母, 数字和短横线, 不支持点号(.),不能全是数字
	// 若输入为空,则会根据资源名称自动生成主机名
	// 输入不为空则会自动剔除不符合规则的字符, 并进行校验
	// 若长度大于允许的最大长度,会自动截取
	// required: false
	Hostname string `json:"hostname"`
}

type HostnetworkDetails

type HostnetworkDetails struct {
	HostJointResourceDetails

	SHostnetwork

	// IP子网名称
	Network string `json:"network"`

	// 二层网络名称
	Wire string `json:"wire"`
	// 二层网络ID
	WireId string `json:"wire_id"`

	NicType compute.TNicType `json:"nic_type"`
}

type HostnetworkListInput

type HostnetworkListInput struct {
	HostJointsListInput
	NetworkFilterListInput

	// IP地址
	IpAddr []string `json:"ip_addr"`
	// MAC地址
	MacAddr []string `json:"mac_addr"`
}

type HostnetworkTopologyOutput

type HostnetworkTopologyOutput struct {
	IpAddr  string `json:"ip_addr"`
	MacAddr string `json:"mac_addr"`
}

type HostschedtagListInput

type HostschedtagListInput struct {
	SchedtagJointsListInput
	HostFilterListInput
}

type HoststorageDetails

type HoststorageDetails struct {
	HostJointResourceDetails

	SHoststorage

	// 存储名称
	Storage string `json:"storage"`
	// 存储大小
	Capacity int64 `json:"capacity"`
	// 存储配置信息
	StorageConf jsonutils.JSONObject `json:"storage_conf"`
	// 已使用存储大小
	UsedCapacity int64 `json:"used_capacity"`
	// 浪费存储大小(异常磁盘总大小)
	WasteCapacity int64 `json:"waste_capacity"`
	// 可用存储大小
	FreeCapacity int64 `json:"free_capacity"`
	// 存储类型
	// example: local
	StorageType string `json:"storage_type"`
	// 介质类型
	// example: ssd
	MediumType string `json:"medium_type"`
	// 是否启用
	Enabled bool `json:"enabled"`
	// 超售比
	Cmtbound float32 `json:"cmtbound"`
	// 镜像缓存路径
	ImagecachePath string `json:"imagecache_path"`
	// 存储缓存Id
	StoragecacheId string `json:"storagecache_id"`

	GuestDiskCount int `json:"guest_disk_count,allowempty"`
}

type HoststorageListInput

type HoststorageListInput struct {
	HostJointsListInput

	StorageFilterListInput
}

type HostwireDetails

type HostwireDetails struct {
	HostJointResourceDetails

	SHostwireDeprecated

	// 二层网络名称
	Wire string `json:"wire"`

	// 带宽大小
	Bandwidth int `json:"bandwidth"`
}

type HostwireListInput

type HostwireListInput struct {
	HostJointsListInput
	WireFilterListInput

	// 网桥名称
	Bridge []string `json:"bridge"`

	// 接口名称
	Interface []string `json:"interface"`

	// 是否是主网口
	IsMaster *bool `json:"is_master"`

	// MAC地址
	MacAddr []string `json:"mac_addr"`
}

type IMetricResource

type IMetricResource interface {
	GetMetricTags() map[string]string
}

type IPAddress

type IPAddress struct {
	IPAddress     string `json:"ip-address"`
	IPAddressType string `json:"ip-address-type"`
	Prefix        int    `json:"prefix"`
}

type IPAllocationDirection

type IPAllocationDirection string
const (
	IPAllocationStepdown IPAllocationDirection = "stepdown"
	IPAllocationStepup   IPAllocationDirection = "stepup"
	IPAllocationRandom   IPAllocationDirection = "random"
	IPAllocationNone     IPAllocationDirection = "none"
	IPAllocationDefault                        = ""
)

type IPMIUser

type IPMIUser struct {
	Id       int
	Name     string
	Callin   bool
	LinkAuth bool
	IPMIMsg  bool
	Priv     string
}

type IPv6GatewayCreateInput

type IPv6GatewayCreateInput struct {
	apis.VirtualResourceCreateInput
}

type IPv6GatewayDetails

type IPv6GatewayDetails struct {
	apis.SharableVirtualResourceDetails
	VpcResourceInfo
}

type IPv6GatewayUpdateInput

type IPv6GatewayUpdateInput struct {
	apis.SharableVirtualResourceBaseUpdateInput
}

type IfnameDetail

type IfnameDetail struct {
	HardwareAddress string      `json:"hardware-address"`
	IPAddresses     []IPAddress `json:"ip-addresses"`
	Name            string      `json:"name"`
	Statistics      struct {
		RxBytes   int `json:"rx-bytes"`
		RxDropped int `json:"rx-dropped"`
		RxErrs    int `json:"rx-errs"`
		RxPackets int `json:"rx-packets"`
		TxBytes   int `json:"tx-bytes"`
		TxDropped int `json:"tx-dropped"`
		TxErrs    int `json:"tx-errs"`
		TxPackets int `json:"tx-packets"`
	} `json:"statistics"`
}

type InstanceBackupDetails

type InstanceBackupDetails struct {
	apis.VirtualResourceDetails
	ManagedResourceInfo
	apis.EncryptedResourceDetails

	// 云主机状态
	GuestStatus string `json:"guest_status"`
	// 云主机名称
	Guest string `json:"guest"`

	// 存储类型
	BackupStorageName string `json:"backup_storage_name"`

	// 主机快照大小
	Size int `json:"size"`

	// 硬盘备份详情
	DiskBackups []SSimpleBackup `json:"disk_backups"`
}

type InstanceBackupListInput

type InstanceBackupListInput struct {
	apis.VirtualResourceListInput
	apis.MultiArchResourceBaseListInput

	ManagedResourceListInput

	ServerFilterListInput

	// 按虚拟机名称排序
	// pattern:asc|desc
	OrderByGuest string `json:"order_by_guest"`

	// 操作系统类型
	OsType []string `json:"os_type"`
}

type InstanceBackupManagerCreateFromPackageInput

type InstanceBackupManagerCreateFromPackageInput struct {
	apis.VirtualResourceCreateInput

	BackupStorageId string
	PackageName     string
}

type InstanceBackupManagerSyncstatusInput

type InstanceBackupManagerSyncstatusInput struct {
}

type InstanceBackupPackInput

type InstanceBackupPackInput struct {
	PackageName string
}

type InstanceBackupPackMetadata

type InstanceBackupPackMetadata struct {
	OsArch         string
	ServerConfig   jsonutils.JSONObject
	ServerMetadata jsonutils.JSONObject
	SecGroups      jsonutils.JSONObject
	KeypairId      string
	OsType         string
	InstanceType   string
	SizeMb         int
	DiskMetadatas  []DiskBackupPackMetadata

	// 加密密钥ID
	EncryptKeyId string
	// Instance Backup metadata
	Metadata map[string]string `json:"metadata"`
}

type InstanceBackupRecoveryInput

type InstanceBackupRecoveryInput struct {
	// description: name of guest
	Name string
}

type InstanceGroupDetail

type InstanceGroupDetail struct {
	apis.VirtualResourceDetails
	ZoneResourceInfo

	SGroup

	// 云主机数量
	GuestCount int `json:"guest_count"`

	// VIP
	Vips []string `json:"vips"`

	// EIP of VIP
	VipEip string `json:"vip_eip"`

	// Attached NetworkId
	NetworkId string `json:"network_id"`

	// Attached Network
	Network string `json:"network"`
}

type InstanceGroupListInput

type InstanceGroupListInput struct {
	apis.VirtualResourceListInput

	apis.EnabledResourceBaseListInput

	ZonalFilterListInput

	ServerFilterListInput

	// 以service_type过滤列表结果
	ServiceType string `json:"service_type"`
	// 以parent_id过滤列表结果
	ParentId string `json:"parent_id"`

	// 调度策略
	SchedStrategy string `json:"sched_strategy"`
	// 按ip地址排序
	// pattern:asc|desc
	OrderByVips string `json:"order_by_vips"`
	// 按关联的虚拟机数量排序
	// pattern:asc|desc
	OrderByGuestCount string `json:"order_by_guest_count"`
}

type InstanceSnapshotDetails

type InstanceSnapshotDetails struct {
	apis.VirtualResourceDetails
	ManagedResourceInfo
	SInstanceSnapshot
	apis.EncryptedResourceDetails

	// 云主机状态
	GuestStatus string `json:"guest_status"`
	// 云主机名称
	Guest string `json:"guest"`

	// 存储类型
	StorageType string `json:"storage_type"`

	// 快照列表
	Snapshots  []SimpleSnapshot  `json:"snapshots"`
	Properties map[string]string `json:"properties"`

	// 主机快照大小
	Size int `json:"size"`
}

type InstanceSnapshotListInput

type InstanceSnapshotListInput struct {
	apis.VirtualResourceListInput
	apis.ExternalizedResourceBaseListInput
	apis.MultiArchResourceBaseListInput

	ManagedResourceListInput

	ServerFilterListInput

	// 操作系统类型
	OsType []string `json:"os_type"`

	// 包含内存快照
	WithMemory *bool `json:"with_memory"`
	// 按磁盘快照数量排序
	// pattern:asc|desc
	OrderByDiskSnapshotCount string `json:"order_by_disk_snapshot_count"`
	// 按虚拟机名称排序
	// pattern:asc|desc
	OrderByGuest string `json:"order_by_guest"`
}

type InterVpcNetworkAddVpcInput

type InterVpcNetworkAddVpcInput struct {
	// 待加入的vpc id
	// vpc和当前vpc互联所必须是同一平台,且运营平台一致,例如aws中国区不能和aws国际区运营平台不一致
	// 可以通过 /vpcs?usable_for_inter_vpc_network_id=<当前vpc互联id> 过滤可以加入的vpc列表
	// required: true
	VpcId string `json:"vpc_id"`
}

type InterVpcNetworkCreateInput

type InterVpcNetworkCreateInput struct {
	apis.EnabledStatusInfrasResourceBaseCreateInput
	ManagerId string `json:"manager_id"`
}

type InterVpcNetworkDetails

type InterVpcNetworkDetails struct {
	apis.EnabledStatusInfrasResourceBaseDetails
	ManagedResourceInfo
	VpcCount int `json:"vpc_count"`
}

type InterVpcNetworkFilterListBase

type InterVpcNetworkFilterListBase struct {
	InterVpcNetworkId string `json:"inter_vpc_network_id"`
}

type InterVpcNetworkManagerListInput

type InterVpcNetworkManagerListInput struct {
	apis.EnabledStatusInfrasResourceBaseListInput
	ManagedResourceListInput

	// 按关联的vpc数量排序
	// pattern:asc|desc
	OrderByVpcCount string `json:"order_by_vpc_count"`
}

type InterVpcNetworkRemoveVpcInput

type InterVpcNetworkRemoveVpcInput struct {
	VpcId string
}

type InterVpcNetworkRouteSetDisableInput

type InterVpcNetworkRouteSetDisableInput struct {
	apis.PerformDisableInput
}

type InterVpcNetworkRouteSetEnableInput

type InterVpcNetworkRouteSetEnableInput struct {
	apis.PerformEnableInput
}

type InterVpcNetworkRouteSetListInput

type InterVpcNetworkRouteSetListInput struct {
	apis.EnabledStatusStandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput
	VpcFilterListInput
	InterVpcNetworkId string
	Cidr              string `json:"cidr"`
}

type InterVpcNetworkSyncstatusInput

type InterVpcNetworkSyncstatusInput struct {
}

type InterVpcNetworkUpdateInput

type InterVpcNetworkUpdateInput struct {
	apis.EnabledStatusInfrasResourceBaseUpdateInput
}

type IsolateDeviceDetails

type IsolateDeviceDetails struct {
	apis.StandaloneResourceDetails
	HostResourceInfo

	SIsolatedDevice

	// 云主机名称
	Guest string `json:"guest"`
	// 云主机状态
	GuestStatus string `json:"guest_status"`
}

type IsolatedDeviceConfig

type IsolatedDeviceConfig struct {
	Index        int    `json:"index"`
	Id           string `json:"id"`
	DevType      string `json:"dev_type"`
	Model        string `json:"model"`
	Vendor       string `json:"vendor"`
	NetworkIndex *int   `json:"network_index"`
	WireId       string `json:"wire_id"`
	DiskIndex    *int8  `json:"disk_index"`
	DevicePath   string `json:"device_path"`
}

type IsolatedDeviceCreateInput

type IsolatedDeviceCreateInput struct {
	apis.StandaloneResourceCreateInput

	HostResourceInput
	IsolatedDeviceReservedResourceInput

	// 设备类型USB/GPU
	// example: GPU
	DevType string `json:"dev_type"`

	// 设备型号
	// # Specific device name read from lspci command, e.g. `Tesla K40m` ...
	Model string `json:"model"`

	// PCI地址
	// # pci address of `Bus:Device.Function` format, or usb bus address of `bus.addr`
	Addr string `json:"addr"`

	// legacy vgpu mdev id
	MdevId string `json:"mdev_id"`

	// 设备VendorId
	VendorDeviceId string `json:"vendor_device_id"`
	// PCIE information
	PCIEInfo *IsolatedDevicePCIEInfo `json:"pcie_info"`
	// Host device path
	DevicePath string `json:"device_path"`
}

type IsolatedDeviceJsonDesc

type IsolatedDeviceJsonDesc struct {
	Id                  string `json:"id"`
	DevType             string `json:"dev_type"`
	Model               string `json:"model"`
	Addr                string `json:"addr"`
	VendorDeviceId      string `json:"vendor_device_id"`
	Vendor              string `json:"vendor"`
	NetworkIndex        int    `json:"network_index"`
	IsInfinibandNic     bool   `json:"is_infiniband_nic"`
	OvsOffloadInterface string `json:"ovs_offload_interface"`
	DiskIndex           int8   `json:"disk_index"`
	NvmeSizeMB          int    `json:"nvme_size_mb"`
	MdevId              string `json:"mdev_id"`
	NumaNode            int8   `json:"numa_node"`
}

type IsolatedDeviceListInput

type IsolatedDeviceListInput struct {
	apis.StandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput
	apis.DomainizedResourceListInput

	HostFilterListInput

	// 只列出GPU直通设备
	Gpu *bool `json:"gpu"`
	// 只列出USB直通设备
	Usb *bool `json:"usb"`
	// 只列出未使用的直通设备
	Unused *bool `json:"unused"`

	// # PCI / GPU-HPC / GPU-VGA / USB / NIC
	// 设备类型
	DevType []string `json:"dev_type"`

	// # Specific device name read from lspci command, e.g. `Tesla K40m` ...
	Model []string `json:"model"`

	// # pci address of `Bus:Device.Function` format, or usb bus address of `bus.addr`
	Addr []string `json:"addr"`

	// 设备VENDOE编号
	VendorDeviceId []string `json:"vendor_device_id"`

	// 展示物理机的上的设备
	ShowBaremetalIsolatedDevices bool `json:"show_baremetal_isolated_devices"`

	// 列出虚拟机上挂载的设备
	GuestId string `json:"guest_id"`
}

type IsolatedDeviceModelCreateInput

type IsolatedDeviceModelCreateInput struct {
	apis.StandaloneAnonResourceCreateInput

	// 设备类型
	// example: NPU
	DevType string `json:"dev_type"`

	// 设备型号
	Model string `json:"model"`

	// 设备VendorId
	VendorId string `json:"vendor_id"`

	// 设备DeviceId
	DeviceId string `json:"device_id"`

	// 支持热插拔 HotPluggable
	HotPluggable bool `json:"hot_pluggable"`

	// hosts scan isolated device after isolated_device_model created
	Hosts []string `json:"hosts"`
}

type IsolatedDeviceModelHardwareInfo

type IsolatedDeviceModelHardwareInfo struct {
	// GPU memory size
	MemoryMB int `json:"memory_mb" help:"Memory size MB of the device"`
	// GPU bandwidth. The unit is GB/s
	Bandwidth float64 `json:"bandwidth" help:"Bandwidth of the device, and the unit is GB/s"`
	// TFLOPS stands for number of floating point operations per second.
	TFLOPS float64 `json:"tflops" help:"TFLOPS of the device, which standing for number of floating point operations per second"`
}

type IsolatedDeviceModelListInput

type IsolatedDeviceModelListInput struct {
	apis.StandaloneAnonResourceListInput

	// 设备类型
	// example: NPU
	DevType []string `json:"dev_type"`

	// 设备型号
	Model []string `json:"model"`

	// 设备VendorId
	VendorId string `json:"vendor_id"`

	// 设备DeviceId
	DeviceId string `json:"device_id"`

	// 支持热插拔 HotPluggable
	HotPluggable bool `json:"hot_pluggable"`

	// 宿主机 Id
	HostId string `json:"host_id"`
}

type IsolatedDeviceModelUpdateInput

type IsolatedDeviceModelUpdateInput struct {
	apis.StandaloneAnonResourceBaseUpdateInput
	// 设备类型
	// example: NPU
	DevType string `json:"dev_type"`

	// 设备型号
	Model string `json:"model"`

	// 设备VendorId
	VendorId string `json:"vendor_id"`

	// 设备DeviceId
	DeviceId string `json:"device_id"`

	// 支持热插拔 HotPluggable
	HotPluggable bool `json:"hot_pluggable"`
}

type IsolatedDevicePCIEInfo

type IsolatedDevicePCIEInfo struct {
	// Transder rate per lane
	// Transfer rate refers to the encoded serial bit rate; 2.5 GT/s means 2.5 Gbit/s serial data rate.
	TransferRatePerLane string `json:"transfer_rate_per_lane"`
	// Lane width
	LaneWidth int `json:"lane_width,omitzero"`

	// Throughput indicates the unencoded bandwidth (without 8b/10b, 128b/130b, or 242B/256B encoding overhead).
	// The PCIe 1.0 transfer rate of 2.5 GT/s per lane means a 2.5 Gbit/s serial bit rate corresponding to a throughput of 2.0 Gbit/s or 250 MB/s prior to 8b/10b encoding.
	Throughput string `json:"throughput"`
	// Version is the PCIE version
	Version string `json:"version"`
}

func NewIsolatedDevicePCIEInfo

func NewIsolatedDevicePCIEInfo(transferRate string, laneWidth int) (*IsolatedDevicePCIEInfo, error)

func (IsolatedDevicePCIEInfo) GetThroughputPerLane

func (info IsolatedDevicePCIEInfo) GetThroughputPerLane() PCIEVersionThroughput

func (*IsolatedDevicePCIEInfo) IsZero

func (info *IsolatedDevicePCIEInfo) IsZero() bool

func (*IsolatedDevicePCIEInfo) String

func (info *IsolatedDevicePCIEInfo) String() string

type IsolatedDeviceReservedResourceInput

type IsolatedDeviceReservedResourceInput struct {
	// GPU 预留内存
	ReservedMemory *int `json:"reserved_memory"`

	// GPU 预留CPU
	ReservedCpu *int `json:"reserved_cpu"`

	// GPU 预留磁盘
	ReservedStorage *int `json:"reserved_storage"`
}

type IsolatedDeviceSpec

type IsolatedDeviceSpec struct {
	apis.Meta

	DevType string `json:"dev_type"`
	Model   string `json:"model"`
	PciId   string `json:"pci_id"`
	Vendor  string `json:"vendor"`
}

type IsolatedDeviceUpdateInput

type IsolatedDeviceUpdateInput struct {
	apis.StandaloneResourceBaseUpdateInput
	IsolatedDeviceReservedResourceInput
	DevType string `json:"dev_type"`
	// PCIE information
	PCIEInfo *IsolatedDevicePCIEInfo `json:"pcie_info"`
	// Host device path
	DevicePath string `json:"device_path"`
}

type KafkaCreateInput

type KafkaCreateInput struct {
}

type KeypairCreateInput

type KeypairCreateInput struct {
	apis.UserResourceCreateInput

	// 公钥内容,若为空则自动生成公钥
	PublicKey string `json:"public_key"`

	// swagger:ignore
	PrivateKey string

	// swagger:ignore
	Fingerprint string

	// 秘钥类型
	// enum: ["RSA"]
	// default: RSA
	Scheme string `json:"scheme"`
}

type KeypairDetails

type KeypairDetails struct {
	apis.UserResourceDetails
	apis.SharableResourceBaseInfo
	SKeypair

	// 私钥长度
	PrivateKeyLen int `json:"private_key_len"`
	// 关联云主机次数
	LinkedGuestCount int `json:"linked_guest_count"`
}

type KeypairListInput

type KeypairListInput struct {
	apis.UserResourceListInput
	apis.SharableResourceBaseListInput

	// 加密类型
	// example: RSA
	Scheme []string `json:"scheme"`

	// 指纹信息
	// example: 1d:3a:83:4a:a1:f3:75:97:ec:d1:ef:f8:3f:a7:5d:9e
	Fingerprint []string `json:"fingerprint"`
}

type KubeClusterCreateInput

type KubeClusterCreateInput struct {
	apis.EnabledStatusInfrasResourceBaseCreateInput

	Version string `json:"version"`
	// required: true
	NetworkIds SKubeNetworkIds `json:"network_ids"`
	// swagger:ignore
	ManagerId string `json:"manager_id"`
	// swagger:ignore
	CloudregionId string `json:"cloudregion_id"`
	// required: true
	VpcResourceInput

	PrivateAccess bool `json:"private_access"`
	PublicAccess  bool `json:"public_access"`

	RoleName string `json:"role_name"`
}

type KubeClusterDeleteInput

type KubeClusterDeleteInput struct {
	// 是否保留集群关联的实例及slb
	// default: false
	Retain bool `json:"retain"`
}

type KubeClusterDetails

func (KubeClusterDetails) GetMetricPairs

func (self KubeClusterDetails) GetMetricPairs() map[string]string

func (KubeClusterDetails) GetMetricTags

func (self KubeClusterDetails) GetMetricTags() map[string]string

type KubeClusterUpdateInput

type KubeClusterUpdateInput struct {
	apis.EnabledStatusInfrasResourceBaseUpdateInput
}

type KubeNodeCreateInput

type KubeNodeCreateInput struct {
}

type KubeNodePoolCreateInput

type KubeNodePoolCreateInput struct {
	apis.StatusStandaloneResourceCreateInput

	NetworkIds    SKubeNetworkIds `json:"network_ids"`
	InstanceTypes SInstanceTypes  `json:"instance_types"`

	// default: 2
	MinInstanceCount int `json:"min_instance_count"`
	// default: 2
	MaxInstanceCount int `json:"max_instance_count"`
	// 预期节点数量, 不得小于min_instance_count
	// default: 2
	DesiredInstanceCount int `json:"desired_instance_count"`

	RootDiskSizeGb int `json:"root_disk_size_gb"`

	CloudKubeClusterId string `json:"cloud_kube_cluster_id"`

	// 秘钥id,若不传,则使用系统级秘钥
	KeypairId string `json:"keypair_id"`

	// swagger: ignore
	PublicKey string `json:"public_key"`
}

type KubeNodePoolListInput

type KubeNodePoolListInput struct {
	apis.StatusStandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput

	RegionalFilterListInput
	ManagedResourceListInput

	CloudKubeClusterId string `json:"cloud_kube_cluster_id"`
}

type KubeNodePoolUpdateInput

type KubeNodePoolUpdateInput struct {
	apis.StatusStandaloneResourceBaseUpdateInput
}

type KubeNodeUpdateInput

type KubeNodeUpdateInput struct {
	apis.StatusStandaloneResourceBaseUpdateInput
}

type KubeServerContainerRegistryConfig

type KubeServerContainerRegistryConfig struct {
	Type   string                                   `json:"type"`
	Common *KubeServerContainerRegistryConfigCommon `json:"common"`
	Harbor *KubeServerContainerRegistryConfigHarbor `json:"harbor"`
}

type KubeServerContainerRegistryConfigCommon

type KubeServerContainerRegistryConfigCommon struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type KubeServerContainerRegistryConfigHarbor

type KubeServerContainerRegistryConfigHarbor struct {
	KubeServerContainerRegistryConfigCommon
}

type KubeServerContainerRegistryDetails

type KubeServerContainerRegistryDetails struct {
	Id     string                             `json:"id"`
	Name   string                             `json:"name"`
	Url    string                             `json:"url"`
	Type   string                             `json:"type"`
	Config *KubeServerContainerRegistryConfig `json:"config"`
}

type LoadbalancerAclCreateInput

type LoadbalancerAclCreateInput struct {
	apis.SharableVirtualResourceCreateInput

	CloudregionResourceInput
	CloudproviderResourceInput

	AclEntries SAclEntries `json:"acl_entries"`
}

func (*LoadbalancerAclCreateInput) Validate

func (self *LoadbalancerAclCreateInput) Validate() error

type LoadbalancerAclFilterListInput

type LoadbalancerAclFilterListInput struct {
	LoadbalancerAclResourceInput

	// 以ACL名称排序
	OrderByAcl string `json:"order_by_acl"`
}

type LoadbalancerAclPatchInput

type LoadbalancerAclPatchInput struct {
	Adds []SAclEntry `json:"adds"`
	Dels []SAclEntry `json:"dels"`
}

type LoadbalancerAclResourceInfo

type LoadbalancerAclResourceInfo struct {
	// 负载均衡ACL名称
	Acl string `json:"acl"`
}

type LoadbalancerAclResourceInput

type LoadbalancerAclResourceInput struct {
	// ACL名称或ID
	AclId string `json:"acl_id"`

	// swagger:ignore
	// Deprecated
	Acl string `json:"acl" yunion-deprecated-by:"acl_id"`
}

type LoadbalancerAclUpdateInput

type LoadbalancerAclUpdateInput struct {
	apis.SharableVirtualResourceBaseUpdateInput

	AclEntries SAclEntries `json:"acl_entries"`
}

func (*LoadbalancerAclUpdateInput) Validate

func (self *LoadbalancerAclUpdateInput) Validate() error

type LoadbalancerAclUsage

type LoadbalancerAclUsage struct {
	ListenerCount int `json:"lb_listener_count"`
}

type LoadbalancerAgentDeployInput

type LoadbalancerAgentDeployInput struct {
	apis.Meta

	Host         ansible.Host
	DeployMethod string
}

type LoadbalancerAgentJoinClusterInput

type LoadbalancerAgentJoinClusterInput struct {
	ClusterId string `json:"cluster_id"`
	Priority  int    `json:"priority"`
}

type LoadbalancerAgentLeaveClusterInput

type LoadbalancerAgentLeaveClusterInput struct {
}

type LoadbalancerAgentListInput

type LoadbalancerAgentListInput struct {
	apis.StandaloneResourceListInput
	LoadbalancerClusterFilterListInput

	Version []string `json:"version"`
	IP      []string `json:"ip"`
	HaState []string `json:"ha_state"`
}

type LoadbalancerAssociateEipInput

type LoadbalancerAssociateEipInput struct {
	// 弹性公网IP的ID
	EipId string `json:"eip_id"`

	// 弹性IP映射的内网IP地址,可选
	IpAddr string `json:"ip_addr"`
}

type LoadbalancerBackendCreateInput

type LoadbalancerBackendCreateInput struct {
	apis.StatusStandaloneResourceCreateInput

	//swagger: ignore
	BackendGroup   string `json:"backend_group" yunion-deprecated-by:"backend_group_id"`
	BackendGroupId string `json:"backend_group_id"`

	//swagger: ignore
	Backend   string `json:"backend" yunion-deprecated-by:"backend_id"`
	BackendId string `json:"backend_id"`

	BackendType string `json:"backend_type"`
	Weight      int    `json:"weight"`
	Port        int    `json:"port"`
	SendProxy   string `json:"send_proxy"`
	Address     string `json:"address"`
	Ssl         string `json:"ssl"`
}

type LoadbalancerBackendDetails

type LoadbalancerBackendDetails struct {
	apis.StatusStandaloneResourceDetails
	LoadbalancerBackendGroupResourceInfo

	SLoadbalancerBackend

	ProjectId string `json:"tenant_id"`
}

type LoadbalancerBackendGroupCreateInput

type LoadbalancerBackendGroupCreateInput struct {
	apis.StatusStandaloneResourceCreateInput

	//swagger: ignore
	Loadbalancer string `json:"loadbalancer" yunion-deprecated-by:"loadbalancer_id"`
	// 负载均衡ID
	LoadbalancerId string `json:"loadbalancer_id"`

	Type string `json:"type"`

	Backends []struct {
		Index       int
		Weight      int
		Port        int
		Id          string
		Name        string
		ExternalId  string
		BackendType string
		BackendRole string
		Address     string
		ZoneId      string
		HostName    string
	} `json:"backends"`
}

type LoadbalancerBackendGroupDetails

type LoadbalancerBackendGroupDetails struct {
	apis.StatusStandaloneResourceDetails
	LoadbalancerResourceInfo

	SLoadbalancerBackendGroup

	LbListenerCount int `json:"lb_listener_count"`

	IsDefault bool   `json:"is_default"`
	ProjectId string `json:"tenant_id"`
}

type LoadbalancerBackendGroupFilterListInput

type LoadbalancerBackendGroupFilterListInput struct {
	LoadbalancerFilterListInput

	LoadbalancerBackendGroupResourceInput

	// 以负载均衡后端组名称排序
	OrderByBackendGroup string `json:"order_by_backend_group"`
}

type LoadbalancerBackendGroupListInput

type LoadbalancerBackendGroupListInput struct {
	apis.StatusStandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput

	LoadbalancerFilterListInput

	// filter LoadbalancerBackendGroup with no reference
	NoRef *bool `json:"no_ref"`

	Type []string `json:"type"`
}

type LoadbalancerBackendGroupResourceInfo

type LoadbalancerBackendGroupResourceInfo struct {
	LoadbalancerResourceInfo

	// 负载均衡后端组名称
	BackendGroup string `json:"backend_group"`

	// 负载均衡ID
	LoadbalancerId string `json:"loadbalancer_id"`
}

type LoadbalancerBackendGroupResourceInput

type LoadbalancerBackendGroupResourceInput struct {
	// 负载均衡后端组ID或名称
	BackendGroupId string `json:"backend_group_id"`

	// swagger:ignore
	// Deprecated
	BackendGroup string `json:"backend_group" yunion-deprecated-by:"backend_group_id"`
}

type LoadbalancerBackendListInput

type LoadbalancerBackendListInput struct {
	apis.StatusStandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput

	LoadbalancerBackendGroupFilterListInput

	// filter by backend server
	Backend string `json:"backend"`

	BackendType []string `json:"backend_type"`
	BackendRole []string `json:"backend_role"`
	Address     []string `json:"address"`

	SendProxy []string `json:"send_proxy"`
	Ssl       []string `json:"ssl"`
}

type LoadbalancerBackendUpdateInput

type LoadbalancerBackendUpdateInput struct {
	apis.StatusStandaloneResourceBaseUpdateInput

	Weight    *int    `json:"weight"`
	Port      *int    `json:"port"`
	SendPorxy *string `json:"send_proxy"`
	Ssl       *string `json:"ssl"`
}

func (*LoadbalancerBackendUpdateInput) Validate

func (self *LoadbalancerBackendUpdateInput) Validate() error

type LoadbalancerCertificateCreateInput

type LoadbalancerCertificateCreateInput struct {
	apis.SharableVirtualResourceCreateInput

	CloudregionResourceInput
	CloudproviderResourceInput

	Certificate string `json:"certificate"`
	PrivateKey  string `json:"private_key"`
	// swagger: ignore
	Fingerprint string `json:"fingerprint"`
	// swagger: ignore
	PublicKeyAlgorithm string `json:"public_key_algorithm"`
	// swagger: ignore
	PublicKeyBitLen int `json:"public_key_bit_len"`
	// swagger: ignore
	SignatureAlgorithm string `json:"signature_algorithm"`
	// swagger: ignore
	NotBefore time.Time `json:"not_before"`
	// swagger: ignore
	NotAfter time.Time `json:"not_after"`
	// swagger: ignore
	CommonName string `json:"common_name"`
	// swagger: ignore
	SubjectAlternativeNames string `json:"subject_alternative_names"`
}

type LoadbalancerCertificateFilterListInput

type LoadbalancerCertificateFilterListInput struct {
	LoadbalancerCertificateResourceInput

	// 以证书名称排序
	OrderByCertificate string `json:"order_by_certificate"`
}

type LoadbalancerCertificateListInput

type LoadbalancerCertificateListInput struct {
	apis.SharableVirtualResourceListInput
	apis.ExternalizedResourceBaseListInput

	UsableResourceListInput
	RegionalFilterListInput
	ManagedResourceListInput

	CommonName              []string `json:"common_name"`
	SubjectAlternativeNames []string `json:"subject_alternative_names"`
}

type LoadbalancerCertificateResourceInfo

type LoadbalancerCertificateResourceInfo struct {
	// 负载均衡证书名称
	Certificate string `json:"certificate"`
}

type LoadbalancerCertificateResourceInput

type LoadbalancerCertificateResourceInput struct {
	// 证书名称或ID
	Certificate string `json:"certificate"`

	// swagger:ignore
	// Deprecated
	CertificateId string `json:"certificate_id" yunion-deprecated-by:"certificate"`
}

type LoadbalancerCertificateUpdateInput

type LoadbalancerCertificateUpdateInput struct {
	apis.SharableVirtualResourceBaseUpdateInput
}

type LoadbalancerCertificateUsage

type LoadbalancerCertificateUsage struct {
	ListenerCount int `json:"lb_listener_count"`
}

type LoadbalancerClusterFilterListInput

type LoadbalancerClusterFilterListInput struct {
	ZonalFilterListInput
	WireFilterListBase

	LoadbalancerClusterResourceInput

	// 以负载均衡集群排序
	OrderByCluster string `json:"order_by_cluster"`
}

type LoadbalancerClusterResourceInfo

type LoadbalancerClusterResourceInfo struct {
	ZoneResourceInfo

	WireResourceInfoBase

	// VPC ID
	VpcId string `json:"vpc_id"`

	// VPC名称
	Vpc string `json:"vpc"`

	// 负载均衡集群名称
	Cluster string `json:"cluster"`
}

type LoadbalancerClusterResourceInput

type LoadbalancerClusterResourceInput struct {
	// 负载均衡集群ID或名称
	ClusterId string `json:"cluster_id"`

	// swagger:ignore
	// Deprecated
	Cluster string `json:"cluster" yunion-deprecated-by:"cluster_id"`
}

type LoadbalancerCreateEipInput

type LoadbalancerCreateEipInput struct {
	// 计费方式,traffic or bandwidth
	ChargeType string `json:"charge_type"`

	// Bandwidth
	Bandwidth int64 `json:"bandwidth"`

	// bgp_type
	BgpType string `json:"bgp_type"`

	// auto_dellocate
	AutoDellocate *bool `json:"auto_dellocate"`
}

type LoadbalancerCreateInput

type LoadbalancerCreateInput struct {
	apis.VirtualResourceCreateInput

	// IP地址
	Address string `json:"address"`
	// 地址类型
	AddressType string `json:"address_type"`
	// 网络类型
	NetworkType string `json:"network_type"`

	// 负载均衡集群Id
	ClusterId string `json:"cluster_id"`

	// 计费类型
	ChargeType string `json:"charge_type"`

	// 出口带宽
	EgressMbps int `json:"egress_mbps"`

	// 套餐名称
	LoadbalancerSpec string `json:"loadbalancer_spec"`

	// 弹性公网IP带宽
	// 指定此参数后会创建新的弹性公网IP并绑定到新建的负载均衡
	EipBw int `json:"eip_bw,omitzero"`
	// 弹性公网IP线路类型
	EipBgpType string `json:"eip_bgp_type,omitzero"`
	// 弹性公网IP计费类型
	EipChargeType string `json:"eip_charge_type,omitempty"`
	// 是否跟随主机删除而自动释放
	EipAutoDellocate bool `json:"eip_auto_dellocate,omitempty"`

	// swagger: ignore
	Eip string `json:"eip" yunion-deprecated-by:"eip_id"`
	// EIP Id
	EipId string `json:"eip_id"`

	// LB的其他配置信息
	LBInfo jsonutils.JSONObject `json:"lb_info"`

	// 从可用区1
	// required: false
	Zone1 string `json:"zone_1"`

	// 包年包月时长
	Duration string `json:"duration"`
	// swagger:ignore
	BillingType string `json:"billing_type"`
	// swagger:ignore
	BillingCycle string `json:"billing_cycle"`

	VpcResourceInput
	// Vpc         string `json:"vpc"`
	ZoneResourceInput
	// Zone        string `json:"zone"`
	CloudregionResourceInput
	// Cloudregion string `json:"cloudregion"`
	NetworkResourceInput
	// 多子网
	// swagger: ignore
	Networks []string
	// Network     string `json:"network"`
	CloudproviderResourceInput
}

type LoadbalancerDetails

type LoadbalancerDetails struct {
	apis.VirtualResourceDetails

	ManagedResourceInfo

	LoadbalancerClusterResourceInfo

	VpcResourceInfoBase
	CloudregionResourceInfo
	ZoneResourceInfoBase
	Zone1ResourceInfoBase
	NetworkResourceInfoBase

	SLoadbalancer

	// 公网IP地址
	Eip string `json:"eip"`

	EipId string `json:"eip_id"`

	// 公网IP地址类型: 弹性、非弹性
	// example: public_ip
	EipMode string `json:"eip_mode"`

	// 后端服务器组名称
	BackendGroup string `json:"backend_group"`

	// 关联安全组列表
	Secgroups []SimpleSecurityGroup `json:"secgroups"`
	LoadbalancerUsage
}

func (LoadbalancerDetails) GetMetricTags

func (self LoadbalancerDetails) GetMetricTags() map[string]string

type LoadbalancerDissociateEipInput

type LoadbalancerDissociateEipInput struct {
	// 是否自动释放
	AudoDelete *bool `json:"auto_delete"`
}

type LoadbalancerFilterListInput

type LoadbalancerFilterListInput struct {
	VpcFilterListInput

	ZonalFilterListBase

	LoadbalancerResourceInput

	// 以负载均衡名称排序
	OrderByLoadbalancer string `json:"order_by_loadbalancer"`
}

type LoadbalancerListInput

type LoadbalancerListInput struct {
	apis.VirtualResourceListInput
	apis.ExternalizedResourceBaseListInput
	apis.DeletePreventableResourceBaseListInput
	billing.BillingResourceListInput

	VpcFilterListInput
	ZonalFilterListBase
	NetworkFilterListBase

	// filter by cluster
	Cluster string `json:"cluster"`

	Address []string `json:"address"`
	// 地址类型
	AddressType []string `json:"address_type"`
	// 网络类型
	NetworkType []string `json:"network_type"`
	// 计费类型
	ChargeType []string `json:"charge_type"`
	// 套餐名称
	LoadbalancerSpec []string `json:"loadbalancer_spec"`

	// filter by security group
	SecgroupId string `json:"secgroup_id"`

	// filter for EIP
	WithEip                  *bool  `json:"with_eip"`
	WithoutEip               *bool  `json:"without_eip"`
	EipAssociable            *bool  `json:"eip_associable"`
	UsableLoadbalancerForEip string `json:"usable_loadbalancer_for_eip"`
}

type LoadbalancerListenerCreateInput

type LoadbalancerListenerCreateInput struct {
	apis.StatusStandaloneResourceCreateInput

	// swagger: ignore
	Loadbalancer string `json:"loadbalancer" yunion-deprecated-by:"loadbalancer_id"`
	// 负载均衡ID
	LoadbalancerId string `json:"loadbalancer_id"`

	//swagger: ignore
	BackendGroup   string `json:"backend_group" yunion-deprecated-by:"backend_group_id"`
	BackendGroupId string `json:"backend_group_id"`

	// range 1-600
	// default: 10
	ClientReqeustTimeout int `json:"client_request_timeout"`
	// range 1-600
	// default: 90
	ClientIdleTimeout int `json:"client_idle_timeout"`
	// range 1-180
	// default: 5
	BackendConnectTimeout int `json:"backend_connect_timeout"`
	// range 1-600
	// default: 90
	BackendIdleTimeout int `json:"backend_idle_timeout"`

	// required: true
	// enmu: tcp, udp, http, https
	ListenerType               string `json:"listener_type"`
	ListenerPort               int    `json:"listener_port"`
	SendProxy                  string `json:"send_proxy"`
	Scheduler                  string `json:"scheduler"`
	StickySession              string `json:"sticky_session"`
	StickySessionType          string `json:"sticky_session_type"`
	StickySessionCookie        string `json:"sticky_session_cookie"`
	StickySessionCookieTimeout int    `json:"sticky_session_cookie_timeout"`
	// default: true
	XForwardedFor *bool `json:"x_forwarded_for"`
	Gzip          bool  `json:"gzip"`

	EgressMbps int `json:"egress_mbps"`

	//swagger: ignore
	Certificate   string `json:"certificate" yunion-deprecated-by:"certificate_id"`
	CertificateId string `json:"certificate_id"`

	TLSCipherPolicy string `json:"tls_cipher_policy"`
	// default: true
	EnableHttp2 *bool `json:"enable_http2"`

	// default: on
	// enmu: on, off
	HealthCheck string `json:"health_check"`
	// enum: ["tcp", "udp", "http"]
	HealthCheckType   string `json:"health_check_type"`
	HealthCheckDomain string `json:"string"`
	HealthCheckPath   string `json:"health_check_path"`
	// default: http_2xx,http_3xx
	HealthCheckHttpCode string `json:"health_check_http_code"`

	// 2-10
	// default: 5
	HealthCheckRise int `json:"health_check_rise"`
	// 2-10
	// default: 2
	HealthCheckFail int `json:"health_check_fail"`
	// 2-120
	// default: 5
	HealthCheckTimeout int `json:"health_check_timeout"`
	// 5-300
	// default: 30
	HealthCheckInterval int `json:"health_check_interval"`

	HttpRequestRate       int `json:"http_request_rate"`
	HttpRequestRatePerSrc int `json:"http_request_rate_src"`

	// default: off
	// enmu: off, raw
	Redirect       string `json:"redirect"`
	RedirectCode   int    `json:"redirect_code"`
	RedirectScheme string `json:"redirect_scheme"`
	RedirectHost   string `json:"redirect_host"`
	RedirectPath   string `json:"redirect_path"`

	//swagger: ignore
	Acl string `json:"acl" yunion-deprecated-by:"acl_id"`

	AclId     string `json:"acl_id"`
	AclStatus string `json:"acl_status"`
	AclType   string `json:"acl_type"`
}

func (*LoadbalancerListenerCreateInput) Validate

func (self *LoadbalancerListenerCreateInput) Validate() error

type LoadbalancerListenerDetails

type LoadbalancerListenerDetails struct {
	apis.StatusStandaloneResourceDetails
	LoadbalancerResourceInfo
	LoadbalancerAclResourceInfo
	LoadbalancerCertificateResourceInfo

	SLoadbalancerListener

	BackendGroup    string `json:"backend_group"`
	CertificateName string `json:"certificate_name"`

	ProjectId string `json:"tenant_id"`
}

type LoadbalancerListenerFilterListInput

type LoadbalancerListenerFilterListInput struct {
	LoadbalancerFilterListInput

	LoadbalancerListenerResourceInput

	// 以负载均衡监听器名称排序
	OrderByListener string `json:"order_by_listener"`
}

type LoadbalancerListenerListInput

type LoadbalancerListenerListInput struct {
	apis.StatusStandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput
	LoadbalancerFilterListInput
	// filter by acl
	LoadbalancerAclResourceInput

	// filter by backend_group
	BackendGroup string `json:"backend_group"`

	ListenerType []string `json:"listener_type"`
	ListenerPort []int    `json:"listener_port"`

	Scheduler []string `json:"scheduler"`

	Certificate []string `json:"certificate_id"`

	SendProxy []string `json:"send_proxy"`

	AclStatus []string `json:"acl_status"`
	AclType   []string `json:"acl_type"`
}

type LoadbalancerListenerResourceInfo

type LoadbalancerListenerResourceInfo struct {
	// 负载均衡监听器名称
	Listener string `json:"listener"`

	// 负载均衡ID
	LoadbalancerId string `json:"loadbalancer_id"`

	LoadbalancerResourceInfo
}

type LoadbalancerListenerResourceInput

type LoadbalancerListenerResourceInput struct {
	// 负载均衡监听器
	ListenerId string `json:"listener_id"`

	// 负载均衡监听器ID
	// swagger:ignore
	// Deprecated
	Listener string `json:"listener" yunion-deprecated-by:"listener_id"`
}

type LoadbalancerListenerRuleCreateInput

type LoadbalancerListenerRuleCreateInput struct {
	apis.StatusStandaloneResourceCreateInput

	// swagger: ignore
	Listener   string `json:"listener" yunion-deprecated-by:"listener_id"`
	ListenerId string `json:"listener_id"`

	BackendGroup   string `json:"backend_group" yunion-deprecated-by:"backend_group_id"`
	BackendGroupId string `json:"backend_group_id"`

	Domain               string `json:"domain"`
	Path                 string `json:"path"`
	HttpRequstRate       int    `json:"http_request_rate"`
	HttpRequstRatePerSec int    `json:"http_request_rate_per_sec"`

	Redirect       string
	RedirectCode   int64
	RedirectScheme string
	RedirectHost   string
	RedirectPath   string

	Condition string `json:"conditon"`
}

func (*LoadbalancerListenerRuleCreateInput) Validate

func (self *LoadbalancerListenerRuleCreateInput) Validate() error

type LoadbalancerListenerRuleDetails

type LoadbalancerListenerRuleDetails struct {
	apis.StatusStandaloneResourceDetails
	LoadbalancerListenerResourceInfo

	SLoadbalancerListenerRule

	BackendGroup string `json:"backend_group"`

	ProjectId string `json:"tenant_id"`
}

type LoadbalancerListenerRuleListInput

type LoadbalancerListenerRuleListInput struct {
	apis.StatusStandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput
	LoadbalancerListenerFilterListInput

	// filter by backend_group
	BackendGroup string `json:"backend_group"`

	// 默认转发策略,目前只有aws用到其它云都是false
	IsDefault *bool `json:"is_default"`

	Domain []string `json:"domain"`
	Path   []string `json:"path"`
}

type LoadbalancerListenerRuleUpdateInput

type LoadbalancerListenerRuleUpdateInput struct {
	apis.StatusStandaloneResourceBaseUpdateInput

	// swagger: ignore
	Listener   string `json:"listener" yunion-deprecated-by:"listener_id"`
	ListenerId string `json:"listener_id"`

	BackendGroup   string `json:"backend_group" yunion-deprecated-by:"backend_group_id"`
	BackendGroupId string `json:"backend_group_id"`

	Domain               string `json:"domain"`
	Path                 string `json:"path"`
	HttpRequstRate       int    `json:"http_request_rate"`
	HttpRequstRatePerSec int    `json:"http_request_rate_per_sec"`

	Redirect       string
	RedirectCode   int64
	RedirectScheme string
	RedirectHost   string
	RedirectPath   string

	Condition string `json:"conditon"`
}

type LoadbalancerListenerUpdateInput

type LoadbalancerListenerUpdateInput struct {
	apis.StatusStandaloneResourceBaseUpdateInput

	AclStatus *string `json:"acl_status"`
	AclType   *string `json:"acl_type"`
	//swagger: ignore
	Acl   *string `json:"acl" yunion-deprecated-by:"acl_id"`
	AclId *string `json:"acl_id"`

	// range 1-600
	// default: 10
	ClientReqeustTimeout *int `json:"client_request_timeout"`
	// range 1-600
	// default: 90
	ClientIdleTimeout *int `json:"client_idle_timeout"`
	// range 1-180
	// default: 5
	BackendConnectTimeout *int `json:"backend_connect_timeout"`
	// range 1-600
	// default: 90
	BackendIdleTimeout *int `json:"backend_idle_timeout"`

	SendProxy                  *string `json:"send_proxy"`
	Scheduler                  *string `json:"scheduler"`
	StickySession              *string `json:"sticky_session"`
	StickySessionType          *string `json:"sticky_session_type"`
	StickySessionCookie        *string `json:"sticky_session_cookie"`
	StickySessionCookieTimeout *int    `json:"sticky_session_cookie_timeout"`
	// default: true
	XForwardedFor *bool `json:"x_forwarded_for"`
	Gzip          *bool `json:"gzip"`

	//swagger: ignore
	Certificate   *string `json:"certificate" yunion-deprecated-by:"certificate_id"`
	CertificateId *string `json:"certificate_id"`

	TLSCipherPolicy *string `json:"tls_cipher_policy"`
	// default: true
	EnableHttp2 *bool `json:"enable_http2"`

	// default: on
	// enmu: on, off
	HealthCheck *string `json:"health_check"`
	// enum: ["tcp", "udp", "http"]
	HealthCheckType   *string `json:"health_check_type"`
	HealthCheckDomain *string `json:"string"`
	HealthCheckPath   *string `json:"health_check_path"`
	// default: http_2xx,http_3xx
	HealthCheckHttpCode *string `json:"health_check_http_code"`

	// 2-10
	// default: 5
	HealthCheckRise *int `json:"health_check_rise"`
	// 2-10
	// default: 2
	HealthCheckFail *int `json:"health_check_fail"`
	// 2-120
	// default: 5
	HealthCheckTimeout *int `json:"health_check_timeout"`
	// 5-300
	// default: 30
	HealthCheckInterval *int `json:"health_check_interval"`

	HttpRequestRate       *int `json:"http_request_rate"`
	HttpRequestRatePerSrc *int `json:"http_request_rate_src"`

	// default: off
	// enmu: off, raw
	Redirect       *string `json:"redirect"`
	RedirectCode   *int    `json:"redirect_code"`
	RedirectScheme *string `json:"redirect_scheme"`
	RedirectHost   *string `json:"redirect_host"`
	RedirectPath   *string `json:"redirect_path"`
}

func (*LoadbalancerListenerUpdateInput) Validate

func (self *LoadbalancerListenerUpdateInput) Validate() error

type LoadbalancerRemoteUpdateInput

type LoadbalancerRemoteUpdateInput struct {
	// 是否覆盖替换所有标签
	ReplaceTags *bool `json:"replace_tags" help:"replace all remote tags"`
}

type LoadbalancerResourceInfo

type LoadbalancerResourceInfo struct {
	// 负载均衡名称
	Loadbalancer string `json:"loadbalancer"`

	// VPC ID
	VpcId string `json:"vpc_id"`

	VpcResourceInfo

	// 可用区ID
	ZoneId string `json:"zone_id"`

	ZoneResourceInfo

	// cloud provider info
	ManagedResourceInfo
}

type LoadbalancerResourceInput

type LoadbalancerResourceInput struct {
	// 负载均衡名称
	LoadbalancerId string `json:"loadbalancer_id"`

	// swagger:ignore
	// Deprecated
	Loadbalancer string `json:"loadbalancer" yunion-deprecated-by:"loadbalancer_id"`
}

type LoadbalancerUsage

type LoadbalancerUsage struct {
	BackendGroupCount int `json:"backend_group_count"`
	ListenerCount     int `json:"listener_count"`
}

type LoadbalancernetworkDetails

type LoadbalancernetworkDetails struct {
	apis.VirtualJointResourceBaseDetails

	SLoadbalancerNetwork

	// 负载均衡器名称
	Loadbalancer string `json:"loadbalancer"`
	// IP子网名称
	Network string `json:"network"`
}

type LoadbalancernetworkListInput

type LoadbalancernetworkListInput struct {
	apis.VirtualJointResourceBaseListInput

	LoadbalancerFilterListInput
	NetworkFilterListInput

	IpAddr []string `json:"ip_addr"`
}

type ManagedResourceInfo

type ManagedResourceInfo struct {
	CloudaccountResourceInfo

	// 云账号Id
	// example: 4d3c8979-9dd0-439b-8d78-36fe1ab1666c
	AccountId string `json:"account_id,omitempty"`

	// 云订阅名称
	// example: google-account
	Manager string `json:"manager,omitempty"`

	// 子订阅所在项目名称
	// example: system
	ManagerProject string `json:"manager_project,omitempty"`
	// 子订阅所在项目Id
	// example: 4d3c8979-9dd0-439b-8d78-36fe1ab1666c
	ManagerProjectId string `json:"manager_project_id,omitempty"`

	// 子订阅所在域名称
	// example: Default
	ManagerDomain string `json:"manager_domain,omitempty"`

	// 子订阅所在域Id
	// example: default
	ManagerDomainId string `json:"manager_domain_id,omitempty"`
}

type ManagedResourceListInput

type ManagedResourceListInput struct {
	apis.DomainizedResourceListInput
	CloudenvResourceListInput

	CloudproviderResourceListInput

	// 列出关联指定云账号(ID或Name)的资源
	CloudaccountId []string `json:"cloudaccount_id"`
	// swagger:ignore
	// Deprecated
	// description: this param will be deprecate at 3.0
	Cloudaccount []string `json:"cloudaccount" yunion-deprecated-by:"cloudaccount_id"`
	// swagger:ignore
	// Deprecated
	// description: this param will be deprecate at 3.0
	Account []string `json:"account" yunion-deprecated-by:"cloudaccount_id"`
	// swagger:ignore
	// Deprecated
	// description: this param will be deprecate at 3.0
	AccountId []string `json:"account_id" yunion-deprecated-by:"cloudaccount_id"`

	// 过滤资源,是否为非OneCloud内置私有云管理的资源
	// default: false
	IsManaged *bool `json:"is_managed"`

	// 以云账号名称排序
	// pattern:asc|desc
	OrderByAccount string `json:"order_by_account"`

	// 以云订阅名称排序
	// pattern:asc|desc
	OrderByManager string `json:"order_by_manager"`
}

func (*ManagedResourceListInput) AfterUnmarshal

func (input *ManagedResourceListInput) AfterUnmarshal()

type MappingRules

type MappingRules []ProjectMappingRuleInfo

func (MappingRules) IsZero

func (self MappingRules) IsZero() bool

func (MappingRules) Rules

func (rules MappingRules) Rules() MappingRules

func (MappingRules) String

func (self MappingRules) String() string

func (MappingRules) Validate

func (rules MappingRules) Validate() error

type MiscResourceUpdateInput

type MiscResourceUpdateInput struct {
	apis.VirtualResourceBaseUpdateInput
}

type ModelartsPoolChangeConfigInput

type ModelartsPoolChangeConfigInput struct {
	NodeCount int
}

type ModelartsPoolCreateInput

type ModelartsPoolCreateInput struct {
	apis.VirtualResourceCreateInput
	DeletePreventableCreateInput

	CloudregionResourceInput
	CloudproviderResourceInput

	NodeCount int    `json:"node_count"`
	Cidr      string `json:"cidr"`
}

type ModelartsPoolSyncstatusInput

type ModelartsPoolSyncstatusInput struct {
}

type ModelartsPoolUpdateInput

type ModelartsPoolUpdateInput struct {
	apis.StatusInfrasResourceBaseCreateInput
	CloudproviderResourceInput
	WorkType string `json:"work_type"`
}

type MongoDBAutoRenewInput

type MongoDBAutoRenewInput struct {
	// 是否自动续费
	AutoRenew bool `json:"auto_renew"`
}

type MongoDBDetails

type MongoDBDetails struct {
	apis.VirtualResourceDetails
	CloudregionResourceInfo
	ZoneResourceInfoBase
	ManagedResourceInfo

	VpcResourceInfoBase
	SMongoDB

	// IP子网名称
	// example: test-network
	Network string `json:"network"`
}

type MongoDBFilterListInput

type MongoDBFilterListInput struct {
	MongoDBFilterListInputBase

	VpcFilterListInput
}

type MongoDBFilterListInputBase

type MongoDBFilterListInputBase struct {
	MongoDBResourceInput

	// 以MongoDB实例名字排序
	OrderByMongoDB string `json:"order_by_mongodb"`
}

type MongoDBListInput

type MongoDBListInput struct {
	apis.VirtualResourceListInput
	apis.ExternalizedResourceBaseListInput
	apis.DeletePreventableResourceBaseListInput

	VpcFilterListInput

	ZoneResourceInput

	VcpuCount int `json:"vcpu_count"`

	VmemSizeMb int `json:"vmem_size_mb"`

	Category string `json:"category"`

	Engine string `json:"engine"`

	EngineVersion string `json:"engine_version"`

	InstanceType string `json:"instance_type"`
}

type MongoDBNetworkListInput

type MongoDBNetworkListInput struct {
	MongoDBJoinListInput

	NetworkFilterListInput
}

type MongoDBRemoteUpdateInput

type MongoDBRemoteUpdateInput struct {
	// 是否覆盖替换所有标签
	ReplaceTags *bool `json:"replace_tags" help:"replace all remote tags"`
}

type MongoDBResourceInfo

type MongoDBResourceInfo struct {
	MongoDBResourceInfoBase

	// 归属VPC ID
	VpcId string `json:"vpc_id"`

	VpcResourceInfo
}

type MongoDBResourceInfoBase

type MongoDBResourceInfoBase struct {
	// MongoDB实例名称
	MongoDB string `json:"mongodb"`
}

type MongoDBResourceInput

type MongoDBResourceInput struct {
	// MongoDB实例(ID or Name)
	MongoDBId string `json:"mongodb_id"`

	// swagger:ignore
	// Deprecated
	MongoDB string `json:"mongodb" yunion-deprecated-by:"mongodb_id"`
}

type MongoDBSetSecgroupInput

type MongoDBSetSecgroupInput struct {
	SecgroupIds []string `json:"secgroup_ids"`
}

type MountTargetCreateInput

type MountTargetCreateInput struct {
	apis.StatusStandaloneResourceCreateInput

	// 网络类型
	// enmu: vpc, classic
	// default: vpc
	NetworkType string `json:"network_type"`

	// 文件系统Id
	// required: true
	FileSystemId string `json:"file_system_id"`

	// Ip子网名称或Id, network_type == vpc时有效
	// required: true
	NetworkId string `json:"network_id"`
	// swagger:ignore
	Network string `json:"network" yunion-deprecated-by:"network_id"`

	// swagger:ignore
	VpcId string `json:"vpc_id"`

	// 权限组Id
	AccessGroupId string `json:"access_group_id"`
}

type MountTargetSyncstatusInput

type MountTargetSyncstatusInput struct {
}

type NasSkuDetails

type NasSkuDetails struct {
	apis.EnabledStatusStandaloneResourceDetails

	CloudregionResourceInfo

	// 云环境
	CloudEnv string `json:"cloud_env"`
}

type NasSkuListInput

type NasSkuListInput struct {
	apis.EnabledStatusStandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput

	RegionalFilterListInput

	PostpaidStatus string `json:"postpaid_stauts"`
	PrepaidStatus  string `json:"prepaid_status"`

	Providers []string `json:"providers"`
	// swagger:ignore
	// Deprecated
	Provider []string `json:"provider" yunion-deprecated-by:"providers"`
}

type NatDEntryDetails

type NatDEntryDetails struct {
	NatEntryDetails
}

type NatDEntryListInput

type NatDEntryListInput struct {
	NatEntryListInput

	ExternalIP   []string `json:"external_ip"`
	ExternalPort []int    `json:"external_port"`

	InternalIP   []string `json:"internal_ip"`
	InternalPort []int    `json:"internal_port"`
	IpProtocol   []string `json:"ip_protocol"`
}

type NatGatewayFilterListInput

type NatGatewayFilterListInput struct {
	NatGatewayResourceInput

	// 以NAT网关名字排序
	OrderByNatgateway string `json:"order_by_natgateway"`

	VpcFilterListInput
}

type NatGatewayResourceInfo

type NatGatewayResourceInfo struct {
	// NAT网关名称
	Natgateway string `json:"natgateway"`

	// 归属VPC ID
	VpcId string `json:"vpc_id"`

	VpcResourceInfo
}

type NatGatewayResourceInput

type NatGatewayResourceInput struct {
	// NAT网关ID or Name
	NatgatewayId string `json:"natgateway_id"`

	// swagger:ignore
	// Deprecated
	Natgateway string `json:"natgateway" yunion-deprecated-by:"natgateway_id"`
}

type NatGatewaySyncstatusInput

type NatGatewaySyncstatusInput struct {
}

type NatSEntryDetails

type NatSEntryDetails struct {
	NatEntryDetails

	// SNAT归属网络
	Network SimpleNetwork `json:"network"`
}

type NatSEntryListInput

type NatSEntryListInput struct {
	NatEntryListInput
	NetworkFilterListBase

	IP         []string `json:"ip"`
	SourceCIDR []string `json:"source_cidr"`
}

type NatSkuDetails

type NatSkuDetails struct {
	apis.EnabledStatusStandaloneResourceDetails

	CloudregionResourceInfo

	// 云环境
	CloudEnv string `json:"cloud_env"`
}

type NatSkuListInput

type NatSkuListInput struct {
	apis.EnabledStatusStandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput

	RegionalFilterListInput

	PostpaidStatus string `json:"postpaid_stauts"`
	PrepaidStatus  string `json:"prepaid_status"`

	Providers []string `json:"providers"`
	// swagger:ignore
	// Deprecated
	Provider []string `json:"provider" yunion-deprecated-by:"providers"`
}

type NatgatewayCreateInput

type NatgatewayCreateInput struct {
	apis.StatusInfrasResourceBaseCreateInput

	// 包年包月时间周期
	Duration string `json:"duration"`

	// 是否自动续费(仅包年包月时生效)
	// default: false
	AutoRenew bool `json:"auto_renew"`

	// 到期释放时间,仅后付费支持
	ExpiredAt time.Time `json:"expired_at"`

	// 计费方式
	// enum: ["postpaid", "prepaid"]
	BillingType string `json:"billing_type"`
	// swagger:ignore
	BillingCycle string `json:"billing_cycle"`

	NetworkId string `json:"network_id"`

	// swagger:ignore
	VpcId string `json:"vpc_id"`

	// 绑定已有弹性公网IP,要求EIP必须和Vpc在同一区域
	Eip string `json:"eip"`

	// 绑定新建弹性公网IP
	EipBw int `json:"eip_bw,omitzero"`

	// 弹性公网IP计费类型
	// enum: ["bandwidth", "traffic"]
	// default: traffic
	EipChargeType    string `json:"eip_charge_type,omitempty"`
	EipBgpType       string `json:"eip_bgp_type"`
	EipAutoDellocate bool   `json:"eip_auto_dellocate"`
}

func (*NatgatewayCreateInput) Params

func (opts *NatgatewayCreateInput) Params() (jsonutils.JSONObject, error)

type NatgatewayDeleteInput

type NatgatewayDeleteInput struct {
	Force bool `json:"force"`
}

type NatgatewayDetails

type NatgatewayDetails struct {
	apis.StatusInfrasResourceBaseDetails

	VpcResourceInfo

	SNatGateway

	Network string `json:"network"`
}

type NetTapFlowCreateInput

type NetTapFlowCreateInput struct {
	apis.EnabledStatusStandaloneResourceCreateInput

	TapId string `json:"tap_id" required:"true" help:"tap service id or name that this flow belongs to"`

	Type string `json:"type" required:"true" choices:"vswitch|vnic" help:"type of tap flow"`

	HostId string `json:"host_id" help:"id or name of host to tap with"`

	WireId string `json:"wire_id" help:"id or name of wire to tap with"`

	VlanId *int `json:"vlan_id" help:"vlan id of vswitch to tap with"`

	GuestId string `json:"guest_id" help:"id or name of vm to tap with"`

	// swagger:ignore
	NetId string `json:"net_id" ignore:"true"`

	MacAddr string `json:"mac_addr" help:"mac address of guest nic to tap with"`

	IpAddr string `json:"ip_addr" help:"ip address of guest nic to tap with"`

	// swagger:ignore
	SourceId string `json:"source_id" ignore:"true"`

	Direction string `json:"direction" help:"flow direction" choices:"IN|OUT|BOTH"`
}

type NetTapFlowDetails

type NetTapFlowDetails struct {
	apis.EnabledStatusStandaloneResourceDetails

	// 关联的tap服务名称
	Tap string `json:"tap"`

	Source string `json:"source"`

	SourceIps string `json:"source_ips"`

	Net string `json:"net"`
}

type NetTapFlowListInput

type NetTapFlowListInput struct {
	apis.EnabledStatusStandaloneResourceListInput

	TapId string `json:"tap_id"`

	HostId string `json:"host_id" help:"filter by host id or name"`
}

type NetTapServiceCreateInput

type NetTapServiceCreateInput struct {
	apis.EnabledStatusStandaloneResourceCreateInput

	// TAP服务类型,监听宿主机的网卡还是虚拟机的网卡, 可能值为 host|guest
	Type string `json:"type" required:"true" choices:"host|guest" help:"type of tap service"`

	// 资源ID,如果Type=host,该值为宿主机的ID,如果Type=guest,该值为虚拟机的ID
	TargetId string `json:"target_id" required:"true" help:"id of target device"`

	// 监听网卡的Mac地址
	MacAddr string `json:"mac_addr" help:"mac address of the device interface for tappping"`
}

type NetTapServiceDetails

type NetTapServiceDetails struct {
	apis.EnabledStatusStandaloneResourceDetails

	// 流量镜像目标名称
	Target string `json:"target"`

	// 流量镜像目标IP地址
	TargetIps string `json:"target_ips"`

	// tap flow数量
	FlowCount int `json:"flow_count"`
}

type NetTapServiceListInput

type NetTapServiceListInput struct {
	apis.EnabledStatusStandaloneResourceListInput

	HostId string `json:"host_id" help:"filter by host id or name"`
	// 按目的ip地址排序
	// pattern:asc|desc
	OrderByIp string `json:"order_by_ip"`
	// 按镜像源数量排序
	// pattern:asc|desc
	OrderByFlowCount string `json:"order_by_flow_count"`
}

type NetworSyncAdditionalWiresInput

type NetworSyncAdditionalWiresInput struct {
	apis.Meta

	WireIds []string `json:"wire_ids"`
}

type NetworkAddrConf

type NetworkAddrConf struct {
	Id      string `json:"id"`
	Type    string `json:"type"`
	IpAddr  string `json:"ip_addr"`
	Masklen int    `json:"masklen"`
	Gateway string `json:"gateway"`
}

type NetworkAddressCreateInput

type NetworkAddressCreateInput struct {
	apis.StandaloneAnonResourceCreateInput

	ParentType        string
	ParentId          int64
	GuestId           string
	GuestnetworkIndex int8

	Type      string
	NetworkId string
	IPAddr    string   `json:"ip_addr"`
	IPAddrs   []string `json:"ip_addrs"`
}

type NetworkAddressDetails

type NetworkAddressDetails struct {
	apis.StandaloneAnonResourceDetails
	NetworkResourceInfo

	Type       string
	ParentType string
	ParentId   string
	NetworkId  string
	IpAddr     string

	SubCtrVid int

	Guestnetwork GuestnetworkDetails
}

type NetworkConfig

type NetworkConfig struct {
	apis.Meta

	// 网卡序号, 从0开始
	// required: true
	Index int `json:"index"`

	// 子网名称或ID
	// required: true
	Network string `json:"network"`

	// swagger:ignore
	Wire string `json:"wire"`

	// 内网地址
	Exit    bool `json:"exit"`
	Private bool `json:"private"`

	// 网卡MAC地址
	// requried: false
	Mac string `json:"mac"`

	// 如果是批量创建,指定每个网卡MAC地址
	// requried: false
	Macs []string `json:"macs"`

	// 子网内的IPv4地址, 若不指定会按照子网的地址分配策略分配一个IP地址
	// required: false
	Address string `json:"address"`

	// 如果是批量创建,指定每台主机子网内的IPv4地址
	// required: false
	Addresses []string `json:"addresses"`

	// 子网内的IPv6地址
	// required: false
	Address6 string `json:"address6"`

	// 如果是批量创建,指定每台主机子网内的IPv4地址
	// required: false
	Addresses6 []string `json:"addresses6"`

	// 是否要求分配IPv6地址
	// required: false
	RequireIPv6 bool `json:"require_ipv6"`

	// 驱动方式
	// 若指定镜像的网络驱动方式,此参数会被覆盖
	Driver         string `json:"driver"`
	BwLimit        int    `json:"bw_limit"`
	Vip            bool   `json:"vip"`
	Reserved       bool   `json:"reserved"`
	NumQueues      int    `json:"num_queues"`
	RxTrafficLimit int64  `json:"rx_traffic_limit"`
	TxTrafficLimit int64  `json:"tx_traffic_limit"`

	NetType TNetworkType `json:"net_type"`

	IsDefault bool `json:"is_default"`

	// sriov nic
	SriovDevice *IsolatedDeviceConfig `json:"sriov_device"`

	RequireDesignatedIP bool `json:"require_designated_ip"`

	RequireTeaming bool `json:"require_teaming"`
	TryTeaming     bool `json:"try_teaming"`

	StandbyPortCount int `json:"standby_port_count"`
	StandbyAddrCount int `json:"standby_addr_count"`

	PortMappings GuestPortMappings `json:"port_mappings"`

	// swagger:ignore
	Project string `json:"project_id"`

	// swagger:ignore
	Domain    string            `json:"domain_id"`
	Ifname    string            `json:"ifname"`
	Schedtags []*SchedtagConfig `json:"schedtags"`
}

type NetworkCreateInput

type NetworkCreateInput struct {
	apis.SharableVirtualResourceCreateInput

	// description: ip range of guest, if not set, you shoud set guest_ip_start,guest_ip_end and guest_ip_mask params
	// example: 10.168.222.1/24
	GuestIpPrefix string `json:"guest_ip_prefix"`

	// description: ip range of guest ip start, if set guest_ip_prefix, this parameter will be ignored
	// example: 10.168.222.1
	GuestIpStart string `json:"guest_ip_start"`

	// description: ip range of guest ip end, if set guest_ip_prefix, this parameter will be ignored
	// example: 10.168.222.100
	GuestIpEnd string `json:"guest_ip_end"`

	// description: ip range of guest ip mask, if set guest_ip_prefix, this parameter will be ignored
	// example: 24
	// maximum: 30
	// minimum: 12
	GuestIpMask int8 `json:"guest_ip_mask"`

	IfnameHint string `json:"ifname_hint"`

	// description: guest gateway
	// example: 192.168.222.1
	GuestGateway string `json:"guest_gateway"`

	// description: ipv6 range of guest, if not set, you shoud set guest_ip6_start,guest_ip6_end and guest_ip6_mask params
	// example: 3ffe:3200:2001:2300::/64
	GuestIp6Prefix string `json:"guest_ip6_prefix"`
	// description: ipv6 range of guest ip start, if set guest_ip6_prefix, this parameter will be ignored
	// example: 3ffe:3200:2001:2300::1
	GuestIp6Start string `json:"guest_ip6_start"`
	// description: ipv6 range of guest ip end, if set guest_ip6_prefix, this parameter will be ignored
	// example: 3ffe:3200:2001:2300:ffff:ffff:ffff:ffff
	GuestIp6End string `json:"guest_ip6_end"`
	// description: ipv6 range of guest ip mask, if set guest_ip6_prefix, this parameter will be ignored
	// example: 64
	// maximum: 126
	// minimum: 48
	GuestIp6Mask uint8 `json:"guest_ip6_mask"`

	// description: guest gateway of IPv6
	// example: 3ffe:3200:2001:2300::1
	GuestGateway6 string `json:"guest_gateway6"`

	// description: guest dns
	// example: 114.114.114.114,8.8.8.8
	GuestDns string `json:"guest_dns"`

	// description: guest dhcp
	// example: 192.168.222.1,192.168.222.4
	GuestDHCP string `json:"guest_dhcp"`

	// description: guest ntp
	// example: cn.pool.ntp.org,0.cn.pool.ntp.org
	GuestNtp string `json:"guest_ntp"`

	// swagger:ignore
	WireId string `json:"wire_id"`

	// description: wire id or name
	Wire string `json:"wire"`

	// description: zone id or name
	Zone string `json:"zone"`

	// description: vpc id or name
	Vpc string `json:"vpc"`

	// description: server type
	// enum: ["guest","baremetal","pxe","ipmi","hostlocal"]
	// default: guest
	ServerType TNetworkType `json:"server_type"`

	// 是否加入自动分配地址池
	IsAutoAlloc *bool `json:"is_auto_alloc"`

	// VlanId
	VlanId *int `json:"vlan_id"`

	// deprecated
	Vlan *int `json:"vlan" yunion-deprecated-by:"vlan_id"`

	// 线路类型
	BgpType string `json:"bgp_type"`

	// 是否申请ip时自动挂载公网ip,仅对aws生效
	AssignPublicIp bool `json:"assign_public_ip"`
}

type NetworkDetails

type NetworkDetails struct {
	apis.SharableVirtualResourceDetails
	WireResourceInfo

	SNetwork
	SNetworkNics

	// 是否是内网
	Exit bool `json:"exit"`
	// 端口数量
	Ports int `json:"ports"`

	Dns string `json:"dns"`

	// 路由信息
	Routes    []types.SRoute             `json:"routes"`
	Schedtags []SchedtagShortDescDetails `json:"schedtags"`

	IsClassic bool `json:"is_classic"`

	AdditionalWires []SSimpleWire `json:"additional_wires"`
}

type NetworkFilterListBase

type NetworkFilterListBase struct {
	NetworkResourceInput

	// 以IP子网的名称排序
	OrderByNetwork string `json:"order_by_network"`
}

type NetworkFilterListInput

type NetworkFilterListInput struct {
	WireFilterListInput
	NetworkFilterListBase
}

type NetworkInterfaceDetails

type NetworkInterfaceDetails struct {
	apis.StatusInfrasResourceBaseDetails
	ManagedResourceInfo
	CloudregionResourceInfo

	SNetworkInterface

	// 弹性网卡网络信息
	Networks []NetworkInterfaceNetworkInfo `json:"networks"`
}

type NetworkInterfaceListInput

type NetworkInterfaceListInput struct {
	apis.StatusInfrasResourceBaseListInput
	apis.ExternalizedResourceBaseListInput

	ManagedResourceListInput
	RegionalFilterListInput

	// MAC地址
	Mac []string `json:"mac"`
	// 绑定资源类型
	AssociateType []string `json:"associate_type"`
	// 绑定资源Id
	AssociateId []string `json:"associate_id"`
}

type NetworkInterfaceNetworkInfo

type NetworkInterfaceNetworkInfo struct {
	// Ip子网Id
	NetworkId string `json:"network_id"`
	// IP地址
	IpAddr string `json:"ip_addr"`
	// 是否是主ip地址
	Primary bool `json:"primary"`
	// 弹性网卡id
	NetworkinterfaceId string `json:"networkinterface_id"`
	// IP子网名称
	Network string `json:"network"`
}

type NetworkIpMacBatchCreateInput

type NetworkIpMacBatchCreateInput struct {
	NetworkId string            `json:"network_id"`
	IpMac     map[string]string `json:"ip_mac"`
}

type NetworkIpMacCreateInput

type NetworkIpMacCreateInput struct {
	apis.StandaloneAnonResourceCreateInput

	NetworkId string `json:"network_id"`
	MacAddr   string `json:"mac_addr"`
	IpAddr    string `json:"ip_addr"`
}

type NetworkIpMacDetails

type NetworkIpMacDetails struct {
	apis.StandaloneAnonResourceDetails

	NetworkId string `json:"network_id"`
	IpAddr    string `json:"ip_addr"`
	MacAddr   string `json:"mac_addr"`
}

type NetworkIpMacListInput

type NetworkIpMacListInput struct {
	apis.StandaloneAnonResourceListInput

	NetworkId string   `json:"network_id"`
	MacAddr   []string `json:"mac_addr"`
	IpAddr    []string `json:"ip_addr"`
}

type NetworkIpMacUpdateInput

type NetworkIpMacUpdateInput struct {
	apis.StandaloneAnonResourceBaseUpdateInput

	MacAddr string `json:"mac_addr"`
	IpAddr  string `json:"ip_addr"`
}

type NetworkListInput

type NetworkListInput struct {
	apis.SharableVirtualResourceListInput
	apis.ExternalizedResourceBaseListInput
	SchedtagResourceInput
	WireFilterListInput

	HostResourceInput
	StorageResourceInput

	UsableResourceListInput

	// filter by route table which associate with it
	RouteTableId string `json:"route_table_id"`

	// description: Exact matching ip address in network.
	// example: 10.168.222.1
	Ip []string `json:"ip"`

	// description: Fuzzy matching ip address in network.
	// example: 10.168.222.1
	IpMatch []string `json:"ip_match"`

	IfnameHint []string `json:"ifname_hint"`
	// 起始IP地址
	GuestIpStart []string `json:"guest_ip_start"`
	// 接收IP地址
	GuestIpEnd []string `json:"guest_ip_end"`
	// 掩码
	GuestIpMask []int8 `json:"guest_ip_mask"`
	// 网关地址
	GuestGateway string `json:"guest_gateway"`
	// DNS
	GuestDns []string `json:"guest_dns"`
	// allow multiple dhcp, seperated by ","
	GuestDhcp []string `json:"guest_dhcp"`
	// NTP
	GuestNtp []string `json:"guest_ntp"`

	GuestDomain []string `json:"guest_domain"`

	GuestIp6Start []string `json:"guest_ip6_start"`
	GuestIp6End   []string `json:"guest_ip6_end"`
	GuestIp6Mask  []int8   `json:"guest_ip6_mask"`
	GuestGateway6 []string `json:"guest_gateway6"`
	GuestDns6     []string `json:"guest_dns6"`

	GuestDomain6 []string `json:"guest_domain6"`
	// vlanId 1~4096
	VlanId []int `json:"vlan_id"`
	// 服务器类型
	// example: server
	ServerType []string `json:"server_type"`
	// 分配策略
	AllocPolicy []string `json:"alloc_policy"`
	// 是否加入自动分配地址池
	IsAutoAlloc *bool `json:"is_auto_alloc"`
	// 是否为基础网络(underlay)
	IsClassic *bool `json:"is_classic"`

	// filter by Host schedtag
	HostSchedtagId string `json:"host_schedtag_id"`

	// filter by BGP types
	BgpType []string `json:"bgp_type"`

	HostType string `json:"host_type"`

	// 按起始ip地址排序
	// pattern:asc|desc
	OrderByIpStart string `json:"order_by_ip_start"`
	// 按终止ip地址排序
	// pattern:asc|desc
	OrderByIpEnd string `json:"order_by_ip_end"`
}

type NetworkMergeInput

type NetworkMergeInput struct {
	apis.Meta

	// description: network id or name to be merged
	// required: true
	// example: test-network
	Target string `json:"target"`
}

type NetworkPurgeInput

type NetworkPurgeInput struct {
	apis.Meta
}

type NetworkReleaseReservedIpInput

type NetworkReleaseReservedIpInput struct {
	apis.Meta

	// description: IP to be released
	// required: true
	// example: 10.168.222.121
	Ip string `json:"ip"`
}

type NetworkReserveIpInput

type NetworkReserveIpInput struct {
	apis.Meta

	// description: reserved ip list
	// required: true
	// example: [10.168.222.131, 10.168.222.134]
	Ips []string `json:"ips"`

	// description: the comment
	// example: reserve ip for test
	Notes  string `json:"notes"`
	Status string `json:"status"`
	// description: The reserved cycle
	// required: false
	Duration string `json:"duration"`
}

type NetworkResourceInfo

type NetworkResourceInfo struct {
	NetworkResourceInfoBase

	// 二层网络ID
	WireId string `json:"wire_id"`

	WireResourceInfo
}

type NetworkResourceInfoBase

type NetworkResourceInfoBase struct {
	// IP子网名称
	Network string `json:"network"`
}

type NetworkResourceInput

type NetworkResourceInput struct {
	// IP子网(ID或Name)
	NetworkId string `json:"network_id"`
	// swagger:ignore
	// Deprecated
	// filter by networkId
	Network string `json:"network" yunion-deprecated-by:"network_id"`
}

type NetworkSetBgpTypeInput

type NetworkSetBgpTypeInput struct {
	apis.Meta

	// description: new BgpType name
	// required: true
	// example: ChinaTelecom, BGP, etc.
	BgpType string `json:"bgp_type"`
}

type NetworkSplitInput

type NetworkSplitInput struct {
	apis.Meta

	// description: The middle - separated IP must belong to the network
	// required: true
	// example: 10.168.222.181
	SplitIp string `json:"split_ip"`

	// description: another network name after split
	// required: false
	Name string `json:"name"`
}

type NetworkSwitchWireInput

type NetworkSwitchWireInput struct {
	apis.Meta

	// description: new wire Id or name
	// required: true
	// example: bcast0
	WireId string `json:"wire_id"`
}

type NetworkSyncInput

type NetworkSyncInput struct {
	apis.Meta
}

type NetworkTopologyOutput

type NetworkTopologyOutput struct {
	Name         string `json:"name"`
	Status       string `json:"status"`
	GuestIpStart string `json:"guest_ip_start"`
	GuestIpEnd   string `json:"guest_ip_end"`
	GuestIpMask  int8   `json:"guest_ip_mask"`
	VlanId       int    `json:"vlan_id"`

	ServerType TNetworkType `json:"server_type"`

	GetNetworkAddressesOutput
}

type NetworkTryCreateNetworkInput

type NetworkTryCreateNetworkInput struct {
	apis.Meta

	Ip          string `json:"ip"`
	Mask        int    `json:"mask"`
	IsOnPremise bool   `json:"is_on_premise"`

	ServerType TNetworkType `json:"server_type"`
}

type NetworkUpdateInput

type NetworkUpdateInput struct {
	apis.SharableVirtualResourceBaseUpdateInput

	// 起始IP地址
	GuestIpStart string `json:"guest_ip_start"`
	// 结束IP地址
	GuestIpEnd string `json:"guest_ip_end"`
	// 掩码
	GuestIpMask int8 `json:"guest_ip_mask"`
	// 网关地址
	GuestGateway *string `json:"guest_gateway"`
	// DNS
	GuestDns *string `json:"guest_dns"`
	// allow multiple dhcp, seperated by ","
	GuestDhcp *string `json:"guest_dhcp"`
	// NTP
	GuestNtp *string `json:"guest_ntp"`

	// 起始IP6地址
	GuestIp6Start *string `json:"guest_ip6_start"`
	// 结束IP6地址
	GuestIp6End *string `json:"guest_ip6_end"`
	// IP6子网掩码长度
	GuestIp6Mask *uint8 `json:"guest_ip6_mask"`
	// IP6网关地址
	GuestGateway6 *string `json:"guest_gateway6"`

	GuestDomain *string `json:"guest_domain"`

	VlanId *int `json:"vlan_id"`

	// 分配策略
	AllocPolicy string `json:"alloc_policy"`

	// 是否加入自动分配地址池
	IsAutoAlloc *bool `json:"is_auto_alloc"`

	// 更新网络类型
	ServerType TNetworkType `json:"server_type"`
}

type NetworkschedtagDetails

type NetworkschedtagDetails struct {
	SchedtagJointResourceDetails

	SNetworkschedtag

	// IP子网名称
	Network string `json:"network"`
}

type NetworkschedtagListInput

type NetworkschedtagListInput struct {
	SchedtagJointsListInput
	NetworkFilterListInput
}

type PCIEVersionThroughput

type PCIEVersionThroughput struct {
	Version    string
	Throughput float64
}

func NewPCIEVersionThroughput

func NewPCIEVersionThroughput(version string) PCIEVersionThroughput

type PodContainerCreateInput

type PodContainerCreateInput struct {
	// Container name
	Name string `json:"name"`
	ContainerSpec
}

type PodContainerDesc

type PodContainerDesc struct {
	Id     string `json:"id"`
	Name   string `json:"name"`
	Image  string `json:"image"`
	Status string `json:"status"`
}

type PodCreateInput

type PodCreateInput struct {
	Containers []*PodContainerCreateInput `json:"containers"`
	//PortMappings    []*PodPortMapping          `json:"port_mappings"`
	SecurityContext *PodSecurityContext `json:"security_context,omitempty"`
}

type PodLogOptions

type PodLogOptions struct {
	// The container for which to stream logs. Defaults to only container if there is one container in the pod.
	// +optional
	Container string `json:"container,omitempty"`
	// Follow the log stream of the pod. Defaults to false.
	// +optional
	Follow bool `json:"follow,omitempty"`
	// Return previous terminated container logs. Defaults to false.
	// +optional
	Previous bool `json:"previous,omitempty"`
	// A relative time in seconds before the current time from which to show logs. If this value
	// precedes the time a pod was started, only logs since the pod start will be returned.
	// If this value is in the future, no logs will be returned.
	// Only one of sinceSeconds or sinceTime may be specified.
	// +optional
	SinceSeconds *int64 `json:"sinceSeconds,omitempty"`
	// An RFC3339 timestamp from which to show logs. If this value
	// precedes the time a pod was started, only logs since the pod start will be returned.
	// If this value is in the future, no logs will be returned.
	// Only one of sinceSeconds or sinceTime may be specified.
	// +optional
	SinceTime *time.Time `json:"sinceTime,omitempty"`
	// If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line
	// of log output. Defaults to false.
	// +optional
	Timestamps bool `json:"timestamps,omitempty"`
	// If set, the number of lines from the end of the logs to show. If not specified,
	// logs are shown from the creation of the container or sinceSeconds or sinceTime
	// +optional
	TailLines *int64 `json:"tailLines,omitempty"`
	// If set, the number of bytes to read from the server before terminating the
	// log output. This may not display a complete final line of logging, and may return
	// slightly more or slightly less than the specified limit.
	// +optional
	LimitBytes *int64 `json:"limitBytes,omitempty"`

	// insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the
	// serving certificate of the backend it is connecting to.  This will make the HTTPS connection between the apiserver
	// and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real
	// kubelet.  If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the
	// connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept
	// the actual log data coming from the real kubelet).
	// +optional
	InsecureSkipTLSVerifyBackend bool `json:"insecureSkipTLSVerifyBackend,omitempty"`
}

type PodMetadataPortMapping

type PodMetadataPortMapping struct {
	Protocol      PodPortMappingProtocol `json:"protocol"`
	ContainerPort int32                  `json:"container_port"`
	HostPort      int32                  `json:"host_port,omitempty"`
	HostIp        string                 `json:"host_ip"`
}

type PodPortMapping

type PodPortMapping struct {
	Protocol      PodPortMappingProtocol   `json:"protocol"`
	ContainerPort int                      `json:"container_port"`
	HostPort      *int                     `json:"host_port,omitempty"`
	HostIp        string                   `json:"host_ip"`
	HostPortRange *PodPortMappingPortRange `json:"host_port_range,omitempty"`
}

type PodPortMappingPortRange

type PodPortMappingPortRange struct {
	Start int `json:"start"`
	End   int `json:"end"`
}

type PodPortMappingProtocol

type PodPortMappingProtocol string

type PodSecurityContext

type PodSecurityContext struct {
	RunAsUser  *int64 `json:"run_as_user,omitempty"`
	RunAsGroup *int64 `json:"run_as_group,omitempty"`
}

type PodStartResponse

type PodStartResponse struct {
	CRIId     string `json:"cri_id"`
	IsRunning bool   `json:"is_running"`
}

type PolicyAssignmentCreateInput

type PolicyAssignmentCreateInput struct {
	SPolicyAssignment
}

type PolicyDefinitionResourceInfo

type PolicyDefinitionResourceInfo struct {
	Policydefinition string
}

type PolicyDefinitionResourceListInput

type PolicyDefinitionResourceListInput struct {
	Policydefinition string
}

type PolicyDefinitionSyncstatusInput

type PolicyDefinitionSyncstatusInput struct {
}

type ProjectMappingCreateInput

type ProjectMappingCreateInput struct {
	apis.EnabledStatusInfrasResourceBaseCreateInput

	// 根据标签key匹配的规则会默认排到列表最后
	Rules MappingRules
}

type ProjectMappingDetails

type ProjectMappingDetails struct {
	SProjectMapping

	apis.EnabledStatusInfrasResourceBaseDetails

	Rules []ProjectMappingRuleInfoDetails

	// 所绑定的云账号列表
	Accounts []SProjectMappingAccount `json:"accounts"`

	// 所绑定的云订阅列表
	Managers []SProjectMappingAccount `json:"managers"`
}

type ProjectMappingFilterListInput

type ProjectMappingFilterListInput struct {
	ProjectMappingId      string `json:"project_mapping_id"`
	OrderByProjectMapping string
}

type ProjectMappingListInput

type ProjectMappingListInput struct {
	apis.EnabledStatusInfrasResourceBaseListInput
}

type ProjectMappingResourceInfo

type ProjectMappingResourceInfo struct {
	ProjectMapping string
}

type ProjectMappingRuleInfo

type ProjectMappingRuleInfo struct {
	// 标签列表, 不可为空
	Tags tagutils.TTagSet `json:"tags"`
	// 条件表达式
	// enmu: and, or
	// default: and
	Condition string `json:"condition"`
	// 是否自动根据标签值创建项目, 仅标签列表中有且仅有一个没有value的key时支持
	AutoCreateProject bool `json:"auto_create_project"`
	// 符合条件时,资源放置的项目id, 此参数和auto_create_project互斥
	ProjectId string `json:"project_id"`
	// 只读信息
	// swagger:ignore
	Project string `json:"project"`
	// swagger:ignore
	DomainId string `json:"domain_id"`
	// 只读信息
	// swagger:ignore
	Domain string `json:"domain"`
}

func (*ProjectMappingRuleInfo) IsMatchTags

func (self *ProjectMappingRuleInfo) IsMatchTags(_extTags map[string]string) (string, string, string, bool)

return domainId, projectId, newProj, isMatch

func (ProjectMappingRuleInfo) IsWide

func (rule ProjectMappingRuleInfo) IsWide() bool

func (*ProjectMappingRuleInfo) Validate

func (rule *ProjectMappingRuleInfo) Validate() error

type ProjectMappingRuleInfoDetails

type ProjectMappingRuleInfoDetails struct {
	ProjectMappingRuleInfo
	Project  string
	TenantId string
	Tenant   string
	Domain   string
}

type ProjectMappingUpdateInput

type ProjectMappingUpdateInput struct {
	apis.EnabledStatusInfrasResourceBaseUpdateInput

	// 根据标签key匹配的规则会默认排到列表最后
	Rules MappingRules
}

type ProviderProject

type ProviderProject struct {
	// 子订阅项目名称
	// example: system
	Tenant string `json:"tenant"`

	// 子订阅项目Id
	// 9a48383a-467a-4542-8b50-4e15b0a8715f
	TenantId string `json:"tenant_id"`
}

type RbdTimeoutInput

type RbdTimeoutInput struct {
	// ceph集群连接超时时间, 单位秒
	// default: 3
	RbdRadosMonOpTimeout int `json:"rbd_rados_mon_op_timeout"`

	// swagger:ignore
	RadosMonOpTimeout int

	// ceph osd 操作超时时间, 单位秒
	// default: 1200
	RbdRadosOsdOpTimeout int `json:"rbd_rados_osd_op_timeout"`

	// swagger:ignore
	RadosOsdOpTimeout int

	// ceph CephFS挂载超时时间, 单位秒
	// default: 120
	RbdClientMountTimeout int `json:"rbd_client_mount_timeout"`
}

type RegionalFilterListInput

type RegionalFilterListInput struct {
	// 过滤位于指定城市区域的资源
	City string `json:"city"`

	CloudregionResourceListInput

	// 按区域名称过滤
	OrderByRegion string `json:"order_by_region"`
	// 按城市过滤
	OrderByCity string `json:"order_by_city"`
}

type RepeatWeekdays

type RepeatWeekdays []int

func (RepeatWeekdays) IsZero

func (days RepeatWeekdays) IsZero() bool

func (RepeatWeekdays) String

func (days RepeatWeekdays) String() string

type ReservedipDetails

type ReservedipDetails struct {
	apis.ResourceBaseDetails
	NetworkResourceInfo

	SReservedip

	// 是否过期
	Expired bool `json:"expired"`
}

type ReservedipListInput

type ReservedipListInput struct {
	apis.ResourceBaseListInput

	NetworkFilterListInput

	// list all reserved ips, including expired ones
	All *bool `json:"all"`

	// ip_addr
	IpAddr []string `json:"ip_addr"`
	// 状态
	Status []string `json:"status"`
}

type RootDiskMatcherSizeMBRange

type RootDiskMatcherSizeMBRange struct {
	Start int64 `json:"start"`
	End   int64 `json:"end"`
}

type RouteTableCreateInput

type RouteTableCreateInput struct {
	apis.StatusInfrasResourceBaseCreateInput

	VpcResourceInput

	Type   string   `json:"type"`
	Routes *SRoutes `json:"routes"`
}

type RouteTableDetails

type RouteTableDetails struct {
	apis.StatusInfrasResourceBaseDetails
	VpcResourceInfo

	SRouteTable

	RouteSetCount    int
	AccociationCount int
}

type RouteTableFilterList

type RouteTableFilterList struct {
	RouteTableFilterListBase
	VpcFilterListInput
}

type RouteTableFilterListBase

type RouteTableFilterListBase struct {
	RouteTableId string `json:"RouteTableId"`
}

type RouteTableListInput

type RouteTableListInput struct {
	apis.StatusInfrasResourceBaseListInput
	apis.ExternalizedResourceBaseListInput

	VpcFilterListInput

	// filter by type
	Type []string `json:"type"`
}

type RouteTableRouteSetCreateInput

type RouteTableRouteSetCreateInput struct {
	apis.StatusStandaloneResourceCreateInput
	RouteTableId string
	Cidr         string `json:"cidr"`
	NextHopType  string `json:"next_hop_type"`
	NextHopId    string `json:"next_hop_id"`
	ExtNextHopId string `json:"ext_next_hop_id"`
}

type RouteTableRouteSetListInput

type RouteTableRouteSetListInput struct {
	apis.StatusStandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput
	RouteTableFilterList
	Type        string `json:"type"`
	NextHopType string `json:"next_hop_type"`
	NextHopId   string `json:"next_hop_id"`
	Cidr        string `json:"cidr"`
}

type RouteTableRouteSetUpdateInput

type RouteTableRouteSetUpdateInput struct {
	apis.StatusStandaloneResourceBaseUpdateInput
	Cidr         string `json:"cidr"`
	NextHopType  string `json:"next_hop_type"`
	NextHopId    string `json:"next_hop_id"`
	ExtNextHopId string `json:"ext_next_hop_id"`
}

type RouteTableUpdateInput

type RouteTableUpdateInput struct {
	apis.StatusInfrasResourceBaseUpdateInput

	Routes *SRoutes `json:"routes"`
}

type SAccessGroup

type SAccessGroup struct {
	apis.SStatusInfrasResourceBase
	apis.SExternalizedResourceBase
	SCloudregionResourceBase
	SManagedResourceBase
	// 已关联的挂载点数量
	MountTargetCount int    `json:"mount_target_count"`
	FileSystemType   string `json:"file_system_type"`
	NetworkType      string `json:"network_type"`
}

SAccessGroup is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SAccessGroup.

type SAccessGroupResourceBase

type SAccessGroupResourceBase struct {
	// 权限组Id
	AccessGroupId string `json:"access_group_id"`
}

SAccessGroupResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SAccessGroupResourceBase.

type SAccessGroupRule

type SAccessGroupRule struct {
	apis.SStandaloneAnonResourceBase
	apis.SStatusResourceBase
	SAccessGroupResourceBase
	// 云上Id, 对应云上资源自身Id
	ExternalId     string `json:"external_id"`
	Priority       int    `json:"priority"`
	Source         string `json:"source"`
	RWAccessType   string `json:"rw_access_type"`
	UserAccessType string `json:"user_access_type"`
}

SAccessGroupRule is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SAccessGroupRule.

type SAccountPermission

type SAccountPermission struct {
	Permissions []string
}

type SAccountPermissions

type SAccountPermissions map[string]SAccountPermission

func (SAccountPermissions) IsZero

func (s SAccountPermissions) IsZero() bool

func (SAccountPermissions) String

func (s SAccountPermissions) String() string

type SAccountUsage

type SAccountUsage struct {
	// 弹性公网Ip数量
	// example: 2
	EipCount int `json:"eip_count,allowempty"`

	// 虚拟私有网络数量
	// example: 4
	VpcCount int `json:"vpc_count,allowempty"`

	// 云盘数量
	// example: 12
	DiskCount int `json:"disk_count,allowempty"`

	// 宿主机数量(不计算虚拟机宿主机数量)
	// example: 0
	HostCount int `json:"host_count,allowempty"`

	// 云主机数量
	// example: 4
	GuestCount int `json:"guest_count,allowempty"`

	// 块存储数量
	// example: 12
	StorageCount int `json:"storage_count,allowempty"`

	// 子订阅数量
	// example: 1
	ProviderCount int `json:"provider_count,allowempty"`

	// 启用的子订阅数量
	// example: 1
	EnabledProviderCount int `json:"enabled_provider_count,allowempty"`

	// 路由表数量
	// example: 0
	RoutetableCount int `json:"routetable_count,allowempty"`

	// 存储缓存数量
	// example: 10
	StoragecacheCount int `json:"storagecache_count,allowempty"`

	// 并发同步数量
	SyncCount int `json:"sync_count,allowempty"`
}

type SAclEntries

type SAclEntries []SAclEntry

func (SAclEntries) IsZero

func (self SAclEntries) IsZero() bool

func (SAclEntries) String

func (self SAclEntries) String() string

type SAclEntry

type SAclEntry struct {
	Cidr    string
	Comment string
}

func (*SAclEntry) Validate

func (aclEntry *SAclEntry) Validate() error

type SApp

type SApp struct {
	apis.SVirtualResourceBase
	apis.SExternalizedResourceBase
	apis.SEnabledResourceBase
	SManagedResourceBase
	SCloudregionResourceBase
	SNetworkResourceBase
	TechStack           string `json:"tech_stack"`
	OsType              string `json:"os_type"`
	IpAddr              string `json:"ip_addr"`
	Hostname            string `json:"hostname"`
	ServerFarm          string `json:"server_farm"`
	PublicNetworkAccess string `json:"public_network_access"`
}

SApp is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SApp.

type SAppEnvironment

type SAppEnvironment struct {
	apis.SVirtualResourceBase
	apis.SExternalizedResourceBase
	AppId string `json:"app_id"`
}

SAppEnvironment is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SAppEnvironment.

type SBackupDiskConfig

type SBackupDiskConfig struct {
	DiskConfig
	Name        string                `json:"name"`
	BackupAsTar *DiskBackupAsTarInput `json:"backup_as_tar"`
}

SBackupDiskConfig is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SBackupDiskConfig.

type SBackupStorage

type SBackupStorage struct {
	apis.SEnabledStatusInfrasResourceBase
	AccessInfo  *SBackupStorageAccessInfo `json:"access_info"`
	StorageType string                    `json:"storage_type"`
	CapacityMb  int                       `json:"capacity_mb"`
}

SBackupStorage is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SBackupStorage.

type SBackupStorageAccessInfo

type SBackupStorageAccessInfo struct {
	// description: host of nfs, storage_type 为 nfs 时, 此参数必传
	// example: 192.168.222.2
	NfsHost string `json:"nfs_host"`

	// description: shared dir of nfs, storage_type 为 nfs 时, 此参数必传
	// example: /nfs_root/
	NfsSharedDir string `json:"nfs_shared_dir"`

	// description: access url of object storage bucket
	// example: https://qxxxxxo.tos-cn-beijing.volces.com
	ObjectBucketUrl string `json:"object_bucket_url"`
	// description: access key of object storage
	ObjectAccessKey string `json:"object_access_key"`
	// description: secret of object storage
	ObjectSecret string `json:"object_secret"`
}

func (*SBackupStorageAccessInfo) IsZero

func (ba *SBackupStorageAccessInfo) IsZero() bool

func (*SBackupStorageAccessInfo) String

func (ba *SBackupStorageAccessInfo) String() string

type SBaremetalagent

type SBaremetalagent struct {
	apis.SStandaloneResourceBase
	SZoneResourceBase
	Status            string `json:"status"`
	AccessIp          string `json:"access_ip"`
	ManagerUri        string `json:"manager_uri"`
	AgentType         string `json:"agent_type"`
	Version           string `json:"version"`
	StoragecacheId    string `json:"storagecache_id"`
	DisableImageCache bool   `json:"disable_image_cache"`
}

SBaremetalagent is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SBaremetalagent.

type SBillingResourceBase

type SBillingResourceBase struct {
	// 计费类型, 按量、包年包月
	// example: postpaid
	BillingType string `json:"billing_type"`
	// 过期时间
	ExpiredAt time.Time `json:"expired_at"`
	// 计费周期
	BillingCycle string `json:"billing_cycle"`
	// 是否自动续费
	AutoRenew bool `json:"auto_renew"`
}

SBillingResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SBillingResourceBase.

type SBillingResourceCheck

type SBillingResourceCheck struct {
	apis.SResourceBase
	ResourceId   string `json:"resource_id"`
	ResourceType string `json:"resource_type"`
	AdvanceDays  int    `json:"advance_days"`
	NotifyNumber int    `json:"notify_number"`
}

SBillingResourceCheck is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SBillingResourceCheck.

type SBucket

type SBucket struct {
	apis.SSharableVirtualResourceBase
	apis.SExternalizedResourceBase
	SCloudregionResourceBase
	SManagedResourceBase
	StorageClass   string               `json:"storage_class"`
	Location       string               `json:"location"`
	Acl            string               `json:"acl"`
	SizeBytes      int64                `json:"size_bytes"`
	ObjectCnt      int                  `json:"object_cnt"`
	SizeBytesLimit int64                `json:"size_bytes_limit"`
	ObjectCntLimit int                  `json:"object_cnt_limit"`
	AccessUrls     jsonutils.JSONObject `json:"access_urls"`
}

SBucket is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SBucket.

type SCDNDomain

type SCDNDomain struct {
	apis.SVirtualResourceBase
	apis.SEnabledResourceBase
	apis.SExternalizedResourceBase
	SDeletePreventableResourceBase
	SManagedResourceBase
	Cname string `json:"cname"`
	// 源站信息
	Origins *cloudprovider.SCdnOrigins `json:"origins"`
	// 服务类别
	ServiceType string `json:"service_type"`
	// 加速区域
	Area string `json:"area"`
	// 是否忽略参数
	CacheKeys *cloudprovider.SCDNCacheKeys `json:"cache_keys"`
	// 是否分片回源
	RangeOriginPull *cloudprovider.SCDNRangeOriginPull `json:"range_origin_pull"`
	// 缓存配置
	Cache *cloudprovider.SCDNCache `json:"cache"`
	// https配置
	HTTPS *cloudprovider.SCDNHttps `json:"https"`
	// 强制跳转
	ForceRedirect *cloudprovider.SCDNForceRedirect `json:"force_redirect"`
	// 防盗链配置
	Referer *cloudprovider.SCDNReferer `json:"referer"`
	// 浏览器缓存配置
	MaxAge *cloudprovider.SCDNMaxAge `json:"max_age"`
}

SCDNDomain is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SCDNDomain.

type SCachedimage

type SCachedimage struct {
	apis.SSharableVirtualResourceBase
	apis.SExternalizedResourceBase
	// 镜像大小单位: Byte
	// example: 53687091200
	Size int64 `json:"size"`
	// 镜像详情信息
	// example: {"deleted":false,"disk_format":"qcow2","id":"img-a6uucnfl","is_public":true,"min_disk":51200,"min_ram":0,"name":"FreeBSD 11.1 64bit","properties":{"os_arch":"x86_64","os_distribution":"FreeBSD","os_type":"FreeBSD","os_version":"11"},"protected":true,"size":53687091200,"status":"active"}
	Info jsonutils.JSONObject `json:"info"`
	// 上此同步时间
	// example: 2020-01-17T05:28:54.000000Z
	LastSync time.Time `json:"last_sync"`
	// 最近一次缓存引用时间
	// 2020-01-17T05:20:54.000000Z
	LastRef time.Time `json:"last_ref"`
	// 引用次数
	// example: 0
	RefCount int `json:"ref_count"`
	// 是否支持UEFI
	// example: false
	UEFI *bool `json:"uefi,omitempty"`
	// 镜像类型, system: 公有云镜像, customized: 自定义镜像
	// example: system
	ImageType string `json:"image_type"`
}

SCachedimage is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SCachedimage.

type SCloudaccount

type SCloudaccount struct {
	apis.SEnabledStatusInfrasResourceBase
	SSyncableBaseResource
	// 项目Id
	ProjectId string `json:"tenant_id"`
	// 云环境连接地址
	AccessUrl string `json:"access_url"`
	// 云账号
	Account string `json:"account"`
	// 云账号密码
	Secret string `json:"secret"`
	// 云环境唯一标识
	AccountId string `json:"account_id"`
	// 是否是公有云账号
	// example: true
	IsPublicCloud *bool `json:"is_public_cloud,omitempty"`
	// 是否是本地IDC账号
	// example: false
	IsOnPremise bool `json:"is_on_premise"`
	// 云平台类型
	// example: google
	Provider string `json:"provider"`
	// 账户余额
	// example: 124.2
	Balance float64 `json:"balance"`
	// 账户余额货币类型
	// enmu: CNY, USD
	Currency string `json:"currency"`
	// 上次账号探测时间
	ProbeAt time.Time `json:"probe_at"`
	// 账号健康状态
	// example: normal
	HealthStatus string `json:"health_status"`
	// 账号探测异常错误次数
	ErrorCount int `json:"error_count"`
	// 是否根据云上项目自动在本地创建对应项目
	// example: false
	AutoCreateProject bool `json:"auto_create_project"`
	// 是否根据云订阅自动在本地创建对应项目
	// example: false
	AutoCreateProjectForProvider bool `json:"auto_create_project_for_provider"`
	// 云API版本
	Version string `json:"version"`
	// 云系统信息
	Sysinfo jsonutils.JSONObject `json:"sysinfo"`
	// 品牌信息, 一般和provider相同
	// example: DStack
	Brand string `json:"brand"`
	// 额外信息
	Options *jsonutils.JSONDict `json:"options"`
	// for backward compatiblity, keep is_public field, but not usable
	// IsPublic bool `default:"false" nullable:"false"`
	// add share_mode field to indicate the share range of this account
	ShareMode string `json:"share_mode"`
	// 默认值proxyapi.ProxySettingId_DIRECT
	ProxySettingId string `json:"proxy_setting_id"`
	// 公有云子账号登录地址
	IamLoginUrl string `json:"iam_login_url"`
	SAMLAuth    *bool  `json:"saml_auth,omitempty"`
	SProjectMappingResourceBase
	ReadOnly bool `json:"read_only"`
	// 设置允许同步的账号及订阅
	SubAccounts *cloudprovider.SubAccounts `json:"sub_accounts"`
	// 缺失的权限,云账号操作资源时自动更新
	LakeOfPermissions *SAccountPermissions `json:"lake_of_permissions"`
	// 跳过部分资源同步
	SkipSyncResources      *SkipSyncResources `json:"skip_sync_resources"`
	EnableAutoSyncResource *bool              `json:"enable_auto_sync_resource,omitempty"`
	// 云平台默认区域id
	RegionId string `json:"region_id"`
}

SCloudaccount is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SCloudaccount.

type SCloudprovider

type SCloudprovider struct {
	apis.SEnabledStatusStandaloneResourceBase
	apis.SProjectizedResourceBase
	apis.SExternalizedResourceBase
	SSyncableBaseResource
	// 云端服务健康状态。例如欠费、项目冻结都属于不健康状态。
	// | HealthStatus  | 说明                 |
	// |---------------|----------------------|
	// | normal        | 远端处于健康状态     |
	// | insufficient  | 不足按需资源余额     |
	// | suspended     | 远端处于冻结状态     |
	// | arrears       | 远端处于欠费状态     |
	// | unknown       | 未知状态,查询失败   |
	// | no permission | 没有权限获取账单信息 |
	HealthStatus string `json:"health_status"`
	AccessUrl    string `json:"access_url"`
	// 云账号的用户信息,例如用户名,access key等
	Account string `json:"account"`
	// 云账号的密码信息,例如密码,access key secret等。该字段在数据库加密存储。Google需要存储秘钥证书,需要此字段比较长
	Secret string `json:"secret"`
	// 归属云账号ID
	CloudaccountId string `json:"cloudaccount_id"`
	// 云账号的平台信息
	Provider string `json:"provider"`
	// 云上同步资源是否在本地被更改过配置, local: 更改过, cloud: 未更改过
	// example: local
	ProjectSrc string `json:"project_src"`
	SProjectMappingResourceBase
}

SCloudprovider is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SCloudprovider.

type SCloudproviderResourceBase

type SCloudproviderResourceBase struct {
	CloudproviderId string `json:"cloudprovider_id"`
}

SCloudproviderResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SCloudproviderResourceBase.

type SCloudproviderUsage

type SCloudproviderUsage struct {
	// 云主机数量
	// example: 1
	GuestCount int `json:"guest_count"`
	// 宿主机数量
	// example: 2
	HostCount int `json:"host_count"`
	// 虚拟私有网络数量
	// example: 4
	VpcCount int `json:"vpc_count"`
	// 块存储梳理
	// example: 4
	StorageCount int `json:"storage_count"`
	// 存储缓存数量
	// example: 1
	StorageCacheCount int `json:"storagecache_count"`
	// 弹性公网IP数量
	// example: 12
	EipCount int `json:"eip_count"`
	// 快照数量
	// example: 0
	SnapshotCount int `json:"snapshot_count"`
	// 负载均衡器数量
	// example: 2
	LoadbalancerCount int `json:"loadbalancer_count"`
	// 数据库实例数量
	// example: 2
	DBInstanceCount int `json:"dbinstance_count"`
	// 弹性缓存实例数量
	// example: 2
	ElasticcacheCount int `json:"elasticcache_count"`
	// 项目数量
	ProjectCount int `json:"project_count"`
	// 同步区域数量
	SyncRegionCount int `json:"sync_region_count"`
}

func (*SCloudproviderUsage) IsEmpty

func (usage *SCloudproviderUsage) IsEmpty() bool

type SCloudproviderregion

type SCloudproviderregion struct {
	apis.SJointResourceBase
	SSyncableBaseResource
	SCloudregionResourceBase
	// 云订阅ID
	CloudproviderId string `json:"cloudprovider_id"`
	Enabled         bool   `json:"enabled"`
	// SyncIntervalSeconds int `list:"domain"`
	SyncResults    jsonutils.JSONObject `json:"sync_results"`
	LastDeepSyncAt time.Time            `json:"last_deep_sync_at"`
	LastAutoSyncAt time.Time            `json:"last_auto_sync_at"`
}

SCloudproviderregion is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SCloudproviderregion.

type SCloudregion

type SCloudregion struct {
	apis.SEnabledStatusStandaloneResourceBase
	SI18nResourceBase
	apis.SExternalizedResourceBase
	cloudprovider.SGeographicInfo
	// 云环境
	// example: ChinaCloud
	Environment string `json:"environment"`
	// 云平台
	// example: Huawei
	Provider string `json:"provider"`
}

SCloudregion is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SCloudregion.

type SCloudregionPolicyDefinition

type SCloudregionPolicyDefinition struct {
	Id   string
	Name string
}

type SCloudregionPolicyDefinitions

type SCloudregionPolicyDefinitions struct {
	Cloudregions []SCloudregionPolicyDefinition
}

type SCloudregionResourceBase

type SCloudregionResourceBase struct {
	// 归属区域ID
	CloudregionId string `json:"cloudregion_id"`
}

SCloudregionResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SCloudregionResourceBase.

type SCloudregionUsage

type SCloudregionUsage struct {
	// 虚拟私有网络数量
	// example: 2
	VpcCount int `json:"vpc_count,allowempty"`
	// 可用区数量
	// example: 3
	ZoneCount int `json:"zone_count,allowempty"`
	// 云主机梳理
	// example: 2
	GuestCount int `json:"guest_count,allowempty"`
	// IP子网数量
	// example: 12
	NetworkCount int `json:"network_count,allowempty"`
	// 距离前天0点新增云主机数量
	// example: 0
	GuestIncrementCount int `json:"guest_increment_count,allowempty"`
}

type SContainer

type SContainer struct {
	apis.SVirtualResourceBase
	// GuestId is also the pod id
	GuestId string `json:"guest_id"`
	// Spec stores all container running options
	Spec *ContainerSpec `json:"spec"`
	// 启动时间
	StartedAt time.Time `json:"started_at"`
	// 上次退出时间
	LastFinishedAt time.Time `json:"last_finished_at"`
	// 重启次数
	RestartCount int `json:"restart_count"`
}

SContainer is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SContainer.

type SCpuNumaPin

type SCpuNumaPin struct {
	SizeMB *int `json:"size_mb"`
	NodeId int  `json:"node_id"`

	VcpuPin       []SVCpuPin `json:"vcpu_pin"`
	ExtraCpuCount int        `json:"extra_cpu_count"`
}

type SDBInstance

type SDBInstance struct {
	apis.SVirtualResourceBase
	apis.SExternalizedResourceBase
	SManagedResourceBase
	SBillingResourceBase
	SCloudregionResourceBase
	SDeletePreventableResourceBase
	// 主实例Id
	MasterInstanceId string `json:"master_instance_id"`
	// CPU数量
	// example: 1
	VcpuCount int `json:"vcpu_count"`
	// 内存大小
	// example: 1024
	VmemSizeMb int `json:"vmem_size_mb"`
	// 存储类型
	// example: local_ssd
	StorageType string `json:"storage_type"`
	// 存储大小
	// example: 10240
	DiskSizeGB int `json:"disk_size_gb"`
	// 已使用的存储大小
	DiskSizeUsedMB int `json:"disk_size_used_mb"`
	// 端口
	// example: 3306
	Port int `json:"port"`
	// 实例类型
	// example: ha
	Category string `json:"category"`
	// 最大连接数
	Iops int `json:"iops"`
	// 引擎
	// example: MySQL
	Engine string `json:"engine"`
	// 引擎版本
	// example: 5.7
	EngineVersion string `json:"engine_version"`
	// 套餐名称
	// example: mysql.x4.large.2c
	InstanceType string `json:"instance_type"`
	// 维护时间
	MaintainTime string `json:"maintain_time"`
	// 虚拟私有网络Id
	// example: ed20d84e-3158-41b1-870c-1725e412e8b6
	VpcId string `json:"vpc_id"`
	// 外部连接地址
	ConnectionStr string `json:"connection_str"`
	// 内部连接地址
	InternalConnectionStr string `json:"internal_connection_str"`
	// 可用区1
	Zone1 string `json:"zone1"`
	// 可用区2
	Zone2 string `json:"zone2"`
	// 可用区3
	Zone3 string `json:"zone3"`
	// 从备份创建新实例
	DBInstancebackupId string `json:"dbinstancebackup_id"`
}

SDBInstance is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDBInstance.

type SDBInstanceAccount

type SDBInstanceAccount struct {
	apis.SStatusStandaloneResourceBase
	Host string `json:"host"`
	SDBInstanceResourceBase
	// 数据库密码
	Secret string `json:"secret"`
}

SDBInstanceAccount is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDBInstanceAccount.

type SDBInstanceAccountPrivilege

type SDBInstanceAccountPrivilege struct {
	// 数据库名称或Id
	// required: true
	Database string `json:"database"`
	// swagger:ignore
	DBInstancedatabaseId string

	// 权限类型
	//
	//
	//
	// | 平台        |Rds引擎                |    支持类型           |
	// | ----        |-------                |    --------           |
	// | Aliyun      |MySQL, MariaBD         |    rw, r, ddl, dml    |
	// | Aliyun      |SQLServer              |    rw, r, owner       |
	// | Huawei      |MySQL, MariaDB         |    rw, r              |
	// 同一平台不同的rds类型支持的权限不尽相同
	// required: true
	Privilege string `json:"privilege"`
}

type SDBInstanceBackup

type SDBInstanceBackup struct {
	apis.SVirtualResourceBase
	SCloudregionResourceBase
	SManagedResourceBase
	apis.SExternalizedResourceBase
	SDBInstanceResourceBase
	// RDS引擎
	// example: MySQL
	Engine string `json:"engine"`
	// RDS引擎版本
	// example: 5.7
	EngineVersion string `json:"engine_version"`
	// 备份开始时间
	StartTime time.Time `json:"start_time"`
	// 备份结束时间
	EndTime time.Time `json:"end_time"`
	// 备份模式
	BackupMode string `json:"backup_mode"`
	// 备份数据库名称
	DBNames string `json:"db_names"`
	// 备份大小
	// example: 32
	BackupSizeMb int `json:"backup_size_mb"`
	// 备份方式 Logical|Physical
	BackupMethod string `json:"backup_method"`
}

SDBInstanceBackup is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDBInstanceBackup.

type SDBInstanceChangeConfigInput

type SDBInstanceChangeConfigInput struct {
	apis.Meta

	InstanceType string
	DiskSizeGB   int
}

type SDBInstanceDatabase

type SDBInstanceDatabase struct {
	apis.SStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	SDBInstanceResourceBase
	// 字符集
	// example: utf-8
	CharacterSet string `json:"character_set"`
}

SDBInstanceDatabase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDBInstanceDatabase.

type SDBInstanceDatabasePrivilege

type SDBInstanceDatabasePrivilege struct {
	// 数据库账号名称或Id
	// required: true
	Account string `json:"account"`
	// swagger:ignore
	DBInstanceaccountId string
	// 权限
	//
	//
	//
	// | 平台        |Rds引擎                |    支持类型    |
	// | ----        |-------                |    --------    |
	// | Aliyun      |MySQL, MariaBD         |    rw, r, ddl, dml    |
	// | Aliyun      |SQLServer              |    rw, r, owner    |
	// | Huawei      |MySQL, MariaDB         |    rw, r    |
	// 同一平台不同的rds类型支持的权限不尽相同
	// required: true
	Privilege string `json:"privilege"`
}

type SDBInstanceParameter

type SDBInstanceParameter struct {
	apis.SStandaloneResourceBase
	apis.SExternalizedResourceBase
	SDBInstanceResourceBase
	// 数据库参数名称
	Key string `json:"key"`
	// 数据库参数值
	Value string `json:"value"`
}

SDBInstanceParameter is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDBInstanceParameter.

type SDBInstancePrivilege

type SDBInstancePrivilege struct {
	apis.SResourceBase
	apis.SExternalizedResourceBase
	Id                   string `json:"id"`
	Privilege            string `json:"privilege"`
	DBInstanceaccountId  string `json:"dbinstanceaccount_id"`
	DBInstancedatabaseId string `json:"dbinstancedatabase_id"`
}

SDBInstancePrivilege is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDBInstancePrivilege.

type SDBInstanceRecoveryConfigInput

type SDBInstanceRecoveryConfigInput struct {
	apis.Meta

	// swagger:ignore
	DBInstancebackup string `json:"dbinstancebackup" yunion-deprecated-by:"dbinstancebackup_id"`

	// 备份Id
	//
	//
	// | 平台        | 支持引擎                                | 说明        |
	// | -----        | ------                                | ---        |
	// | 华为云        |MySQL, SQL Server                        | 仅SQL Server支持恢复到当前实例            |
	// | 阿里云        |MySQL, SQL Server                        | MySQL要求必须开启单库单表恢复功能 并且只能是MySQL 8.0 高可用版(本地SSD盘)MySQL 5.7 高可用版(本地SSD盘)或MySQL 5.6 高可用版, MySQL仅支持恢复到当前实例|
	// | Google        |MySQL, PostgreSQL, SQL Server            | PostgreSQL备份恢复时,要求实例不能有副本            |
	DBInstancebackupId string `json:"dbinstancebackup_id"`

	// 数据库信息, 例如 {"src":"dest"} 是将备份中的src数据库恢复到目标实例的dest数据库中, 阿里云此参数为必传
	// example: {"sdb1":"ddb1"}
	Databases map[string]string `json:"databases,allowempty"`
}

type SDBInstanceResourceBase

type SDBInstanceResourceBase struct {
	DBInstanceId string `json:"dbinstance_id"`
}

SDBInstanceResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDBInstanceResourceBase.

type SDBInstanceSetPrivilegesInput

type SDBInstanceSetPrivilegesInput struct {
	Privileges []SDBInstanceAccountPrivilege `json:"privileges"`
}

type SDBInstanceSku

type SDBInstanceSku struct {
	apis.SEnabledStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	SCloudregionResourceBase
	Provider     string `json:"provider"`
	StorageType  string `json:"storage_type"`
	DiskSizeStep int    `json:"disk_size_step"`
	// 步长
	MaxDiskSizeGb  int    `json:"max_disk_size_gb"`
	MinDiskSizeGb  int    `json:"min_disk_size_gb"`
	IOPS           int    `json:"iops"`
	TPS            int    `json:"tps"`
	QPS            int    `json:"qps"`
	MaxConnections int    `json:"max_connections"`
	VcpuCount      int    `json:"vcpu_count"`
	VmemSizeMb     int    `json:"vmem_size_mb"`
	Category       string `json:"category"`
	Engine         string `json:"engine"`
	EngineVersion  string `json:"engine_version"`
	Zone1          string `json:"zone1"`
	Zone2          string `json:"zone2"`
	Zone3          string `json:"zone3"`
	ZoneId         string `json:"zone_id"`
	MultiAZ        *bool  `json:"multi_az,omitempty"`
}

SDBInstanceSku is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDBInstanceSku.

type SDeletePreventableResourceBase

type SDeletePreventableResourceBase struct {
	// 是否开启删除保护
	// example: true
	DisableDelete *bool `json:"disable_delete,omitempty"`
}

SDeletePreventableResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDeletePreventableResourceBase.

type SDisk

type SDisk struct {
	apis.SVirtualResourceBase
	apis.SExternalizedResourceBase
	SBillingResourceBase
	SStorageResourceBase
	apis.SMultiArchResourceBase
	apis.SAutoDeleteResourceBase
	apis.SEncryptedResource
	// 磁盘存储类型
	// example: qcow2
	DiskFormat string `json:"disk_format"`
	// 磁盘大小, 单位Mb
	// example: 10240
	DiskSize int `json:"disk_size"`
	// 磁盘路径
	AccessPath string `json:"access_path"`
	// 备份磁盘实例的存储ID
	BackupStorageId string `json:"backup_storage_id"`
	// 镜像Id
	TemplateId string `json:"template_id"`
	// 快照Id
	SnapshotId string `json:"snapshot_id"`
	// 备份Id
	BackupId string `json:"backup_id"`
	// 文件系统
	FsFormat string `json:"fs_format"`
	// 文件系统特性
	FsFeatures *DiskFsFeatures `json:"fs_features"`
	// 磁盘类型
	// sys: 系统盘
	// data: 数据盘
	// swap: 交换盘
	// example: sys
	DiskType string `json:"disk_type"`
	// 预分配策略
	// off: 关闭预分配,默认关闭
	// metadata: 精简制备
	// falloc: 厚制制备延迟置零
	// full: 厚制备快速置零
	Preallocation string `json:"preallocation"`
	// # is persistent
	Nonpersistent bool `json:"nonpersistent"`
	// 是否标记为SSD磁盘
	IsSsd bool `json:"is_ssd"`
	// 最大连接数
	Iops int `json:"iops"`
	// 磁盘吞吐量
	Throughput int `json:"throughput"`
}

SDisk is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDisk.

type SDiskBackup

type SDiskBackup struct {
	apis.SVirtualResourceBase
	SManagedResourceBase
	SCloudregionResourceBase
	apis.SMultiArchResourceBase
	apis.SEncryptedResource
	DiskId          string `json:"disk_id"`
	BackupStorageId string `json:"backup_storage_id"`
	StorageId       string `json:"storage_id"`
	// 备份大小
	SizeMb     int    `json:"size_mb"`
	DiskSizeMb int    `json:"disk_size_mb"`
	DiskType   string `json:"disk_type"`
	// 操作系统类型
	OsType     string             `json:"os_type"`
	DiskConfig *SBackupDiskConfig `json:"disk_config"`
}

SDiskBackup is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDiskBackup.

type SDiskResourceBase

type SDiskResourceBase struct {
	DiskId string `json:"disk_id"`
}

SDiskResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDiskResourceBase.

type SDnsRecord

type SDnsRecord struct {
	apis.SEnabledStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	SDnsZoneResourceBase
	DnsType    string `json:"dns_type"`
	DnsValue   string `json:"dns_value"`
	TTL        int64  `json:"ttl"`
	MxPriority int64  `json:"mx_priority"`
	// 解析线路类型
	PolicyType string `json:"policy_type"`
	// 解析线路
	PolicyValue string `json:"policy_value"`
	// 目前存储阿里云GTM设置地址及AWS TrafficPolicy端点地址, 仅支持同步
	ExtraAddresses []string `json:"extra_addresses"`
}

SDnsRecord is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDnsRecord.

func (*SDnsRecord) ValidateDnsrecordValue

func (record *SDnsRecord) ValidateDnsrecordValue() error

type SDnsResolveResult

type SDnsResolveResult struct {
	DnsValue string `json:"dns_value"`
	TTL      int64  `json:"ttl"`
	DnsName  string `json:"dns_name"`
}

type SDnsZone

type SDnsZone struct {
	apis.SSharableVirtualResourceBase
	apis.SEnabledResourceBase
	apis.SExternalizedResourceBase
	SManagedResourceBase
	ZoneType    string `json:"zone_type"`
	ProductType string `json:"product_type"`
}

SDnsZone is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDnsZone.

type SDnsZoneResourceBase

type SDnsZoneResourceBase struct {
	DnsZoneId string `json:"dns_zone_id"`
}

SDnsZoneResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDnsZoneResourceBase.

type SDynamicschedtag

type SDynamicschedtag struct {
	apis.SStandaloneResourceBase
	SSchedtagResourceBase
	// 动态调度标间的匹配条件
	// example: host.sys_load > 1.5 || host.mem_used_percent > 0.7 => "high_load"
	Condition string `json:"condition"`
	Enabled   *bool  `json:"enabled,omitempty"`
}

SDynamicschedtag is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SDynamicschedtag.

type SElasticSearch

type SElasticSearch struct {
	apis.SVirtualResourceBase
	apis.SExternalizedResourceBase
	SManagedResourceBase
	SBillingResourceBase
	SCloudregionResourceBase
	SDeletePreventableResourceBase
	// 版本
	Version string `json:"version"`
	// 套餐名称
	// example: elasticsearch.sn2ne.xlarge
	InstanceType string `json:"instance_type"`
	// CPU数量
	// example: 1
	VcpuCount int `json:"vcpu_count"`
	// 内存大小
	// example: 1024
	VmemSizeGb int `json:"vmem_size_gb"`
	// 存储类型
	// example: local_ssd
	StorageType string `json:"storage_type"`
	// 存储大小
	// example: 1024
	DiskSizeGb int `json:"disk_size_gb"`
	// 实例类型
	// example: ha
	Category  string `json:"category"`
	VpcId     string `json:"vpc_id"`
	NetworkId string `json:"network_id"`
	// 可用区Id
	ZoneId string `json:"zone_id"`
	// 是否是多可用区部署
	IsMultiAz bool `json:"is_multi_az"`
}

SElasticSearch is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SElasticSearch.

type SElasticcache

type SElasticcache struct {
	apis.SVirtualResourceBase
	apis.SExternalizedResourceBase
	SCloudregionResourceBase
	SManagedResourceBase
	SBillingResourceBase
	SDeletePreventableResourceBase
	SZoneResourceBase
	VpcId string `json:"vpc_id"`
	// 备可用区
	SlaveZones string `json:"slave_zones"`
	// 实例规格
	// example: redis.master.micro.default
	InstanceType string `json:"instance_type"`
	// 容量
	// example: 1024
	CapacityMB int `json:"capacity_mb"`
	// 对应Sku
	LocalCategory string `json:"local_category"`
	// 类型
	// single(单副本) | double(双副本) | readone (单可读) | readthree (3可读) | readfive(5只读)
	NodeType string `json:"node_type"`
	// 后端存储引擎
	// Redis | Memcache
	// example: redis
	Engine string `json:"engine"`
	// 后端存储引擎版本
	// example: 4.0
	EngineVersion string `json:"engine_version"`
	// 网络类型, CLASSIC(经典网络)  VPC(专有网络)
	// example: CLASSIC
	NetworkType string `json:"network_type"`
	// 所属网络ID
	NetworkId string `json:"network_id"`
	// 带宽
	Bandwidth int `json:"bandwidth"`
	// 内网DNS
	PrivateDNS string `json:"private_dns"`
	// 内网IP地址
	PrivateIpAddr string `json:"private_ip_addr"`
	// 内网访问端口
	PrivateConnectPort int `json:"private_connect_port"`
	// 公网DNS
	PublicDNS string `json:"public_dns"`
	// 公网IP地址
	PublicIpAddr string `json:"public_ip_addr"`
	// 外网访问端口
	PublicConnectPort int `json:"public_connect_port"`
	// 维护开始时间,格式为HH:mmZ
	// example: 02:00Z
	MaintainStartTime string `json:"maintain_start_time"`
	// 维护结束时间
	MaintainEndTime string `json:"maintain_end_time"`
	// 访问密码? on (开启密码)|off (免密码访问)
	AuthMode string `json:"auth_mode"`
	// 最大连接数
	Connections int `json:"connections"`
}

SElasticcache is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SElasticcache.

type SElasticcacheAccount

type SElasticcacheAccount struct {
	apis.SStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	SElasticcacheResourceBase
	AccountType string `json:"account_type"`
	// 账号类型 normal |admin
	AccountPrivilege string `json:"account_privilege"`
	// 账号权限 read | write | repl(复制, 复制权限支持读写,且开放SYNC/PSYNC命令)
	Password string `json:"password"`
}

SElasticcacheAccount is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SElasticcacheAccount.

type SElasticcacheAcl

type SElasticcacheAcl struct {
	apis.SStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	SElasticcacheResourceBase
	// Ip地址白名单列表
	IpList string `json:"ip_list"`
}

SElasticcacheAcl is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SElasticcacheAcl.

type SElasticcacheBackup

type SElasticcacheBackup struct {
	apis.SStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	SElasticcacheResourceBase
	// 备份大小
	BackupSizeMb int `json:"backup_size_mb"`
	// 备份类型, 全量|增量额
	BackupType string `json:"backup_type"`
	// 备份模式,自动|手动
	BackupMode string `json:"backup_mode"`
	// 下载地址
	DownloadURL string `json:"download_url"`
	// 开始备份时间
	StartTime time.Time `json:"start_time"`
	// 结束备份时间
	EndTime time.Time `json:"end_time"`
}

SElasticcacheBackup is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SElasticcacheBackup.

type SElasticcacheJointsBase

type SElasticcacheJointsBase struct {
	apis.SVirtualJointResourceBase
	SElasticcacheResourceBase
}

SElasticcacheJointsBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SElasticcacheJointsBase.

type SElasticcacheParameter

type SElasticcacheParameter struct {
	apis.SStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	SElasticcacheResourceBase
	// Parameter KEY
	Key string `json:"key"`
	// Parameter Value
	Value string `json:"value"`
	// 校验代码,参数的可选范围。
	ValueRange string `json:"value_range"`
	// True(可修改)   False(不可修改)
	Modifiable bool `json:"modifiable"`
	// True(重启生效) False(无需重启,提交后即生效)
	ForceRestart bool `json:"force_restart"`
}

SElasticcacheParameter is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SElasticcacheParameter.

type SElasticcacheResourceBase

type SElasticcacheResourceBase struct {
	// 弹性缓存ID
	ElasticcacheId string `json:"elasticcache_id"`
}

SElasticcacheResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SElasticcacheResourceBase.

type SElasticcacheSku

type SElasticcacheSku struct {
	apis.SStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	SCloudregionResourceBase
	// 区域
	SZoneResourceBase
	SlaveZoneId    string `json:"slave_zone_id"`
	InstanceSpec   string `json:"instance_spec"`
	EngineArch     string `json:"engine_arch"`
	LocalCategory  string `json:"local_category"`
	PrepaidStatus  string `json:"prepaid_status"`
	PostpaidStatus string `json:"postpaid_status"`
	// 引擎	redis|memcached
	Engine string `json:"engine"`
	// 引擎版本	3.0
	EngineVersion string `json:"engine_version"`
	// CPU 架构 x86|ARM
	CpuArch string `json:"cpu_arch"`
	// 存储类型	DRAM|SCM
	StorageType string `json:"storage_type"`
	// standrad|enhanced
	PerformanceType string `json:"performance_type"`
	// single(单副本) | double(双副本) | readone (单可读) | readthree (3可读) | readfive(5只读)
	NodeType string `json:"node_type"`
	// 内存容量
	MemorySizeMB int `json:"memory_size_mb"`
	// 套餐附带硬盘容量
	DiskSizeGB int `json:"disk_size_gb"`
	// 最小分片数量
	ShardNum int `json:"shard_num"`
	// 最大分片数量
	MaxShardNum int `json:"max_shard_num"`
	// 最小副本数量
	ReplicasNum int `json:"replicas_num"`
	// 最大副本数量
	MaxReplicasNum int `json:"max_replicas_num"`
	// 最大客户端数
	MaxClients int `json:"max_clients"`
	// 最大连接数
	MaxConnections int `json:"max_connections"`
	// 最大内网带宽
	MaxInBandwidthMb int `json:"max_in_bandwidth_mb"`
	// 实际可使用的最大内存
	MaxMemoryMB int `json:"max_memory_mb"`
	// QPS参考值
	QPS int `json:"qps"`
	// 公有云厂商	Aliyun/Azure/AWS/Qcloud/...
	Provider string `json:"provider"`
}

SElasticcacheSku is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SElasticcacheSku.

type SElasticcachesecgroup

type SElasticcachesecgroup struct {
	SElasticcacheJointsBase
	SSecurityGroupResourceBase
}

SElasticcachesecgroup is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SElasticcachesecgroup.

type SElasticip

type SElasticip struct {
	apis.SVirtualResourceBase
	apis.SExternalizedResourceBase
	SManagedResourceBase
	SCloudregionResourceBase
	SBillingResourceBase
	// IP子网Id, 仅私有云不为空
	NetworkId string `json:"network_id"`
	// 标识弹性或非弹性
	// | Mode       | 说明       |
	// |------------|------------|
	// | public_ip  | 公网IP     |
	// | elastic_ip | 弹性公网IP |
	// example: elastic_ip
	Mode string `json:"mode"`
	// IP地址
	IpAddr string `json:"ip_addr"`
	// 绑定资源类型
	AssociateType string `json:"associate_type"`
	// 绑定资源Id
	AssociateId string `json:"associate_id"`
	// 带宽大小
	Bandwidth int `json:"bandwidth"`
	// 计费类型: 流量、带宽
	// example: bandwidth
	ChargeType string `json:"charge_type"`
	// 线路类型
	BgpType string `json:"bgp_type"`
	// 是否跟随主机删除而自动释放
	AutoDellocate *bool `json:"auto_dellocate,omitempty"`
}

SElasticip is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SElasticip.

type SElasticipCreateInput

type SElasticipCreateInput struct {
	apis.VirtualResourceCreateInput

	// 区域名称或Id, 建议使用Id
	// 在指定区域内创建弹性公网ip
	CloudregionId string `json:"cloudregion_id"`
	// swagger:ignore
	Cloudregion string `json:"cloudregion" yunion-deprecated-by:"cloudregion_id"`
	// swagger:ignore
	Region string `json:"region" yunion-deprecated-by:"cloudregion_id"`
	// swagger:ignore
	RegionId string `json:"region_id" yunion-deprecated-by:"cloudregion_id"`

	// swagger:ignore
	Cloudprovider string `json:"cloudprovider" yunion-deprecated-by:"manager_id"`
	// swagger:ignore
	Manager string `json:"manager" yunion-deprecated-by:"manager_id"`
	// 子订阅Id, 建议使用Id
	// 使用指定子订阅创建弹性公网ip
	// 弹性公网ip和虚拟机在同一区域同一子订阅底下,才可以进行绑定操作
	ManagerId string `json:"manager_id"`

	// 计费类型: 流量或带宽
	//
	//
	//
	// | 平台       |    支持类型            |
	// | ---        |    --------            |
	// |Aliyun      | traffic, bandwidth    |
	// |腾讯云      | traffic                |
	// |Azure       | traffic                |
	// |Google      | traffic, bandwidth    |
	// |Ucloud      | traffic                |
	// |Aws         | traffic                |
	// |华为云      | traffic, bandwidth    |
	// |天翼云      | traffic, bandwidth    |
	// |KVM         | 不支持创建            |
	// |VMware      | 不支持创建            |
	// |ZStack      | traffic                |
	// |OpenStack   | traffic                |
	// default: traffic
	// enum: ["traffic", "bandwidth"]
	ChargeType string `json:"charge_type"`

	Mode string `json:"mode"`

	// swagger:ignore
	Network string `json:"network" yunion-deprecated-by:"network_id"`
	// 子网Id
	// 私有云创建此参数必传,例如Openstack, ZStack
	NetworkId string `json:"network_id"`
	// 指定新建EIP的地址
	IpAddr string `json:"ip_addr"`

	// 线路类型
	//
	//
	//
	// | 平台       |    支持类型            |  说明 |
	// | ---        |    --------            | ---   |
	// |Aliyun      | BGP, BGP_PRO(精品线路)           | 部分区域不支持BGP_PRO|
	// default: BGP
	BgpType string `json:"bgp_type"`

	BandwidthMb int `json:"bandwidth"`
}

type SExternalProject

type SExternalProject struct {
	apis.SVirtualResourceBase
	apis.SExternalizedResourceBase
	SManagedResourceBase
	// 优先级,同一个本地项目映射多个云上项目,优先级高的优先选择
	// 数值越高,优先级越大
	Priority int `json:"priority"`
	// swagger: ignore
	// 将在3.12之后版本移除
	CloudaccountId string `json:"cloudaccount_id"`
}

SExternalProject is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SExternalProject.

type SFileSystem

type SFileSystem struct {
	apis.SSharableVirtualResourceBase
	apis.SExternalizedResourceBase
	SManagedResourceBase
	SBillingResourceBase
	SCloudregionResourceBase
	SZoneResourceBase
	SDeletePreventableResourceBase
	// 文件系统类型
	// enmu: extreme, standard, cpfs
	FileSystemType string `json:"file_system_type"`
	// 存储类型
	// enmu: performance, capacity, standard, advance, advance_100, advance_200
	StorageType string `json:"storage_type"`
	// 协议类型
	// enum: ["NFS", "SMB", "cpfs"]
	Protocol string `json:"protocol"`
	// 容量, 单位Gb
	Capacity int64 `json:"capacity"`
	// 已使用容量, 单位Gb
	UsedCapacity int64 `json:"used_capacity"`
	// 最多支持挂载点数量, -1代表无限制
	MountTargetCountLimit int `json:"mount_target_count_limit"`
}

SFileSystem is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SFileSystem.

type SGMapItem

type SGMapItem struct {
	SGDeviceName    string
	HostNumber      int
	Bus             int
	SCSIId          int
	Lun             int
	Type            int
	LinuxDeviceName string
}

type SGPerformDetachScalingGroupInput

type SGPerformDetachScalingGroupInput struct {
	// description: 伸缩组 Id or Name
	// example: sg-1234
	ScalingGroup string `json:"scaling_group"`

	// description: 是否删除机器
	// example: false
	DeleteServer bool `json:"delete_server"`

	// description: 自动行为
	// example: true
	Auto bool `json:"auto"`
}

type SGlobalVpc

SGlobalVpc is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGlobalVpc.

type SGlobalVpcResourceBase

type SGlobalVpcResourceBase struct {
	GlobalvpcId string `json:"globalvpc_id"`
}

SGlobalVpcResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGlobalVpcResourceBase.

type SGroup

type SGroup struct {
	apis.SVirtualResourceBase
	SZoneResourceBase
	apis.SEnabledResourceBase
	// 服务类型
	ServiceType string `json:"service_type"`
	ParentId    string `json:"parent_id"`
	// 调度策略
	SchedStrategy string `json:"sched_strategy"`
	// the upper limit number of guests with this group in a host
	Granularity     int   `json:"granularity"`
	ForceDispersion *bool `json:"force_dispersion,omitempty"`
}

SGroup is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGroup.

type SGroupJointsBase

type SGroupJointsBase struct {
	apis.SVirtualJointResourceBase
	GroupId string `json:"group_id"`
}

SGroupJointsBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGroupJointsBase.

type SGroupResourceBase

type SGroupResourceBase struct {
	// 实例组ID
	GroupId string `json:"group_id"`
}

SGroupResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGroupResourceBase.

type SGroupguest

type SGroupguest struct {
	SGroupJointsBase
	Tag         string `json:"tag"`
	GuestId     string `json:"guest_id"`
	GuestStatus string `json:"guest_status"`
}

SGroupguest is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGroupguest.

type SGroupnetwork

type SGroupnetwork struct {
	SGroupJointsBase
	NetworkId string `json:"network_id"`
	// IPv4地址
	IpAddr string `json:"ip_addr"`
	// IPv6地址
	Ip6Addr string `json:"ip6_addr"`
	Index   byte   `json:"index"`
	EipId   string `json:"eip_id"`
}

SGroupnetwork is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGroupnetwork.

type SGuest

type SGuest struct {
	apis.SVirtualResourceBase
	apis.SExternalizedResourceBase
	SBillingResourceBase
	SDeletePreventableResourceBase
	apis.SMultiArchResourceBase
	apis.SRecordChecksumResourceBase
	SHostnameResourceBase
	SHostResourceBase
	apis.SEncryptedResource
	// CPU插槽(socket)的数量
	CpuSockets int `json:"cpu_sockets"`
	// CPU核(core)的数量, VcpuCount = CpuSockets * (cores per socket),例如 2颗CPU,每颗CPU8核,则 VcpuCount=2*8=16
	VcpuCount int `json:"vcpu_count"`
	// 内存大小, 单位MB
	VmemSize int `json:"vmem_size"`
	// CPU 内存绑定信息
	CpuNumaPin jsonutils.JSONObject `json:"cpu_numa_pin"`
	// 启动顺序
	BootOrder string `json:"boot_order"`
	// 关机操作类型
	// example: stop
	ShutdownBehavior string `json:"shutdown_behavior"`
	// 关机收费模式
	// example: keep_charging, stop_charging
	ShutdownMode string `json:"shutdown_mode"`
	// 秘钥对Id
	KeypairId string `json:"keypair_id"`
	// 备份机所在宿主机Id
	BackupHostId      string `json:"backup_host_id"`
	BackupGuestStatus string `json:"backup_guest_status"`
	// 迁移或克隆的速度
	ProgressMbps float64 `json:"progress_mbps"`
	Vga          string  `json:"vga"`
	Vdi          string  `json:"vdi"`
	Machine      string  `json:"machine"`
	Bios         string  `json:"bios"`
	// 操作系统类型
	OsType   string `json:"os_type"`
	FlavorId string `json:"flavor_id"`
	// 安全组Id
	// example: default
	SecgrpId string `json:"secgrp_id"`
	// 管理员可见安全组Id
	AdminSecgrpId string `json:"admin_secgrp_id"`
	SrcIpCheck    *bool  `json:"src_ip_check,omitempty"`
	SrcMacCheck   *bool  `json:"src_mac_check,omitempty"`
	// 虚拟化技术
	// example: kvm
	Hypervisor string `json:"hypervisor"`
	// 套餐名称
	InstanceType     string `json:"instance_type"`
	SshableLastState *bool  `json:"sshable_last_state,omitempty"`
	IsDaemon         *bool  `json:"is_daemon,omitempty"`
	// 最大内网带宽
	InternetMaxBandwidthOut int `json:"internet_max_bandwidth_out"`
	// 磁盘吞吐量
	Throughput int    `json:"throughput"`
	QgaStatus  string `json:"qga_status"`
	// power_states limit in [on, off, unknown]
	PowerStates string `json:"power_states"`
	// Used for guest rescue
	RescueMode bool `json:"rescue_mode"`
	// 上次开机时间
	LastStartAt time.Time `json:"last_start_at"`
}

SGuest is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGuest.

type SGuestJointsBase

type SGuestJointsBase struct {
	apis.SVirtualJointResourceBase
	GuestId string `json:"guest_id"`
}

SGuestJointsBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGuestJointsBase.

type SGuestTemplate

type SGuestTemplate struct {
	apis.SSharableVirtualResourceBase
	SCloudregionResourceBase
	SVpcResourceBase
	// 虚拟机CPU数量
	VcpuCount int `json:"vcpu_count"`
	// 虚拟机内存大小(MB)
	VmemSize int `json:"vmem_size"`
	// 虚拟机操作系统类型
	// pattern:Linux|Windows|VMWare
	OsType string `json:"os_type"`
	// 镜像类型
	ImageType string `json:"image_type"`
	// 镜像ID
	ImageId string `json:"image_id"`
	// 虚拟机技术
	Hypervisor string `json:"hypervisor"`
	// 计费方式
	BillingType string `json:"billing_type"`
	// 其他配置信息
	Content jsonutils.JSONObject `json:"content"`
}

SGuestTemplate is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGuestTemplate.

type SGuestTemplateResourceBase

type SGuestTemplateResourceBase struct {
	// 主机模板ID
	GuestTemplateId string `json:"guest_template_id"`
}

SGuestTemplateResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGuestTemplateResourceBase.

type SGuestdisk

type SGuestdisk struct {
	SGuestJointsBase
	SDiskResourceBase
	ImagePath string `json:"image_path"`
	Driver    string `json:"driver"`
	// Column(VARCHAR(32, charset='ascii'), nullable=True)
	CacheMode string `json:"cache_mode"`
	// Column(VARCHAR(32, charset='ascii'), nullable=True)
	AioMode string `json:"aio_mode"`
	// Column(VARCHAR(32, charset='ascii'), nullable=True)
	Iops       int    `json:"iops"`
	Bps        int    `json:"bps"`
	Mountpoint string `json:"mountpoint"`
	Index      byte   `json:"index"`
	// Column(TINYINT(4), nullable=False, default=0)
	BootIndex byte `json:"boot_index"`
}

SGuestdisk is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGuestdisk.

type SGuestnetwork

type SGuestnetwork struct {
	SGuestJointsBase
	NetworkId string `json:"network_id"`
	// MAC地址
	MacAddr string `json:"mac_addr"`
	// IPv4地址
	IpAddr string `json:"ip_addr"`
	// IPv6地址
	Ip6Addr string `json:"ip6_addr"`
	// 虚拟网卡驱动
	Driver string `json:"driver"`
	// 网卡队列数
	NumQueues int `json:"num_queues"`
	// 带宽限制,单位mbps
	BwLimit int `json:"bw_limit"`
	// 下行流量限制,单位 bytes
	RxTrafficLimit int64 `json:"rx_traffic_limit"`
	RxTrafficUsed  int64 `json:"rx_traffic_used"`
	// 上行流量限制,单位 bytes
	TxTrafficLimit int64 `json:"tx_traffic_limit"`
	TxTrafficUsed  int64 `json:"tx_traffic_used"`
	// 网卡序号
	Index int `json:"index"`
	// 是否为虚拟接口(无IP)
	Virtual bool `json:"virtual"`
	// 虚拟网卡设备名称
	Ifname string `json:"ifname"`
	// bind配对网卡MAC地址
	TeamWith string `json:"team_with"`
	// IPv4映射地址,当子网属于私有云vpc的时候分配,用于访问外网
	MappedIpAddr string `json:"mapped_ip_addr"`
	// 网卡关联的Eip实例
	EipId string `json:"eip_id"`
	// 是否为缺省路由
	IsDefault bool `json:"is_default"`
	// 端口映射
	PortMappings []*GuestPortMapping `json:"port_mappings"`
}

SGuestnetwork is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGuestnetwork.

type SGuestsecgroup

type SGuestsecgroup struct {
	SGuestJointsBase
	SSecurityGroupResourceBase
}

SGuestsecgroup is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGuestsecgroup.

type SHost

type SHost struct {
	apis.SEnabledStatusInfrasResourceBase
	apis.SExternalizedResourceBase
	SZoneResourceBase
	SManagedResourceBase
	SBillingResourceBase
	SHostnameResourceBase
	// 机架
	Rack string `json:"rack"`
	// 机位
	Slots string `json:"slots"`
	// 管理口MAC
	AccessMac string `json:"access_mac"`
	// 管理口Ip地址
	AccessIp string `json:"access_ip"`
	// 管理地址
	ManagerUri string `json:"manager_uri"`
	// 系统信息
	SysInfo jsonutils.JSONObject `json:"sys_info"`
	// 物理机序列号信息
	SN string `json:"sn"`
	// CPU核数
	CpuCount int `json:"cpu_count"`
	// 物理CPU颗数
	NodeCount byte `json:"node_count"`
	// CPU描述信息
	CpuDesc string `json:"cpu_desc"`
	// CPU频率
	CpuMhz int `json:"cpu_mhz"`
	// CPU缓存大小,单位KB
	CpuCache int `json:"cpu_cache"`
	// 预留CPU大小
	CpuReserved int `json:"cpu_reserved"`
	// CPU超分比
	CpuCmtbound float32 `json:"cpu_cmtbound"`
	// CPUMicrocode
	CpuMicrocode string `json:"cpu_microcode"`
	// CPU架构
	CpuArchitecture string `json:"cpu_architecture"`
	// 内存大小,单位Mb
	MemSize int `json:"mem_size"`
	// 预留内存大小
	MemReserved int `json:"mem_reserved"`
	// 内存超分比
	MemCmtbound float32 `json:"mem_cmtbound"`
	// 页大小
	PageSizeKB         int  `json:"page_size_kb"`
	EnableNumaAllocate bool `json:"enable_numa_allocate"`
	// 存储大小,单位Mb
	StorageSize int64 `json:"storage_size"`
	// 存储类型
	StorageType string `json:"storage_type"`
	// 存储驱动类型
	StorageDriver string `json:"storage_driver"`
	// 存储详情
	StorageInfo jsonutils.JSONObject `json:"storage_info"`
	// IPMI地址
	IpmiIp string `json:"ipmi_ip"`
	// IPMI详情
	IpmiInfo jsonutils.JSONObject `json:"ipmi_info"`
	// 宿主机状态
	// example: online
	HostStatus string `json:"host_status"`
	// 宿主机类型
	HostType string `json:"host_type"`
	// host服务软件版本
	Version string `json:"version"`
	// OVN软件版本
	OvnVersion  string `json:"ovn_version"`
	IsBaremetal bool   `json:"is_baremetal"`
	// 是否处于维护状态
	IsMaintenance bool `json:"is_maintenance"`
	// health check enabled by host agent online
	EnableHealthCheck bool   `json:"enable_health_check"`
	ResourceType      string `json:"resource_type"`
	RealExternalId    string `json:"real_external_id"`
	// 是否为导入的宿主机
	IsImport bool `json:"is_import"`
	// 是否允许PXE启动
	EnablePxeBoot *bool `json:"enable_pxe_boot,omitempty"`
	// 主机UUID
	Uuid string `json:"uuid"`
	// 主机启动模式, 可能值为PXE和ISO
	BootMode string `json:"boot_mode"`
	// IPv4地址,作为私有云vpc访问外网时的网关
	OvnMappedIpAddr string `json:"ovn_mapped_ip_addr"`
	// UEFI详情
	UefiInfo jsonutils.JSONObject `json:"uefi_info"`
	// 公网Ip地址
	PublicIp string `json:"public_ip"`
}

SHost is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SHost.

type SHostBackupstorage

type SHostBackupstorage struct {
	SHostJointsBase
	// 宿主机Id
	HostId string `json:"host_id"`
	// 存储Id
	BackupstorageId string `json:"backupstorage_id"`
}

SHostBackupstorage is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SHostBackupstorage.

type SHostJointsBase

type SHostJointsBase struct {
	apis.SJointResourceBase
}

SHostJointsBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SHostJointsBase.

type SHostPingInput

type SHostPingInput struct {
	WithData bool `json:"with_data"`

	MemoryUsedMb int `json:"memory_used_mb"`

	RootPartitionUsedCapacityMb int `json:"root_partition_used_capacity_mb"`

	StorageStats []SHostStorageStat `json:"storage_stats"`

	QgaRunningGuestIds []string `json:"qga_running_guests"`
}

type SHostResourceBase

type SHostResourceBase struct {
	HostId string `json:"host_id"`
}

SHostResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SHostResourceBase.

type SHostStorageStat

type SHostStorageStat struct {
	StorageId string `json:"storage_id"`

	CapacityMb           int64 `json:"capacity_mb"`
	ActualCapacityUsedMb int64 `json:"actual_capacity_used_mb"`
}

type SHostTapConfig

type SHostTapConfig struct {
	Taps []STapServiceConfig `json:"taps"`

	Mirrors []SMirrorConfig `json:"mirrors"`
}

type SHostnameResourceBase

type SHostnameResourceBase struct {
	Hostname string `json:"hostname"`
}

SHostnameResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SHostnameResourceBase.

type SHostnetwork

type SHostnetwork struct {
	SHostJointsBase
	// 宿主机ID
	BaremetalId string `json:"baremetal_id"`
	// 网络ID
	NetworkId string `json:"network_id"`
	// IP地址
	IpAddr string `json:"ip_addr"`
	// MAC地址
	MacAddr string `json:"mac_addr"`
	// VLAN
	VlanId int `json:"vlan_id"`
}

SHostnetwork is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SHostnetwork.

type SHostschedtag

type SHostschedtag struct {
	SSchedtagJointsBase
	HostId string `json:"host_id"`
}

SHostschedtag is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SHostschedtag.

type SHoststorage

type SHoststorage struct {
	SHostJointsBase
	// 宿主机Id
	HostId string `json:"host_id"`
	// 存储Id
	StorageId string `json:"storage_id"`
	// 挂载点
	// nvme pci address
	MountPoint string `json:"mount_point"`
	// 是否是根分区
	IsRootPartition bool `json:"is_root_partition"`
	// 配置信息
	Config *jsonutils.JSONArray `json:"config"`
	// 真实容量大小
	RealCapacity int64 `json:"real_capacity"`
}

SHoststorage is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SHoststorage.

type SHostwireDeprecated

type SHostwireDeprecated struct {
	SHostJointsBase
	Bridge string `json:"bridge"`
	// 接口名称
	Interface string `json:"interface"`
	// 是否是主地址
	IsMaster bool `json:"is_master"`
	// MAC地址
	MacAddr string `json:"mac_addr"`
	// 宿主机Id
	HostId string `json:"host_id"`
	// 二层网络Id
	WireId string `json:"wire_id"`
}

SHostwireDeprecated is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SHostwireDeprecated.

type SI18nResourceBase

type SI18nResourceBase struct {
}

SI18nResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SI18nResourceBase.

type SIPv6Gateway

type SIPv6Gateway struct {
	apis.SSharableVirtualResourceBase
	apis.SExternalizedResourceBase
	SVpcResourceBase
	InstanceType string `json:"instance_type"`
}

SIPv6Gateway is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SIPv6Gateway.

type SImagesInGuest

type SImagesInGuest struct {
	Id         string
	Name       string
	RootImage  SSubImage
	DataImages []SSubImage
}

type SImportDisk

type SImportDisk struct {
	Index      int    `json:"index"`
	DiskId     string `json:"disk_id"`
	Driver     string `json:"driver"`
	CacheMode  string `json:"cache_mode"`
	AioMode    string `json:"aio_mode"`
	SizeMb     int    `json:"size"`
	Format     string `json:"format"`
	Fs         string `json:"fs"`
	Mountpoint string `json:"mountpoint"`
	Dev        string `json:"dev"`
	TemplateId string `json:"template_id"`
	AccessPath string `json:"AccessPath"`
	Backend    string `json:"Backend"`
}

type SImportGuestDesc

type SImportGuestDesc struct {
	Id          string            `json:"uuid"`
	Name        string            `json:"name"`
	Nics        []SImportNic      `json:"nics"`
	Disks       []SImportDisk     `json:"disks"`
	Metadata    map[string]string `json:"metadata"`
	MemSizeMb   int               `json:"mem"`
	Cpu         int               `json:"cpu"`
	TemplateId  string            `json:"template_id"`
	ImagePath   string            `json:"image_path"`
	Vdi         string            `json:"vdi"`
	Hypervisor  string            `json:"hypervisor"`
	HostId      string            `json:"host"`
	BootOrder   string            `json:"boot_order"`
	IsSystem    bool              `json:"is_system"`
	Description string            `json:"description"`
	MonitorPath string            `json:"monitor_path"`
}

type SImportNic

type SImportNic struct {
	Index     int    `json:"index"`
	Bridge    string `json:"bridge"`
	Domain    string `json:"domain"`
	Ip        string `json:"ip"`
	Vlan      int    `json:"vlan"`
	Driver    string `json:"driver"`
	Masklen   int    `json:"masklen"`
	Virtual   bool   `json:"virtual"`
	Manual    bool   `json:"manual"`
	WireId    string `json:"wire_id"`
	NetId     string `json:"net_id"`
	Mac       string `json:"mac"`
	BandWidth int    `json:"bw"`
	Dns       string `json:"dns"`
	Net       string `json:"net"`
	Interface string `json:"interface"`
	Gateway   string `json:"gateway"`
	Ifname    string `json:"ifname"`
}

type SInstanceBackup

type SInstanceBackup struct {
	apis.SVirtualResourceBase
	SManagedResourceBase
	SCloudregionResourceBase
	apis.SMultiArchResourceBase
	apis.SEncryptedResource
	BackupStorageId string `json:"backup_storage_id"`
	GuestId         string `json:"guest_id"`
	// 云主机配置 corresponds to api.ServerCreateInput
	ServerConfig jsonutils.JSONObject `json:"server_config"`
	// 云主机标签
	ServerMetadata jsonutils.JSONObject `json:"server_metadata"`
	// 安全组
	SecGroups jsonutils.JSONObject `json:"sec_groups"`
	// 秘钥Id
	KeypairId string `json:"keypair_id"`
	// 操作系统类型
	OsType string `json:"os_type"`
	// 套餐名称
	InstanceType string `json:"instance_type"`
	// 主机备份容量和
	SizeMb int `json:"size_mb"`
}

SInstanceBackup is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SInstanceBackup.

type SInstanceSnapshot

type SInstanceSnapshot struct {
	apis.SVirtualResourceBase
	apis.SExternalizedResourceBase
	SManagedResourceBase
	SCloudregionResourceBase
	apis.SMultiArchResourceBase
	apis.SEncryptedResource
	// 云主机Id
	GuestId string `json:"guest_id"`
	// 云主机配置
	ServerConfig jsonutils.JSONObject `json:"server_config"`
	// 云主机标签
	ServerMetadata jsonutils.JSONObject `json:"server_metadata"`
	// 是否自动删除
	AutoDelete bool `json:"auto_delete"`
	// 引用次数
	RefCount int `json:"ref_count"`
	// 安全组
	SecGroups jsonutils.JSONObject `json:"sec_groups"`
	// 秘钥Id
	KeypairId string `json:"keypair_id"`
	// 操作系统类型
	OsType string `json:"os_type"`
	// 套餐名称
	InstanceType string `json:"instance_type"`
	// 主机快照磁盘容量和
	SizeMb int `json:"size_mb"`
	// 镜像ID
	ImageId string `json:"image_id"`
	// 是否保存内存
	WithMemory bool `json:"with_memory"`
	// 内存文件大小
	MemorySizeMB int `json:"memory_size_mb"`
	// 内存文件所在宿主机
	MemoryFileHostId string `json:"memory_file_host_id"`
	// 内存文件路径
	MemoryFilePath string `json:"memory_file_path"`
	// 内存文件校验和
	MemoryFileChecksum string `json:"memory_file_checksum"`
}

SInstanceSnapshot is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SInstanceSnapshot.

type SInstanceTypes

type SInstanceTypes []string

func (SInstanceTypes) IsZero

func (kn SInstanceTypes) IsZero() bool

func (SInstanceTypes) String

func (kn SInstanceTypes) String() string

type SInterVpcNetwork

SInterVpcNetwork is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SInterVpcNetwork.

type SInterVpcNetworkResourceBase

type SInterVpcNetworkResourceBase struct {
	InterVpcNetworkId string `json:"inter_vpc_network_id"`
}

SInterVpcNetworkResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SInterVpcNetworkResourceBase.

type SInterVpcNetworkRouteSet

type SInterVpcNetworkRouteSet struct {
	apis.SEnabledStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	SVpcResourceBase
	InterVpcNetworkId   string `json:"inter_vpc_network_id"`
	Cidr                string `json:"cidr"`
	ExtInstanceId       string `json:"ext_instance_id"`
	ExtInstanceType     string `json:"ext_instance_type"`
	ExtInstanceRegionId string `json:"ext_instance_region_id"`
}

SInterVpcNetworkRouteSet is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SInterVpcNetworkRouteSet.

type SInterVpcNetworkVpc

type SInterVpcNetworkVpc struct {
	apis.SJointResourceBase
	SInterVpcNetworkResourceBase
	VpcId string `json:"vpc_id"`
}

SInterVpcNetworkVpc is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SInterVpcNetworkVpc.

type SIsolatedDevice

type SIsolatedDevice struct {
	apis.SStandaloneResourceBase
	SHostResourceBase
	// # PCI / GPU-HPC / GPU-VGA / USB / NIC
	// 设备类型
	DevType string `json:"dev_type"`
	// # Specific device name read from lspci command, e.g. `Tesla K40m` ...
	Model string `json:"model"`
	// 云主机Id
	GuestId string `json:"guest_id"`
	// guest network index
	NetworkIndex int `json:"network_index"`
	// Nic wire id
	WireId string `json:"wire_id"`
	// Offload interface name
	OvsOffloadInterface string `json:"ovs_offload_interface"`
	// Is infiniband nic
	IsInfinibandNic bool `json:"is_infiniband_nic"`
	// NVME disk size
	NvmeSizeMB int `json:"nvme_size_mb"`
	// guest disk index
	DiskIndex byte `json:"disk_index"`
	// # pci address of `Bus:Device.Function` format, or usb bus address of `bus.addr`
	Addr       string `json:"addr"`
	DevicePath string `json:"device_path"`
	// Is vgpu physical funcion, That means it cannot be attached to guest
	// VGPUPhysicalFunction bool `nullable:"true" default:"false" list:"domain" create:"domain_optional"`
	// nvidia vgpu config
	// vgpu uuid generated on create
	MdevId string `json:"mdev_id"`
	// The frame rate limiter (FRL) configuration in frames per second
	FRL string `json:"frl"`
	// The frame buffer size in Mbytes
	Framebuffer string `json:"framebuffer"`
	// The maximum resolution per display head, eg: 5120x2880
	MaxResolution string `json:"max_resolution"`
	// The maximum number of virtual display heads that the vGPU type supports
	// In computer graphics and display technology, the term "head" is commonly used to
	// describe the physical interface of a display device or display output.
	// It refers to a connection point on the monitor, such as HDMI, DisplayPort, or VGA interface.
	NumHeads string `json:"num_heads"`
	// The maximum number of vGPU instances per physical GPU
	MaxInstance string `json:"max_instance"`
	// MPS perdevice memory limit MB
	MpsMemoryLimit int `json:"mps_memory_limit"`
	// MPS device memory total MB
	MpsMemoryTotal int `json:"mps_memory_total"`
	// MPS device thread percentage
	MpsThreadPercentage int    `json:"mps_thread_percentage"`
	VendorDeviceId      string `json:"vendor_device_id"`
	// reserved memory size for isolated device
	ReservedMemory int `json:"reserved_memory"`
	// reserved cpu count for isolated device
	ReservedCpu int `json:"reserved_cpu"`
	// reserved storage size for isolated device
	ReservedStorage int `json:"reserved_storage"`
	// PciInfo stores extra PCIE information
	PcieInfo *IsolatedDevicePCIEInfo `json:"pcie_info"`
	// device numa node
	NumaNode byte `json:"numa_node"`
}

SIsolatedDevice is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SIsolatedDevice.

type SIsolatedDeviceModel

type SIsolatedDeviceModel struct {
	apis.SStandaloneAnonResourceBase
	Model        string `json:"model"`
	VendorId     string `json:"vendor_id"`
	DeviceId     string `json:"device_id"`
	DevType      string `json:"dev_type"`
	HotPluggable *bool  `json:"hot_pluggable,omitempty"`
	// Disable auto detect isolated devices on host
	DisableAutoDetect *bool `json:"disable_auto_detect,omitempty"`
}

SIsolatedDeviceModel is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SIsolatedDeviceModel.

type SKafka

type SKafka struct {
	apis.SVirtualResourceBase
	apis.SExternalizedResourceBase
	SManagedResourceBase
	SBillingResourceBase
	SCloudregionResourceBase
	SDeletePreventableResourceBase
	// 版本
	Version string `json:"version"`
	// 套餐名称
	// example: elasticsearch.sn2ne.xlarge
	InstanceType string `json:"instance_type"`
	// 存储类型
	// example: local_ssd
	StorageType string `json:"storage_type"`
	// 存储大小
	// example: 1024
	DiskSizeGb int `json:"disk_size_gb"`
	// 带宽峰值
	// example: 1024
	BandwidthMb int `json:"bandwidth_mb"`
	// 消息保留时长
	MsgRetentionMinute int `json:"msg_retention_minute"`
	// 连接端点
	Endpoint  string `json:"endpoint"`
	VpcId     string `json:"vpc_id"`
	NetworkId string `json:"network_id"`
	// 可用区Id
	ZoneId string `json:"zone_id"`
	// 是否是多可用区部署
	IsMultiAz bool `json:"is_multi_az"`
}

SKafka is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SKafka.

type SKeypair

type SKeypair struct {
	apis.SUserResourceBase
	apis.SSharableBaseResource
	// 加密类型
	// example: RSA
	Scheme string `json:"scheme"`
	// 指纹信息
	// example: 1d:3a:83:4a:a1:f3:75:97:ec:d1:ef:f8:3f:a7:5d:9e
	Fingerprint string `json:"fingerprint"`
	// 私钥
	PrivateKey string `json:"private_key"`
	// 公钥
	PublicKey string `json:"public_key"`
}

SKeypair is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SKeypair.

type SKubeCluster

type SKubeCluster struct {
	apis.SEnabledStatusInfrasResourceBase
	apis.SExternalizedResourceBase
	SManagedResourceBase
	SVpcResourceBase
	SCloudregionResourceBase
	Version string `json:"version"`
	// 本地KubeserverId
	ExternalClusterId string           `json:"external_cluster_id"`
	NetworkIds        *SKubeNetworkIds `json:"network_ids"`
}

SKubeCluster is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SKubeCluster.

type SKubeNetworkIds

type SKubeNetworkIds []string

func (SKubeNetworkIds) IsZero

func (kn SKubeNetworkIds) IsZero() bool

func (SKubeNetworkIds) String

func (kn SKubeNetworkIds) String() string

type SKubeNode

type SKubeNode struct {
	apis.SStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	CloudKubeNodePoolId string `json:"cloud_kube_node_pool_id"`
	CloudKubeClusterId  string `json:"cloud_kube_cluster_id"`
}

SKubeNode is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SKubeNode.

type SKubeNodePool

type SKubeNodePool struct {
	apis.SStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	NetworkIds           *SKubeNetworkIds `json:"network_ids"`
	InstanceTypes        *SInstanceTypes  `json:"instance_types"`
	MinInstanceCount     int              `json:"min_instance_count"`
	MaxInstanceCount     int              `json:"max_instance_count"`
	DesiredInstanceCount int              `json:"desired_instance_count"`
	RootDiskSizeGb       int              `json:"root_disk_size_gb"`
	CloudKubeClusterId   string           `json:"cloud_kube_cluster_id"`
}

SKubeNodePool is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SKubeNodePool.

type SLibvirtHostConfig

type SLibvirtHostConfig struct {
	Servers     []SLibvirtServerConfig `json:"servers"`
	XmlFilePath string                 `json:"xml_file_path"`
	MonitorPath string                 `json:"monitor_path"`
	HostIp      string                 `json:"host_ip"`
}

type SLibvirtImportConfig

type SLibvirtImportConfig struct {
	Hosts []SLibvirtHostConfig `json:"hosts"`
}

type SLibvirtServerConfig

type SLibvirtServerConfig struct {
	MacIp map[string]string `json:"mac_ip"`
}

type SLoadbalancer

type SLoadbalancer struct {
	apis.SVirtualResourceBase
	apis.SExternalizedResourceBase
	SBillingResourceBase
	SManagedResourceBase
	SCloudregionResourceBase
	SDeletePreventableResourceBase
	// LB might optionally be in a VPC, vpc_id, manager_id, cloudregion_id
	SVpcResourceBase
	// zone_id
	SZoneResourceBase
	// optional network_id
	SNetworkResourceBase
	SLoadbalancerRateLimiter
	// 备可用区
	Zone1 string `json:"zone_1"`
	// IP地址
	Address string `json:"address"`
	// 地址类型
	AddressType string `json:"address_type"`
	// 网络类型
	NetworkType string `json:"network_type"`
	SLoadbalancerClusterResourceBase
	// 计费类型
	ChargeType string `json:"charge_type"`
	// 套餐名称
	LoadbalancerSpec string `json:"loadbalancer_spec"`
	// 默认后端服务器组Id
	BackendGroupId string `json:"backend_group_id"`
}

SLoadbalancer is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancer.

type SLoadbalancerAcl

SLoadbalancerAcl is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerAcl.

type SLoadbalancerAclResourceBase

type SLoadbalancerAclResourceBase struct {
	// 本地Acl ID
	AclId string `json:"acl_id"`
}

SLoadbalancerAclResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerAclResourceBase.

type SLoadbalancerAgent

type SLoadbalancerAgent struct {
	apis.SStandaloneResourceBase
	SLoadbalancerClusterResourceBase
	Version   string `json:"version"`
	IP        string `json:"ip"`
	Interface string `json:"interface"`
	Priority  int    `json:"priority"`
	HaState   string `json:"ha_state"`
	// LB_HA_STATE_UNKNOWN
	HbLastSeen                time.Time                     `json:"hb_last_seen"`
	HbTimeout                 int                           `json:"hb_timeout"`
	Params                    *SLoadbalancerAgentParams     `json:"params"`
	Networks                  time.Time                     `json:"networks"`
	LoadbalancerNetworks      time.Time                     `json:"loadbalancer_networks"`
	Loadbalancers             time.Time                     `json:"loadbalancers"`
	LoadbalancerListeners     time.Time                     `json:"loadbalancer_listeners"`
	LoadbalancerListenerRules time.Time                     `json:"loadbalancer_listener_rules"`
	LoadbalancerBackendGroups time.Time                     `json:"loadbalancer_backend_groups"`
	LoadbalancerBackends      time.Time                     `json:"loadbalancer_backends"`
	LoadbalancerAcls          time.Time                     `json:"loadbalancer_acls"`
	LoadbalancerCertificates  time.Time                     `json:"loadbalancer_certificates"`
	Deployment                *SLoadbalancerAgentDeployment `json:"deployment"`
}

SLoadbalancerAgent is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerAgent.

type SLoadbalancerAgentDeployment

type SLoadbalancerAgentDeployment struct {
	Host                        string `json:"host"`
	AnsiblePlaybook             string `json:"ansible_playbook"`
	AnsiblePlaybookUndeployment string `json:"ansible_playbook_undeployment"`
}

SLoadbalancerAgentDeployment is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerAgentDeployment.

type SLoadbalancerAgentParams

type SLoadbalancerAgentParams struct {
	KeepalivedConfTmpl string                           `json:"keepalived_conf_tmpl"`
	HaproxyConfTmpl    string                           `json:"haproxy_conf_tmpl"`
	TelegrafConfTmpl   string                           `json:"telegraf_conf_tmpl"`
	Vrrp               SLoadbalancerAgentParamsVrrp     `json:"vrrp"`
	Haproxy            SLoadbalancerAgentParamsHaproxy  `json:"haproxy"`
	Telegraf           SLoadbalancerAgentParamsTelegraf `json:"telegraf"`
}

SLoadbalancerAgentParams is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerAgentParams.

type SLoadbalancerAgentParamsHaproxy

type SLoadbalancerAgentParamsHaproxy struct {
	GlobalLog      string `json:"global_log"`
	GlobalNbthread int    `json:"global_nbthread"`
	LogHttp        bool   `json:"log_http"`
	LogTcp         bool   `json:"log_tcp"`
	LogNormal      bool   `json:"log_normal"`
	TuneHttpMaxhdr int    `json:"tune_http_maxhdr"`
}

SLoadbalancerAgentParamsHaproxy is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerAgentParamsHaproxy.

type SLoadbalancerAgentParamsTelegraf

type SLoadbalancerAgentParamsTelegraf struct {
	InfluxDbOutputUrl       string `json:"influx_db_output_url"`
	InfluxDbOutputName      string `json:"influx_db_output_name"`
	InfluxDbOutputUnsafeSsl bool   `json:"influx_db_output_unsafe_ssl"`
	HaproxyInputInterval    int    `json:"haproxy_input_interval"`
}

SLoadbalancerAgentParamsTelegraf is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerAgentParamsTelegraf.

type SLoadbalancerAgentParamsVrrp

type SLoadbalancerAgentParamsVrrp struct {
	SLoadbalancerClusterParams
	Priority  int    `json:"priority"`
	Interface string `json:"interface"`
}

SLoadbalancerAgentParamsVrrp is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerAgentParamsVrrp.

type SLoadbalancerBackend

type SLoadbalancerBackend struct {
	apis.SStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	SLoadbalancerBackendgroupResourceBase
	BackendId   string `json:"backend_id"`
	BackendType string `json:"backend_type"`
	BackendRole string `json:"backend_role"`
	Weight      int    `json:"weight"`
	Address     string `json:"address"`
	Port        int    `json:"port"`
	SendProxy   string `json:"send_proxy"`
	Ssl         string `json:"ssl"`
}

SLoadbalancerBackend is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerBackend.

type SLoadbalancerBackendGroup

type SLoadbalancerBackendGroup struct {
	apis.SStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	SLoadbalancerResourceBase
	Type string `json:"type"`
}

SLoadbalancerBackendGroup is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerBackendGroup.

type SLoadbalancerBackendgroupResourceBase

type SLoadbalancerBackendgroupResourceBase struct {
	// 负载均衡后端组ID
	BackendGroupId string `json:"backend_group_id"`
}

SLoadbalancerBackendgroupResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerBackendgroupResourceBase.

type SLoadbalancerCertificate

SLoadbalancerCertificate is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerCertificate.

type SLoadbalancerCertificateResourceBase

type SLoadbalancerCertificateResourceBase struct {
	// 本地负载均衡证书ID
	CertificateId string `json:"certificate_id"`
}

SLoadbalancerCertificateResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerCertificateResourceBase.

type SLoadbalancerCluster

type SLoadbalancerCluster struct {
	apis.SStandaloneResourceBase
	SZoneResourceBase
	SWireResourceBase
	Params *SLoadbalancerClusterParams `json:"params"`
}

SLoadbalancerCluster is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerCluster.

type SLoadbalancerClusterParams

type SLoadbalancerClusterParams struct {
	VirtualRouterId   int    `json:"virtual_router_id"`
	Preempt           bool   `json:"preempt"`
	AdvertInt         int    `json:"advert_int"`
	Pass              string `json:"pass"`
	GarpMasterRefresh int    `json:"garp_master_refresh"`
}

SLoadbalancerClusterParams is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerClusterParams.

type SLoadbalancerClusterResourceBase

type SLoadbalancerClusterResourceBase struct {
	// 归属LB集群
	ClusterId string `json:"cluster_id"`
}

SLoadbalancerClusterResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerClusterResourceBase.

type SLoadbalancerHTTPListener

type SLoadbalancerHTTPListener struct {
	StickySession string `json:"sticky_session"`
	// 会话保持开启状态 on|off
	StickySessionType string `json:"sticky_session_type"`
	// Cookie处理方式 insert(植入cookie)|server(重写cookie)
	StickySessionCookie string `json:"sticky_session_cookie"`
	// Cookie名称
	StickySessionCookieTimeout int  `json:"sticky_session_cookie_timeout"`
	XForwardedFor              bool `json:"xforwarded_for"`
	// 获取客户端真实IP
	Gzip bool `json:"gzip"`
}

SLoadbalancerHTTPListener is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerHTTPListener.

type SLoadbalancerHTTPRateLimiter

type SLoadbalancerHTTPRateLimiter struct {
	HTTPRequestRate int `json:"http_request_rate"`
	// 限定监听接收请示速率
	HTTPRequestRatePerSrc int `json:"http_request_rate_per_src"`
}

SLoadbalancerHTTPRateLimiter is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerHTTPRateLimiter.

type SLoadbalancerHTTPRedirect

type SLoadbalancerHTTPRedirect struct {
	Redirect string `json:"redirect"`
	// 跳转类型
	RedirectCode int `json:"redirect_code"`
	// 跳转HTTP code
	RedirectScheme string `json:"redirect_scheme"`
	// 跳转uri scheme
	RedirectHost string `json:"redirect_host"`
	// 跳转时变更Host
	RedirectPath string `json:"redirect_path"`
}

SLoadbalancerHTTPRedirect is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerHTTPRedirect.

type SLoadbalancerHTTPSListener

type SLoadbalancerHTTPSListener struct {
	SLoadbalancerCertificateResourceBase
	TLSCipherPolicy string `json:"tls_cipher_policy"`
	EnableHttp2     bool   `json:"enable_http2"`
}

SLoadbalancerHTTPSListener is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerHTTPSListener.

type SLoadbalancerHealthCheck

type SLoadbalancerHealthCheck struct {
	HealthCheck string `json:"health_check"`
	// 健康检查开启状态 on|off
	HealthCheckType   string `json:"health_check_type"`
	HealthCheckDomain string `json:"health_check_domain"`
	// 健康检查域名 yunion.cn
	HealthCheckURI string `json:"health_check_uri"`
	// 健康检查路径 /
	HealthCheckHttpCode string `json:"health_check_http_code"`
	HealthCheckRise     int    `json:"health_check_rise"`
	// 健康检查健康阈值 3秒
	HealthCheckFall int `json:"health_check_fall"`
	// 健康检查不健康阈值 15秒
	HealthCheckTimeout int `json:"health_check_timeout"`
	// 健康检查超时时间 10秒
	HealthCheckInterval int    `json:"health_check_interval"`
	HealthCheckReq      string `json:"health_check_req"`
	// UDP监听健康检查的请求串
	HealthCheckExp string `json:"health_check_exp"`
}

SLoadbalancerHealthCheck is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerHealthCheck.

type SLoadbalancerListener

type SLoadbalancerListener struct {
	apis.SStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	SLoadbalancerResourceBase
	ListenerType         string `json:"listener_type"`
	ListenerPort         int    `json:"listener_port"`
	BackendGroupId       string `json:"backend_group_id"`
	BackendServerPort    int    `json:"backend_server_port"`
	Scheduler            string `json:"scheduler"`
	SendProxy            string `json:"send_proxy"`
	ClientRequestTimeout int    `json:"client_request_timeout"`
	// 连接请求超时时间
	ClientIdleTimeout int `json:"client_idle_timeout"`
	// 连接空闲超时时间
	BackendConnectTimeout int `json:"backend_connect_timeout"`
	// 后端连接超时时间
	BackendIdleTimeout int    `json:"backend_idle_timeout"`
	AclStatus          string `json:"acl_status"`
	AclType            string `json:"acl_type"`
	SLoadbalancerAclResourceBase
	SLoadbalancerRateLimiter
	SLoadbalancerTCPListener
	SLoadbalancerUDPListener
	SLoadbalancerHTTPListener
	SLoadbalancerHTTPSListener
	SLoadbalancerHealthCheck
	SLoadbalancerHTTPRateLimiter
	SLoadbalancerHTTPRedirect
}

SLoadbalancerListener is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerListener.

type SLoadbalancerListenerResourceBase

type SLoadbalancerListenerResourceBase struct {
	// 负载均衡监听器ID
	ListenerId string `json:"listener_id"`
}

SLoadbalancerListenerResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerListenerResourceBase.

type SLoadbalancerListenerRule

type SLoadbalancerListenerRule struct {
	apis.SStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	SLoadbalancerListenerResourceBase
	// 默认转发策略,目前只有aws用到其它云都是false
	IsDefault      bool   `json:"is_default"`
	BackendGroupId string `json:"backend_group_id"`
	Domain         string `json:"domain"`
	Path           string `json:"path"`
	Condition      string `json:"condition"`
	SLoadbalancerHealthCheck
	// 目前只有腾讯云HTTP、HTTPS类型的健康检查是和规则绑定的。
	SLoadbalancerHTTPRateLimiter
	SLoadbalancerHTTPRedirect
}

SLoadbalancerListenerRule is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerListenerRule.

type SLoadbalancerNetwork

type SLoadbalancerNetwork struct {
	apis.SVirtualJointResourceBase
	LoadbalancerId string `json:"loadbalancer_id"`
	NetworkId      string `json:"network_id"`
	IpAddr         string `json:"ip_addr"`
	MacAddr        string `json:"mac_addr"`
}

SLoadbalancerNetwork is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerNetwork.

type SLoadbalancerRateLimiter

type SLoadbalancerRateLimiter struct {
	EgressMbps int `json:"egress_mbps"`
}

SLoadbalancerRateLimiter is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerRateLimiter.

type SLoadbalancerResourceBase

type SLoadbalancerResourceBase struct {
	// 负载均衡ID
	LoadbalancerId string `json:"loadbalancer_id"`
}

SLoadbalancerResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerResourceBase.

type SLoadbalancerSecurityGroup

type SLoadbalancerSecurityGroup struct {
	apis.SJointResourceBase
	LoadbalancerId string `json:"loadbalancer_id"`
	SSecurityGroupResourceBase
}

SLoadbalancerSecurityGroup is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerSecurityGroup.

type SLoadbalancerTCPListener

type SLoadbalancerTCPListener struct {
}

SLoadbalancerTCPListener is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerTCPListener.

type SLoadbalancerUDPListener

type SLoadbalancerUDPListener struct {
}

SLoadbalancerUDPListener is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerUDPListener.

type SManagedResourceBase

type SManagedResourceBase struct {
	// 云订阅ID
	ManagerId string `json:"manager_id"`
}

SManagedResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SManagedResourceBase.

type SMirrorConfig

type SMirrorConfig struct {
	TapHostIp string `json:"tap_host_ip"`

	HostIp string `json:"host_ip"`

	Port string `json:"port"`

	Bridge string `json:"bridge"`

	FlowId uint16 `json:"flow_id"`

	VlanId int `json:"vlan_id"`

	Direction string `json:"direction"`
}

type SMiscResource

type SMiscResource struct {
	apis.SVirtualResourceBase
	apis.SExternalizedResourceBase
	SManagedResourceBase
	SCloudregionResourceBase
	ResourceType string               `json:"resource_type"`
	MiscConf     jsonutils.JSONObject `json:"misc_conf"`
}

SMiscResource is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SMiscResource.

type SModelartsPool

type SModelartsPool struct {
	apis.SVirtualResourceBase
	apis.SExternalizedResourceBase
	SManagedResourceBase
	SBillingResourceBase
	SCloudregionResourceBase
	SDeletePreventableResourceBase
	InstanceType string `json:"instance_type"`
	NodeCount    int    `json:"node_count"`
	WorkType     string `json:"work_type"`
	// CPU 架构 x86|xarm
	CpuArch string `json:"cpu_arch"`
	Cidr    string `json:"cidr"`
}

SModelartsPool is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SModelartsPool.

type SModelartsPoolSku

type SModelartsPoolSku struct {
	apis.SEnabledStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	SCloudregionResourceBase
	Type string `json:"type"`
	// CPU 架构 x86|xarm
	CpuArch string `json:"cpu_arch"`
	// CPU核心数量
	CpuCount int `json:"cpu_count"`
	// GPU卡类型
	GpuType string `json:"gpu_type"`
	// GPU卡数量
	GpuSize int `json:"gpu_size"`
	// NPU卡类型
	NpuType string `json:"npu_type"`
	// NPU卡数量
	NpuSize int `json:"npu_size"`
	// 内存
	Memory int `json:"memory"`
	// 处理器类型
	ProcessorType string `json:"processor_type"`
}

SModelartsPoolSku is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SModelartsPoolSku.

type SMongoDB

type SMongoDB struct {
	apis.SVirtualResourceBase
	apis.SExternalizedResourceBase
	SManagedResourceBase
	SBillingResourceBase
	SCloudregionResourceBase
	SZoneResourceBase
	SDeletePreventableResourceBase
	// CPU数量
	// example: 1
	VcpuCount int `json:"vcpu_count"`
	// 内存大小
	// example: 1024
	VmemSizeMb int `json:"vmem_size_mb"`
	// 存储大小, 单位Mb
	// example: 10240
	DiskSizeMb int `json:"disk_size_mb"`
	// 端口
	// example: 3306
	Port int `json:"port"`
	// 实例类型
	// example: ha
	Category string `json:"category"`
	// 分片数量
	// example: 3
	ReplicationNum int `json:"replication_num"`
	// 最大连接数
	MaxConnections int `json:"max_connections"`
	Iops           int `json:"iops"`
	// 实例IP地址
	IpAddr string `json:"ip_addr"`
	// 引擎
	// example: MySQL
	Engine string `json:"engine"`
	// 引擎版本
	// example: 5.7
	EngineVersion string `json:"engine_version"`
	// 套餐名称
	// example: mysql.x4.large.2c
	InstanceType string `json:"instance_type"`
	// 维护时间
	MaintainTime string `json:"maintain_time"`
	// 虚拟私有网络Id
	// example: ed20d84e-3158-41b1-870c-1725e412e8b6
	VpcId string `json:"vpc_id"`
	// 所属网络ID
	NetworkId string `json:"network_id"`
	// 连接地址
	NetworkAddress string `json:"network_address"`
}

SMongoDB is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SMongoDB.

type SMongoDBChangeConfigInput

type SMongoDBChangeConfigInput struct {
	apis.Meta

	InstanceType string
	DiskSizeGB   int
}

type SMountTarget

type SMountTarget struct {
	apis.SStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	SVpcResourceBase
	SNetworkResourceBase
	SAccessGroupResourceBase
	NetworkType  string `json:"network_type"`
	DomainName   string `json:"domain_name"`
	FileSystemId string `json:"file_system_id"`
}

SMountTarget is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SMountTarget.

type SNasSku

type SNasSku struct {
	apis.SEnabledStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	SCloudregionResourceBase
	PrepaidStatus string `json:"prepaid_status"`
	// 预付费资源状态   available|soldout
	PostpaidStatus string `json:"postpaid_status"`
	StorageType    string `json:"storage_type"`
	DiskSizeStep   int    `json:"disk_size_step"`
	// 步长
	MaxDiskSizeGb  int    `json:"max_disk_size_gb"`
	MinDiskSizeGb  int    `json:"min_disk_size_gb"`
	NetworkTypes   string `json:"network_types"`
	FileSystemType string `json:"file_system_type"`
	Protocol       string `json:"protocol"`
	Provider       string `json:"provider"`
	ZoneIds        string `json:"zone_ids"`
}

SNasSku is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNasSku.

type SNatDCreateInput

type SNatDCreateInput struct {
	apis.Meta

	Name         string
	NatgatewayId string
	InternalIp   string
	InternalPort int
	ExternalIp   string
	Eip          string `json:"eip"`
	ExternalIpId string `json:"external_ip_id"  yunion-deprecated-by:"eip"`
	ExternalPort int
	IpProtocol   string
}

type SNatDEntry

type SNatDEntry struct {
	SNatEntry
	ExternalIP   string `json:"external_ip"`
	ExternalPort int    `json:"external_port"`
	InternalIP   string `json:"internal_ip"`
	InternalPort int    `json:"internal_port"`
	IpProtocol   string `json:"ip_protocol"`
}

SNatDEntry is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNatDEntry.

type SNatEntry

SNatEntry is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNatEntry.

type SNatGateway

type SNatGateway struct {
	apis.SStatusInfrasResourceBase
	apis.SExternalizedResourceBase
	SBillingResourceBase
	SVpcResourceBase
	SDeletePreventableResourceBase
	NetworkId   string `json:"network_id"`
	NetworkType string `json:"network_type"`
	IpAddr      string `json:"ip_addr"`
	BandwidthMb int    `json:"bandwidth_mb"`
	NatSpec     string `json:"nat_spec"`
}

SNatGateway is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNatGateway.

type SNatSCreateInput

type SNatSCreateInput struct {
	apis.Meta

	Name         string
	NatgatewayId string
	NetworkId    string
	// swagger: ignore
	Ip string

	// swagger:ignore
	ExternalIpId string `json:"external_ip_id"  yunion-deprecated-by:"eip"`
	Eip          string `json:"eip"`
	SourceCidr   string
}

type SNatSEntry

type SNatSEntry struct {
	SNatEntry
	SNetworkResourceBase
	IP         string `json:"ip"`
	SourceCIDR string `json:"source_cidr"`
}

SNatSEntry is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNatSEntry.

type SNatSku

type SNatSku struct {
	apis.SEnabledStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	SCloudregionResourceBase
	PrepaidStatus string `json:"prepaid_status"`
	// 预付费资源状态   available|soldout
	PostpaidStatus string `json:"postpaid_status"`
	Provider       string `json:"provider"`
	ZoneIds        string `json:"zone_ids"`
}

SNatSku is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNatSku.

type SNatgatewayResourceBase

type SNatgatewayResourceBase struct {
	NatgatewayId string `json:"natgateway_id"`
}

SNatgatewayResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNatgatewayResourceBase.

type SNetTapFlow

type SNetTapFlow struct {
	apis.SEnabledStatusStandaloneResourceBase
	TapId     string `json:"tap_id"`
	Type      string `json:"type"`
	SourceId  string `json:"source_id"`
	NetId     string `json:"net_id"`
	MacAddr   string `json:"mac_addr"`
	VlanId    int    `json:"vlan_id"`
	Direction string `json:"direction"`
	FlowId    uint16 `json:"flow_id"`
}

SNetTapFlow is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNetTapFlow.

type SNetTapService

type SNetTapService struct {
	apis.SEnabledStatusStandaloneResourceBase
	// 流量采集端类型,虚拟机(guest)还是宿主机(host)
	Type string `json:"type"`
	// 接受流量的目标ID,如果type=host,是hostId,如果type=guest,是guestId
	TargetId string `json:"target_id"`
	// 接受流量的Mac地址
	MacAddr string `json:"mac_addr"`
	// 网卡名称
	Ifname string `json:"ifname"`
}

SNetTapService is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNetTapService.

type SNetwork

type SNetwork struct {
	apis.SSharableVirtualResourceBase
	apis.SExternalizedResourceBase
	SWireResourceBase
	IfnameHint string `json:"ifname_hint"`
	// 起始IP地址
	GuestIpStart string `json:"guest_ip_start"`
	// 结束IP地址
	GuestIpEnd string `json:"guest_ip_end"`
	// 掩码
	GuestIpMask byte `json:"guest_ip_mask"`
	// 网关地址
	GuestGateway string `json:"guest_gateway"`
	// DNS, allow multiple dns, seperated by ","
	GuestDns string `json:"guest_dns"`
	// allow multiple dhcp, seperated by ","
	GuestDhcp string `json:"guest_dhcp"`
	// allow mutiple ntp, seperated by ","
	GuestNtp string `json:"guest_ntp"`
	// search domain
	GuestDomain string `json:"guest_domain"`
	// 起始IPv6地址
	GuestIp6Start string `json:"guest_ip6_start"`
	// 结束IPv6地址
	GuestIp6End string `json:"guest_ip6_end"`
	// IPv6子网掩码
	GuestIp6Mask byte `json:"guest_ip6_mask"`
	// IPv6网关
	GuestGateway6 string `json:"guest_gateway6"`
	// IPv6域名服务器
	GuestDns6    string `json:"guest_dns6"`
	GuestDomain6 string `json:"guest_domain6"`
	VlanId       int    `json:"vlan_id"`
	// 服务器类型
	// example: server
	ServerType string `json:"server_type"`
	// 分配策略
	AllocPolicy        string `json:"alloc_policy"`
	AllocTimoutSeconds int    `json:"alloc_timout_seconds"`
	// 该网段是否用于自动分配IP地址,如果为false,则用户需要明确选择该网段,才会使用该网段分配IP,
	// 如果为true,则用户不指定网段时,则自动从该值为true的网络中选择一个分配地址
	IsAutoAlloc *bool `json:"is_auto_alloc,omitempty"`
	// 线路类型
	BgpType string `json:"bgp_type"`
}

SNetwork is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNetwork.

type SNetworkAdditionalWire

type SNetworkAdditionalWire struct {
	NetworkId string `json:"network_id"`
	WireId    string `json:"wire_id"`
	Synced    *bool  `json:"synced"`
	Marked    *bool  `json:"marked"`
}

SNetworkAdditionalWire is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNetworkAdditionalWire.

type SNetworkAddress

type SNetworkAddress struct {
	apis.SStandaloneAnonResourceBase
	Type       string `json:"type"`
	ParentType string `json:"parent_type"`
	ParentId   string `json:"parent_id"`
	SNetworkResourceBase
	IpAddr    string `json:"ip_addr"`
	SubCtrVid int    `json:"sub_ctr_vid"`
}

SNetworkAddress is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNetworkAddress.

type SNetworkInterface

type SNetworkInterface struct {
	apis.SStatusInfrasResourceBase
	apis.SExternalizedResourceBase
	SManagedResourceBase
	SCloudregionResourceBase
	// MAC地址
	Mac string `json:"mac"`
	// 绑定资源类型
	AssociateType string `json:"associate_type"`
	// 绑定资源Id
	AssociateId string `json:"associate_id"`
}

SNetworkInterface is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNetworkInterface.

type SNetworkIpMac

type SNetworkIpMac struct {
	apis.SStandaloneAnonResourceBase
	NetworkId string `json:"network_id"`
	// MAC地址
	MacAddr string `json:"mac_addr"`
	// IPv4地址
	IpAddr string `json:"ip_addr"`
}

SNetworkIpMac is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNetworkIpMac.

type SNetworkNics

type SNetworkNics struct {
	// 虚拟机网卡数量
	Vnics int `json:"vnics"`
	// IPv4地址数量
	Vnics4 int `json:"vnics4"`
	// IPv6地址数量
	Vnics6 int `json:"vnics6"`
	// 裸金属网卡数量
	BmVnics int `json:"bm_vnics"`
	// 负载均衡网卡数量
	LbVnics int `json:"lb_vnics"`
	// 浮动Ip网卡数量
	EipVnics int `json:"eip_vnics"`
	// VIP数量
	GroupVnics int `json:"group_vnics"`

	// 预留IPv4数量
	ReserveVnics4 int `json:"reserve_vnics4"`
	// 预留IPv6数量
	ReserveVnics6 int `json:"reserve_vnics6"`

	// RDS网卡数量
	RdsVnics int `json:"rds_vnics"`
	// NAT网关网卡数量
	NatVnics      int `json:"nat_vnics"`
	BmReusedVnics int `json:"bm_reused_vnics"`

	// 弹性网卡数量
	NetworkinterfaceVnics int `json:"networkinterface_vnics"`

	// 已使用端口数量
	PortsUsed int `json:"ports_used"`

	Total int `json:"total"`

	// 已使用IPv4端口数量
	Ports6Used int `json:"ports6_used"`

	Total6 int `json:"total6"`
}

func (*SNetworkNics) SumTotal

func (self *SNetworkNics) SumTotal()

type SNetworkResourceBase

type SNetworkResourceBase struct {
	NetworkId string `json:"network_id"`
}

SNetworkResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNetworkResourceBase.

type SNetworkUsedAddress

type SNetworkUsedAddress struct {
	IpAddr        string
	Ip6Addr       string
	MacAddr       string
	Owner         string
	OwnerId       string
	OwnerStatus   string
	OwnerType     string
	AssociateId   string
	AssociateType string
	CreatedAt     time.Time
}

type SNetworkinterfacenetwork

type SNetworkinterfacenetwork struct {
	apis.SJointResourceBase
	Primary            bool   `json:"primary"`
	IpAddr             string `json:"ip_addr"`
	NetworkinterfaceId string `json:"networkinterface_id"`
	// Column(VARCHAR(36, charset='ascii'), nullable=False)
	NetworkId string `json:"network_id"`
}

SNetworkinterfacenetwork is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNetworkinterfacenetwork.

type SNetworkschedtag

type SNetworkschedtag struct {
	SSchedtagJointsBase
	NetworkId string `json:"network_id"`
}

SNetworkschedtag is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNetworkschedtag.

type SNicTrafficRecord

type SNicTrafficRecord struct {
	RxTraffic int64
	TxTraffic int64

	HasBeenSetDown bool
}

type SPolicyAssignment

type SPolicyAssignment struct {
	apis.SDomainLevelResourceBase
	SPolicyDefinitionResourceBase
}

SPolicyAssignment is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SPolicyAssignment.

type SPolicyDefinition

type SPolicyDefinition struct {
	apis.SStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	// 参数
	Parameters *jsonutils.JSONDict `json:"parameters"`
	// 条件
	Condition string `json:"condition"`
	// 类别
	Category string `json:"category"`
}

SPolicyDefinition is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SPolicyDefinition.

type SPolicyDefinitionDetails

type SPolicyDefinitionDetails struct {
}

type SPolicyDefinitionResourceBase

type SPolicyDefinitionResourceBase struct {
	// 策略Id
	PolicydefinitionId string `json:"policydefinition_id"`
}

SPolicyDefinitionResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SPolicyDefinitionResourceBase.

type SProjectMapping

type SProjectMapping struct {
	apis.SEnabledStatusInfrasResourceBase
	Rules *MappingRules `json:"rules"`
}

SProjectMapping is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SProjectMapping.

type SProjectMappingAccount

type SProjectMappingAccount struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type SProjectMappingResourceBase

type SProjectMappingResourceBase struct {
	ProjectMappingId   string `json:"project_mapping_id"`
	EnableProjectSync  *bool  `json:"enable_project_sync,omitempty"`
	EnableResourceSync *bool  `json:"enable_resource_sync,omitempty"`
}

SProjectMappingResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SProjectMappingResourceBase.

type SProjectMappingResourceInput

type SProjectMappingResourceInput struct {
	ProjectMappingId   string `json:"project_mapping_id"`
	EnableProjectSync  bool   `json:"enable_project_sync"`
	EnableResourceSync bool   `json:"enable_resource_sync"`
}

type SReservedip

type SReservedip struct {
	apis.SResourceBase
	SNetworkResourceBase
	// 自增Id
	Id int64 `json:"id"`
	// IP地址
	IpAddr string `json:"ip_addr"`
	// IPv6地址
	Ip6Addr string `json:"ip6_addr"`
	// 预留原因或描述
	Notes string `json:"notes"`
	// 过期时间
	ExpiredAt time.Time `json:"expired_at"`
	// 状态
	Status string `json:"status"`
}

SReservedip is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SReservedip.

type SRoute

type SRoute struct {
	Type        string `json:"type"`
	Cidr        string `json:"cidr"`
	NextHopType string `json:"next_hop_type"`
	NextHopId   string `json:"next_hop_id"`
}

func (*SRoute) Validate

func (route *SRoute) Validate() error

type SRouteTable

type SRouteTable struct {
	apis.SStatusInfrasResourceBase
	apis.SExternalizedResourceBase
	SVpcResourceBase
	Type   string   `json:"type"`
	Routes *SRoutes `json:"routes"`
}

SRouteTable is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SRouteTable.

type SRouteTableAssociation

type SRouteTableAssociation struct {
	apis.SStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	SRouteTableResourceBase
	AssociationType         string `json:"association_type"`
	AssociatedResourceId    string `json:"associated_resource_id"`
	ExtAssociatedResourceId string `json:"ext_associated_resource_id"`
}

SRouteTableAssociation is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SRouteTableAssociation.

type SRouteTableResourceBase

type SRouteTableResourceBase struct {
	RouteTableId string `json:"route_table_id"`
}

SRouteTableResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SRouteTableResourceBase.

type SRouteTableRouteSet

type SRouteTableRouteSet struct {
	apis.SStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	SRouteTableResourceBase
	Type         string `json:"type"`
	Cidr         string `json:"cidr"`
	NextHopType  string `json:"next_hop_type"`
	NextHopId    string `json:"next_hop_id"`
	ExtNextHopId string `json:"ext_next_hop_id"`
}

SRouteTableRouteSet is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SRouteTableRouteSet.

type SRoutes

type SRoutes []*SRoute

func (SRoutes) IsZero

func (routes SRoutes) IsZero() bool

func (SRoutes) String

func (routes SRoutes) String() string

func (*SRoutes) Validate

func (routes *SRoutes) Validate() error

type SSLCertificateCreateInput

type SSLCertificateCreateInput struct {
}

资源创建参数, 目前仅占位

type SSLCertificateDetails

资源返回详情

type SSSLCertificate

type SSSLCertificate struct {
	apis.SVirtualResourceBase
	apis.SExternalizedResourceBase
	SManagedResourceBase
	SDeletePreventableResourceBase
	Sans        string    `json:"sans"`
	StartDate   time.Time `json:"start_date"`
	Province    string    `json:"province"`
	Common      string    `json:"common"`
	Country     string    `json:"country"`
	Issuer      string    `json:"issuer"`
	Expired     bool      `json:"expired"`
	IsUpload    bool      `json:"is_upload"`
	EndDate     time.Time `json:"end_date"`
	Fingerprint string    `json:"fingerprint"`
	City        string    `json:"city"`
	OrgName     string    `json:"org_name"`
	Certificate string    `json:"certificate"`
	PrivateKey  string    `json:"private_key"`
}

SSSLCertificate is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SSSLCertificate.

type SScalingActivity

type SScalingActivity struct {
	apis.SStatusStandaloneResourceBase
	SScalingGroupResourceBase
	InstanceNumber int `json:"instance_number"`
	// 起因描述
	TriggerDesc string `json:"trigger_desc"`
	// 行为描述
	ActionDesc string    `json:"action_desc"`
	StartTime  time.Time `json:"start_time"`
	EndTime    time.Time `json:"end_time"`
	Reason     string    `json:"reason"`
}

SScalingActivity is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SScalingActivity.

type SScalingAlarm

type SScalingAlarm struct {
	apis.SStandaloneResourceBase
	SScalingPolicyBase
	// ID of alarm config in alarm service
	AlarmId string `json:"alarm_id"`
	// Trigger when the cumulative count is reached
	Cumulate  int    `json:"cumulate"`
	Cycle     int    `json:"cycle"`
	Indicator string `json:"indicator"`
	// Wrapper instruct how to calculate collective data based on individual data
	Wrapper  string  `json:"wrapper"`
	Operator string  `json:"operator"`
	Value    float64 `json:"value"`
	// Real-time cumulate number
	RealCumulate int `json:"real_cumulate"`
}

SScalingAlarm is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SScalingAlarm.

type SScalingGroup

type SScalingGroup struct {
	apis.SVirtualResourceBase
	SCloudregionResourceBase
	SVpcResourceBase
	SLoadbalancerBackendgroupResourceBase
	// GuestGroupId represent the guest gropu related to this scaling group.
	// Every scaling group will have only one guest group related to itself.
	SGroupResourceBase
	SGuestTemplateResourceBase
	apis.SEnabledResourceBase
	Hypervisor        string `json:"hypervisor"`
	MinInstanceNumber int    `json:"min_instance_number"`
	MaxInstanceNumber int    `json:"max_instance_number"`
	// DesireInstanceNumber represent the number of instances that should exist in the scaling group.
	// Scaling controller will monitor and ensure this in real time.
	// Scaling activities triggered by various policies will also modify this value.
	// This value should between MinInstanceNumber and MaxInstanceNumber
	DesireInstanceNumber int `json:"desire_instance_number"`
	// ExpansionPrinciple represent the principle when creating new instance to join in.
	ExpansionPrinciple string `json:"expansion_principle"`
	// ShrinkPrinciple represent the principle when removing instance from scaling group.
	ShrinkPrinciple           string `json:"shrink_principle"`
	HealthCheckMode           string `json:"health_check_mode"`
	HealthCheckCycle          int    `json:"health_check_cycle"`
	HealthCheckGov            int    `json:"health_check_gov"`
	LoadbalancerBackendPort   int    `json:"loadbalancer_backend_port"`
	LoadbalancerBackendWeight int    `json:"loadbalancer_backend_weight"`
}

SScalingGroup is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SScalingGroup.

type SScalingGroupGuest

type SScalingGroupGuest struct {
	SGuestJointsBase
	ScalingGroupId string `json:"scaling_group_id"`
	GuestStatus    string `json:"guest_status"`
	Manual         *bool  `json:"manual,omitempty"`
}

SScalingGroupGuest is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SScalingGroupGuest.

type SScalingGroupNetwork

type SScalingGroupNetwork struct {
	apis.SVirtualJointResourceBase
	ScalingGroupId string `json:"scaling_group_id"`
	NetworkId      string `json:"network_id"`
}

SScalingGroupNetwork is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SScalingGroupNetwork.

type SScalingGroupResourceBase

type SScalingGroupResourceBase struct {
	// ScalingGroupId
	ScalingGroupId string `json:"scaling_group_id"`
}

SScalingGroupResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SScalingGroupResourceBase.

type SScalingPolicy

type SScalingPolicy struct {
	apis.SVirtualResourceBase
	SScalingGroupResourceBase
	apis.SEnabledResourceBase
	TriggerType string `json:"trigger_type"`
	TriggerId   string `json:"trigger_id"`
	// Action of scaling activity
	Action string `json:"action"`
	Number int    `json:"number"`
	// Unit of Number
	Unit string `json:"unit"`
	// Scaling activity triggered by alarms will be rejected during this period about CoolingTime
	CoolingTime int `json:"cooling_time"`
}

SScalingPolicy is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SScalingPolicy.

type SScalingPolicyBase

type SScalingPolicyBase struct {
	ScalingPolicyId string `json:"scaling_policy_id"`
}

SScalingPolicyBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SScalingPolicyBase.

type SScalingTimer

type SScalingTimer struct {
	apis.SStandaloneResourceBase
	SScalingPolicyBase
	STimer
}

SScalingTimer is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SScalingTimer.

type SSchedpolicy

type SSchedpolicy struct {
	apis.SStandaloneResourceBase
	SSchedtagResourceBase
	Condition string `json:"condition"`
	Strategy  string `json:"strategy"`
	Enabled   *bool  `json:"enabled,omitempty"`
}

SSchedpolicy is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SSchedpolicy.

type SSchedtag

type SSchedtag struct {
	apis.SStandaloneResourceBase
	apis.SScopedResourceBase
	DefaultStrategy string `json:"default_strategy"`
	// Column(VARCHAR(16, charset='ascii'), nullable=True, default=”)
	ResourceType string `json:"resource_type"`
}

SSchedtag is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SSchedtag.

type SSchedtagJointsBase

type SSchedtagJointsBase struct {
	apis.SJointResourceBase
	SchedtagId string `json:"schedtag_id"`
}

SSchedtagJointsBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SSchedtagJointsBase.

type SSchedtagResourceBase

type SSchedtagResourceBase struct {
	// 归属调度标签ID
	SchedtagId string `json:"schedtag_id"`
}

SSchedtagResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SSchedtagResourceBase.

type SSecgroupCreateInput

type SSecgroupCreateInput struct {
	apis.SharableVirtualResourceCreateInput

	// vpc id
	// defualt: default
	VpcResourceInput
	// swagger: ignore
	CloudproviderResourceInput
	// swagger: ignore
	CloudregionResourceInput

	// swagger: ignore
	GlobalvpcId string `json:"globalvpc_id"`

	// 规则列表
	// required: false
	Rules []SSecgroupRuleCreateInput `json:"rules"`
}

type SSecgroupRuleCreateInput

type SSecgroupRuleCreateInput struct {
	apis.ResourceBaseCreateInput
	SSecgroupRuleResource

	// swagger:ignore
	Secgroup string `json:"secgroup"  yunion-deprecated-by:"secgroup_id"`

	// swagger: ignore
	Status string `json:"status"`

	// 安全组ID
	// required: true
	SecgroupId string `json:"secgroup_id"`
}

type SSecgroupRuleResource

type SSecgroupRuleResource struct {
	// 优先级, 数字越大优先级越高
	// minimum: 1
	// maximum: 100
	// required: true
	Priority *int `json:"priority"`

	// 协议
	// required: true
	//
	//
	//
	// | protocol | name    |
	// | -------- | ----    |
	// | any      | 所有协议|
	// | tcp      | TCP     |
	// | icmp     | ICMP    |
	// | udp      | UDP     |
	// enum: ["any", "tcp", "udp", "icmp"]
	Protocol string `json:"protocol"`

	// 端口列表, 参数为空代表任意端口
	// 此参数仅对protocol是tcp, udp时生效
	// 支持格式:
	// | 格式类型 | 举例    |
	// | -------- | ----    |
	// | 单端口   | 22      |
	// | 端口范围 | 100-200 |
	// | 不连续端口| 80,443 |
	// requried: false
	Ports string `json:"ports"`

	// swagger:ignore
	PortStart int
	// swagger:ignore
	PortEnd int

	// 方向
	// enum: ["in", "out"]
	// required: true
	Direction string `json:"direction"`

	// ip或cidr地址, 若指定peer_secgroup_id此参数不生效
	// example: 192.168.222.121
	CIDR string `json:"cidr"`

	// 行为
	// deny: 拒绝
	// allow: 允许
	// enum: ["deny", "allow"]
	// required: true
	Action string `json:"action"`

	// 规则描述信息
	// requried: false
	// example: test to create rule
	Description string `json:"description"`
}

func (*SSecgroupRuleResource) Check

func (input *SSecgroupRuleResource) Check() error

type SSecgroupRuleResourceSet

type SSecgroupRuleResourceSet []SSecgroupRuleResource

type SSecgroupRuleUpdateInput

type SSecgroupRuleUpdateInput struct {
	apis.ResourceBaseUpdateInput

	Priority *int    `json:"priority"`
	Ports    *string `json:"ports"`
	// ip或cidr地址, 若指定peer_secgroup_id此参数不生效
	// example: 192.168.222.121
	CIDR *string `json:"cidr"`

	// 协议
	// required: true
	//
	//
	//
	// | protocol | name    |
	// | -------- | ----    |
	// | any      | 所有协议|
	// | tcp      | TCP     |
	// | icmp     | ICMP    |
	// | udp      | UDP     |
	// enum: ["any", "tcp", "udp", "icmp"]
	Protocol *string `json:"protocol"`

	// 行为
	// deny: 拒绝
	// allow: 允许
	// enum: ["deny", "allow"]
	// required: true
	Action *string `json:"action"`

	// 规则描述信息
	// requried: false
	// example: test to create rule
	Description string `json:"description"`
}

type SSecurityGroup

SSecurityGroup is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SSecurityGroup.

type SSecurityGroupRef

type SSecurityGroupRef struct {
	GuestCnt        int `json:"guest_cnt"`
	AdminGuestCnt   int `json:"admin_guest_cnt"`
	RdsCnt          int `json:"rds_cnt"`
	RedisCnt        int `json:"redis_cnt"`
	LoadbalancerCnt int `json:"loadbalancer_cnt"`
	TotalCnt        int `json:"total_cnt"`
}

func (*SSecurityGroupRef) Sum

func (self *SSecurityGroupRef) Sum()

type SSecurityGroupResourceBase

type SSecurityGroupResourceBase struct {
	// 本地安全组ID
	SecgroupId string `json:"secgroup_id"`
}

SSecurityGroupResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SSecurityGroupResourceBase.

type SSecurityGroupRule

type SSecurityGroupRule struct {
	apis.SResourceBase
	apis.SStatusResourceBase
	apis.SExternalizedResourceBase
	SSecurityGroupResourceBase
	Id          string `json:"id"`
	Priority    int    `json:"priority"`
	Protocol    string `json:"protocol"`
	Ports       string `json:"ports"`
	Direction   string `json:"direction"`
	CIDR        string `json:"cidr"`
	Action      string `json:"action"`
	Description string `json:"description"`
}

SSecurityGroupRule is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SSecurityGroupRule.

type SServerSku

type SServerSku struct {
	apis.SEnabledStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	SCloudregionResourceBase
	SZoneResourceBase
	// SkuId       string `width:"64" charset:"ascii" nullable:"false" list:"user" create:"admin_required"`                 // x2.large
	InstanceTypeFamily string `json:"instance_type_family"`
	// x2
	InstanceTypeCategory string `json:"instance_type_category"`
	// 通用型
	LocalCategory string `json:"local_category"`
	PrepaidStatus string `json:"prepaid_status"`
	// 预付费资源状态   available|soldout
	PostpaidStatus string `json:"postpaid_status"`
	CpuArch        string `json:"cpu_arch"`
	// CPU 架构 x86|xarm
	CpuCoreCount     int    `json:"cpu_core_count"`
	MemorySizeMB     int    `json:"memory_size_mb"`
	OsName           string `json:"os_name"`
	SysDiskResizable *bool  `json:"sys_disk_resizable,omitempty"`
	SysDiskType      string `json:"sys_disk_type"`
	SysDiskMinSizeGB int    `json:"sys_disk_min_size_gb"`
	// not required。 windows比较新的版本都是50G左右。
	SysDiskMaxSizeGB   int    `json:"sys_disk_max_size_gb"`
	AttachedDiskType   string `json:"attached_disk_type"`
	AttachedDiskSizeGB int    `json:"attached_disk_size_gb"`
	AttachedDiskCount  int    `json:"attached_disk_count"`
	DataDiskTypes      string `json:"data_disk_types"`
	DataDiskMaxCount   int    `json:"data_disk_max_count"`
	NicType            string `json:"nic_type"`
	NicMaxCount        int    `json:"nic_max_count"`
	GpuAttachable      *bool  `json:"gpu_attachable,omitempty"`
	GpuSpec            string `json:"gpu_spec"`
	GpuCount           string `json:"gpu_count"`
	GpuMaxCount        int    `json:"gpu_max_count"`
	Provider           string `json:"provider"`
	Md5                string `json:"md5"`
}

SServerSku is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SServerSku.

type SServiceCatalog

type SServiceCatalog struct {
	apis.SSharableVirtualResourceBase
	IconUrl         string `json:"icon_url"`
	GuestTemplateID string `json:"guest_template_id"`
}

SServiceCatalog is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SServiceCatalog.

type SSimpleBackup

type SSimpleBackup struct {
	// 备份Id
	Id string `json:"id"`
	// 备份名称
	Name string `json:"name"`
	// 备份大小
	SizeMb int `json:"size_mb"`
	// 磁盘大小
	DiskSizeMb int `json:"disk_size_mb"`
	// 磁盘类型
	DiskType string `json:"disk_type"`
	// 备份存储Id
	BackupStorageId string `json:"backup_storage_id"`
	// 快照状态
	Status string `json:"status"`
	// 密钥
	EncryptKeyId string `json:"encrypt_key_id"`
	// 创建时间
	CreatedAt time.Time `json:"created_at"`
}

type SSimpleWire

type SSimpleWire struct {
	Wire   string
	WireId string
}

type SSnapshot

type SSnapshot struct {
	apis.SVirtualResourceBase
	apis.SExternalizedResourceBase
	SManagedResourceBase
	SCloudregionResourceBase
	apis.SMultiArchResourceBase
	apis.SEncryptedResource
	// 磁盘Id
	DiskId string `json:"disk_id"`
	// Only onecloud has StorageId
	StorageId string `json:"storage_id"`
	CreatedBy string `json:"created_by"`
	Location  string `json:"location"`
	// 快照大小,单位Mb
	Size        int    `json:"size"`
	OutOfChain  bool   `json:"out_of_chain"`
	FakeDeleted bool   `json:"fake_deleted"`
	DiskType    string `json:"disk_type"`
	// 操作系统类型
	OsType string `json:"os_type"`
	// create disk from snapshot, snapshot as disk backing file
	RefCount      int       `json:"ref_count"`
	BackingDiskId string    `json:"backing_disk_id"`
	DiskBackupId  string    `json:"disk_backup_id"`
	ExpiredAt     time.Time `json:"expired_at"`
}

SSnapshot is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SSnapshot.

type SSnapshotPolicy

type SSnapshotPolicy struct {
	apis.SVirtualResourceBase
	apis.SExternalizedResourceBase
	SManagedResourceBase
	SCloudregionResourceBase
	RetentionDays int `json:"retention_days"`
	// 1~7, 1 is Monday
	RepeatWeekdays []int `json:"repeat_weekdays"`
	// 0~23
	TimePoints []int `json:"time_points"`
}

SSnapshotPolicy is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SSnapshotPolicy.

type SSnapshotPolicyCreateInput

type SSnapshotPolicyCreateInput struct {
	apis.VirtualResourceCreateInput
	CloudproviderResourceInput
	CloudregionResourceInput

	RetentionDays int `json:"retention_days"`

	RepeatWeekdays []int `json:"repeat_weekdays"`

	TimePoints []int `json:"time_points"`
}

func (*SSnapshotPolicyCreateInput) Validate

func (self *SSnapshotPolicyCreateInput) Validate() error

type SSnapshotPolicyDisk

type SSnapshotPolicyDisk struct {
	apis.SVirtualJointResourceBase
	SnapshotpolicyId string `json:"snapshotpolicy_id"`
	SDiskResourceBase
}

SSnapshotPolicyDisk is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SSnapshotPolicyDisk.

type SSnapshotPolicyUpdateInput

type SSnapshotPolicyUpdateInput struct {
	apis.VirtualResourceBaseUpdateInput

	RetentionDays *int

	RepeatWeekdays *[]int `json:"repeat_weekdays"`
	TimePoints     *[]int `json:"time_points"`
}

func (*SSnapshotPolicyUpdateInput) Validate

func (self *SSnapshotPolicyUpdateInput) Validate() error

type SStorage

type SStorage struct {
	apis.SEnabledStatusInfrasResourceBase
	apis.SExternalizedResourceBase
	SManagedResourceBase
	SZoneResourceBase
	// 容量大小,单位Mb
	Capacity int64 `json:"capacity"`
	// 实际容量大小,单位Mb
	// we always expect actual capacity great or equal than zero, otherwise something wrong
	ActualCapacityUsed int64 `json:"actual_capacity_used"`
	// 预留容量大小
	Reserved int64 `json:"reserved"`
	// 存储类型
	// example: local
	StorageType string `json:"storage_type"`
	// 介质类型
	// example: ssd
	MediumType string `json:"medium_type"`
	// 超售比
	Cmtbound float32 `json:"cmtbound"`
	// 存储配置信息
	StorageConf jsonutils.JSONObject `json:"storage_conf"`
	// 存储缓存Id
	StoragecacheId string `json:"storagecache_id"`
	// master host id
	MasterHost string `json:"master_host"`
	// indicating whether system disk can be allocated in this storage
	// 是否可以用作系统盘存储
	// example: true
	IsSysDiskStore *bool `json:"is_sys_disk_store,omitempty"`
}

SStorage is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SStorage.

type SStorageCapacityInfo

type SStorageCapacityInfo struct {
	// 已使用容量大小
	UsedCapacity int64 `json:"used_capacity"`
	// 浪费容量大小(异常磁盘大小总和)
	WasteCapacity int64 `json:"waste_capacity"`
	// 虚拟容量大小
	VirtualCapacity int64 `json:"virtual_capacity"`
	// 超分率
	CommitRate float64 `json:"commit_rate"`
	// 可使用容量
	FreeCapacity int64 `json:"free_capacity"`
}

type SStorageResourceBase

type SStorageResourceBase struct {
	StorageId string `json:"storage_id"`
}

SStorageResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SStorageResourceBase.

type SStoragecache

type SStoragecache struct {
	apis.SStandaloneResourceBase
	apis.SExternalizedResourceBase
	SManagedResourceBase
	// 镜像存储地址
	Path string `json:"path"`
	// master host id
	MasterHost string `json:"master_host"`
}

SStoragecache is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SStoragecache.

type SStoragecacheResourceBase

type SStoragecacheResourceBase struct {
	// 存储缓存Id
	StoragecacheId string `json:"storagecache_id"`
}

SStoragecacheResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SStoragecacheResourceBase.

type SStoragecachedimage

type SStoragecachedimage struct {
	apis.SJointResourceBase
	apis.SExternalizedResourceBase
	SStoragecacheResourceBase
	// 镜像缓存Id
	CachedimageId string `json:"cachedimage_id"`
	// 镜像状态
	Status string `json:"status"`
	Path   string `json:"path"`
	// 上次下载时间
	LastDownload time.Time `json:"last_download"`
	// 下载引用次数
	DownloadRefcnt int `json:"download_refcnt"`
}

SStoragecachedimage is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SStoragecachedimage.

type SStorageschedtag

type SStorageschedtag struct {
	SSchedtagJointsBase
	StorageId string `json:"storage_id"`
}

SStorageschedtag is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SStorageschedtag.

type SSubImage

type SSubImage struct {
	Id         string
	Name       string
	MinDiskMB  int32
	DiskFormat string
}

type SSyncableBaseResource

type SSyncableBaseResource struct {
	SyncStatus string    `json:"sync_status"`
	LastSync   time.Time `json:"last_sync"`
	// = Column(DateTime, nullable=True)
	LastSyncEndAt time.Time `json:"last_sync_end_at"`
}

SSyncableBaseResource is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SSyncableBaseResource.

type STablestore

STablestore is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.STablestore.

type STapServiceConfig

type STapServiceConfig struct {
	TapHostIp string `json:"tap_host_ip"`

	MacAddr string `json:"mac_addr"`

	Ifname string `json:"ifname"`

	Mirrors []SMirrorConfig
}

type STimer

type STimer struct {
	// Cycle type
	Type string `json:"type"`
	// 0-59
	Minute int `json:"minute"`
	// 0-23
	Hour int `json:"hour"`
	// 0-7 1 is Monday 0 is unlimited
	WeekDays byte `json:"week_days"`
	// 0-31 0 is unlimited
	MonthDays uint32 `json:"month_days"`
	// StartTime represent the start time of this timer
	StartTime time.Time `json:"start_time"`
	// EndTime represent deadline of this timer
	EndTime time.Time `json:"end_time"`
	// NextTime represent the time timer should bell
	NextTime  time.Time `json:"next_time"`
	IsExpired bool      `json:"is_expired"`
}

STimer is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.STimer.

type SVCpuPin

type SVCpuPin struct {
	Vcpu int
	Pcpu int
}

type SVpc

type SVpc struct {
	apis.SEnabledStatusInfrasResourceBase
	apis.SExternalizedResourceBase
	SManagedResourceBase
	SCloudregionResourceBase
	SGlobalVpcResourceBase
	// 是否是默认VPC
	// example: true
	IsDefault bool `json:"is_default"`
	// CIDR地址段
	// example: 192.168.222.0/24
	CidrBlock string `json:"cidr_block"`
	// CIDR for IPv6
	CidrBlock6 string `json:"cidr_block6"`
	// Vpc外网访问模式
	ExternalAccessMode string `json:"external_access_mode"`
	// Can it be connected directly
	Direct bool `json:"direct"`
}

SVpc is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SVpc.

type SVpcPeeringConnection

type SVpcPeeringConnection struct {
	apis.SEnabledStatusInfrasResourceBase
	apis.SExternalizedResourceBase
	SVpcResourceBase
	ExtPeerVpcId     string `json:"ext_peer_vpc_id"`
	ExtPeerAccountId string `json:"ext_peer_account_id"`
	PeerVpcId        string `json:"peer_vpc_id"`
	PeerAccountId    string `json:"peer_account_id"`
	Bandwidth        int    `json:"bandwidth"`
}

SVpcPeeringConnection is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SVpcPeeringConnection.

type SVpcResourceBase

type SVpcResourceBase struct {
	VpcId string `json:"vpc_id"`
}

SVpcResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SVpcResourceBase.

type SWafIPSet

SWafIPSet is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SWafIPSet.

type SWafInstance

type SWafInstance struct {
	apis.SEnabledStatusInfrasResourceBase
	apis.SExternalizedResourceBase
	SManagedResourceBase
	SCloudregionResourceBase
	Type          string                       `json:"type"`
	DefaultAction *cloudprovider.DefaultAction `json:"default_action"`
	Cname         string                       `json:"cname"`
	// 前面是否有代理服务
	IsAccessProduct bool     `json:"is_access_product"`
	AccessHeaders   []string `json:"access_headers"`
	// 源站地址
	SourceIps []string `json:"source_ips"`
	// 回源地址
	CcList         []string `json:"cc_list"`
	HttpPorts      []int    `json:"http_ports"`
	HttpsPorts     []int    `json:"https_ports"`
	UpstreamScheme string   `json:"upstream_scheme"`
	UpstreamPort   int      `json:"upstream_port"`
	CertId         string   `json:"cert_id"`
	CertName       string   `json:"cert_name"`
}

SWafInstance is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SWafInstance.

type SWafRegexSet

type SWafRegexSet struct {
	apis.SStatusInfrasResourceBase
	apis.SExternalizedResourceBase
	SManagedResourceBase
	SCloudregionResourceBase
	RegexPatterns *cloudprovider.WafRegexPatterns `json:"regex_patterns"`
	Type          string                          `json:"type"`
}

SWafRegexSet is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SWafRegexSet.

type SWafRule

type SWafRule struct {
	apis.SStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	// 规则优先级
	Priority int `json:"priority"`
	// 规则默认行为
	Action *cloudprovider.DefaultAction `json:"action"`
	// 条件
	StatementConditon string `json:"statement_conditon"`
	// 规则组的id
	WafRuleGroupId string `json:"waf_rule_group_id"`
	// 所属waf实例id
	WafInstanceId string `json:"waf_instance_id"`
}

SWafRule is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SWafRule.

type SWafRuleGroup

SWafRuleGroup is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SWafRuleGroup.

type SWafRuleStatement

type SWafRuleStatement struct {
	apis.SResourceBase
	Id string `json:"id"`
	cloudprovider.SWafStatement
	WafRuleId string `json:"waf_rule_id"`
}

SWafRuleStatement is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SWafRuleStatement.

type SWire

type SWire struct {
	apis.SStatusInfrasResourceBase
	apis.SExternalizedResourceBase
	SManagedResourceBase
	SVpcResourceBase
	SZoneResourceBase
	// 带宽大小, 单位Mbps
	// example: 1000
	Bandwidth int `json:"bandwidth"`
	// MTU
	// example: 1500
	Mtu int `json:"mtu"`
	// swagger:ignore
	ScheduleRank int `json:"schedule_rank"`
}

SWire is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SWire.

type SWireResourceBase

type SWireResourceBase struct {
	// 二层网络ID
	WireId string `json:"wire_id"`
}

SWireResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SWireResourceBase.

type SZone

type SZone struct {
	apis.SStatusStandaloneResourceBase
	apis.SExternalizedResourceBase
	SI18nResourceBase
	SCloudregionResourceBase
	Location   string `json:"location"`
	Contacts   string `json:"contacts"`
	NameCn     string `json:"name_cn"`
	ManagerUri string `json:"manager_uri"`
}

SZone is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SZone.

type SZoneResourceBase

type SZoneResourceBase struct {
	ZoneId string `json:"zone_id"`
}

SZoneResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SZoneResourceBase.

type ScalingAlarmCreateInput

type ScalingAlarmCreateInput struct {

	// description: 累计次数(报警次数达到此累计次数就会触发伸缩活动)
	// example: 1
	Cumulate int `json:"cumulate"`

	// description: 监控周期,单位s
	// example: 300
	Cycle int `json:"cycle"`

	// description: 监控指标
	// example: cpu
	// enum: ["cpu","disk_read","disk_write","flow_into","flow_out"]
	Indicator string `json:"indicator"`

	// description: 监控指标的取值方式(比如最大值,最小值,平均值)
	// example: max
	// enum: ["max","min","average"]
	Wrapper string `json:"wrapper"`

	// descripion: 监控指标的比较符
	// example: ge
	// enum: ["ge","le"]
	Operator string `json:"operator"`

	// description: 监控指标的取值
	// example: 3
	Value float64 `json:"value"`
}

type ScalingAlarmDetails

type ScalingAlarmDetails struct {
	// description: 累计次数,只有到达累计次数的报警才会触发伸缩活动
	Cumulate int `json:"cumulate"`
	// description: 监控周期
	Cycle int `json:"cycle"`
	// description: 指标
	Indicator string `json:"indicator"`
	// description: 指标的取值方式,最大值/最小值/平均值
	Wrapper string `json:"wrapper"`
	// description: 指标和阈值之间的比较关系,>=/<=
	Operator string `json:"operator"`
	// description: 阈值
	Value float64 `json:"value"`
}

type ScalingGroupCreateInput

type ScalingGroupCreateInput struct {
	apis.VirtualResourceCreateInput
	apis.EnabledBaseResourceCreateInput
	VpcResourceInput

	// description: cloud region id or name
	// required: true
	// example: cr-test-one
	Cloudregion string `json:"cloudregion"`

	//swagger: ignore
	CloudregionId string `json:"cloudregion_id"`

	// description: hypervisor
	// example: kvm
	Hypervisor string `json:"hypervisor"`

	// description: 多个网络(ID或者Name),
	// example: n-test-one
	Networks []string `json:"networks"`

	// description: 最小实例数
	// example: 0
	MinInstanceNumber int `json:"min_instance_number"`

	// description: 最大实例数
	// example: 10
	MaxInstanceNumber int `json:"max_instance_number"`

	// description: 期望实例数
	// example: 1
	DesireInstanceNumber int `json:"desire_instance_number"`

	// description: 主机模板 id or name
	// example: gt-test-one
	GuestTemplate string `json:"guest_template"`

	// swagger: ignore
	GuestTemplateId string `json:"guest_template_id"`

	// description: 扩容策略
	// enum: ["balanced"]
	// required: false
	// example: balanced
	ExpansionPrinciple string `json:"expansion_principle"`

	// description: 缩容策略
	// enum: ["earliest","latest","config_earliest","config_latest"]
	// example: latest
	ShrinkPrinciple string `json:"shrink_principle"`

	// description: 检查健康模式
	// enum: ["normal","loadbalancer"]
	// example: normal
	HealthCheckMode string `json:"health_check_mode"`

	// description: 健康检查周期
	// example: 300
	HealthCheckCycle int `json:"health_check_cycle"`

	// description: 健康检查缓冲时间
	// example: 180
	HealthCheckGov int `json:"health_check_gov"`

	// description: 负载均衡后端服务器组
	// example: lbg-nihao
	LbBackendGroup string `json:"lb_backend_group"`

	// swagger: ignore
	BackendGroupId string `json:"backend_group_id"`

	// description: 负载均衡后端服务器统一端口
	// example: 8080
	LoadbalancerBackendPort int `json:"loadbalancer_backend_port"`

	// description: 负载均衡后端服务器的weight
	// example: 10
	LoadbalancerBackendWeight int `json:"loadbalancer_backend_weight"`
}

type ScalingGroupDetails

type ScalingGroupDetails struct {
	apis.VirtualResourceDetails
	CloudregionResourceInfo
	LoadbalancerBackendGroupResourceInfo
	VpcResourceInfo
	GroupResourceInfo
	GuestTemplateResourceInfo
	SScalingGroup

	// description: 实例数
	// example: 0
	InstanceNumber int `json:"instance_number"`

	// description: 伸缩策略的数量
	// example: 3
	ScalingPolicyNumber int `json:"scaling_policy_number"`

	// description: 平台
	// example: OneCloud
	Brand string `json:"brand"`

	// description: 网络信息
	Networks []ScalingGroupNetwork `json:"networks"`
}

type ScalingGroupFilterListInput

type ScalingGroupFilterListInput struct {
	// description: 伸缩组 Id or Name
	// example: sg-1234
	ScalingGroup string `json:"scaling_group"`
}

type ScalingGroupListInput

type ScalingGroupListInput struct {
	apis.VirtualResourceListInput
	RegionalFilterListInput
	LoadbalancerBackendGroupFilterListInput
	VpcFilterListInput
	GroupFilterListInput
	GuestTemplateFilterListInput
	apis.EnabledResourceBaseListInput
	// description: hypervisor
	// example: kvm
	Hypervisor string `json:"hypervisor"`

	// desription: 平台
	// example: OneCloud
	Brand string `json:"brand"`
}

type ScalingGroupNetwork

type ScalingGroupNetwork struct {
	Id           string `json:"id"`
	Name         string `json:"name"`
	GuestIpStart string `json:"guest_ip_start"`
	GuestIpEnd   string `json:"guest_ip_end"`
}

type ScalingGroupResourceInfo

type ScalingGroupResourceInfo struct {
	// description: 伸缩组名称
	// example: sg-nihao
	ScalingGroup string `json:"scaling_group"`

	// description: 伸缩组ID
	// example: sg-1234
	ScalingGroupId string `json:"scaling_group_id"`
}

type ScalingPolicyCreateInput

type ScalingPolicyCreateInput struct {
	apis.VirtualResourceCreateInput
	apis.EnabledBaseResourceCreateInput

	// description: scaling_group ID or Name
	// example: sg-test-one
	ScalingGroup string `json:"scaling_group"`

	// swagger: ignore
	ScalingGroupId string `json:"scaling_group_id"`

	// description: trigger type
	// enum: ["timing","cycle","alarm"]
	TriggerType string `json:"trigger_type"`

	Timer      TimerCreateInput        `json:"timer"`
	CycleTimer CycleTimerCreateInput   `json:"cycle_timer"`
	Alarm      ScalingAlarmCreateInput `json:"alarm"`

	// desciption: 伸缩策略的行为(增加还是删除或者调整为)
	// enum: ["add","remove","set"]
	// example: add
	Action string `json:"action"`

	// desciption: 实例的数量
	// example: 2
	Number int `json:"number"`

	// desciption: 实例数量的单位
	// enum: ["s","%"]
	// example: s
	Unit string `json:"unit"`

	// desciption: Scaling activity triggered by alarms will be rejected during this period about CoolingTime
	// example: 300
	CoolingTime int `json:"cooling_time"`
}

type ScalingPolicyDetails

type ScalingPolicyDetails struct {
	apis.VirtualResourceDetails
	ScalingGroupResourceInfo
	SScalingPolicy
	// 定时方式触发
	Timer TimerDetails `json:"timer"`
	// 周期方式触发
	CycleTimer CycleTimerDetails `json:"cycle_timer"`
	//  告警方式触发
	Alarm ScalingAlarmDetails `json:"alarm"`
}

type ScalingPolicyListInput

type ScalingPolicyListInput struct {
	apis.VirtualResourceListInput
	apis.EnabledResourceBaseListInput

	// description: scaling group
	// example: sg-test
	ScalingGroupFilterListInput

	// description: trigger type
	// enum: ["timing","cycel","alarm"]
	// example: alarm
	TriggerType string `json:"trigger_type"`
}

type SchedpolicyListInput

type SchedpolicyListInput struct {
	apis.StandaloneResourceListInput
	SchedtagFilterListInput

	//
	Strategy []string `json:"strategy"`

	//
	Enabled *bool `json:"enabled"`
}

type SchedtagConfig

type SchedtagConfig struct {
	apis.Meta

	// swagger: ignore
	Id string `json:"id"`
	// 调度策略
	// required: 必须使用
	// prefer: 尽量使用
	// avoid: 避免使用
	// exclude: 禁止使用
	// enmu: required, prefer, avoid, exclude
	Strategy string `json:"strategy"`
	// swagger: ignore
	Weight int `json:"weight"`
	// 资源类型
	// hosts: 宿主机
	// networks: 网络
	// storages: 存储
	// enmu: hosts, storages, networks
	ResourceType string `json:"resource_type"`
}

type SchedtagCreateInput

type SchedtagCreateInput struct {
	apis.StandaloneResourceCreateInput
	apis.ScopedResourceCreateInput

	// 动态标签策略
	// enum: ["exclude", "prefer", "avoid"]
	DefaultStrategy string `json:"default_strategy"`

	// 资源类型
	// enum: ["servers", "hosts", "...."]
	// default: hosts
	ResourceType string `json:"resource_type"`
}

type SchedtagDetails

type SchedtagDetails struct {
	apis.StandaloneResourceDetails
	apis.ScopedResourceBaseInfo

	SSchedtag

	DynamicSchedtagCount int    `json:"dynamic_schedtag_count"`
	SchedpolicyCount     int    `json:"schedpolicy_count"`
	HostCount            int    `json:"host_count"`
	ServerCount          int    `json:"server_count"`
	OtherCount           int    `json:"other_count"`
	ResourceCount        int    `json:"resource_count"`
	JoinModelKeyword     string `json:"join_model_keyword"`
}

type SchedtagFilterListInput

type SchedtagFilterListInput struct {
	SchedtagResourceInput

	// 按调度标签名称排序
	// pattern:asc|desc
	OrderBySchedtag string `json:"order_by_schedtag"`

	// 按调度标签资源类型排序
	// pattern:asc|desc
	OrderByResourceType string `json:"order_by_resource_type"`
}

type SchedtagJointResourceDetails

type SchedtagJointResourceDetails struct {
	apis.JointResourceBaseDetails

	// 调度标签名称
	Schedtag string `json:"schedtag"`

	// 调度标签管理的资源类型
	ResourceType string `json:"resource_type"`
}

type SchedtagListInput

type SchedtagListInput struct {
	apis.StandaloneResourceListInput
	apis.ScopedResourceBaseListInput
	CloudproviderResourceInput

	// fitler by resource_type
	ResourceType []string `json:"resource_type"`
	// swagger:ignore
	// Deprecated
	// filter by type, alias for resource_type
	Type string `json:"type" yunion-deprecated-by:"resource_type"`

	DefaultStrategy []string `json:"default_strategy"`
}

type SchedtagResourceInfo

type SchedtagResourceInfo struct {

	// 调度标签名称
	Schedtag string `json:"schedtag"`

	// 调度标签管理的资源类型
	ResourceType string `json:"resource_type"`
}

type SchedtagResourceInput

type SchedtagResourceInput struct {
	// 以关联的调度标签(ID或Name)过滤列表
	SchedtagId string `json:"schedtag_id"`
	// swagger:ignore
	// Deprecated
	// filter by schedtag_id
	Schedtag string `json:"schedtag" yunion-deprecated-by:"schedtag_id"`
}

type SchedtagSetResourceInput

type SchedtagSetResourceInput struct {
	ResourceIds []string `json:"resource_ids"`
}

type SchedtagShortDescDetails

type SchedtagShortDescDetails struct {
	*apis.StandaloneResourceShortDescDetail
	Default string `json:"default"`
}

type SecgroupDetails

type SecgroupDetails struct {
	apis.SharableVirtualResourceDetails
	SSecurityGroup

	VpcResourceInfo
	GlobalVpcResourceInfo

	// 关联云主机数量, 不包含回收站云主机
	GuestCnt int `json:"guest_cnt,allowempty"`

	// 关联此安全组的云主机is_system为true数量, , 不包含回收站云主机
	SystemGuestCnt int `json:"system_guest_cnt,allowempty"`

	// admin_secgrp_id为此安全组的云主机数量, , 不包含回收站云主机
	AdminGuestCnt int `json:"admin_guest_cnt,allowempty"`

	// 关联LB数量
	LoadbalancerCnt int `json:"loadbalancer_cnt,allowempty"`

	// 关联RDS数量
	RdsCnt int `json:"rds_cnt,allowempty"`
	// 关联Redis数量
	RedisCnt int `json:"redis_cnt,allowempty"`

	// 所有关联的资源数量
	TotalCnt int `json:"total_cnt,allowempty"`
}

type SecgroupFilterListInput

type SecgroupFilterListInput struct {
	SecgroupResourceInput

	// 以安全组排序
	OrderBySecgroup string `json:"order_by_secgroup"`
}

type SecgroupImportRulesInput

type SecgroupImportRulesInput struct {
	Rules []SSecgroupRuleCreateInput `json:"rules"`
}

type SecgroupJsonDesc

type SecgroupJsonDesc struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type SecgroupListInput

type SecgroupListInput struct {
	apis.SharableVirtualResourceListInput
	apis.ExternalizedResourceBaseListInput

	ServerResourceInput

	DBInstanceResourceInput
	ELasticcacheResourceInput

	// 按缓存关联主机数排序
	// pattern:asc|desc
	OrderByGuestCnt string `json:"order_by_guest_cnt"`

	// 模糊过滤规则中含有指定ip的安全组
	// example: 10.10.2.1
	Ip string `json:"ip"`

	// 精确匹配规则中含有指定端口的安全组
	// example: 100-200
	Ports string `json:"ports"`

	// 指定过滤规则的方向(仅在指定ip或ports时生效) choices: all|in|out
	// default: all
	// example: in
	Direction string `json:"direction"`

	VpcId string `json:"vpc_id"`

	LoadbalancerId string `json:"loadbalancer_id"`
	RegionalFilterListInput
	ManagedResourceListInput
}

type SecgroupResourceInput

type SecgroupResourceInput struct {
	// 过滤关联指定安全组(ID或Name)的列表结果
	SecgroupId string `json:"secgroup_id"`
	// swagger:ignore
	// Deprecated
	// filter by secgroup_id
	Secgroup string `json:"secgroup" yunion-deprecated-by:"secgroup_id"`

	// 模糊匹配安全组规则名称
	SecgroupName string `json:"secgroup_name"`
}

type SecgroupRuleDetails

type SecgroupRuleDetails struct {
	apis.ResourceBaseDetails
	apis.ProjectizedResourceInfo
	SSecurityGroupRule
	SecurityGroupResourceInfo

	ProjectId string `json:"tenant_id"`
}

type SecurityGroupCloneInput

type SecurityGroupCloneInput struct {
	Name        string
	Description string
}

type SecurityGroupResourceInfo

type SecurityGroupResourceInfo struct {
	// 安全组名称
	Secgroup string `json:"secgroup"`
}

type SecurityGroupRuleListInput

type SecurityGroupRuleListInput struct {
	apis.ResourceBaseListInput
	apis.ExternalizedResourceBaseListInput
	SecgroupFilterListInput

	Projects []string `json:"projects"`

	// 以direction字段过滤安全组规则
	Direction string `json:"direction"`
	// 以action字段过滤安全组规则
	Action string `json:"action"`
	// 以protocol字段过滤安全组规则
	Protocol string `json:"protocol"`
	// 以ports字段过滤安全组规则
	Ports string `json:"ports"`
	// 根据ip模糊匹配安全组规则
	Ip string `json:"ip"`
}

type SecurityGroupSyncstatusInput

type SecurityGroupSyncstatusInput struct {
}

type ServerAssociateEipInput

type ServerAssociateEipInput struct {
	// swagger:ignore
	// Deprecated
	Eip string `json:"eip" yunion-deprecated-by:"eip_id"`
	// 弹性公网IP的ID
	EipId string `json:"eip_id"`

	// 弹性IP映射的内网IP地址,可选
	IpAddr string `json:"ip_addr"`
}

type ServerAttachDiskInput

type ServerAttachDiskInput struct {
	DiskId string `json:"disk_id"`

	BootIndex *int8 `json:"boot_index"`
}

type ServerCPUSetInput

type ServerCPUSetInput struct {
	// Specifies the CPUs that tasks in this cgroup are permitted to access.
	CPUS []int `json:"cpus"`
}

type ServerCPUSetRemoveInput

type ServerCPUSetRemoveInput struct{}

type ServerCPUSetRemoveResp

type ServerCPUSetRemoveResp struct {
	Done  bool   `json:"done"`
	Error string `json:"error"`
}

type ServerCPUSetResp

type ServerCPUSetResp struct{}

type ServerChangeBandwidthInput

type ServerChangeBandwidthInput struct {
	ServerNetworkInfo

	Bandwidth int `json:"bandwidth"`

	NoSync *bool `json:"no_sync"`
}

type ServerChangeConfigInput

type ServerChangeConfigInput struct {
	// 关机且停机不收费情况下不允许调整配置
	// 实例类型, 优先级高于vcpu_count和vmem_size
	InstanceType string `json:"instance_type"`
	// swagger: ignore
	Sku string `json:"sku" yunion-deprecated-by:"instance_type"`
	// swagger: ignore
	Flavor string `json:"flavor" yunion-deprecated-by:"instance_type"`

	// cpu卡槽数
	// vmware 若开机调整配置时,需要保证调整前及调整后 vcpu_count / cpu_sockets 保持不变
	// vmware开机调整配置同样需要注意 https://kb.vmware.com/s/article/2008405
	CpuSockets *int `json:"cpu_sockets"`

	// cpu大小
	VcpuCount *int `json:"vcpu_count"`
	// 任务分配CPU大小
	ExtraCpuCount *int `json:"extra_cpu_count"`
	// 内存大小, 1024M, 1G
	VmemSize string `json:"vmem_size"`

	// 调整完配置后是否自动启动
	AutoStart bool `json:"auto_start"`

	// disks start from index 1, i.e. cannot change size of system disk(1st disk)
	Disks []DiskConfig `json:"disks"`

	SetTrafficLimits   []ServerNicTrafficLimit
	ResetTrafficLimits []ServerNicTrafficLimit
}

type ServerChangeConfigSettings

type ServerChangeConfigSettings struct {
	Old ServerChangeConfigSpecs `json:"old"`

	ServerChangeConfigSpecs

	InstanceTypeFamily string `json:"instance_type_family"`
	// disks to resize
	Resize []*DiskResizeSpec `json:"resize"`
	// disks to create
	Create []*DiskConfig `json:"create"`

	AutoStart   bool `json:"auto_start"`
	GuestOnline bool `json:"guest_online"`

	SetTrafficLimits   []ServerNicTrafficLimit `json:"set_traffic_limits"`
	ResetTrafficLimits []ServerNicTrafficLimit `json:"reset_traffic_limits"`

	SchedDesc jsonutils.JSONObject `json:"sched_desc"`
}

func (ServerChangeConfigSettings) AddedCpu

func (conf ServerChangeConfigSettings) AddedCpu() int

func (ServerChangeConfigSettings) AddedDisk

func (conf ServerChangeConfigSettings) AddedDisk() int

func (ServerChangeConfigSettings) AddedExtraCpu

func (conf ServerChangeConfigSettings) AddedExtraCpu() int

func (ServerChangeConfigSettings) AddedMem

func (conf ServerChangeConfigSettings) AddedMem() int

func (ServerChangeConfigSettings) CpuChanged

func (conf ServerChangeConfigSettings) CpuChanged() bool

func (ServerChangeConfigSettings) ExtraCpuChanged

func (conf ServerChangeConfigSettings) ExtraCpuChanged() bool

func (ServerChangeConfigSettings) MemChanged

func (conf ServerChangeConfigSettings) MemChanged() bool

type ServerChangeConfigSpecs

type ServerChangeConfigSpecs struct {
	CpuSockets    int    `json:"cpu_sockets"`
	VcpuCount     int    `json:"vcpu_count"`
	ExtraCpuCount int    `json:"extra_cpu_count"`
	VmemSize      int    `json:"vmem_size"`
	InstanceType  string `json:"instance_type"`
}

type ServerChangeDiskStorageInput

type ServerChangeDiskStorageInput struct {
	DiskId          string `json:"disk_id"`
	TargetStorageId string `json:"target_storage_id"`
	KeepOriginDisk  bool   `json:"keep_origin_disk"`
}

type ServerChangeDiskStorageInternalInput

type ServerChangeDiskStorageInternalInput struct {
	ServerChangeDiskStorageInput
	StorageId      string             `json:"storage_id"`
	TargetDiskId   string             `json:"target_disk_id"`
	DiskFormat     string             `json:"disk_format"`
	GuestRunning   bool               `json:"guest_running"`
	TargetDiskDesc *GuestdiskJsonDesc `json:"target_disk_desc"`

	// clone progress
	CompletedDiskCount int `json:"completed_disk_count"`
	CloneDiskCount     int `json:"disk_count"`
}

type ServerChangeIpaddrInput

type ServerChangeIpaddrInput struct {
	ServerNetworkInfo

	NetDesc string         `json:"net_desc"`
	NetConf *NetworkConfig `json:"net_conf"`

	Reserve *bool `json:"reserve"`

	RestartNetwork *bool `json:"restart_network"`
}

type ServerChangeStorageInput

type ServerChangeStorageInput struct {
	TargetStorageId string `json:"target_storage_id"`
	KeepOriginDisk  bool   `json:"keep_origin_disk"`
}

type ServerChangeStorageInternalInput

type ServerChangeStorageInternalInput struct {
	ServerChangeStorageInput
	Disks        []string `json:"disks"`
	GuestRunning bool     `json:"guest_running"`
	DiskCount    int      `json:"disk_count"`
}

type ServerCloneInput

type ServerCloneInput struct {
	apis.Meta

	Name      string `json:"name"`
	AutoStart bool   `json:"auto_start"`

	EipBw         int    `json:"eip_bw,omitzero"`
	EipChargeType string `json:"eip_charge_type,omitempty"`
	Eip           string `json:"eip,omitempty"`

	PreferHostId string `json:"prefer_host_id"`
}

type ServerConfigs

type ServerConfigs struct {
	// 调度使用指定的云账号
	PreferManager string `json:"prefer_manager_id"`

	// 调度到指定区域,优先级低于prefer_zone_id
	PreferRegion string `json:"prefer_region_id"`

	// 调度到指定可用区,优先级低于prefer_host_id
	PreferZone string `json:"prefer_zone_id"`

	// 调度使用指定二层网络, 优先级低于prefer_host_id
	PreferWire string `json:"prefer_wire_id"`

	// 调度使用指定宿主机
	PreferHost string `json:"prefer_host_id"`

	// 主机高可用时,将备机调度到指定宿主机, 此参数仅对KVM生效
	PreferBackupHost string `json:"prefer_backup_host"`

	// 虚拟化技术或平台
	//
	//
	//
	// |hypervisor    |    技术或平台    |
	// |-------        |    ----------    |
	// |kvm            |    本地私有云    |
	// |esxi        |    VMWare        |
	// |baremetal    |    裸金属        |
	// |aliyun        |    阿里云        |
	// |aws            |    亚马逊        |
	// |qcloud        |    腾讯云        |
	// |azure        |    微软云        |
	// |huawei        |    华为云        |
	// |openstack    |    OpenStack    |
	// |ucloud        |    Ucloud        |
	// |zstack        |    ZStack        |
	// |google        |    谷歌云        |
	// |ctyun        |    天翼云        |
	// default: kvm
	Hypervisor string `json:"hypervisor"`

	// swagger: ignore
	Provider string `json:"provider"`

	// 包年包月资源池
	// swagger:ignore
	// emum: shared, prepaid, dedicated
	ResourceType string `json:"resource_type"`

	// 套餐名称, 此参数优先级高于vcpu_count和vmem_size
	// 套餐可以通过 serverskus 列表获取
	// esxi, openstack, zstack等私有云都统一使用provider为OneCloud的套餐
	// 公有云使用各自的套餐
	InstanceType string `json:"instance_type"`

	// swagger:ignore
	// Deprecated
	// alias for InstanceType
	Sku string `json:"sku" yunion-deprecated-by:"instance_type"`

	// 虚拟机高可用(创建备机)
	// default: false
	// required: false
	Backup bool `json:"backup"`

	// 设置为 daemon 虚机
	// default: false
	// required: false
	IsDaemon *bool `json:"is_daemon"`

	// swagger:ignore
	// 创建虚拟机数量
	// default: 1
	Count int `json:"count"`

	// 磁盘列表,第一块磁盘为系统盘,需要指定image_id
	// 若指定主机快照,此参数可以为空
	// required: true
	Disks []*DiskConfig `json:"disks"`

	// 指定主机网络
	// required: false
	Networks []*NetworkConfig `json:"nets"`

	// 调度标签
	// required: false
	Schedtags []*SchedtagConfig `json:"schedtags"`

	// 透传设备列表
	// required: false
	IsolatedDevices []*IsolatedDeviceConfig `json:"isolated_devices"`

	// 裸金属磁盘配置列表
	BaremetalDiskConfigs []*BaremetalDiskConfig `json:"baremetal_disk_configs"`

	// 裸金属系统盘匹配器
	BaremetalRootDiskMatcher *BaremetalRootDiskMatcher `json:"baremetal_root_disk_matcher"`

	// 主机组列表, 参数可以是主机组名称或ID,建议使用ID
	InstanceGroupIds []string `json:"groups"`

	// DEPRECATE
	Suggestion bool `json:"suggestion"`
}

func NewServerConfigs

func NewServerConfigs() *ServerConfigs

type ServerCreateEipInput

type ServerCreateEipInput struct {
	// 计费方式,traffic or bandwidth
	ChargeType string `json:"charge_type"`

	// Bandwidth
	Bandwidth int64 `json:"bandwidth"`

	// bgp_type
	BgpType string `json:"bgp_type"`

	// auto_dellocate
	AutoDellocate *bool `json:"auto_dellocate"`

	// 弹性IP映射的内网IP地址,可选
	IpAddr string `json:"ip_addr"`
}

type ServerCreateInput

type ServerCreateInput struct {
	apis.VirtualResourceCreateInput
	DeletePreventableCreateInput
	HostnameInput

	*ServerConfigs

	apis.EncryptedResourceCreateInput

	// 虚拟机内存大小,单位Mb,若未指定instance_type,此参数为必传项
	VmemSize       int  `json:"vmem_size"`
	EnableMemclean bool `json:"enable_memclean"`

	// 虚拟机Cpu大小,若未指定instance_type,此参数为必传项
	// default: 1
	VcpuCount int `json:"vcpu_count"`

	// cpu卡槽数
	// 目前仅vmware支持此参数
	// default: 1
	CpuSockets int `json:"cpu_sockets"`

	// 额外分配 cpu 数量
	// required: false
	ExtraCpuCount int `json:"extra_cpu_count"`

	// 用户自定义启动脚本
	// 支持 #cloud-config yaml 格式及shell脚本
	// 支持特殊user data平台: Aliyun, Qcloud, Azure, Apsara, Ucloud
	// required: false
	UserData string `json:"user_data"`

	// swagger: ignore
	// 创建测试数据,不实际创建资源
	FakeCreate bool `json:"fake_create"`

	// swagger:ignore
	// Deprecated
	Keypair string `json:"keypair" yunion-deprecated-by:"keypair_id"`

	// 秘钥对Id
	// required: false
	KeypairId string `json:"keypair_id"`

	// 密码
	// 要求: 密码长度 >= 20, 至少包含一个数字一个小写字母一个大小字母及特殊字符~`!@#$%^&*()-_=+[]{}|:';\",./<>?中的一个
	// requried: false
	Password string `json:"password"`

	// 登录账户
	// required: false
	LoginAccount string `json:"login_account"`

	// 使用ISO光盘启动, 仅KVM平台支持
	// required: false
	Cdrom          string `json:"cdrom"`
	CdromBootIndex *int8  `json:"cdrom_boot_index"`

	// enum: ["cirros", "vmware", "qxl", "std"]
	// default: std
	Vga string `json:"vga"`

	// 远程连接协议
	// enum: ["vnc", "spice"]
	// default: vnc
	Vdi string `json:"vdi"`

	// BIOS类型, 若镜像是Windows,并且支持UEFI,则自动会设置为UEFI
	// emulate: BIOS, UEFI
	Bios string `json:"bios"`

	// Machine类型
	// emulate: pc, q35
	Machine string `json:"machine"`

	// 启动顺序
	// c: cdrome
	// d: disk
	// n: network
	// example: cnd
	// default: cdn
	BootOrder string `json:"boot_order"`

	// 启用cloud-init,需要镜像装有cloud-init服务
	// default: false
	EnableCloudInit bool `json:"enable_cloud_init"`

	// 随机密码, 若指定password参数,此参数不生效
	// 若值为false并且password为空,则表示保留镜像密码
	ResetPassword *bool `json:"reset_password"`

	// 关机后执行的操作
	// terminate: 关机后自动删除
	// enum: ["stop", "terminate", "stop_release_gpu"]
	// default: stop
	ShutdownBehavior string `json:"shutdown_behavior"`

	// 创建后自动启动
	// 部分云创建后会自动启动例如: 腾讯云, AWS, OpenStack, ZStack, Ucloud, Huawei, Azure, 天翼云
	// default: false
	AutoStart      bool            `json:"auto_start"`
	DeployConfigs  []*DeployConfig `json:"deploy_configs"`
	DeployTelegraf bool            `json:"deploy_telegraf"`

	// 包年包月时长
	//
	//
	// |平台                |是否支持    |
	// |----                |-------    |
	// |KVM                    |否            |
	// |ESxi                |否            |
	// |OpenStack            |否            |
	// |ZStack                |否            |
	// |Google                |否            |
	// |Azure                |否            |
	// |AWS                    |否            |
	// |腾讯云                |是            |
	// |Aliyun                |是            |
	// |Ucloud                |是            |
	// |Huawei                |是            |
	// |天翼云                |是            |
	Duration string `json:"duration"`

	// 是否自动续费
	// default: false
	AutoRenew bool `json:"auto_renew"`

	// swagger:ignore
	AutoPrepaidRecycle bool `json:"auto_prepaid_recycle,omitfalse"`

	// 弹性公网IP带宽
	// 指定此参数后会创建新的弹性公网IP并绑定到新建的虚拟机
	// 此参数优先级低于public_ip
	EipBw int `json:"eip_bw,omitzero"`
	// 弹性公网IP线路类型
	EipBgpType string `json:"eip_bgp_type,omitzero"`
	// 弹性公网IP计费类型
	EipChargeType string `json:"eip_charge_type,omitempty"`
	// 是否跟随主机删除而自动释放
	EipAutoDellocate bool `json:"eip_auto_dellocate,omitempty"`

	// 弹性公网IP名称或ID
	// 绑定已有弹性公网IP, 此参数会限制虚拟机再谈下公网IP所在的区域创建
	// required: false
	Eip string `json:"eip,omitempty"`

	// 公网IP带宽(单位MB)
	// 若指定此参数则忽略eip相关参数
	// 私有云不支持此参数
	//
	//
	// |平台                |支持范围    |
	// |----                |-------    |
	// |腾讯云                |按量计费1-100, 包年包月1-200 |
	PublicIpBw int `json:"public_ip_bw,omitzero"`
	// 公网IP计费类型
	// 默认按流量计费
	//
	//
	// |类别                    |说明    |
	// |----                    |-------    |
	// |traffic                    |按流量计费|
	// |bandwidth                |按带宽计费|
	PublicIpChargeType string `json:"public_ip_charge_type,omitempty"`

	// 使用主机快照创建虚拟机, 主机快照不会重置密码及秘钥信息
	// 使用主机快照创建的虚拟机将沿用之前的密码秘钥及安全组信息
	// required: false
	InstanceSnapshotId string `json:"instance_snapshot_id,omitempty"`

	// 使用主机备份创建虚拟机, 主机快照不会重置密码及秘钥信息
	// 使用主机备份创建的虚拟机将沿用之前的密码秘钥及安全组信息
	// required: false
	InstanceBackupId string `json:"instance_backup_id,omitempty"`

	// 安全组Id, 此参数会和secgroups参数合并
	SecgroupId string `json:"secgrp_id"`
	// 安全组Id列表
	Secgroups []string `json:"secgroups"`

	// swagger:ignore
	OsType string `json:"os_type"`
	// swagger:ignore
	OsArch string `json:"os_arch"`
	// swagger:ignore
	DisableUsbKbd bool `json:"disable_usb_kbd"`
	// swagger:ignore
	OsProfile jsonutils.JSONObject `json:"__os_profile__"`
	// swagger:ignore
	BillingType string `json:"billing_type"`
	// swagger:ignore
	BillingCycle string `json:"billing_cycle"`

	// swagger:ignore
	// Deprecated
	// 此参数等同于 hypervisor=baremetal
	Baremetal bool `json:"baremetal"`

	// Used to store BaremetalConvertHypervisorTaskId
	ParentTaskId string `json:"__parent_task_id,omitempty"`

	// 指定系统盘默认存储类型, 如果指定宿主机
	// swagger:ignore
	DefaultStorageType string `json:"default_storage_type,omitempty"`

	// 指定用于新建主机的主机镜像ID
	GuestImageID string `json:"guest_image_id"`

	Pod *PodCreateInput `json:"pod"`
}

func (*ServerCreateInput) AfterUnmarshal

func (input *ServerCreateInput) AfterUnmarshal()

func (*ServerCreateInput) ToDiskCreateInput

func (req *ServerCreateInput) ToDiskCreateInput() *DiskCreateInput

type ServerCreateInstanceBackupInput

type ServerCreateInstanceBackupInput struct {
	// 主机备份名称
	Name string `json:"name"`
	// 主机备份的生成名称
	GenerateName string `json:"generate_name"`
	// 备份存储ID
	BackupStorageId string `json:"backup_storage_id"`
}

type ServerCreateSnapshotParams

type ServerCreateSnapshotParams struct {
	Name         string `json:"name"`
	GenerateName string `json:"generate_name"`
}

type ServerDelExtraOptionInput

type ServerDelExtraOptionInput struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

func (ServerDelExtraOptionInput) Validate

func (o ServerDelExtraOptionInput) Validate() error

type ServerDeleteInput

type ServerDeleteInput struct {
	// 是否越过回收站直接删除
	// default: false
	OverridePendingDelete bool

	// 是否仅删除本地资源
	// default: false
	Purge bool

	// 是否删除快照
	// default: false
	DeleteSnapshots bool

	// 是否删除关联的EIP
	// default: false
	DeleteEip bool

	// 是否删除关联的数据盘
	// default: false
	DeleteDisks bool
}

type ServerDeployInput

type ServerDeployInput struct {
	apis.Meta

	ServerDeployInputBase

	// 部署完成后是否自动启动
	// 若虚拟机重置密码后需要重启生效,并且当前虚拟机状态为running, 此参数默认为true
	// 若虚拟机状态为ready, 指定此参数后,部署完成后,虚拟机会自动启动
	AutoStart bool `json:"auto_start"`
}

type ServerDeployInputBase

type ServerDeployInputBase struct {
	// swagger: ignore
	Keypair string `json:"keypair" yunion-deprecated-by:"keypair_id"`
	// 秘钥Id
	KeypairId string `json:"keypair_id"`

	// 清理指定公钥
	// 若指定的秘钥Id和虚拟机的秘钥Id不相同, 则清理旧的公钥
	DeletePublicKey string `json:"delete_public_key"`
	// 解绑当前虚拟机秘钥, 并清理公钥信息
	DeleteKeypair bool `json:"__delete_keypair__"`
	// 生成随机密码, 优先级低于password
	ResetPassword bool `json:"reset_password"`
	// 重置指定密码
	Password string `json:"password"`
	// 用户自定义启动脚本
	// 支持 #cloud-config yaml 格式及shell脚本
	// 支持特殊user data平台: Aliyun, Qcloud, Azure, Apsara, Ucloud
	// required: false
	UserData string `json:"user_data"`
	// swagger: ignore
	LoginAccount string `json:"login_account"`

	// swagger: ignore
	Restart bool `json:"restart"`

	// swagger: ignore
	DeployConfigs []*DeployConfig `json:"deploy_configs"`
	// swagger: ignore
	DeployTelegraf bool `json:"deploy_telegraf"`
}

type ServerDetachDiskInput

type ServerDetachDiskInput struct {
	// 磁盘Id,若磁盘未挂载在虚拟机上,不返回错误
	DiskId string `json:"disk_id"`
	// 是否保留磁盘
	// default: false
	KeepDisk bool `json:"keep_disk"`
}

type ServerDetachnetworkInput

type ServerDetachnetworkInput struct {
	// 是否保留IP地址(ip地址会进入到预留ip)
	Reserve bool `json:"reserve"`
	// 通过IP子网地址, 优先级最高
	NetId string `json:"net_id"`
	// 通过IP解绑网卡, 优先级高于mac
	IpAddr string `json:"ip_addr"`
	// 通过Mac解绑网卡, 优先级低于ip_addr
	Mac string `json:"mac"`
	// 解绑后不立即同步配置
	DisableSyncConfig *bool `json:"disable_sync_config"`
	// 强制卸载,无论虚拟机的状态,仅更新数据库
	Force *bool `json:"force"`
}

func (ServerDetachnetworkInput) IsForce

func (input ServerDetachnetworkInput) IsForce() bool

type ServerDetails

type ServerDetails struct {
	apis.VirtualResourceDetails
	apis.EncryptedResourceDetails

	SGuest

	HostResourceInfo

	// details
	// 网络概要
	Networks string `json:"networks"`
	// 磁盘概要
	Disks string `json:"disks"`

	// 磁盘详情
	DisksInfo []GuestDiskInfo `json:"disks_info"`
	// 虚拟机Ip列表
	VirtualIps string `json:"virtual_ips"`
	// 安全组规则
	SecurityRules string `json:"security_rules"`
	// 操作系统名称
	OsName string `json:"os_name"`

	// 系统管理员可见的安全组规则
	AdminSecurityRules string `json:"admin_security_rules"`

	// common
	IsPrepaidRecycle bool `json:"is_prepaid_recycle"`

	// 主备机信息
	BackupInfo

	// 是否可以回收
	CanRecycle bool `json:"can_recycle"`

	// 自动释放时间
	AutoDeleteAt time.Time `json:"auto_delete_at"`
	// 磁盘数量
	DiskCount int `json:"disk_count"`
	// 是否支持ISO启动
	CdromSupport bool `json:"cdrom_support"`
	//是否支持Floppy启动
	FloppySupport bool `json:"floppy_support"`

	// 磁盘大小
	// example:30720
	DiskSizeMb int64 `json:"disk"`
	// IP地址列表字符串
	// example: 10.165.2.1,172.16.8.1
	IPs string `json:"ips"`
	// VIP
	Vip string `json:"vip"`
	// VIP's eip
	VipEip string `json:"vip_eip"`
	// mac地址信息
	Macs string `json:"macs"`
	// 网卡信息
	Nics []GuestnetworkShortDesc `json:"nics"`
	// 附属IP
	SubIPs []string `json:"sub_ips"`

	// 归属VPC
	Vpc string `json:"vpc"`
	// 归属VPC ID
	VpcId string `json:"vpc_id"`
	// Vpc外网访问模式
	VpcExternalAccessMode string `json:"vpc_external_access_mode"`

	// 关联安全组列表
	Secgroups []apis.StandaloneShortDesc `json:"secgroups"`
	// 关联主安全组
	Secgroup string `json:"secgroup"`

	// 浮动IP
	Eip string `json:"eip"`
	// 浮动IP类型
	EipMode string `json:"eip_mode"`

	// 密钥对
	Keypair string `json:"keypair"`

	// 直通设备(GPU)列表
	IsolatedDevices []SIsolatedDevice `json:"isolated_devices"`
	// 是否支持GPU
	IsGpu    bool   `json:"is_gpu"`
	GpuModel string `json:"gpu_model"`
	GpuCount string `json:"gpu_count"`

	// Cdrom信息
	Cdrom []Cdrom `json:"cdrom"`

	//Floppy信息
	Floppy []Floppy `json:"floppy"`

	// 主机在伸缩组中的状态
	ScalingStatus string `json:"scaling_status"`

	// 伸缩组id
	ScalingGroupId string `json:"scaling_group_id"`

	// 监控上报URL
	MonitorUrl string `json:"monitor_url"`

	// 容器描述信息
	Containers []*PodContainerDesc `json:"containers"`
}

func (ServerDetails) GetMetricPairs

func (self ServerDetails) GetMetricPairs() map[string]string

func (ServerDetails) GetMetricTags

func (self ServerDetails) GetMetricTags() map[string]string

type ServerDissociateEipInput

type ServerDissociateEipInput struct {
	// 是否自动释放
	AudoDelete *bool `json:"auto_delete"`
}

type ServerEjectVfdInput

type ServerEjectVfdInput struct {
	FloppyOrdinal int64  `json:"floppy_ordinal"`
	ImageId       string `json:"image_id"`
}

type ServerFilterListInput

type ServerFilterListInput struct {
	HostFilterListInput

	ServerResourceInput

	// 以主机名称排序
	OrderByServer string `json:"order_by_server"`
}

type ServerGetCPUSetCoresInput

type ServerGetCPUSetCoresInput struct{}

type ServerGetCPUSetCoresResp

type ServerGetCPUSetCoresResp struct {
	PinnedCores   []int `json:"pinned_cores"`
	HostCores     []int `json:"host_cores"`
	HostUsedCores []int `json:"host_used_cores"`
}

type ServerGetHardwareInfoInput

type ServerGetHardwareInfoInput struct{}

type ServerGetHardwareInfoResp

type ServerGetHardwareInfoResp struct {
	Motherboard *ServerHardwareInfoMotherboard `json:"motherboard"`
	CPU         *ServerHardwareInfoCPU         `json:"cpu"`
	Memory      *ServerHardwareInfoMemory      `json:"memory"`
	Disks       []*ServerHardwareInfoDisk      `json:"disk"`
	GPUs        []*ServerHardwareInfoGPU       `json:"gpu"`
}

type ServerHardwareInfoCPU

type ServerHardwareInfoCPU struct {
	Model string `json:"model"`
	Count int    `json:"count"`
}

type ServerHardwareInfoDisk

type ServerHardwareInfoDisk struct {
	Id        string `json:"id"`
	StorageId string `json:"storage_id"`
	Model     string `json:"model"`
	SizeMB    int    `json:"size_mb"`
	// Disk's backend bandwidth. The unit is MB/s
	Bandwidth float64 `json:"bandwidth"`
}

type ServerHardwareInfoGPU

type ServerHardwareInfoGPU struct {
	*IsolatedDeviceModelHardwareInfo

	// isolate device id
	Id string `json:"id"`
	// GPU model name
	Model string `json:"model"`
	// PCIE information
	PCIEInfo *IsolatedDevicePCIEInfo `json:"pcie_info"`
}

type ServerHardwareInfoGPUPCIEInfo

type ServerHardwareInfoGPUPCIEInfo struct {
	Throughput string `json:"pcie_throughput"`
	LaneWidth  int    `json:"pcie_lane_width"`
}

type ServerHardwareInfoMemory

type ServerHardwareInfoMemory struct {
	SizeMB int `json:"size_mb"`
}

type ServerHardwareInfoMotherboard

type ServerHardwareInfoMotherboard struct {
	Manufacturer string `json:"manufacturer"`
	Model        string `json:"model"`
	OemName      string `json:"oem_name"`
	SN           string `json:"sn"`
	Version      string `json:"version"`
}

type ServerInsertVfdInput

type ServerInsertVfdInput struct {
	FloppyOrdinal int64  `json:"floppy_ordinal"`
	ImageId       string `json:"image_id"`
}

type ServerInstanceSnapshot

type ServerInstanceSnapshot struct {
	ServerCreateSnapshotParams
	WithMemory bool `json:"with_memory"`
}

type ServerListInput

type ServerListInput struct {
	apis.VirtualResourceListInput
	apis.ExternalizedResourceBaseListInput
	apis.DeletePreventableResourceBaseListInput
	apis.MultiArchResourceBaseListInput

	HostFilterListInput

	NetworkFilterListInput `yunion-ambiguous-prefix:"vpc_"`

	billing.BillingResourceListInput

	GroupFilterListInput
	SecgroupFilterListInput
	//DiskFilterListInput `yunion-ambiguous-prefix:"storage_"`
	ScalingGroupFilterListInput

	// 只列出裸金属主机
	Baremetal *bool `json:"baremetal"`
	// 只列出透传了 GPU 的主机
	Gpu *bool `json:"gpu"`
	// 只列出透传了 USB 的主机
	Usb *bool `json:"usb"`
	// 自定义 PCI 设备类型
	CustomDevType string `json:"custom_dev_type"`
	// 通用虚拟机
	Normal *bool `json:"normal"`
	// 只列出还有备份机的主机
	Backup *bool `json:"bakcup"`
	// 列出指定类型的主机
	// enum: ["normal","gpu","usb","backup"]
	ServerType []string `json:"server_type"`
	// 列出管理安全组为指定安全组的主机
	AdminSecgroup string `json:"admin_security"`
	// 列出Hypervisor为指定值的主机
	// enum: ["kvm","esxi","baremetal","aliyun","azure","aws","huawei","ucloud","zstack","openstack","google","ctyun","cloudpods","ecloud","jdcloud","remotefile"]
	Hypervisor []string `json:"hypervisor"`
	// 列出绑定了弹性IP(EIP)的主机
	WithEip *bool `json:"with_eip"`
	// 列出未绑定弹性IP(EIP)的主机
	WithoutEip *bool `json:"without_eip"`
	// 列出可绑定弹性IP的主机
	EipAssociable *bool `json:"eip_associable"`
	// 列出操作系统为指定值的主机
	// enum: ["linux","windows","vmware"]
	OsType []string `json:"os_type"`
	// 操作系统发行版
	OsDist []string `json:"os_dist"`

	// 对列表结果按照磁盘大小进行排序
	// enum: ["asc","desc"]
	OrderByDisk string `json:"order_by_disk"`

	OrderByIp string `json:"order_by_ip"`
	// 根据ip查找机器
	IpAddr string `json:"ip_addr" yunion-deprecated-by:"ip_addrs"`
	// 根据多个ip查找机器
	IpAddrs []string `json:"ip_addrs"`

	// 列出可以挂载指定EIP的主机
	UsableServerForEip string `json:"usable_server_for_eip"`

	// 列出可以挂载磁盘的主机
	AttachableServersForDisk string `json:"attachable_servers_for_disk"`
	// Deprecated
	// 列出可以挂载磁盘的主机
	Disk string `json:"disk" yunion-deprecated-by:"attachable_servers_for_disk"`

	// 按主机资源类型进行排序
	// enum: ["shared","prepaid","dedicated"]
	ResourceType string `json:"resource_type"`
	// 返回该宿主机上的所有虚拟机,包括备份机
	GetAllGuestsOnHost string `json:"get_all_guests_on_host"`

	VcpuCount []int `json:"vcpu_count"`

	VmemSize []int `json:"vmem_size"`

	BootOrder []string `json:"boot_order"`

	Vga []string `json:"vga"`

	Vdi []string `json:"vdi"`

	Machine []string `json:"machine"`

	Bios []string `json:"bios"`

	SrcIpCheck *bool `json:"src_ip_check"`

	SrcMacCheck *bool `json:"src_mac_check"`

	InstanceType []string `json:"instance_type"`

	// 根据镜像发行版排序
	OrderByOsDist string `json:"order_by_os_dist"`

	// 是否调度到宿主机上
	WithHost *bool `json:"with_host"`
}

func (*ServerListInput) AfterUnmarshal

func (input *ServerListInput) AfterUnmarshal()

type ServerLoginInfoInput

type ServerLoginInfoInput struct {
	PrivateKey string `json:"private_key"`
}

type ServerLoginInfoOutput

type ServerLoginInfoOutput struct {
	Username string `json:"username"`
	Updated  string `json:"updated"`
	LoginKey string `json:"login_key"`
	Keypair  string `json:"keypair"`
	Password string `json:"password"`
}

type ServerMigrateForecastInput

type ServerMigrateForecastInput struct {
	PreferHostId string `json:"prefer_host_id"`
	// Deprecated
	PreferHost      string `json:"prefer_host" yunion-deprecated-by:"prefer_host_id"`
	LiveMigrate     bool   `json:"live_migrate"`
	SkipCpuCheck    bool   `json:"skip_cpu_check"`
	SkipKernelCheck bool   `json:"skip_kernel_check"`
	ConvertToKvm    bool   `json:"convert_to_kvm"`
	IsRescueMode    bool   `json:"is_rescue_mode"`
	ResetCpuNumaPin bool   `json:"reset_cpu_numa_pin"`
}

type ServerMigrateNetworkInput

type ServerMigrateNetworkInput struct {
	// Source network Id
	Src string `json:"src"`
	// Destination network Id
	Dest string `json:"dest"`
}

type ServerMonitorInput

type ServerMonitorInput struct {
	COMMAND string
	QMP     bool
}

type ServerNetworkInfo

type ServerNetworkInfo struct {
	Index   int    `json:"index"`
	Mac     string `json:"mac"`
	IpAddr  string `json:"ip_addr"`
	Ip6Addr string `json:"ip6_addr"`
}

type ServerNicTrafficLimit

type ServerNicTrafficLimit struct {
	Mac            string `json:"mac"`
	RxTrafficLimit *int64 `json:"rx_traffic_limit"`
	TxTrafficLimit *int64 `json:"tx_traffic_limit"`
}

type ServerQemuInfo

type ServerQemuInfo struct {
	Version string `json:"version"`
	Cmdline string `json:"cmdline"`
}

type ServerQgaCommandInput

type ServerQgaCommandInput struct {
	ServerQgaTimeoutInput
	Command string
}

type ServerQgaGetNetworkInput

type ServerQgaGetNetworkInput struct {
}

type ServerQgaGuestInfoTaskInput

type ServerQgaGuestInfoTaskInput struct {
}

type ServerQgaSetNetworkInput

type ServerQgaSetNetworkInput struct {
	ServerQgaTimeoutInput
	Device  string
	Ipmask  string
	Gateway string
}

type ServerQgaSetPasswordInput

type ServerQgaSetPasswordInput struct {
	Username string
	Password string
}

type ServerQgaTimeoutInput

type ServerQgaTimeoutInput struct {
	// qga execute timeout millisecond
	Timeout int
}

type ServerRebuildRootInput

type ServerRebuildRootInput struct {
	apis.Meta

	// swagger: ignore
	Image string `json:"image" yunion-deprecated-by:"image_id"`
	// 关机且停机不收费情况下不允许重装系统
	// 镜像 id
	// required: true
	ImageId string `json:"image_id"`

	AutoStart *bool `json:"auto_start"`

	AllDisks *bool `json:"all_disks"`

	ServerDeployInputBase
}

type ServerReleasedIsolatedDevice

type ServerReleasedIsolatedDevice struct {
	DevType string `json:"dev_type"`
	Model   string `json:"model"`
}

type ServerRemoteUpdateInput

type ServerRemoteUpdateInput struct {
	// 是否覆盖替换所有标签
	ReplaceTags *bool `json:"replace_tags" help:"replace all remote tags"`
}

type ServerResetInput

type ServerResetInput struct {
	InstanceSnapshot string `json:"instance_snapshot"`
	// 自动启动
	AutoStart *bool `json:"auto_start"`
	// 恢复内存
	WithMemory bool `json:"with_memory"`
}

type ServerResizeDiskInput

type ServerResizeDiskInput struct {
	// swagger: ignore
	Disk string `json:"disk" yunion-deprecated-by:"disk_id"`
	// 磁盘Id
	DiskId string `json:"disk_id"`

	DiskResizeInput
}

type ServerResourceInput

type ServerResourceInput struct {
	// 主机(ID或Name)
	ServerId string `json:"server_id"`
	// swagger:ignore
	// Deprecated
	// Filter by guest Id
	Server string `json:"server" yunion-deprecated-by:"server_id"`
	// swagger:ignore
	// Deprecated
	// Filter by guest Id
	Guest string `json:"guest" yunion-deprecated-by:"server_id"`
	// swagger:ignore
	// Deprecated
	// Filter by guest Id
	GuestId string `json:"guest_id" yunion-deprecated-by:"server_id"`
}

type ServerResumeInput

type ServerResumeInput struct {
	apis.Meta
}

type ServerSaveGuestImageInput

type ServerSaveGuestImageInput struct {
	imageapi.GuestImageCreateInputBase

	// 保存镜像后是否自动启动
	AutoStart *bool `json:"auto_start"`
}

type ServerSaveImageInput

type ServerSaveImageInput struct {
	// 镜像名称
	Name         string
	GenerateName string
	Notes        string
	IsPublic     *bool
	// 镜像格式
	Format string

	// 保存镜像后是否自动启动,若实例状态为运行中,则会先关闭实例
	// 公有云若支持开机保存镜像,此参数则不生效
	// default: false
	AutoStart bool
	// swagger: ignore
	Restart bool

	// swagger: ignore
	OsType string

	// swagger: ignore
	OsArch string

	// swagger: ignore
	ImageId string
}

type ServerSetBootIndexInput

type ServerSetBootIndexInput struct {
	// key index, value boot_index
	Disks map[string]int8 `json:"disks"`
	// key ordinal, value boot_index
	Cdroms map[string]int8 `json:"cdroms"`
}

type ServerSetDiskIoThrottleInput

type ServerSetDiskIoThrottleInput struct {
	// key disk id, value bps
	Bps map[string]int `json:"bps"`
	// key disk id, value iops
	IOPS map[string]int `json:"iops"`
}

type ServerSetExtraOptionInput

type ServerSetExtraOptionInput struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

func (ServerSetExtraOptionInput) Validate

func (o ServerSetExtraOptionInput) Validate() error

type ServerSetLiveMigrateParamsInput

type ServerSetLiveMigrateParamsInput struct {
	MaxBandwidthMB  *int64
	DowntimeLimitMS *int64
}

type ServerSetOSInfoInput

type ServerSetOSInfoInput struct {
	// OS type, e.g.: Linux, Windows
	Type string `json:"type" help:"OS type, e.g.: Linux, Windows"`
	// OS distribution, e.g.: CentOS, Ubuntu, Windows Server 2016 Datacenter
	Distribution string `json:"distribution" help:"OS distribution, e.g.: CentOS, Ubuntu, Windows Server 2016 Datacenter"`
	// OS version, e.g: 7.9, 22.04, 6.3
	Version string `json:"version" help:"OS version, e.g.: 7.9, 22.04, 6.3"`
	Arch    string `json:"arch" help:"OS arch, e.g.: x86_64, aarch64"`
}

type ServerSetPasswordInput

type ServerSetPasswordInput struct {
	Username string
	Password string

	// deploy params
	ResetPassword bool
	AutoStart     bool
}

type ServerSkuCreateInput

type ServerSkuCreateInput struct {
	apis.EnabledStatusStandaloneResourceCreateInput

	// 区域名称或Id,建议使用Id
	// default: default
	CloudregionId string `json:"cloudregion_id"`

	// 可用区名称或Id, 建议使用Id
	// required: false
	ZoneId string `json:"zone_id"`

	// swagger:ignore
	InstanceTypeFamily string

	// 套餐类型
	//
	//
	//
	// | instance_type_category    |    说明    |
	// |    -----                |    ---        |
	// |general_purpose            |通用型        |
	// |burstable                |突发性能型        |
	// |compute_optimized        |计算优化型        |
	// |memory_optimized        |内存优化型        |
	// |storage_optimized        |存储IO优化型        |
	// |hardware_accelerated    |硬件加速型        |
	// |high_storage            |高存储型        |
	// |high_memory                |高内存型        |
	// default: general_purpose
	InstanceTypeCategory string `json:"instance_type_category"`

	// swagger:ignore
	LocalCategory string

	// 预付费状态
	// default: available
	PrepaidStatus string `json:"prepaid_status"`
	// 后付费状态
	// default: available
	PostpaidStatus string `json:"postpaid_status"`

	// Cpu核数
	// minimum: 1
	// maximum: 256
	// required: true
	CpuCoreCount int64 `json:"cpu_core_count"`

	// 内存大小
	// minimum: 512
	// maximum: 524288
	// required: true
	MemorySizeMB int64 `json:"memory_size_mb"`

	// swagger:ignore
	OsName string

	// swagger:ignore
	SysDiskResizable *bool

	// swagger:ignore
	SysDiskType string

	// swagger:ignore
	SysDiskMinSizeGB int

	// swagger:ignore
	SysDiskMaxSizeGB int

	// swagger:ignore
	AttachedDiskType string

	// swagger:ignore
	AttachedDiskSizeGB int

	// swagger:ignore
	AttachedDiskCount int

	// swagger:ignore
	DataDiskTypes string

	// swagger:ignore
	DataDiskMaxCount int

	// swagger:ignore
	NicType string

	// swagger:ignore
	NicMaxCount int

	// swagger:ignore
	GpuAttachable *bool

	// swagger:ignore
	GpuSpec string

	// swagger:ignore
	GpuCount int

	// swagger:ignore
	GpuMaxCount int

	// swagger:ignore
	Provider string
}

type ServerSkuDetails

type ServerSkuDetails struct {
	apis.EnabledStatusStandaloneResourceDetails

	ZoneResourceInfoBase
	CloudregionResourceInfo

	SServerSku

	// 云环境
	CloudEnv string `json:"cloud_env"`

	// 绑定云主机数量
	TotalGuestCount int `json:"total_guest_count"`
}

type ServerSkuListInput

type ServerSkuListInput struct {
	apis.EnabledStatusStandaloneResourceListInput
	apis.DomainizedResourceListInput

	ManagedResourceListInput

	ZonalFilterListInput
	billing.BillingResourceListInput
	UsableResourceListInput

	// filter sku by memory size in MB
	MemorySizeMb []int `json:"memory_size_mb"`
	// filter sku by CPU core count
	CpuCoreCount []int `json:"cpu_core_count"`

	// 后付费状态
	PostpaidStatus string `json:"postpaid_status"`

	// 预付费状态
	PrepaidStatus string `json:"prepaid_status"`

	// 按套餐名称去重
	Distinct bool `json:"distinct"`

	// 根据cpu架构过滤
	// enmu: arm, x86
	CpuArch []string `json:"cpu_arch"`

	// 按关联虚拟机数量排序
	OrderByTotalGuestCount string `json:"order_by_total_guest_count"`
}

type ServerSkuUpdateInput

type ServerSkuUpdateInput struct {
	apis.EnabledStatusStandaloneResourceBaseUpdateInput

	// 预付费状态
	// default: available
	PrepaidStatus string `json:"prepaid_status"`
	// 后付费状态
	// default: available
	PostpaidStatus string `json:"postpaid_status"`

	InstanceTypeFamily string `json:"instance_type_family"`

	InstanceTypeCategory string `json:"instance_type_category"`

	LocalCategory string `json:"local_category"` // 记录本地分类

	OsName string `json:"os_name"` // Windows|Linux|Any

	SysDiskResizable *bool `json:"sys_disk_resizable"`

	SysDiskType string `json:"sys_disk_type"`

	SysDiskMinSizeGB *int `json:"sys_disk_min_size_gb"` // not required。 windows比较新的版本都是50G左右。

	SysDiskMaxSizeGB *int `json:"sys_disk_max_size_gb"` // not required

	AttachedDiskType string `json:"attached_disk_type"`

	AttachedDiskSizeGB *int `json:"attached_disk_size_gb"`

	AttachedDiskCount *int `json:"attached_disk_count"`

	DataDiskTypes string `json:"data_disk_types"`

	DataDiskMaxCount *int `json:"data_disk_max_count"`

	NicType string `json:"nic_type"`

	NicMaxCount *int `json:"nic_max_count"`

	GpuAttachable *bool `json:"gpu_attachable"`

	GpuSpec string `json:"gpu_spec"`

	GpuCount *int `json:"gpu_count"`

	GpuMaxCount *int `json:"gpu_max_count"`
}

type ServerSnapshotAndCloneInput

type ServerSnapshotAndCloneInput struct {
	ServerCreateSnapshotParams

	// number of cloned servers
	// 数量
	Count *int `json:"count"`

	// Whether auto start the cloned server
	// 是否自动启动
	AutoStart *bool `json:"auto_start"`

	// Whether delete instance snapshot automatically
	// 是否自动删除主机快照
	AutoDeleteInstanceSnapshot *bool `json:"auto_delete_instance_snapshot"`

	// ignore
	InstanceSnapshotId string `json:"instance_snapshot_id"`

	// Perfer clone destination host
	// 指定期望的迁移目标宿主机
	PreferHostId string `json:"prefer_host_id"`
}

type ServerStopInput

type ServerStopInput struct {
	// 是否强制关机
	IsForce bool `json:"is_force"`

	// 关机等待时间,如果是强制关机,则等待时间为0,如果不设置,默认为30秒
	TimeoutSecs int `json:"timeout_secs"`

	// 是否关机停止计费, 若平台不支持停止计费,此参数无作用
	// 目前仅阿里云,腾讯云此参数生效
	StopCharging bool `json:"stop_charging"`
}

type ServerUpdateInput

type ServerUpdateInput struct {
	apis.VirtualResourceBaseUpdateInput

	HostnameInput

	// 删除保护开关
	DisableDelete *bool `json:"disable_delete"`
	// 启动顺序
	BootOrder *string `json:"boot_order"`
	// 关机执行操作
	ShutdownBehavior *string `json:"shutdown_behavior"`
	Vga              *string `json:"vga"`
	Vdi              *string `json:"vdi"`
	Machine          *string `json:"machine"`
	Bios             *string `json:"bios"`

	SrcIpCheck  *bool `json:"src_ip_check"`
	SrcMacCheck *bool `json:"src_mac_check"`

	SshPort int `json:"ssh_port"`

	// swagger: ignore
	ProgressMbps float32 `json:"progress_mbps"`
}

type ServerUserDataInput

type ServerUserDataInput struct {
	UserData string `json:"user_data"`
}

type ServiceCatalogCreateInput

type ServiceCatalogCreateInput struct {
	apis.SharableVirtualResourceCreateInput

	// description: service catalog icon url
	// example: https://yunion.io/files/hello.png
	IconUrl string `json:"icon_url"`

	// description: the id or name of guest template
	// example: good
	// required: true
	GuestTemplate string `json:"guest_template"`
}

type ServiceCatalogDeploy

type ServiceCatalogDeploy struct {

	// description: name of the new vm
	// example: hello
	Name string `json:"name"`

	// description: generate name automatically if name is repeated, and only one of name and this shoudle be given
	// example: hello
	GenerateName string `json:"generate_name"`

	// description: the count of the new vm
	// example: 1
	Count int `json:"count"`
}

type ServiceCatalogDetails

type ServiceCatalogDetails struct {
	apis.SharableVirtualResourceDetails

	SServiceCatalog
}

type ServiceCatalogUpdateInput

type ServiceCatalogUpdateInput struct {
	// description: resource name
	// unique: true
	// example: test-network
	Name string `json:"name"`

	// description: service catalog icon url
	// example: https://yunion.io/files/hello.png
	IconUrl string `json:"icon_url"`

	// description: the id or name of guest template
	// example: good
	GuestTemplate string `json:"guest_template"`
}

type SimpleGuest

type SimpleGuest struct {
	// 主机名称
	Name string `json:"name"`
	// 主机ID
	Id string `json:"id"`
	// 主机状态
	Status string `json:"status"`
	// 磁盘序号
	Index int `json:"index"`
	// 磁盘驱动
	Driver string `json:"driver"`
	// 缓存模式
	CacheMode string `json:"cache_mode"`
	// 磁盘并发数
	Iops int `json:"iops"`
	// 磁盘吞吐
	Bps int `json:"bps"`
}

type SimpleHost

type SimpleHost struct {
	Id   string
	Name string
}

type SimpleNetwork

type SimpleNetwork struct {
	Id            string `json:"id"`
	Name          string `json:"name"`
	GuestIpStart  string `json:"guest_ip_start"`
	GuestIpEnd    string `json:"guest_ip_end"`
	GuestIp6Start string `json:"guest_ip6_start"`
	GuestIp6End   string `json:"guest_ip6_end"`
}

type SimpleSecurityGroup

type SimpleSecurityGroup struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type SimpleSnapshot

type SimpleSnapshot struct {
	// 快照Id
	Id string `json:"id"`
	// 快照名称
	Name string `json:"name"`
	// 存储Id
	StorageId string `json:"storage_id"`
	// 磁盘类型
	DiskType string `json:"disk_type"`
	// 区域Id
	CloudregionId string `json:"cloudregion_id"`
	// 快照大小
	Size int `json:"size"`
	// 快照状态
	Status string `json:"status"`
	// 存储类型
	StorageType string `json:"storage_type"`
	// 密钥
	EncryptKeyId string `json:"encrypt_key_id"`
	// 创建时间
	CreatedAt time.Time `json:"created_at"`
}

type SimpleSnapshotPolicy

type SimpleSnapshotPolicy struct {
	Id             string `json:"id"`
	Name           string `json:"name"`
	RepeatWeekdays []int  `json:"repeat_weekdays"`
	TimePoints     []int  `json:"time_points"`
}

type SkipSyncResources

type SkipSyncResources []string

func (*SkipSyncResources) Add

func (s *SkipSyncResources) Add(res string)

func (SkipSyncResources) IsZero

func (s SkipSyncResources) IsZero() bool

func (*SkipSyncResources) Remove

func (s *SkipSyncResources) Remove(res string)

func (SkipSyncResources) String

func (s SkipSyncResources) String() string

type SkuSyncInput

type SkuSyncInput struct {
	// 云平台名称
	// example: Google
	Provider string `json:"provider,omitempty"`

	// 区域ID
	CloudregionIds []string `json:"cloudregion_ids"`
}

type SkuTaskQueryInput

type SkuTaskQueryInput struct {
	// 异步任务ID
	TaskIds []string `json:"task_ids"`
}

type SlaveZoneResourceInfoBase

type SlaveZoneResourceInfoBase struct {
	// 可用区名称
	// example: 北京2区
	SlaveZone string `json:"slave_zone"`

	// 纳管云的zoneId
	SlaveZoneExtId string `json:"slave_zone_ext_id"`
}

type SnapshotCreateInput

type SnapshotCreateInput struct {
	apis.VirtualResourceCreateInput
	apis.EncryptedResourceCreateInput

	// 磁盘Id
	// 目前仅VMware平台不支持创建快照,其余平台磁盘均支持创建快照
	// required: true
	DiskId string `json:"disk_id"`
	// swagger:ignore
	Disk string `json:"disk" yunion-deprecated-by:"disk_id"`
	// swagger:ignore
	StorageId string `json:"storage_id"`
	// swagger:ignore
	CreatedBy string `json:"created_by"`
	// swagger:ignore
	Location string `json:"location"`
	// swagger:ignore
	Size int `json:"size"`
	// swagger:ignore
	DiskType string `json:"disk_type"`
	// swagger:ignore
	CloudregionId string `json:"cloudregion_id"`
	// swagger:ignore
	OutOfChain bool `json:"out_of_chain"`
	// swagger:ignore
	ManagerId string `json:"manager_id"`
	// swagger:ignore
	OsArch string `json:"os_arch"`
}

type SnapshotDetails

type SnapshotDetails struct {
	apis.VirtualResourceDetails
	ManagedResourceInfo
	CloudregionResourceInfo
	apis.EncryptedResourceDetails

	SSnapshot

	// 存储类型
	StorageType string `json:"storage_type"`
	// 存储名称
	Storage string `json:"storage"`
	// 磁盘状态
	DiskStatus string `json:"disk_status"`
	// 云主机名称
	Guest string `json:"guest"`
	// 云主机Id
	GuestId string `json:"guest_id"`
	// 云主机状态
	GuestStatus string `json:"guest_status"`
	// 磁盘名称
	DiskName string `json:"disk_name"`
	// 是否是子快照
	IsSubSnapshot bool `json:"is_sub_snapshot,allowempty"`
}

type SnapshotListInput

type SnapshotListInput struct {
	apis.VirtualResourceListInput
	apis.ExternalizedResourceBaseListInput
	apis.MultiArchResourceBaseListInput

	ManagedResourceListInput
	RegionalFilterListInput

	StorageShareFilterListInput

	// filter snapshot that is fake deleted
	FakeDeleted *bool `json:"fake_deleted"`
	// filter by disk type
	DiskType string `json:"disk_type"`
	// filter instance snapshot
	IsInstanceSnapshot *bool `json:"is_instance_snapshot"`

	DiskFilterListInputBase
	StorageFilterListInputBase

	OutOfChain *bool    `json:"out_of_chain"`
	OsType     []string `json:"os_type"`

	// list server snapshots
	ServerId string `json:"server_id"`

	// 未关联任何磁盘
	Unused bool `json:"unused"`

	// 按虚拟机名称排序
	// pattern:asc|desc
	OrderByGuest string `json:"order_by_guest"`
	// 按磁盘名称排序
	// pattern:asc|desc
	OrderByDiskName string `json:"order_by_disk_name"`
}

type SnapshotPolicyDetails

type SnapshotPolicyDetails struct {
	apis.VirtualResourceDetails
	ManagedResourceInfo
	CloudregionResourceInfo

	SSnapshotPolicy

	RetentionDays int `json:"retention_days"`

	BindingDiskCount int `json:"binding_disk_count"`
}

type SnapshotPolicyDisksInput

type SnapshotPolicyDisksInput struct {
	Disks []string `json:"disk"`
}

type SnapshotPolicyFilterListInput

type SnapshotPolicyFilterListInput struct {
	SnapshotPolicyResourceInput

	// 以快照策略名称排序
	OrderBySnapshotpolicy string `json:"order_by_snapshotpolicy"`
}

type SnapshotPolicyListInput

type SnapshotPolicyListInput struct {
	apis.VirtualResourceListInput
	apis.ExternalizedResourceBaseListInput
	ManagedResourceListInput
	RegionalFilterListInput

	// 按绑定的磁盘数量排序
	// pattern:asc|desc
	OrderByBindDiskCount string `json:"order_by_bind_disk_count"`
}

type SnapshotPolicyResourceInput

type SnapshotPolicyResourceInput struct {
	// filter disk by snapshotpolicy
	SnapshotpolicyId string `json:"snapshotpolicy_id"`
	// swagger:ignore
	// Deprecated
	// filter disk by snapshotpolicy_id
	Snapshotpolicy string `json:"snapshotpolicy" yunion-deprecated-by:"snapshotpolicy_id"`
}

type SnapshotSyncstatusInput

type SnapshotSyncstatusInput struct {
}

type StorageCreateInput

type StorageCreateInput struct {
	apis.EnabledStatusInfrasResourceBaseCreateInput

	// 存储类型
	//
	//
	//
	// | storage_type    | 参数                        |是否必传    |    默认值    | 说明        |
	// | --------        | -------                    | --------    | --------    | ---------    |
	// | rbd            | rbd_mon_host                | 是        |            | ceph mon_host    |
	// | rbd             | rbd_pool                    | 是         |            | ceph pool        |
	// | rbd             | rbd_key                    | 否         |            |若cephx认证开启,此参数必传    |
	// | rbd             | rbd_rados_mon_op_timeout    | 否         |    3        |单位: 秒    |
	// | rbd             | rbd_rados_osd_op_timeout    | 否         |    1200    |单位: 秒    |
	// | rbd             | rbd_client_mount_timeout    | 否         |    120        |单位: 秒    |
	// | nfs             | nfs_host                    | 是         |            |网络文件系统主机    |
	// | nfs             | nfs_shared_dir            | 是         |            |网络文件系统共享目录    |
	// local: 本地存储
	// rbd: ceph块存储, ceph存储创建时仅会检测是否重复创建,不会具体检测认证参数是否合法,只有挂载存储时
	// 计算节点会验证参数,若挂载失败,宿主机和存储不会关联,可以通过查看存储日志查找挂载失败原因
	// enum: ["local", "rbd", "nfs", "gpfs"]
	// required: true
	StorageType string `json:"storage_type"`

	// 存储介质类型
	// enum: ["rotate", "ssd", "hybird"]
	// required: true
	// default: ssd
	MediumType string `json:"medium_type"`

	ZoneResourceInput

	// ceph认证主机, storage_type为 rbd 时,此参数为必传项
	// 单个ip或以逗号分隔的多个ip具体可查询 /etc/ceph/ceph.conf 文件
	// example: 192.168.222.3,192.168.222.4,192.168.222.99
	RbdMonHost string `json:"rbd_mon_host"`

	// enable ceph messenger v2
	EnableMessengerV2 *bool `json:"enable_messenger_v2"`

	// swagger:ignore
	MonHost string

	// ceph使用的pool, storage_type为 rbd 时,此参数为必传项
	// example: rbd
	RbdPool string `json:"rbd_pool"`

	// swagger:ignore
	Pool string

	// ceph集群密码,若ceph集群开启cephx认证,此参数必传
	// 可在ceph集群主机的/etc/ceph/ceph.client.admin.keyring文件中找到
	// example: AQDigB9dtnDAKhAAxS6X4zi4BPR/lIle4nf4Dw==
	RbdKey string `json:"rbd_key"`

	// swagger:ignore
	Key string

	RbdTimeoutInput

	// swagger:ignore
	ClientMountTimeout int

	// swagger:ignore
	StorageConf *jsonutils.JSONDict

	// 网络文件系统主机, storage_type 为 nfs 时,此参数必传
	// example: 192.168.222.2
	NfsHost string `json:"nfs_host"`

	// 网络文件系统共享目录, storage_type 为 nfs 时, 此参数必传
	// example: /nfs_root/
	NfsSharedDir string `json:"nfs_shared_dir"`

	// swagger:ignore
	HardwareInfo *StorageHardwareInfo `json:"hardware_info"`
	// CLVM VG Name
	CLVMVgName string
	// SLVM VG Name
	SLVMVgName string
	Lvmlockd   bool
}

type StorageDetails

type StorageDetails struct {
	apis.EnabledStatusInfrasResourceBaseDetails
	ManagedResourceInfo
	ZoneResourceInfo

	SStorage

	SStorageCapacityInfo
	ActualUsed int64 `json:"real_time_used_capacity,omitzero"`
	VCapacity  int64 `json:"virtual_capacity,omitzero"`

	Hosts []StorageHost `json:"hosts"`

	Schedtags []SchedtagShortDescDetails `json:"schedtags"`

	StorageUsage `json:"storage_usage"`

	// 超分比
	CommitBound float32 `json:"commit_bound"`

	// master host name
	MasterHostName string `json:"master_host_name"`
}

func (StorageDetails) GetMetricPairs

func (self StorageDetails) GetMetricPairs() map[string]string

func (StorageDetails) GetMetricTags

func (self StorageDetails) GetMetricTags() map[string]string

type StorageFilterListInputBase

type StorageFilterListInputBase struct {
	StorageResourceInput

	// 以host过滤
	StorageHostId string `json:"storage_host_id"`

	// 以存储名称排序
	// pattern:asc|desc
	OrderByStorage string `json:"order_by_storage"`
}

type StorageHardwareInfo

type StorageHardwareInfo struct {
	Model     *string `json:"model"`
	Vendor    *string `json:"vendor"`
	Bandwidth float64 `json:"bandwidth" help:"Bandwidth of the device, and the unit is GB/s"`
}

type StorageHost

type StorageHost struct {
	Id         string
	Name       string
	Status     string
	HostStatus string
}

type StorageInfo

type StorageInfo struct {
	Id string `json:"id"`

	Name string `json:"name"`

	StorageType string `json:"storage_type"`

	MediumType string `json:"medium_type"`

	ZoneId string `json:"zone_id"`

	Zone string `json:"zone"`
}

type StorageListInput

type StorageListInput struct {
	apis.EnabledStatusInfrasResourceBaseListInput
	apis.ExternalizedResourceBaseListInput
	SchedtagResourceInput

	ManagedResourceListInput
	ZonalFilterListInput

	UsableResourceListInput
	StorageShareFilterListInput

	// filter by host schedtag
	HostSchedtagId string `json:"host_schedtag_id"`

	// filter by cachedimage
	ImageId string `json:"image_id"`

	// filter storages which attached the specified host
	HostId string `json:"host_id"`

	// filter storages which server can change disks to
	ServerId string `json:"server_id"`

	// filter storages of baremetal host
	IsBaremetal *bool `json:"is_baremetal"`
}

type StorageResourceInfo

type StorageResourceInfo struct {
	// 归属云订阅ID
	ManagerId string `json:"manager_id"`

	ManagedResourceInfo

	// 归属可用区ID
	ZoneId string `json:"zone_id"`

	ZoneResourceInfo

	// 存储名称
	Storage string `json:"storage"`

	// 存储类型
	StorageType string `json:"storage_type"`

	// 存储介质类型
	MediumType string `json:"medium_type"`

	// 存储状态
	StorageStatus string `json:"storage_status"`
}

type StorageResourceInput

type StorageResourceInput struct {
	// 存储(ID或Name)
	StorageId string `json:"storage_id"`
	// swagger:ignore
	// Deprecated
	// filter by storage_id
	Storage string `json:"storage" yunion-deprecated-by:"storage_id"`
}

type StorageShareFilterListInput

type StorageShareFilterListInput struct {
	// filter shared storage
	Share *bool `json:"share"`
	// filter local storage
	Local *bool `json:"local"`
}

type StorageShortDesc

type StorageShortDesc struct {
	Id          string `json:"id"`
	Name        string `json:"name"`
	Status      string `json:"status"`
	Enabled     bool   `json:"enabled"`
	StorageType string `json:"storage_type"`
	CapacityMb  int64  `json:"capacity_mb"`
}

type StorageUpdateInput

type StorageUpdateInput struct {
	apis.EnabledStatusInfrasResourceBaseUpdateInput

	// ceph集群密码,若ceph集群开启cephx认证,此参数必传
	// 可在ceph集群主机的/etc/ceph/ceph.client.admin.keyring文件中找到
	// example: AQDigB9dtnDAKhAAxS6X4zi4BPR/lIle4nf4Dw==
	RbdKey string `json:"rbd_key"`

	// enable ceph messenger v2
	EnableMessengerV2 *bool `json:"enable_messenger_v2"`

	RbdTimeoutInput

	// swagger:ignore
	StorageConf *jsonutils.JSONDict

	UpdateStorageConf bool

	// swagger:ignore
	HardwareInfo *StorageHardwareInfo `json:"hardware_info"`
	MasterHost   string
}

type StorageUsage

type StorageUsage struct {
	HostCount     int
	DiskCount     int
	SnapshotCount int
	Used          int64
	Wasted        int64
}

func (StorageUsage) IsZero

func (self StorageUsage) IsZero() bool

type StoragecacheDetails

type StoragecacheDetails struct {
	apis.StandaloneResourceDetails
	ManagedResourceInfo

	SStoragecache

	// 存储列表
	Storages []string `json:"storages"`
	// 缓存镜像总大小
	Size int64 `json:"size"`
	// 缓存镜像个数
	Count int `json:"count"`
	// 通过一致性哈希获取的一个管理宿主机信息
	Host *jsonutils.JSONDict `json:"host"`
}

type StoragecacheFilterListInputBase

type StoragecacheFilterListInputBase struct {
	StoragecacheResourceInput

	// 以存储缓存名称排序
	// pattern:asc|desc
	OrderByStoragecache string `json:"order_by_storagecache"`
}

type StoragecacheListInput

type StoragecacheListInput struct {
	apis.StandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput

	ManagedResourceListInput

	// 路径过滤
	Path []string `json:"path"`
}

type StoragecacheResourceInfo

type StoragecacheResourceInfo struct {
	// 归属云订阅ID
	ManagerId string `json:"manager_id"`

	ManagedResourceInfo

	// 存储缓存名称
	Storagecache string `json:"storagecache"`

	// 关联存储名称
	Storages []string `json:"storages"`

	// 关联存储信息
	StorageInfo []StorageInfo `json:"storage_info"`
}

type StoragecacheResourceInput

type StoragecacheResourceInput struct {
	// 存储缓存(ID或Name)
	StoragecacheId string `json:"storagecache_id"`
	// swagger:ignore
	// Deprecated
	// filter by storagecache_id
	Storagecache string `json:"storagecache" yunion-deprecated-by:"storagecache_id"`
}

type StoragecachedimageDetails

type StoragecachedimageDetails struct {
	SStoragecachedimage

	apis.JointResourceBaseDetails

	StoragecacheResourceInfo

	// 缓存镜像名称
	Cachedimage string `json:"cachedimage"`

	// 镜像名称
	Image string `json:"image"`
	// 镜像大小
	Size int64 `json:"size"`
	// 引用次数
	Reference int `json:"reference"`
	// Disk引用次数
	DiskReference int `json:"disk_reference"`
	// Cdrom引用次数
	CdromReference int `json:"cdrom_reference"`
}

type StoragecachedimageListInput

type StoragecachedimageListInput struct {
	apis.JointResourceBaseListInput
	apis.ExternalizedResourceBaseListInput

	StoragecacheFilterListInput

	// 以镜像缓存过滤
	CachedimageId string `json:"cachedimage_id"`
	// Deprecated
	// swagger:ignore
	Cachedimage string `json:"cachedimage" yunion-deprecated-by:"cachedimage_id"`

	// 镜像状态
	Status []string `json:"status"`
}

type StorageschedtagDetails

type StorageschedtagDetails struct {
	SchedtagJointResourceDetails

	SStorageschedtag

	// 存储名称
	Storage string `json:"storage"`
}

type StorageschedtagListInput

type StorageschedtagListInput struct {
	SchedtagJointsListInput
	StorageFilterListInput
}

type SubscriptonCreateInput

type SubscriptonCreateInput struct {

	// EA 账号id, 可通过 cloud-account-enrollment-accounts接口获取里面的id字段
	EnrollmentAccountId string `json:"enrollment_account_id"`

	// 订阅名称
	Name string `json:"name"`

	// 可选值: MS-AZR-0017P(生产用途), MS-AZR-0148P(开发测试)
	OfferType string `json:"offer_type"`
}

type SyncImagesInput

type SyncImagesInput struct {
}

type SyncRangeInput

type SyncRangeInput struct {
	Force    bool `json:"force"`
	FullSync bool `json:"full_sync"`
	DeepSync bool `json:"deep_sync"`
	// 极速模式(差量更新)
	Xor bool `json:"xor"`

	Region []string `json:"region"`
	Zone   []string `json:"zone"`
	Host   []string `json:"host"`

	// swagger: ignore
	SkipSyncResources []string `json:"skip_sync_resources"`

	// 按资源类型同步,可输入多个
	// enmu: project, compute, network, eip, loadbalancer, objectstore, rds, cache, event, cloudid, dnszone, public_ip, intervpcnetwork, saml_auth, quota, nat, nas, waf, mongodb, es, kafka, app, cdn, container, ipv6_gateway, tablestore, modelarts, vpcpeer, misc
	Resources []string `` /* 247-byte string literal not displayed */
}

func (*SyncRangeInput) IsNotSkipSyncResource

func (self *SyncRangeInput) IsNotSkipSyncResource(res iRes) bool

type SyncableBaseResourceListInput

type SyncableBaseResourceListInput struct {
	// 同步状态
	SyncStatus []string `json:"sync_status"`
}

type TAddressType

type TAddressType string

type TAgentType

type TAgentType string

type TBackupStorageType

type TBackupStorageType string

type TNetworkType

type TNetworkType string

type TablestoreCreateInput

type TablestoreCreateInput struct {
	apis.VirtualResourceCreateInput
}

type TablestoreUpdateInput

type TablestoreUpdateInput struct {
	apis.VirtualResourceBaseUpdateInput
}

type TimePoints

type TimePoints []int

func (TimePoints) IsZero

func (points TimePoints) IsZero() bool

func (TimePoints) String

func (points TimePoints) String() string

type TimerCreateInput

type TimerCreateInput struct {

	// description: 执行时间
	ExecTime time.Time
}

type TimerDetails

type TimerDetails struct {
	// description: 执行时间
	ExecTime time.Time `json:"exec_time"`
}

type UsableResourceListInput

type UsableResourceListInput struct {
	// filter by network usability of the resource
	Usable *bool `json:"usable"`
}

type UsableVpcResourceListInput

type UsableVpcResourceListInput struct {
	// filter by Vpc usability of the resource
	UsableVpc *bool `json:"usable_vpc"`
}

type VSwitch

type VSwitch struct {
	Id            string       `json:"id"`
	Name          string       `json:"name"`
	Distributed   bool         `json:"distributed"`
	Hosts         []SimpleHost `json:"hosts"`
	HostNetworks  []CANetConf  `json:"host_networks"`
	GuestNetworks []CANetConf  `json:"guest_networks"`
}

type VpcCreateInput

type VpcCreateInput struct {
	apis.EnabledStatusInfrasResourceBaseCreateInput

	CloudregionResourceInput

	CloudproviderResourceInput

	// CIDR_BLOCK
	CidrBlock string `json:"cidr_block"`

	// CIDR_BLOCK
	CidrBlock6 string `json:"cidr_block6"`

	// 仅对谷歌云有用,若谷歌云订阅只有一个全局VPC,此参数可不传
	// 若有多个全局VPC,谷歌云需要指定其中一个全局VPC
	GlobalvpcId string `json:"globalvpc_id"`

	// Vpc外网访问模式
	ExternalAccessMode string `json:"external_access_mode"`
}

type VpcFilterListInputBase

type VpcFilterListInputBase struct {
	VpcListItemInput

	// 按VPC名称排序
	// pattern:asc|desc
	OrderByVpc string `json:"order_by_vpc"`
}

type VpcListInput

type VpcListInput struct {
	apis.EnabledStatusInfrasResourceBaseListInput
	apis.ExternalizedResourceBaseListInput

	ManagedResourceListInput
	RegionalFilterListInput
	GlobalVpcResourceListInput

	DnsZoneFilterListBase

	InterVpcNetworkFilterListBase
	// 过滤可以加入指定vpc互联的vpc
	UsableForInterVpcNetworkId string `json:"usable_for_inter_vpc_network_id"`

	UsableResourceListInput
	UsableVpcResourceListInput

	// 过滤vpc底下有指定zone的ip子网
	ZoneId string `json:"zone_id"`

	// filter by globalvpc
	Globalvpc string `json:"globalvpc"`

	// 是否是默认VPC
	// example: true
	IsDefault *bool `json:"is_default"`

	// CIDR地址段
	// example: 192.168.222.0/24
	CidrBlock []string `json:"cidr_block"`

	// IPv6地址段
	CidrBlock6 []string `json:"cidr_block6"`

	// enmu: eip, none
	ExternalAccessMode string `json:"external_access_mode"`

	// 按子网数量排序
	// pattern:asc|desc
	OrderByNetworkCount string `json:"order_by_network_count"`
	// 按二层网络数量排序
	// pattern:asc|desc
	OrderByWireCount string `json:""order_by_wire_count`
}

type VpcListItemInput

type VpcListItemInput struct {
	// 关联VPC(ID或Name)
	VpcId []string `json:"vpc_id"`
	// swagger:ignore
	// Deprecated
	// filter by vpc Id
	Vpc []string `json:"vpc" yunion-deprecated-by:"vpc_id"`

	// Vpc外网访问模式
	ExternalAccessMode string `json:"external_access_mode"`
}

type VpcPeeringConnectionCreateInput

type VpcPeeringConnectionCreateInput struct {
	apis.EnabledStatusInfrasResourceBaseCreateInput
	SVpcResourceBase
	PeerVpcId string
	//跨区域vpc对等连接带宽,仅对腾讯云有效
	//单位Mbps,可选值 10,20,50,100,200,500,1000
	Bandwidth int
}

type VpcPeeringConnectionDetails

type VpcPeeringConnectionDetails struct {
	apis.EnabledStatusInfrasResourceBaseDetails
	VpcResourceInfo

	PeerVpcName string
}

type VpcPeeringConnectionUpdateInput

type VpcPeeringConnectionUpdateInput struct {
	apis.EnabledStatusInfrasResourceBaseUpdateInput
}

type VpcResourceInfo

type VpcResourceInfo struct {
	VpcResourceInfoBase

	// VPC归属区域ID
	CloudregionId string `json:"cloudregion_id"`

	CloudregionResourceInfo

	// VPC归属云订阅ID
	ManagerId string `json:"manager_id"`

	ManagedResourceInfo
}

type VpcResourceInfoBase

type VpcResourceInfoBase struct {
	// Vpc Name
	Vpc string `json:"vpc"`

	// VPC外部Id
	VpcExtId string `json:"vpc_ext_id"`

	// 是否为经典网络
	IsDefaultVpc bool `json:"is_default_vpc"`
}

type VpcResourceInput

type VpcResourceInput struct {
	// 关联VPC(ID或Name)
	VpcId string `json:"vpc_id"`
	// swagger:ignore
	// Deprecated
	// filter by vpc Id
	Vpc string `json:"vpc" yunion-deprecated-by:"vpc_id"`

	// Vpc外网访问模式
	ExternalAccessMode string `json:"external_access_mode"`
}

type VpcSyncstatusInput

type VpcSyncstatusInput struct {
}

type VpcTopologyInput

type VpcTopologyInput struct {
}

type VpcTopologyOutput

type VpcTopologyOutput struct {
	Name   string               `json:"name"`
	Status string               `json:"status"`
	Wires  []WireTopologyOutput `json:"wires"`
}

type VpcUpdateInput

type VpcUpdateInput struct {
	apis.EnabledStatusInfrasResourceBaseUpdateInput

	// Vpc外网访问模式
	ExternalAccessMode string `json:"external_access_mode"`

	// CIDR BLOCK of IPv4
	CidrBlock string `json:"cidr_block"`

	// CIDR BLOCK of IPv6
	CidrBlock6 string `json:"cidr_block6"`
}

type VpcUsage

type VpcUsage struct {
	// 二层网络数量
	// example: 1
	WireCount int `json:"wire_count"`
	// IP子网个数
	// example: 2
	NetworkCount int `json:"network_count"`
	// 路由表个数
	// example: 0
	RoutetableCount int `json:"routetable_count"`
	// NAT网关个数
	// example: 0
	NatgatewayCount int `json:"natgateway_count"`

	// DnsZone个数
	// example: 2
	DnsZoneCount int `json:"dns_zone_count"`

	RequestVpcPeerCount int `json:"request_vpc_peer_count"`
	AcceptVpcPeerCount  int `json:"accpet_vpc_peer_count"`
}

type WafDeleteRuleInput

type WafDeleteRuleInput struct {
	WafRuleId string
}

type WafInstanceCreateInput

type WafInstanceCreateInput struct {
	apis.EnabledStatusInfrasResourceBaseCreateInput

	// 阿里云CNAME介入回源地址,支持IP和域名,域名仅支持输入一个
	// 此参数和cloud_resources两者必须指定某一个
	SourceIps cloudprovider.WafSourceIps `json:"source_ips"`

	// 关联云资源列表
	// 阿里云要求输入此参数或source_ips
	CloudResources []cloudprovider.SCloudResource

	CloudregionResourceInput
	CloudproviderResourceInput

	Type cloudprovider.TWafType

	DefaultAction *cloudprovider.DefaultAction
}

type WafRuleCreateInput

type WafRuleCreateInput struct {
	apis.StatusStandaloneResourceCreateInput

	// WAF实例Id
	WafInstanceId string `json:"waf_instance_id"`

	// 优先级,不可重复
	// Azure优先级范围1-100
	Priority int `json:"priority"`
	// 匹配后默认行为
	Action *cloudprovider.DefaultAction `json:"action"`
	// enmu: and, or, not
	StatementCondition string `json:"statement_condition"`

	// swagger: ignore
	// WAF规则组Id
	WafRuleGroupId string `json:"waf_rule_group_id"`

	// 条件表达式
	Statements []cloudprovider.SWafStatement
}

type WafRuleDetails

type WafRuleDetails struct {
	apis.StatusStandaloneResourceDetails
	SWafRule

	Statements []cloudprovider.SWafStatement
}

type WafRuleListInput

type WafRuleListInput struct {
	apis.StatusStandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput

	// WAF实例Id
	WafInstanceId string `json:"waf_instance_id"`

	// WAF规则组Id
	WafRuleGroupId string `json:"waf_rule_group_id"`
}

type WafRuleUpdateInput

type WafRuleUpdateInput struct {
	apis.StatusStandaloneResourceBaseUpdateInput
	// 条件表达式
	Statements []cloudprovider.SWafStatement
}

type WafSyncstatusInput

type WafSyncstatusInput struct {
}

type WireCreateInput

type WireCreateInput struct {
	apis.StatusInfrasResourceBaseCreateInput

	// 带宽大小,单位: Mbps
	// default: 0
	Bandwidth int `json:"bandwidth"`

	// Deprecated
	Bw int `json:"bw" yunion-deprecated-by:"bandwidth"`

	// mtu
	// minimum: 0
	// maximum: 1000000
	// default: 0
	Mtu int `json:"mtu"`

	VpcResourceInput

	ZoneResourceInput
}

type WireDetails

func (WireDetails) GetMetricTags

func (self WireDetails) GetMetricTags() map[string]string

type WireFilterListBase

type WireFilterListBase struct {
	WireResourceInput

	// 以二层网络名称排序
	OrderByWire string `json:"order_by_wire"`
}

type WireListInput

type WireListInput struct {
	apis.StatusInfrasResourceBaseListInput
	apis.ExternalizedResourceBaseListInput

	VpcFilterListInput

	ZonalFilterListBase

	HostResourceInput

	Bandwidth *int   `json:"bandwidth"`
	HostType  string `json:"host_type"`

	// 按子网数量排序
	// pattern:asc|desc
	OrderByNetworkCount string `json:"order_by_network_count"`
}

type WireMergeFromInput

type WireMergeFromInput struct {
	// description: wire ids or names to be merged from
	// required: true
	Sources []string `json:"sources"`
	// description: if merge networks under wire
	// required: false
	MergeNetwork bool `json:"merge_network"`
}

type WireMergeInput

type WireMergeInput struct {
	// description: wire id or name to be merged
	// required: true
	// example: test-wire
	Target string `json:"target"`
	// description: if merge networks under wire
	// required: false
	MergeNetwork bool `json:"merge_network"`
}

type WireMergeNetworkInput

type WireMergeNetworkInput struct {
}

type WireResourceInfo

type WireResourceInfo struct {
	WireResourceInfoBase

	// VPC ID
	VpcId string `json:"vpc_id"`

	VpcResourceInfo

	// 可用区ID
	ZoneId string `json:"zone_id"`

	// 可用区
	Zone string `json:"zone"`
}

type WireResourceInfoBase

type WireResourceInfoBase struct {
	// 二层网络(WIRE)的名称
	Wire string `json:"wire"`
}

type WireResourceInput

type WireResourceInput struct {
	// 二层网络(ID或Name)的资源
	WireId string `json:"wire_id"`
	// swagger:ignore
	// Deprecated
	// fitler by wire id
	Wire string `json:"wire" yunion-deprecated-by:"wire_id"`
}

type WireTopologyInput

type WireTopologyInput struct {
}

type WireTopologyOutput

type WireTopologyOutput struct {
	Name      string                  `json:"name"`
	Status    string                  `json:"status"`
	Bandwidth int                     `json:"bandwidth"`
	Zone      string                  `json:"zone"`
	Networks  []NetworkTopologyOutput `json:"networks"`
	Hosts     []HostTopologyOutput    `json:"hosts"`
}

type WireUpdateInput

type WireUpdateInput struct {
	apis.InfrasResourceBaseUpdateInput

	// bandwidth in MB
	Bandwidth *int `json:"bandwidth"`

	// MTU
	// example: 1500
	Mtu *int `json:"mtu"`
}

type WireUsage

type WireUsage struct {
	// IP子网数量
	// example: 1
	Networks int `json:"networks"`
	// Host数量
	// example: 1
	HostCount int `json:"host_count"`
}

type ZonalFilterListBase

type ZonalFilterListBase struct {
	ZoneResourceInput

	// 过滤处于多个指定可用区内的资源
	ZoneIds []string `json:"zone_ids"`
	// Deprecated
	// swagger:ignore
	Zones []string `json:"zones" yunion-deprecated-by:"zone_ids"`

	// 按可用区名称排序
	// pattern:asc|desc
	OrderByZone string `json:"order_by_zone"`
}

func (ZonalFilterListBase) FirstZone

func (input ZonalFilterListBase) FirstZone() string

func (ZonalFilterListBase) ZoneList

func (input ZonalFilterListBase) ZoneList() []string

type ZonalFilterListInput

type ZonalFilterListInput struct {
	RegionalFilterListInput

	ZonalFilterListBase
}

type Zone1ResourceInfoBase

type Zone1ResourceInfoBase struct {
	// 可用区名称
	// example: 北京2区
	Zone1Name string `json:"zone_1_name"`

	// 纳管云的zoneId
	Zone1ExtId string `json:"zone_1_ext_id"`
}

type ZoneCreateInput

type ZoneCreateInput struct {
	apis.StatusStandaloneResourceCreateInput

	// 区域名称或Id,建议使用Id
	Cloudregion string

	// swagger:ignore
	Region string
	// swagger:ignore
	RegionId string
	// swagger:ignore
	CloudregionId string
}

type ZoneGeneralUsage

type ZoneGeneralUsage struct {
	// 可用区底下的宿主机数量
	// example: 3
	Hosts int `json:"hosts"`

	// 可用区底下启用的宿主机数量
	// example: 2
	HostsEnabled int `json:"hosts_enabled"`

	// 可用区底下的裸金属服务器数量
	// example: 1
	Baremetals int `json:"baremetals"`

	// 可用区底下启用的裸金属服务器数量
	// example: 1
	BaremetalsEnabled int `json:"baremetals_enabled"`

	// 可用区底下的二层网络数量
	// example: 3
	Wires int `json:"wires"`

	// 可用区底下的子网数量
	// example: 1
	Networks int `json:"networks"`

	// 可用区底下的块存储数量
	// example: 1
	Storages int `json:"storages"`
}

func (*ZoneGeneralUsage) IsEmpty

func (usage *ZoneGeneralUsage) IsEmpty() bool

type ZoneListInput

type ZoneListInput struct {
	apis.StatusStandaloneResourceListInput
	apis.ExternalizedResourceBaseListInput

	ManagedResourceListInput

	RegionalFilterListInput

	UsableResourceListInput
	UsableVpcResourceListInput

	// 过滤提供特定服务的可用区
	Service string `json:"service"`

	Location []string `json:"location"`
	Contacts []string `json:"contacts"`

	OrderByWires             string
	OrderByHosts             string
	OrderByHostsEnabled      string
	OrderByBaremetals        string
	OrderByBaremetalsEnabled string
}

type ZonePurgeInput

type ZonePurgeInput struct {
	// 云订阅Id, 若zone底下不存在任何资源,会删除当前zone
	// required: true
	ManagerId string `json:"manager_id"`
}

type ZoneResourceInfo

type ZoneResourceInfo struct {
	ZoneResourceInfoBase

	// 可用区的区域ID
	CloudregionId string `json:"cloudregion_id"`

	CloudregionResourceInfo
}

type ZoneResourceInfoBase

type ZoneResourceInfoBase struct {
	// 可用区名称
	// example: 北京一区
	Zone string `json:"zone"`

	// 纳管云的zoneId
	ZoneExtId string `json:"zone_ext_id"`
}

type ZoneResourceInput

type ZoneResourceInput struct {
	// 可用区ID或名称
	// example:zone1
	ZoneId string `json:"zone_id"`

	// swagger:ignore
	// Deprecated
	Zone string `json:"zone" yunion-deprecated-by:"zone_id"`
}

type ZoneschedtagDetails

type ZoneschedtagDetails struct {
	SchedtagJointResourceDetails

	Zone string `json:"zone"`
}

type ZoneschedtagListInput

type ZoneschedtagListInput struct {
	SchedtagJointsListInput
	ZonalFilterListInput
}

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL