compute

package
v0.3.10-0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: Apache-2.0, Apache-2.0 Imports: 20 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmtptyUpdate = errors.New("No valid update data")

Functions

func ParseServerDeployInfo

func ParseServerDeployInfo(info string) (*computeapi.DeployConfig, error)

func ParseServerDeployInfoList

func ParseServerDeployInfoList(list []string) ([]*computeapi.DeployConfig, error)

Types

type AccessGroupCacheIdOption

type AccessGroupCacheIdOption struct {
	ID string `help:"Access group cache Id"`
}

func (*AccessGroupCacheIdOption) GetId

func (opts *AccessGroupCacheIdOption) GetId() string

func (*AccessGroupCacheIdOption) Params

type AccessGroupCacheListOptions

type AccessGroupCacheListOptions struct {
	options.BaseListOptions
}

func (*AccessGroupCacheListOptions) Params

type AccessGroupIdOption

type AccessGroupIdOption struct {
	ID string `help:"Access group Id"`
}

func (*AccessGroupIdOption) GetId

func (opts *AccessGroupIdOption) GetId() string

func (*AccessGroupIdOption) Params

func (opts *AccessGroupIdOption) Params() (jsonutils.JSONObject, error)

type AccessGroupListOptions

type AccessGroupListOptions struct {
	options.BaseListOptions
}

func (*AccessGroupListOptions) Params

type AccessGroupRuleIdOption

type AccessGroupRuleIdOption struct {
	ID string `help:"Access group rule Id"`
}

func (*AccessGroupRuleIdOption) GetId

func (opts *AccessGroupRuleIdOption) GetId() string

func (*AccessGroupRuleIdOption) Params

type AccessGroupRuleListOptions

type AccessGroupRuleListOptions struct {
	options.BaseListOptions
}

func (*AccessGroupRuleListOptions) Params

type AccessRuleCreateOptions

type AccessRuleCreateOptions struct {
	Priority       int
	Source         string
	RWAccessType   string `choices:"rw|r"`
	UserAccessType string `choices:""`
	Description    string
	AccessGroupId  string
}

func (*AccessRuleCreateOptions) Params

type AclEntries

type AclEntries []*AclEntry

func NewAclEntries

func NewAclEntries(ss []string) AclEntries

func (AclEntries) String

func (entries AclEntries) String() string

type AclEntry

type AclEntry struct {
	Cidr    string
	Comment string
}

func NewAclEntry

func NewAclEntry(s string) *AclEntry

func (*AclEntry) String

func (entry *AclEntry) String() string

type AppEnvironmentIdOption

type AppEnvironmentIdOption struct {
	ID string `help:"AppEnvironment ID"`
}

func (*AppEnvironmentIdOption) GetId

func (opts *AppEnvironmentIdOption) GetId() string

func (*AppEnvironmentIdOption) Params

type AppEnvironmentListOptions

type AppEnvironmentListOptions struct {
	options.BaseListOptions
	AppId        string `help:"App Id"`
	InstanceType string `help:"Instance Type"`
}

func (*AppEnvironmentListOptions) Params

type AppIdOptions

type AppIdOptions struct {
	ID string `help:"App Id"`
}

func (*AppIdOptions) GetId

func (opts *AppIdOptions) GetId() string

func (*AppIdOptions) Params

func (opts *AppIdOptions) Params() (jsonutils.JSONObject, error)

type AppListOptions

type AppListOptions struct {
	options.BaseListOptions
	TechStack string
}

func (*AppListOptions) Params

func (opts *AppListOptions) Params() (jsonutils.JSONObject, error)

type Backends

type Backends []*SBackend

func NewBackends

func NewBackends(ss []string) (Backends, error)

type BackupStorageCreateOptions

type BackupStorageCreateOptions struct {
	options.BaseCreateOptions
	StorageType  string `help:"storage type" choices:"nfs"`
	NfsHost      string `help:"nfs host, required when storage_type is nfs"`
	NfsSharedDir string `help:"nfs shared dir, required when storage_type is nfs" `
	CapacityMb   int    `help:"capacity, unit mb"`
}

func (*BackupStorageCreateOptions) Params

type BackupStorageIdOptions

type BackupStorageIdOptions struct {
	ID string `help:"backup storage id"`
}

func (*BackupStorageIdOptions) GetId

func (opts *BackupStorageIdOptions) GetId() string

func (*BackupStorageIdOptions) Params

type BackupStorageListOptions

type BackupStorageListOptions struct {
	options.BaseListOptions
}

func (*BackupStorageListOptions) Params

type CDNDomainCreateOptions

type CDNDomainCreateOptions struct {
	DOMAIN       string `help:"Domain Name"`
	MANAGER      string `help:"Cloudprovider Id"`
	AREA         string `help:"Area" choices:"mainland|overseas|global"`
	SERVICE_TYPE string `help:"Service Type" choices:"web|download|media"`
	ORIGIN_TYPE  string `help:"Origin Type" choices:"domain|ip|bucket|third_party"`
	ORIGIN       string `help:"Origin Addr"`
	ServerName   string `help:"Cdn Server Name"`
}

func (*CDNDomainCreateOptions) Params

type CDNDomainListOptions

type CDNDomainListOptions struct {
	options.BaseListOptions
}

func (*CDNDomainListOptions) Params

func (opts *CDNDomainListOptions) Params() (jsonutils.JSONObject, error)

type CDNDomainUpdateOptions

type CDNDomainUpdateOptions struct {
	options.BaseIdOptions
	Description string
	Delete      string `help:"Lock or not lock cdn domain" choices:"enable|disable"`
}

func (*CDNDomainUpdateOptions) Params

type CachedLoadbalancerAclListOptions

type CachedLoadbalancerAclListOptions struct {
	LoadbalancerAclListOptions
	AclId string `help:"local acl id" `
}

func (*CachedLoadbalancerAclListOptions) Params

type CloudproviderChangeProjectOptions

type CloudproviderChangeProjectOptions struct {
	options.BaseIdOptions
	TENANT string `help:"ID or Name of tenant"`
}

func (*CloudproviderChangeProjectOptions) Params

type CloudproviderListOptions

type CloudproviderListOptions struct {
	options.BaseListOptions

	Usable bool `help:"Vpc & Network usable"`

	HasObjectStorage bool     `help:"filter cloudproviders that has object storage"`
	NoObjectStorage  bool     `help:"filter cloudproviders that has no object storage"`
	Capability       []string `help:"capability filter" choices:"project|compute|network|loadbalancer|objectstore|rds|cache|event"`
	Cloudregion      string   `help:"filter cloudproviders by cloudregion"`

	HostSchedtagId string `help:"filter by host schedtag"`
}

func (*CloudproviderListOptions) Params

type CloudproviderStorageClassesOptions

type CloudproviderStorageClassesOptions struct {
	options.BaseIdOptions
	Cloudregion string `help:"cloud region name or Id"`
}

func (*CloudproviderStorageClassesOptions) Params

type CloudproviderSyncOptions

type CloudproviderSyncOptions struct {
	options.BaseIdOptions
	Force       bool     `help:"Force sync no matter what"`
	FullSync    bool     `help:"Synchronize everything"`
	ProjectSync bool     `help:"Auto sync project info"`
	Region      []string `help:"region to sync"`
	Zone        []string `help:"region to sync"`
	Host        []string `help:"region to sync"`
}

func (*CloudproviderSyncOptions) Params

type CloudproviderUpdateOptions

type CloudproviderUpdateOptions struct {
	options.BaseIdOptions
	Name      string `help:"New name to update"`
	AccessUrl string `help:"New access url"`
	Desc      string `help:"Description"`
}

func (*CloudproviderUpdateOptions) Params

type ClouproviderProjectMappingOptions

type ClouproviderProjectMappingOptions struct {
	options.BaseIdOptions
	ProjectMappingId string `json:"project_mapping_id" help:"project mapping id"`
}

func (*ClouproviderProjectMappingOptions) Params

type ClouproviderSetSyncingOptions

type ClouproviderSetSyncingOptions struct {
	options.BaseIdOptions
	Enabled        bool     `help:"Enable or disable sync"`
	CloudregionIds []string `help:"Cloudregion ids for sync"`
}

func (*ClouproviderSetSyncingOptions) Params

type DBInstanceChangeConfigOptions

type DBInstanceChangeConfigOptions struct {
	DBInstanceIdOptions
	DiskSizeGb   int64  `help:"Change DBInstance storage size"`
	VcpuCount    int64  `help:"Change DBInstance vcpu count"`
	VmemSizeMb   int64  `help:"Change DBInstance vmem size mb"`
	InstanceType string `help:"Change DBInstance instanceType"`
	Category     string `help:"Change DBInstance category"`
}

func (*DBInstanceChangeConfigOptions) Params

type DBInstanceChangeOwnerOptions

type DBInstanceChangeOwnerOptions struct {
	DBInstanceIdOptions
	PROJECT string `help:"Project ID or change" json:"tenant"`
}

func (*DBInstanceChangeOwnerOptions) Params

type DBInstanceCreateOptions

type DBInstanceCreateOptions struct {
	NAME               string   `help:"DBInstance Name"`
	InstanceType       string   `help:"InstanceType for DBInstance"`
	VcpuCount          int      `help:"Core of cpu for DBInstance"`
	VmemSizeMb         int      `help:"Memory size of DBInstance"`
	Port               int      `help:"Port of DBInstance"`
	Category           string   `help:"Category of DBInstance"`
	Network            string   `help:"Network of DBInstance"`
	Address            string   `help:"Address of DBInstance"`
	Engine             string   `help:"Engine of DBInstance"`
	EngineVersion      string   `help:"EngineVersion of DBInstance Engine"`
	StorageType        string   `help:"StorageTyep of DBInstance"`
	Secgroup           string   `help:"Secgroup name or Id for DBInstance"`
	Zone               string   `help:"ZoneId or name for DBInstance"`
	DiskSizeGB         int      `help:"Storage size for DBInstance"`
	Duration           string   `help:"Duration for DBInstance"`
	AllowDelete        *bool    `help:"not lock dbinstance" `
	Tags               []string `help:"Tags info,prefix with 'user:', eg: user:project=default" json:"-"`
	DBInstancebackupId string   `help:"create dbinstance from backup" json:"dbinstancebackup_id"`
	MultiAz            bool     `help:"deploy rds with multi az"`
}

func (*DBInstanceCreateOptions) Params

type DBInstanceDeleteOptions

type DBInstanceDeleteOptions struct {
	DBInstanceIdOptions
	KeepBackup bool `help:"Keep dbinstance manual backup after delete dbinstance"`
}

func (*DBInstanceDeleteOptions) Params

type DBInstanceIdOptions

type DBInstanceIdOptions struct {
	ID string `help:"DBInstance Id"`
}

func (*DBInstanceIdOptions) GetId

func (opts *DBInstanceIdOptions) GetId() string

func (*DBInstanceIdOptions) Params

func (opts *DBInstanceIdOptions) Params() (jsonutils.JSONObject, error)

type DBInstanceListOptions

type DBInstanceListOptions struct {
	options.BaseListOptions
	BillingType string `help:"billing type" choices:"postpaid|prepaid"`
	IpAddr      string
}

func (*DBInstanceListOptions) Params

func (opts *DBInstanceListOptions) Params() (jsonutils.JSONObject, error)

type DBInstanceNetworkListOptions

type DBInstanceNetworkListOptions struct {
	options.BaseListOptions
	DBInstance string `help:"ID or Name of DBInstance" json:"dbinstance"`
	Network    string `help:"Network ID or name"`
}

func (*DBInstanceNetworkListOptions) GetContextId

func (opts *DBInstanceNetworkListOptions) GetContextId() string

func (*DBInstanceNetworkListOptions) Params

type DBInstancePublicConnectionOptions

type DBInstancePublicConnectionOptions struct {
	DBInstanceIdOptions
	IS_OPEN string `help:"Open Or Close public connection" choices:"true|false"`
}

func (*DBInstancePublicConnectionOptions) Params

type DBInstanceRecoveryOptions

type DBInstanceRecoveryOptions struct {
	DBInstanceIdOptions
	BACKUP    string
	Databases []string
}

func (*DBInstanceRecoveryOptions) Params

type DBInstanceRemoteUpdateOptions

type DBInstanceRemoteUpdateOptions struct {
	DBInstanceIdOptions
	api.DBInstanceRemoteUpdateInput
}

func (*DBInstanceRemoteUpdateOptions) Params

type DBInstanceRenewOptions

type DBInstanceRenewOptions struct {
	DBInstanceIdOptions
	DURATION string `help:"Duration of renew, ADMIN only command"`
}

func (*DBInstanceRenewOptions) Params

type DBInstanceSetSecgroupOptions

type DBInstanceSetSecgroupOptions struct {
	DBInstanceIdOptions
	SECGROUP_IDS []string `help:"Security Group Ids"`
}

func (*DBInstanceSetSecgroupOptions) Params

type DBInstanceUpdateOptions

type DBInstanceUpdateOptions struct {
	DBInstanceIdOptions
	Name        string
	Description string
	Delete      string `help:"Lock or not lock dbinstance" choices:"enable|disable"`
}

func (*DBInstanceUpdateOptions) Params

type DiskBackupCreateOptions

type DiskBackupCreateOptions struct {
	options.BaseCreateOptions
	DISKID          string `help:"disk id" json:"disk_id"`
	BACKUPSTORAGEID string `help:"back storage id" json:"backup_storage_id"`
}

func (*DiskBackupCreateOptions) Params

type DiskBackupDeleteOptions

type DiskBackupDeleteOptions struct {
	DiskBackupIdOptions
	Force bool `help:"force delete"`
}

func (*DiskBackupDeleteOptions) QueryParams

func (opts *DiskBackupDeleteOptions) QueryParams() (jsonutils.JSONObject, error)

type DiskBackupIdOptions

type DiskBackupIdOptions struct {
	ID string `help:"disk backup id" json:"-"`
}

func (*DiskBackupIdOptions) GetId

func (opts *DiskBackupIdOptions) GetId() string

func (*DiskBackupIdOptions) Params

func (opts *DiskBackupIdOptions) Params() (jsonutils.JSONObject, error)

type DiskBackupListOptions

type DiskBackupListOptions struct {
	options.BaseListOptions
	DiskId           string `help:"disk id" json:"disk_id"`
	BackupStorageId  string `help:"backup storage id" json:"backup_storage_id"`
	IsInstanceBackup *bool  `help:"if part of instance backup" json:"is_instance_backup"`
}

func (*DiskBackupListOptions) Params

func (opts *DiskBackupListOptions) Params() (jsonutils.JSONObject, error)

type DiskBackupRecoveryOptions

type DiskBackupRecoveryOptions struct {
	DiskBackupIdOptions
	Name string `help:"disk name" json:"name"`
}

func (*DiskBackupRecoveryOptions) GetId

func (opt *DiskBackupRecoveryOptions) GetId() string

func (*DiskBackupRecoveryOptions) Params

type DiskBackupSyncstatusOptions

type DiskBackupSyncstatusOptions struct {
	DiskBackupIdOptions
}

func (*DiskBackupSyncstatusOptions) GetId

func (opt *DiskBackupSyncstatusOptions) GetId() string

func (*DiskBackupSyncstatusOptions) Params

type DiskCreateOptions

type DiskCreateOptions struct {
	Manager string `help:"Preferred manager where virtual server should be created" json:"prefer_manager_id"`
	Region  string `help:"Preferred region where virtual server should be created" json:"prefer_region_id"`
	Zone    string `help:"Preferred zone where virtual server should be created" json:"prefer_zone_id"`
	Wire    string `help:"Preferred wire where virtual server should be created" json:"prefer_wire_id"`
	Host    string `help:"Preferred host where virtual server should be created" json:"prefer_host_id"`

	NAME       string   `help:"Name of the disk"`
	DISKDESC   string   `help:"Image size or size of virtual disk"`
	Desc       string   `help:"Description" metavar:"Description"`
	Storage    string   `help:"ID or name of storage where the disk is created"`
	Hypervisor string   `help:"Hypervisor of this disk, used by schedule"`
	Backend    string   `help:"Backend of this disk"`
	Schedtag   []string `help:"Schedule policy, key = aggregate name, value = require|exclude|prefer|avoid" metavar:"<KEY:VALUE>"`
	TaskNotify bool     `help:"Setup task notify"`
	SnapshotId string   `help:"snapshot id"`
	BackupId   string   `help:"backupid"`

	Project string `help:"owner project"`
}

func (DiskCreateOptions) Params

func (o DiskCreateOptions) Params() (*api.DiskCreateInput, error)

type EipAssociateOptions

type EipAssociateOptions struct {
	options.BaseIdOptions
	INSTANCE_ID  string `help:"ID of instance the eip associated with"`
	InstanceType string `` /* 126-byte string literal not displayed */
}

func (*EipAssociateOptions) Params

func (opts *EipAssociateOptions) Params() (jsonutils.JSONObject, error)

type EipChangeBandwidthOptions

type EipChangeBandwidthOptions struct {
	options.BaseIdOptions
	BANDWIDTH int `help:"new bandwidth of EIP"`
}

func (*EipChangeBandwidthOptions) Params

type EipChangeOwnerOptions

type EipChangeOwnerOptions struct {
	options.BaseIdOptions
	PROJECT string `help:"Project ID or change"`
}

func (*EipChangeOwnerOptions) Params

func (opts *EipChangeOwnerOptions) Params() (jsonutils.JSONObject, error)

type EipCreateOptions

type EipCreateOptions struct {
	options.BaseCreateOptions
	Manager    *string `help:"cloud provider"`
	Region     *string `help:"cloud region in which EIP is allocated"`
	Bandwidth  *int    `help:"Bandwidth in Mbps"`
	IpAddr     *string `help:"IP address of the EIP" json:"ip_addr"`
	Network    *string `help:"Network of the EIP"`
	BgpType    *string `help:"BgpType of the EIP" positional:"false"`
	ChargeType *string `help:"bandwidth charge type" choices:"traffic|bandwidth"`
}

func (*EipCreateOptions) Params

func (opts *EipCreateOptions) Params() (jsonutils.JSONObject, error)

type EipDissociateOptions

type EipDissociateOptions struct {
	options.BaseIdOptions
	AutoDelete bool `help:"automatically delete the dissociate EIP" json:"auto_delete,omitfalse"`
}

func (*EipDissociateOptions) Params

func (opts *EipDissociateOptions) Params() (jsonutils.JSONObject, error)

type EipUpdateOptions

type EipUpdateOptions struct {
	options.BaseUpdateOptions

	AutoDellocate *string `help:"enable or disable automatically dellocate when dissociate from instance" choices:"true|false"`
	IpAddr        string
	AssociateId   string
	AssociateType string
}

func (*EipUpdateOptions) Params

func (opts *EipUpdateOptions) Params() (jsonutils.JSONObject, error)

type ElasticSearchIdOption

type ElasticSearchIdOption struct {
	ID string `help:"Elasticsearch Id"`
}

func (*ElasticSearchIdOption) GetId

func (opts *ElasticSearchIdOption) GetId() string

func (*ElasticSearchIdOption) Params

func (opts *ElasticSearchIdOption) Params() (jsonutils.JSONObject, error)

type ElasticSearchListOptions

type ElasticSearchListOptions struct {
	options.BaseListOptions
}

func (*ElasticSearchListOptions) Params

type ElasticSearchUpdateOptions

type ElasticSearchUpdateOptions struct {
	ElasticSearchIdOption
	Name        string
	Description string
	Delete      string `help:"Lock or not lock dbinstance" choices:"enable|disable"`
}

func (*ElasticSearchUpdateOptions) Params

type ElasticipListOptions

type ElasticipListOptions struct {
	Region string `help:"List eips in cloudregion"`

	Usable                    *bool  `help:"List all zones that is usable"`
	UsableEipForAssociateType string `help:"With associate id filter which eip can associate" choices:"server|natgateway|loadbalancer"`
	UsableEipForAssociateId   string `help:"With associate type filter which eip can associate"`

	options.BaseListOptions
}

func (*ElasticipListOptions) Params

func (opts *ElasticipListOptions) Params() (jsonutils.JSONObject, error)

type ExterProjectChagneProjectOptions

type ExterProjectChagneProjectOptions struct {
	ExternalProjectIdOption
	PROJECT string
}

func (*ExterProjectChagneProjectOptions) Params

type ExternalProjectCreateOptions

type ExternalProjectCreateOptions struct {
	NAME            string
	CLOUDACCOUNT_ID string
	ManagerId       string
}

func (*ExternalProjectCreateOptions) Params

type ExternalProjectIdOption

type ExternalProjectIdOption struct {
	ID string `help:"external project Id"`
}

func (*ExternalProjectIdOption) GetId

func (opts *ExternalProjectIdOption) GetId() string

func (*ExternalProjectIdOption) Params

type ExternalProjectListOptions

type ExternalProjectListOptions struct {
	options.BaseListOptions
}

func (*ExternalProjectListOptions) Params

type FileSystemCreateOptions

type FileSystemCreateOptions struct {
	NAME           string
	Protocol       string `choices:"NFS|SMB|CPFS"`
	FileSystemType string
	Capacity       int64  `json:"capacity"`
	NetworkId      string `json:"network_id"`
	StorageType    string `json:"storage_type"`
	ZoneId         string `json:"zone_id"`
	ManagerId      string `json:"manager_id"`
}

func (*FileSystemCreateOptions) Params

type FileSystemIdOption

type FileSystemIdOption struct {
	ID string `help:"File system Id"`
}

func (*FileSystemIdOption) GetId

func (opts *FileSystemIdOption) GetId() string

func (*FileSystemIdOption) Params

func (opts *FileSystemIdOption) Params() (jsonutils.JSONObject, error)

type FileSystemListOptions

type FileSystemListOptions struct {
	options.BaseListOptions
}

func (*FileSystemListOptions) Params

func (opts *FileSystemListOptions) Params() (jsonutils.JSONObject, error)

type GlobalVpcCreateOptions

type GlobalVpcCreateOptions struct {
	NAME    string `help:"Global vpc name"`
	MANAGER string `help:"Cloudprovider Id"`
}

func (*GlobalVpcCreateOptions) Params

type GlobalVpcIdOption

type GlobalVpcIdOption struct {
	ID string `help:"Global vpc Id"`
}

func (*GlobalVpcIdOption) GetId

func (opts *GlobalVpcIdOption) GetId() string

func (*GlobalVpcIdOption) Params

func (opts *GlobalVpcIdOption) Params() (jsonutils.JSONObject, error)

type GlobalVpcListOptions

type GlobalVpcListOptions struct {
	options.BaseListOptions
}

func (*GlobalVpcListOptions) Params

func (opts *GlobalVpcListOptions) Params() (jsonutils.JSONObject, error)

type HostAutoMigrateOnHostDownOptions

type HostAutoMigrateOnHostDownOptions struct {
	options.BaseIdsOptions
	AutoMigrateOnHostDown     string `help:"Auto migrate on host down" choices:"enable|disable" default:"disable"`
	AutoMigrateOnHostShutdown string `help:"Auto migrate on host shutdown" choices:"enable|disable" default:"disable"`
}

func (*HostAutoMigrateOnHostDownOptions) Params

type HostListOptions

type HostListOptions struct {
	Schedtag  string `help:"List hosts in schedtag"`
	Zone      string `help:"List hosts in zone"`
	Region    string `help:"List hosts in region"`
	Wire      string `help:"List hosts in wire"`
	Image     string `help:"List hosts cached images" json:"cachedimage"`
	Storage   string `help:"List hosts attached to storages"`
	Baremetal string `help:"List hosts that is managed by baremetal system" choices:"true|false"`
	Empty     bool   `help:"show empty host" json:"-"`
	Occupied  bool   `help:"show occupid host" json:"-"`
	Enabled   bool   `help:"Show enabled host only" json:"-"`
	Disabled  bool   `help:"Show disabled host only" json:"-"`
	HostType  string `help:"Host type filter" choices:"baremetal|hypervisor|esxi|kubelet|hyperv|aliyun|azure|qcloud|aws|huawei|ucloud|google|ctyun"`
	AnyMac    string `help:"Mac matches one of the host's interface"`
	AnyIp     string `help:"IP matches one of the host's interface"`

	IsBaremetal *bool `help:"filter host list by is_baremetal=true|false"`

	ResourceType string `help:"Resource type" choices:"shared|prepaid|dedicated"`

	Usable *bool `help:"List all zones that is usable"`

	Hypervisor string `help:"filter hosts by hypervisor"`

	StorageNotAttached bool `help:"List hosts not attach specified storage"`

	Uuid string `help:"find host with given system uuid"`

	CdromBoot *bool `help:"filter hosts list by cdrom_boot=true|false"`

	Sn string `help:"find host by sn"`

	OrderByServerCount       string `help:"Order by server count" choices:"desc|asc"`
	OrderByStorage           string `help:"Order by host storage" choices:"desc|asc"`
	OrderByStorageCommitRate string `help:"Order by host storage commite rate" choices:"desc|asc"`
	OrderByCpuCommitRate     string `help:"Order by host cpu commit rate" choices:"desc|asc"`
	OrderByMemCommitRate     string `help:"Order by host meme commit rate" choices:"desc|asc"`

	options.BaseListOptions
}

func (*HostListOptions) Params

func (opts *HostListOptions) Params() (jsonutils.JSONObject, error)

type HostReserveCpusOptions

type HostReserveCpusOptions struct {
	options.BaseIdsOptions
	Cpus                    string
	Mems                    string
	DisableSchedLoadBalance bool
}

func (*HostReserveCpusOptions) Params

type HostStatusStatisticsOptions

type HostStatusStatisticsOptions struct {
	HostListOptions
	options.StatusStatisticsOptions
}

type IPv6GatewayListOptions

type IPv6GatewayListOptions struct {
	options.BaseListOptions
}

func (*IPv6GatewayListOptions) Params

type InstanceBackupDeleteOptions

type InstanceBackupDeleteOptions struct {
	InstanceBackupIdOptions
	Force bool `help:"force delete"`
}

func (*InstanceBackupDeleteOptions) QueryParams

func (opts *InstanceBackupDeleteOptions) QueryParams() (jsonutils.JSONObject, error)

type InstanceBackupIdOptions

type InstanceBackupIdOptions struct {
	ID string `help:"instance backup id" json:"-"`
}

func (*InstanceBackupIdOptions) GetId

func (opts *InstanceBackupIdOptions) GetId() string

func (*InstanceBackupIdOptions) Params

type InstanceBackupListOptions

type InstanceBackupListOptions struct {
	options.BaseListOptions
}

func (*InstanceBackupListOptions) Params

type InstanceBackupManagerCreateFromPackageOptions

type InstanceBackupManagerCreateFromPackageOptions struct {
	PackageName     string `help:"package name" json:"package_name"`
	Name            string `help:"instance backup name" json:"name"`
	BackupStorageId string `help:"backup storage id" json:"backup_storage_id"`
	ProjectId       string `help:"target project id" json:"project_id"`
}

func (*InstanceBackupManagerCreateFromPackageOptions) Params

type InstanceBackupPackOptions

type InstanceBackupPackOptions struct {
	DiskBackupIdOptions
	PackageName string `help:"package name" json:"package_name"`
}

func (*InstanceBackupPackOptions) Params

type InstanceBackupRecoveryOptions

type InstanceBackupRecoveryOptions struct {
	DiskBackupIdOptions
	Name string `help:"server name" json:"name"`
}

func (*InstanceBackupRecoveryOptions) GetId

func (opts *InstanceBackupRecoveryOptions) GetId() string

func (*InstanceBackupRecoveryOptions) Params

type InstanceGroupAssociateEipOptions

type InstanceGroupAssociateEipOptions struct {
	options.BaseIdOptions

	api.ServerAssociateEipInput
}

func (*InstanceGroupAssociateEipOptions) Params

type InstanceGroupAttachnetworkOptions

type InstanceGroupAttachnetworkOptions struct {
	options.BaseIdOptions

	api.GroupAttachNetworkInput
}

func (*InstanceGroupAttachnetworkOptions) Params

type InstanceGroupBindGuestsOptions

type InstanceGroupBindGuestsOptions struct {
	options.BaseIdOptions
	Guest []string `help:"ID or Name of Guest"`
}

func (*InstanceGroupBindGuestsOptions) Params

type InstanceGroupCreateEipOptions

type InstanceGroupCreateEipOptions struct {
	options.BaseIdOptions

	api.ServerCreateEipInput
}

func (*InstanceGroupCreateEipOptions) Params

type InstanceGroupCreateOptions

type InstanceGroupCreateOptions struct {
	NAME string `help:"name of instance group"`

	ZoneId          string `help:"zone id" json:"zone_id"`
	ServiceType     string `help:"service type"`
	ParentId        string `help:"parent id"`
	SchedStrategy   string `help:"scheduler strategy"`
	Granularity     string `help:"the upper limit number of guests with this group in a host"`
	ForceDispersion bool   `help:"force to make guest dispersion"`
}

func (*InstanceGroupCreateOptions) Params

type InstanceGroupDetachnetworkOptions

type InstanceGroupDetachnetworkOptions struct {
	options.BaseIdOptions

	api.GroupDetachNetworkInput
}

func (*InstanceGroupDetachnetworkOptions) Params

type InstanceGroupDissociateEipOptions

type InstanceGroupDissociateEipOptions struct {
	options.BaseIdOptions

	api.ServerDissociateEipInput
}

func (*InstanceGroupDissociateEipOptions) Params

type InstanceGroupGuestListOptions

type InstanceGroupGuestListOptions struct {
	options.BaseListOptions

	Group  string `help:"Group ID or Name"`
	Server string `help:"Gest ID or Name"`
}

func (*InstanceGroupGuestListOptions) GetMasterOpt

func (opts *InstanceGroupGuestListOptions) GetMasterOpt() string

func (*InstanceGroupGuestListOptions) GetSlaveOpt

func (opts *InstanceGroupGuestListOptions) GetSlaveOpt() string

func (*InstanceGroupGuestListOptions) Params

type InstanceGroupListOptions

type InstanceGroupListOptions struct {
	options.BaseListOptions

	ServiceType string `help:"Service Type"`
	ParentId    string `help:"Parent ID"`
	ZoneId      string `help:"Zone ID"`
	Server      string `help:"Guest ID or Name"`
}

func (*InstanceGroupListOptions) Params

type InstanceGroupNetworkListOptions

type InstanceGroupNetworkListOptions struct {
	options.BaseListOptions

	Group   string `help:"Guest ID or Name"`
	Network string `help:"Network ID or Name"`
}

func (*InstanceGroupNetworkListOptions) GetMasterOpt

func (opts *InstanceGroupNetworkListOptions) GetMasterOpt() string

func (*InstanceGroupNetworkListOptions) GetSlaveOpt

func (opts *InstanceGroupNetworkListOptions) GetSlaveOpt() string

func (*InstanceGroupNetworkListOptions) Params

type InstanceGroupUpdateOptions

type InstanceGroupUpdateOptions struct {
	options.BaseIdOptions

	Name            string `help:"New name to change"`
	Granularity     string `help:"the upper limit number of guests with this group in a host"`
	ForceDispersion string `help:"force to make guest dispersion" choices:"yes|no" json:"-"`
}

func (*InstanceGroupUpdateOptions) Params

type KafkaIdOption

type KafkaIdOption struct {
	ID string `help:"Kafka Id"`
}

func (*KafkaIdOption) GetId

func (opts *KafkaIdOption) GetId() string

func (*KafkaIdOption) Params

func (opts *KafkaIdOption) Params() (jsonutils.JSONObject, error)

type KafkaListOptions

type KafkaListOptions struct {
	options.BaseListOptions
}

func (*KafkaListOptions) Params

func (opts *KafkaListOptions) Params() (jsonutils.JSONObject, error)

type KafkaUpdateOptions

type KafkaUpdateOptions struct {
	KafkaIdOption
	Name        string
	Description string
	Delete      string `help:"Lock or not lock dbinstance" choices:"enable|disable"`
}

func (*KafkaUpdateOptions) Params

func (opts *KafkaUpdateOptions) Params() (jsonutils.JSONObject, error)

type KubeClusterConfigOptions

type KubeClusterConfigOptions struct {
	KubeClusterIdOption
	Private       bool
	ExpireMinutes int
}

func (*KubeClusterConfigOptions) Params

type KubeClusterIdOption

type KubeClusterIdOption struct {
	ID string `help:"KubeCluster Id"`
}

func (*KubeClusterIdOption) GetId

func (opts *KubeClusterIdOption) GetId() string

func (*KubeClusterIdOption) Params

func (opts *KubeClusterIdOption) Params() (jsonutils.JSONObject, error)

type KubeClusterListOptions

type KubeClusterListOptions struct {
	options.BaseListOptions
}

func (*KubeClusterListOptions) Params

type KubeNodeIdOption

type KubeNodeIdOption struct {
	ID string `help:"KubeNode Id"`
}

func (*KubeNodeIdOption) GetId

func (opts *KubeNodeIdOption) GetId() string

func (*KubeNodeIdOption) Params

func (opts *KubeNodeIdOption) Params() (jsonutils.JSONObject, error)

type KubeNodeListOptions

type KubeNodeListOptions struct {
	options.BaseListOptions
}

func (*KubeNodeListOptions) Params

func (opts *KubeNodeListOptions) Params() (jsonutils.JSONObject, error)

type KubeNodePoolIdOption

type KubeNodePoolIdOption struct {
	ID string `help:"KubeNodePool Id"`
}

func (*KubeNodePoolIdOption) GetId

func (opts *KubeNodePoolIdOption) GetId() string

func (*KubeNodePoolIdOption) Params

func (opts *KubeNodePoolIdOption) Params() (jsonutils.JSONObject, error)

type KubeNodePoolListOptions

type KubeNodePoolListOptions struct {
	options.BaseListOptions
}

func (*KubeNodePoolListOptions) Params

type LoadbalancerAclActionPatchOptions

type LoadbalancerAclActionPatchOptions struct {
	ID  string   `json:"-"`
	Add []string `help:"acl entry with cidr and comment separated by #, e.g. 10.9.0.0/16#no comment" json:"-"`
	Del []string `help:"acl entry with cidr and comment separated by #, e.g. 10.9.0.0/16#no comment" json:"-"`
}

func (*LoadbalancerAclActionPatchOptions) Params

type LoadbalancerAclCreateOptions

type LoadbalancerAclCreateOptions struct {
	options.SharableProjectizedResourceBaseCreateInput

	NAME     string
	AclEntry []string `help:"acl entry with cidr and comment separated by #, e.g. 10.9.0.0/16#no comment" json:"-"`
	Manager  string   `json:"manager_id"`
	Region   string   `json:"cloudregion"`
	Listener string   `help:"Huawei listener id"`
}

func (*LoadbalancerAclCreateOptions) Params

type LoadbalancerAclDeleteOptions

type LoadbalancerAclDeleteOptions struct {
	ID string `json:"-"`
}

type LoadbalancerAclGetOptions

type LoadbalancerAclGetOptions struct {
	ID string `json:"-"`
}

type LoadbalancerAclListOptions

type LoadbalancerAclListOptions struct {
	options.BaseListOptions
	Cloudregion string
}

type LoadbalancerAclPrivateOptions

type LoadbalancerAclPrivateOptions struct {
	ID string `json:"-"`
}

type LoadbalancerAclPublicOptions

type LoadbalancerAclPublicOptions struct {
	options.SharableResourcePublicBaseOptions

	ID string `json:"-"`
}

type LoadbalancerAclUpdateOptions

type LoadbalancerAclUpdateOptions struct {
	ID   string `json:"-"`
	Name string

	AclEntry []string `help:"acl entry with cidr and comment separated by #, e.g. 10.9.0.0/16#no comment" json:"-"`
}

func (*LoadbalancerAclUpdateOptions) Params

type LoadbalancerActionStatusOptions

type LoadbalancerActionStatusOptions struct {
	LoadbalancerIdOptions
	Status string `choices:"enabled|disabled"`
}

func (*LoadbalancerActionStatusOptions) Params

type LoadbalancerActionSyncStatusOptions

type LoadbalancerActionSyncStatusOptions struct {
	ID string `json:"-"`
}

type LoadbalancerAgentActionDeployOptions

type LoadbalancerAgentActionDeployOptions struct {
	ID string `json:"-"`

	Host         string `help:"name or id of the server in format '<[server:]id|host:id>|ipaddr var=val'" json:"-"`
	DeployMethod string `help:"use yum repo or use file copy" choices:"yum|copy" default:"yum"`
}

func (*LoadbalancerAgentActionDeployOptions) Params

type LoadbalancerAgentActionHbOptions

type LoadbalancerAgentActionHbOptions struct {
	ID string `json:"-"`

	Version string
	IP      string
	HaState string
}

func (*LoadbalancerAgentActionHbOptions) Params

type LoadbalancerAgentActionPatchParamsOptions

type LoadbalancerAgentActionPatchParamsOptions struct {
	ID string `json:"-"`

	LoadbalancerAgentParamsOptions
}

func (*LoadbalancerAgentActionPatchParamsOptions) Params

type LoadbalancerAgentActionUndeployOptions

type LoadbalancerAgentActionUndeployOptions struct {
	ID string `json:"-"`
}

type LoadbalancerAgentCreateOptions

type LoadbalancerAgentCreateOptions struct {
	NAME      string
	HbTimeout *int
	Cluster   string `required:"true"`

	LoadbalancerAgentParamsOptions
}

func (*LoadbalancerAgentCreateOptions) Params

type LoadbalancerAgentDefaultParamsOptions

type LoadbalancerAgentDefaultParamsOptions struct {
	Cluster string
}

type LoadbalancerAgentDeleteOptions

type LoadbalancerAgentDeleteOptions struct {
	ID string `json:"-"`
}

type LoadbalancerAgentGetOptions

type LoadbalancerAgentGetOptions struct {
	ID string `json:"-"`
}

type LoadbalancerAgentListOptions

type LoadbalancerAgentListOptions struct {
	options.BaseListOptions

	Cluster string
}

type LoadbalancerAgentParamsOptions

type LoadbalancerAgentParamsOptions struct {
	KeepalivedConfTmpl string
	HaproxyConfTmpl    string
	TelegrafConfTmpl   string

	VrrpPriority          *int // required
	VrrpVirtualRouterId   *int // required
	VrrpGarpMasterRefresh *int
	VrrpPreempt           string `choices:"true|false"`
	VrrpInterface         string // required
	VrrpAdvertInt         *int
	VrrpPass              string

	HaproxyGlobalLog      string
	HaproxyGlobalNbthread *int   `help:"enable experimental multi-threading support available since haproxy 1.8"`
	HaproxyLogHttp        string `choices:"true|false"`
	HaproxyLogTcp         string `choices:"true|false"`
	HaproxyLogNormal      string `choices:"true|false"`
	HaproxyTuneHttpMaxhdr *int   `help:"max number of http headers allowed"`

	TelegrafInfluxDbOutputUrl       string
	TelegrafInfluxDbOutputName      string
	TelegrafInfluxDbOutputUnsafeSsl *bool
	TelegrafHaproxyInputInterval    int
}

func (*LoadbalancerAgentParamsOptions) Params

type LoadbalancerAgentUpdateOptions

type LoadbalancerAgentUpdateOptions struct {
	ID   string `json:"-"`
	Name string

	HbTimeout *int

	Loadbalancers             *time.Time
	LoadbalancerListeners     *time.Time
	LoadbalancerListenerRules *time.Time
	LoadbalancerBackendGroups *time.Time
	LoadbalancerBackends      *time.Time
	LoadbalancerAcls          *time.Time
	LoadbalancerCertificates  *time.Time
}

func (*LoadbalancerAgentUpdateOptions) Params

type LoadbalancerAssociateEipOptions

type LoadbalancerAssociateEipOptions struct {
	LoadbalancerIdOptions
	computeapi.LoadbalancerAssociateEipInput
}

func (*LoadbalancerAssociateEipOptions) Params

type LoadbalancerBackendCreateOptions

type LoadbalancerBackendCreateOptions struct {
	BackendGroup string `required:"true"`
	Backend      string `required:"true"`
	BackendType  string `default:"guest"`
	Port         *int   `required:"true"`
	Weight       *int   `default:"1"`

	SendProxy string `choices:"off|v1|v2|v2-ssl|v2-ssl-on"`
	Ssl       string `choices:"on|off"`
}

func (*LoadbalancerBackendCreateOptions) Params

type LoadbalancerBackendDeleteOptions

type LoadbalancerBackendDeleteOptions struct {
	ID string `json:"-"`
}

type LoadbalancerBackendGetOptions

type LoadbalancerBackendGetOptions struct {
	ID string `json:"-"`
}

type LoadbalancerBackendGroupCreateOptions

type LoadbalancerBackendGroupCreateOptions struct {
	NAME         string
	Loadbalancer string
	Type         string   `choices:"default|normal|master_slave"`
	ProtocolType string   `help:"Huawei backendgroup protocol type" choices:"tcp|udp|http"`
	Scheduler    string   `help:"Huawei backendgroup scheduler algorithm" choices:"rr|sch|wlc"`
	Backend      []string `` /* 129-byte string literal not displayed */
}

func (*LoadbalancerBackendGroupCreateOptions) Params

type LoadbalancerBackendGroupDeleteOptions

type LoadbalancerBackendGroupDeleteOptions struct {
	ID string `json:"-"`
}

type LoadbalancerBackendGroupGetOptions

type LoadbalancerBackendGroupGetOptions struct {
	ID string `json:"-"`
}

type LoadbalancerBackendGroupIDOptions

type LoadbalancerBackendGroupIDOptions struct {
	ID string `json:"-"`
}

type LoadbalancerBackendGroupListOptions

type LoadbalancerBackendGroupListOptions struct {
	options.BaseListOptions
	Loadbalancer string
	Cloudregion  string
	NoRef        bool
}

func (*LoadbalancerBackendGroupListOptions) Params

type LoadbalancerBackendGroupUpdateOptions

type LoadbalancerBackendGroupUpdateOptions struct {
	ID   string `json:"-"`
	Name string
}

func (*LoadbalancerBackendGroupUpdateOptions) Params

type LoadbalancerBackendListOptions

type LoadbalancerBackendListOptions struct {
	options.BaseListOptions
	BackendGroup string
	Backend      string
	BackendType  string
	Weight       *int
	Address      string
	Port         *int

	SendProxy string `choices:"off|v1|v2|v2-ssl|v2-ssl-on"`
	Ssl       string `choices:"on|off"`
}

func (*LoadbalancerBackendListOptions) Params

type LoadbalancerBackendUpdateOptions

type LoadbalancerBackendUpdateOptions struct {
	ID   string `json:"-"`
	Name string

	Weight *int
	Port   *int

	SendProxy string `choices:"off|v1|v2|v2-ssl|v2-ssl-on"`
	Ssl       string `choices:"on|off"`
}

func (*LoadbalancerBackendUpdateOptions) Params

type LoadbalancerCachedAclCreateOptions

type LoadbalancerCachedAclCreateOptions struct {
	CLOUDPROVIDER string `help:"cloud provider id"`
	CLOUDREGION   string `help:"cloud region id"`
	ACL           string `help:"acl id"`
	Listener      string `help:"cloud listener id, required by huawei"`
}

func (*LoadbalancerCachedAclCreateOptions) Params

type LoadbalancerCachedCertificateCreateOptions

type LoadbalancerCachedCertificateCreateOptions struct {
	CLOUDPROVIDER string `help:"cloud provider id"`
	CLOUDREGION   string `help:"cloud region id"`
	CERTIFICATE   string `help:"certificate id"`
}

func (*LoadbalancerCachedCertificateCreateOptions) Params

type LoadbalancerCachedCertificateListOptions

type LoadbalancerCachedCertificateListOptions struct {
	LoadbalancerCertificateListOptions

	CertificateId string `help:"related certificate id"`
}

func (*LoadbalancerCachedCertificateListOptions) Params

type LoadbalancerCertificateCreateOptions

type LoadbalancerCertificateCreateOptions struct {
	options.SharableProjectizedResourceBaseCreateInput

	NAME string

	Cert string `required:"true" json:"-" help:"path to certificate file"`
	Pkey string `required:"true" json:"-" help:"path to private key file"`
}

func (*LoadbalancerCertificateCreateOptions) Params

type LoadbalancerCertificateDeleteOptions

type LoadbalancerCertificateDeleteOptions struct {
	ID string `json:"-"`
}

type LoadbalancerCertificateGetOptions

type LoadbalancerCertificateGetOptions struct {
	ID string `json:"-"`
}

type LoadbalancerCertificateListOptions

type LoadbalancerCertificateListOptions struct {
	options.BaseListOptions

	PublicKeyAlgorithm string
	PublicKeyBitLen    *int
	SignatureAlgorithm string
	Cloudregion        string
	Usable             *bool `help:"List certificates are usable"`
}

func (*LoadbalancerCertificateListOptions) Params

type LoadbalancerCertificatePrivateOptions

type LoadbalancerCertificatePrivateOptions struct {
	ID string `json:"-"`
}

type LoadbalancerCertificatePublicOptions

type LoadbalancerCertificatePublicOptions struct {
	options.SharableResourcePublicBaseOptions

	ID string `json:"-"`
}

type LoadbalancerCertificateUpdateOptions

type LoadbalancerCertificateUpdateOptions struct {
	ID   string `json:"-"`
	Name string

	Cert string `json:"-" help:"path to certificate file"`
	Pkey string `json:"-" help:"path to private key file"`
}

func (*LoadbalancerCertificateUpdateOptions) Params

type LoadbalancerClusterCreateOptions

type LoadbalancerClusterCreateOptions struct {
	NAME string

	Zone string `required:"true"`
	Wire string
}

func (*LoadbalancerClusterCreateOptions) Params

type LoadbalancerClusterDeleteOptions

type LoadbalancerClusterDeleteOptions struct {
	ID string `json:"-"`
}

type LoadbalancerClusterGetOptions

type LoadbalancerClusterGetOptions struct {
	ID string `json:"-"`
}

type LoadbalancerClusterListOptions

type LoadbalancerClusterListOptions struct {
	options.BaseListOptions

	Zone string
	Wire string
}

func (*LoadbalancerClusterListOptions) Params

type LoadbalancerClusterUpdateOptions

type LoadbalancerClusterUpdateOptions struct {
	ID string `json:"-"`

	Wire string
}

func (*LoadbalancerClusterUpdateOptions) Params

type LoadbalancerCreateEipOptions

type LoadbalancerCreateEipOptions struct {
	LoadbalancerIdOptions
	computeapi.LoadbalancerCreateEipInput
}

func (*LoadbalancerCreateEipOptions) Params

type LoadbalancerCreateOptions

type LoadbalancerCreateOptions struct {
	NAME             string
	Vpc              string
	Network          string
	Address          string
	AddressType      string `choices:"intranet|internet"`
	LoadbalancerSpec string `choices:"slb.s1.small|slb.s2.small|slb.s2.medium|slb.s3.small|slb.s3.medium|slb.s3.large|network"`
	ChargeType       string `choices:"traffic|bandwidth"`
	Bandwidth        int
	Zone             string
	Zone1            string `json:"zone_1" help:"slave zone 1"`
	Cluster          string `json:"cluster_id"`
	Manager          string
	Tags             []string `help:"Tags info,prefix with 'user:', eg: user:project=default" json:"-"`

	Eip              string `json:"eip" help:"Id or name of EIP to associate with"`
	EipBw            int    `json:"eip_bw"`
	EipChargeType    string `json:"eip_charge_type"`
	EipBgpType       string `json:"eip_bgp_type"`
	EipAutoDellocate *bool  `json:"eip_auto_dellocate"`
}

func (*LoadbalancerCreateOptions) Params

type LoadbalancerDeleteOptions

type LoadbalancerDeleteOptions struct {
	ID string `json:"-"`
}

type LoadbalancerDissociateEipOptions

type LoadbalancerDissociateEipOptions struct {
	LoadbalancerIdOptions
	computeapi.LoadbalancerDissociateEipInput
}

func (*LoadbalancerDissociateEipOptions) Params

type LoadbalancerIdOptions

type LoadbalancerIdOptions struct {
	ID string `json:"-"`
}

func (*LoadbalancerIdOptions) GetId

func (opts *LoadbalancerIdOptions) GetId() string

func (*LoadbalancerIdOptions) Params

func (opts *LoadbalancerIdOptions) Params() (jsonutils.JSONObject, error)

type LoadbalancerListOptions

type LoadbalancerListOptions struct {
	options.BaseListOptions

	Address      string
	AddressType  string `choices:"intranet|internet"`
	NetworkType  string `choices:"classic|vpc"`
	Network      string
	BackendGroup string
	Cloudregion  string
	Zone         string
	Cluster      string `json:"cluster_id"`
}

func (*LoadbalancerListOptions) Params

type LoadbalancerListenerActionStatusOptions

type LoadbalancerListenerActionStatusOptions struct {
	ID     string `json:"-"`
	Status string `choices:"enabled|disabled"`
}

func (*LoadbalancerListenerActionStatusOptions) Params

type LoadbalancerListenerActionSyncStatusOptions

type LoadbalancerListenerActionSyncStatusOptions struct {
	ID string `json:"-"`
}

type LoadbalancerListenerCreateOptions

type LoadbalancerListenerCreateOptions struct {
	NAME string

	Loadbalancer      string `required:"true"`
	ListenerType      string `required:"true" choices:"tcp|udp|http|https"`
	ListenerPort      *int   `required:"true"`
	BackendServerPort *int
	BackendGroup      *string `json:",allowempty"`

	Scheduler string `choices:"rr|wrr|wlc|sch|tch"`

	SendProxy string `choices:"off|v1|v2|v2-ssl|v2-ssl-cn"`

	ClientRequestTimeout  *int
	ClientIdleTimeout     *int
	BackendConnectTimeout *int
	BackendIdleTimeout    *int

	AclStatus string `choices:"on|off"`
	AclType   string `choices:"black|white"`
	Acl       string

	EgressMbps int

	HealthCheck     string `choices:"on|off"`
	HealthCheckType string `choices:"tcp|http"`

	HealthCheckDomain   string
	HealthCheckURI      string
	HealthCheckHttpCode string

	HealthCheckRise     *int
	HealthCheckFall     *int
	HealthCheckInterval *int
	HealthCheckTimeout  *int

	HealthCheckReq string
	HealthCheckExp string

	StickySession              string
	StickySessionType          string
	StickySessionCookie        string
	StickySessionCookieTimeout *int

	XForwardedFor string `choices:"true|false"`
	Gzip          string `choices:"true|false"`

	Certificate     string
	TLSCipherPolicy string
	EnableHttp2     string `choices:"true|false"`

	HTTPRequestRate       *int
	HTTPRequestRatePerSrc *int

	Redirect       *string `choices:"off|raw"`
	RedirectCode   *int    `choices:"301|302|307"`
	RedirectScheme *string `choices:"http|https|" json:",allowempty"`
	RedirectHost   *string `json:",allowempty"`
	RedirectPath   *string `json:",allowempty"`
}

type LoadbalancerListenerDeleteOptions

type LoadbalancerListenerDeleteOptions struct {
	ID string `json:"-"`
}

type LoadbalancerListenerGetBackendStatusOptions

type LoadbalancerListenerGetBackendStatusOptions struct {
	ID string `json:"-"`
}

type LoadbalancerListenerGetOptions

type LoadbalancerListenerGetOptions struct {
	ID string `json:"-"`
}

type LoadbalancerListenerListOptions

type LoadbalancerListenerListOptions struct {
	options.BaseListOptions

	Loadbalancer string
	ListenerType string `choices:"tcp|udp|http|https"`
	ListenerPort *int
	BackendGroup *string `json:",allowempty"`

	Scheduler string `choices:"rr|wrr|wlc|sch|tch"`

	SendProxy string `choices:"off|v1|v2|v2-ssl|v2-ssl-cn"`

	ClientRequestTimeout  *int
	ClientIdleTimeout     *int
	BackendConnectTimeout *int
	BackendIdleTimeout    *int

	AclStatus string `choices:"on|off"`
	AclType   string `choices:"black|white"`
	Acl       string

	HealthCheck     string `choices:"on|off"`
	HealthCheckType string `choices:"tcp|http"`

	HealthCheckDomain   string
	HealthCheckURI      string
	HealthCheckHttpCode string

	HealthCheckRise     *int
	HealthCheckFall     *int
	HealthCheckInterval *int
	HealthCheckTimeout  *int

	HealthCheckReq string
	HealthCheckExp string

	StickySession              string
	StickySessionType          string
	StickySessionCookie        string
	StickySessionCookieTimeout *int

	XForwardedFor string `choices:"true|false"`
	Gzip          string `choices:"true|false"`

	Certificate     string `json:"certificate_id"`
	TLSCipherPolicy string
	EnableHttp2     string `choices:"true|false"`

	HTTPRequestRate       *int
	HTTPRequestRatePerSrc *int

	Redirect       *string `choices:"off|raw"`
	RedirectCode   *int    `choices:"301|302|307"`
	RedirectScheme *string `choices:"http|https|" json:",allowempty"`
	RedirectHost   *string `json:",allowempty"`
	RedirectPath   *string `json:",allowempty"`
}

func (*LoadbalancerListenerListOptions) Params

type LoadbalancerListenerRuleActionStatusOptions

type LoadbalancerListenerRuleActionStatusOptions struct {
	ID     string `json:"-"`
	Status string `choices:"enabled|disabled"`
}

func (*LoadbalancerListenerRuleActionStatusOptions) Params

type LoadbalancerListenerRuleCreateOptions

type LoadbalancerListenerRuleCreateOptions struct {
	NAME         string
	Listener     string `required:"true"`
	BackendGroup string
	Domain       string
	Path         string

	HTTPRequestRate       *int
	HTTPRequestRatePerSrc *int

	Redirect       *string `choices:"off|raw"`
	RedirectCode   *int    `choices:"301|302|307"`
	RedirectScheme *string `json:",allowempty" choices:"http|https|"`
	RedirectHost   *string `json:",allowempty"`
	RedirectPath   *string `json:",allowempty"`
}

type LoadbalancerListenerRuleDeleteOptions

type LoadbalancerListenerRuleDeleteOptions struct {
	ID string `json:"-"`
}

type LoadbalancerListenerRuleGetBackendStatusOptions

type LoadbalancerListenerRuleGetBackendStatusOptions struct {
	ID string `json:"-"`
}

type LoadbalancerListenerRuleGetOptions

type LoadbalancerListenerRuleGetOptions struct {
	ID string `json:"-"`
}

type LoadbalancerListenerRuleListOptions

type LoadbalancerListenerRuleListOptions struct {
	options.BaseListOptions

	BackendGroup string
	Listener     string
	Domain       string
	Path         string

	Redirect       *string `choices:"off|raw"`
	RedirectCode   *int    `choices:"301|302|307"`
	RedirectScheme *string `choices:"http|https|" json:",allowempty"`
	RedirectHost   *string `json:",allowempty"`
	RedirectPath   *string `json:",allowempty"`
}

func (*LoadbalancerListenerRuleListOptions) Params

type LoadbalancerListenerRuleUpdateOptions

type LoadbalancerListenerRuleUpdateOptions struct {
	ID   string `json:"-"`
	Name string

	BackendGroup string

	HTTPRequestRate       *int
	HTTPRequestRatePerSrc *int

	Redirect       *string `choices:"off|raw"`
	RedirectCode   *int    `choices:"301|302|307"`
	RedirectScheme *string `choices:"http|https|" json:",allowempty"`
	RedirectHost   *string `json:",allowempty"`
	RedirectPath   *string `json:",allowempty"`
}

func (*LoadbalancerListenerRuleUpdateOptions) Params

type LoadbalancerListenerUpdateOptions

type LoadbalancerListenerUpdateOptions struct {
	ID   string `json:"-"`
	Name string

	BackendGroup *string `json:",allowempty"`

	Scheduler string `choices:"rr|wrr|wlc|sch|tch"`

	SendProxy string `choices:"off|v1|v2|v2-ssl|v2-ssl-cn"`

	ClientRequestTimeout  *int
	ClientIdleTimeout     *int
	BackendConnectTimeout *int
	BackendIdleTimeout    *int

	AclStatus string `choices:"on|off"`
	AclType   string `choices:"black|white"`
	Acl       string

	HealthCheck     string `choices:"on|off"`
	HealthCheckType string `choices:"tcp|http"`

	HealthCheckDomain   string
	HealthCheckURI      string
	HealthCheckHttpCode string

	HealthCheckRise     *int
	HealthCheckFall     *int
	HealthCheckInterval *int
	HealthCheckTimeout  *int

	HealthCheckReq string
	HealthCheckExp string

	StickySession              string
	StickySessionType          string
	StickySessionCookie        string
	StickySessionCookieTimeout *int

	XForwardedFor string `choices:"true|false"`
	Gzip          string `choices:"true|false"`

	Certificate     string
	TLSCipherPolicy string
	EnableHttp2     string `choices:"true|false"`

	HTTPRequestRate       *int
	HTTPRequestRatePerSrc *int

	Redirect       *string `choices:"off|raw"`
	RedirectCode   *int    `choices:"301|302|307"`
	RedirectScheme *string `choices:"http|https|" json:",allowempty"`
	RedirectHost   *string `json:",allowempty"`
	RedirectPath   *string `json:",allowempty"`
}

func (*LoadbalancerListenerUpdateOptions) Params

type LoadbalancerPurgeOptions

type LoadbalancerPurgeOptions struct {
	ID string `json:"-"`
}

type LoadbalancerRemoteUpdateOptions

type LoadbalancerRemoteUpdateOptions struct {
	LoadbalancerIdOptions
	computeapi.LoadbalancerRemoteUpdateInput
}

func (*LoadbalancerRemoteUpdateOptions) Params

type LoadbalancerUpdateOptions

type LoadbalancerUpdateOptions struct {
	LoadbalancerIdOptions
	Name string

	Delete       string `help:"Lock server to prevent from deleting" choices:"enable|disable" json:"-"`
	Cluster      string `json:"cluster_id"`
	BackendGroup string
}

func (LoadbalancerUpdateOptions) Params

type ModelartsPoolChangeConfigOption

type ModelartsPoolChangeConfigOption struct {
	ID        string `help:"Id"`
	NodeCount int
}

func (*ModelartsPoolChangeConfigOption) GetId

func (*ModelartsPoolChangeConfigOption) Params

type ModelartsPoolCreateOption

type ModelartsPoolCreateOption struct {
	Name         string `help:"Name"`
	ManagerId    string `help:"Manager Id"`
	InstanceType string `help:"Instance Type"`
	WorkType     string `help:"Work Type"`
	CpuArch      string `help:"Cpu Arch"`
	NodeCount    int    `help:"Node Count"`

	CloudregionId string `help:"Cloud Region ID"`
}

func (*ModelartsPoolCreateOption) Params

type ModelartsPoolIdOption

type ModelartsPoolIdOption struct {
	ID string `help:"ModelartsPool Id"`
}

func (*ModelartsPoolIdOption) GetId

func (opts *ModelartsPoolIdOption) GetId() string

func (*ModelartsPoolIdOption) Params

func (opts *ModelartsPoolIdOption) Params() (jsonutils.JSONObject, error)

type ModelartsPoolListOptions

type ModelartsPoolListOptions struct {
	options.BaseListOptions
}

func (*ModelartsPoolListOptions) Params

type ModelartsPoolSkuListOptions

type ModelartsPoolSkuListOptions struct {
	options.BaseListOptions
}

func (*ModelartsPoolSkuListOptions) Params

type ModelartsPoolSyncstatusOption

type ModelartsPoolSyncstatusOption struct {
	ID string `help:"Id"`
}

func (*ModelartsPoolSyncstatusOption) GetId

func (opts *ModelartsPoolSyncstatusOption) GetId() string

func (*ModelartsPoolSyncstatusOption) Params

type ModelartsPoolUpdateOption

type ModelartsPoolUpdateOption struct {
	ID       string `help:"Id"`
	WorkType string `help:"Work Type"`
}

func (*ModelartsPoolUpdateOption) GetId

func (opts *ModelartsPoolUpdateOption) GetId() string

func (*ModelartsPoolUpdateOption) Params

type MongoDBBackupListOptions

type MongoDBBackupListOptions struct {
	options.BaseIdOptions
}

func (*MongoDBBackupListOptions) Property

func (opts *MongoDBBackupListOptions) Property() string

type MongoDBListOptions

type MongoDBListOptions struct {
	options.BaseListOptions
}

func (*MongoDBListOptions) Params

func (opts *MongoDBListOptions) Params() (jsonutils.JSONObject, error)

type MongoDBUpdateOptions

type MongoDBUpdateOptions struct {
	options.BaseIdOptions
	Name        string
	Description string
	Delete      string `help:"Lock or not lock dbinstance" choices:"enable|disable"`
}

func (*MongoDBUpdateOptions) Params

func (opts *MongoDBUpdateOptions) Params() (jsonutils.JSONObject, error)

type MountTargetCreateOptions

type MountTargetCreateOptions struct {
	NAME          string
	NetworkType   string `choices:"vpc|classic"`
	FileSystemId  string `json:"file_system_id"`
	NetworkId     string `json:"network_id"`
	AccessGroupId string `json:"access_group_id"`
}

func (*MountTargetCreateOptions) Params

type MountTargetIdOption

type MountTargetIdOption struct {
	ID string `help:"Mount Target Id"`
}

func (*MountTargetIdOption) GetId

func (opts *MountTargetIdOption) GetId() string

func (*MountTargetIdOption) Params

func (opts *MountTargetIdOption) Params() (jsonutils.JSONObject, error)

type MountTargetListOptions

type MountTargetListOptions struct {
	options.BaseListOptions
}

func (*MountTargetListOptions) Params

type NasSkuIdOption

type NasSkuIdOption struct {
	ID string `help:"Nas Id or name"`
}

func (*NasSkuIdOption) GetId

func (opts *NasSkuIdOption) GetId() string

func (*NasSkuIdOption) Params

func (opts *NasSkuIdOption) Params() (jsonutils.JSONObject, error)

type NasSkuListOption

type NasSkuListOption struct {
	options.BaseListOptions
}

func (*NasSkuListOption) Params

func (opts *NasSkuListOption) Params() (jsonutils.JSONObject, error)

type NatDCreateOptions

type NatDCreateOptions struct {
	NAME         string `help:"DNAT's name"`
	NATGATEWAYID string `help:"The nat gateway'id to which DNat belongs"`
	INTERNALIP   string `help:"Internal IP"`
	INTERNALPORT string `help:"Internal Port"`
	EXTERNALIP   string `help:"External IP"`
	EXTERNALIPID string `help:"External IP ID, can be empty except huawei Cloud"`
	EXTERNALPORT string `help:"External Port"`
	IPPROTOCOL   string `help:"Transport Protocol(tcp|udp)"`
}

type NatDDeleteShowOptions

type NatDDeleteShowOptions struct {
	ID string `help:"ID of the DNat"`
}

type NatDTableListOptions

type NatDTableListOptions struct {
	Natgateway string `help:"Natgateway name or id"`

	options.BaseListOptions
}

type NatGatewayDeleteOption

type NatGatewayDeleteOption struct {
	NatGatewayIdOptions
	Force bool
}

func (*NatGatewayDeleteOption) Params

type NatGatewayIdOptions

type NatGatewayIdOptions struct {
	ID string `help:"ID of Nat Gateway"`
}

func (*NatGatewayIdOptions) GetId

func (opts *NatGatewayIdOptions) GetId() string

func (*NatGatewayIdOptions) Params

func (opts *NatGatewayIdOptions) Params() (jsonutils.JSONObject, error)

type NatGatewayListOptions

type NatGatewayListOptions struct {
	options.BaseListOptions
	Vpc         string `help:"vpc id or name"`
	Cloudregion string `help:"cloudreigon id or name"`
}

func (*NatGatewayListOptions) Params

func (opts *NatGatewayListOptions) Params() (jsonutils.JSONObject, error)

type NatPostpaidExpireOptions

type NatPostpaidExpireOptions struct {
	NatGatewayIdOptions
	apis.PostpaidExpireInput
}

func (*NatPostpaidExpireOptions) Params

type NatSCreateOptions

type NatSCreateOptions struct {
	NAME         string `help:"SNAT's name"`
	NATGATEWAYID string `help:"The nat gateway'id to which SNat belongs"`
	IP           string `help:"External IP"`
	EXTERNALIPID string `help:"External IP ID, can be empty except huawei Cloud"`
	SourceCIDR   string `help:"Source CIDR"`
	NetworkID    string `help:"Network id"`
}

type NatSDeleteShowOptions

type NatSDeleteShowOptions struct {
	ID string `help:"ID of the SNat"`
}

type NatSTableListOptions

type NatSTableListOptions struct {
	Natgateway string `help:"Natgateway name or id"`
	Network    string `help:"Network id or name"`

	options.BaseListOptions
}

type NatSkuIdOption

type NatSkuIdOption struct {
	ID string `help:"Nat Id or name"`
}

func (*NatSkuIdOption) GetId

func (opts *NatSkuIdOption) GetId() string

func (*NatSkuIdOption) Params

func (opts *NatSkuIdOption) Params() (jsonutils.JSONObject, error)

type NatSkuListOption

type NatSkuListOption struct {
	options.BaseListOptions
}

func (*NatSkuListOption) Params

func (opts *NatSkuListOption) Params() (jsonutils.JSONObject, error)

type NetTapFlowCreateOptions

type NetTapFlowCreateOptions struct {
	api.NetTapFlowCreateInput
}

func (*NetTapFlowCreateOptions) Params

type NetTapFlowIdOptions

type NetTapFlowIdOptions struct {
	ID string `json:"-" help:"Id or name of net tap service"`
}

func (*NetTapFlowIdOptions) GetId

func (o *NetTapFlowIdOptions) GetId() string

func (*NetTapFlowIdOptions) Params

type NetTapFlowListOptions

type NetTapFlowListOptions struct {
	options.BaseListOptions

	TapId string `help:"filter by tap id" json:"tap_id"`

	HostId string `help:"filter by host id" json:"host_id"`
}

func (*NetTapFlowListOptions) Params

type NetTapServiceCreateOptions

type NetTapServiceCreateOptions struct {
	api.NetTapServiceCreateInput
}

func (*NetTapServiceCreateOptions) Params

type NetTapServiceIdOptions

type NetTapServiceIdOptions struct {
	ID string `json:"-" help:"Id or name of net tap service"`
}

func (*NetTapServiceIdOptions) GetId

func (o *NetTapServiceIdOptions) GetId() string

func (*NetTapServiceIdOptions) Params

type NetTapServiceListOptions

type NetTapServiceListOptions struct {
	options.BaseListOptions

	HostId string `json:"host_id" help:"Filter by host id or name"`
}

func (*NetTapServiceListOptions) Params

type ProjectMappingCreateOption

type ProjectMappingCreateOption struct {
	options.BaseCreateOptions
	RULES_FILE string
}

func (*ProjectMappingCreateOption) Params

type ProjectMappingListOptions

type ProjectMappingListOptions struct {
	options.BaseListOptions
}

func (*ProjectMappingListOptions) Params

type ProjectMappingUpdateOption

type ProjectMappingUpdateOption struct {
	options.BaseUpdateOptions
	RulesFile string
}

func (*ProjectMappingUpdateOption) Params

type SBackend

type SBackend struct {
	Index       int
	Weight      int
	Port        int
	ID          string
	BackendType string
}

func NewBackend

func NewBackend(s string, index int) (*SBackend, error)

type SchedulerForecastOptions

type SchedulerForecastOptions struct {
	SchedulerTestBaseOptions
}

func (SchedulerForecastOptions) Params

type SchedulerTestBaseOptions

type SchedulerTestBaseOptions struct {
	ServerConfigs

	Mem   int    `help:"Memory size (MB), default 512" metavar:"MEMORY" default:"512"`
	Ncpu  int    `help:"#CPU cores of VM server, default 1" default:"1" metavar:"<SERVER_CPU_COUNT>"`
	Sku   string `help:"Server SKU instance type"`
	Log   bool   `help:"Record to schedule history"`
	Cdrom string `help:"ISO image ID" metavar:"IMAGE_ID"`
}

type SchedulerTestOptions

type SchedulerTestOptions struct {
	SchedulerTestBaseOptions
	SuggestionLimit int64 `help:"Number of schedule candidate informations" default:"50"`
	SuggestionAll   bool  `help:"Show all schedule candidate informations"`
	Details         bool  `help:"Show suggestion details"`
}

func (*SchedulerTestOptions) Params

type SecGroupCacheIdOptions

type SecGroupCacheIdOptions struct {
	ID string `help:"ID or Name or secgroup cache"`
}

func (*SecGroupCacheIdOptions) GetId

func (opts *SecGroupCacheIdOptions) GetId() string

func (*SecGroupCacheIdOptions) Params

type SecGroupCacheListOptions

type SecGroupCacheListOptions struct {
	options.BaseListOptions
	Secgroup string `help:"Secgroup ID or Name"`
}

func (*SecGroupCacheListOptions) Params

type SecGroupRulesCreateOptions

type SecGroupRulesCreateOptions struct {
	SECGROUP       string `help:"Secgroup ID or Name" metavar:"Secgroup"`
	RULE           string `json:"-"`
	Priority       int64  `help:"priority of Rule" default:"50"`
	Desc           string `help:"Description" json:"description"`
	PeerSecgroupId string `help:"Peer Secgroup Id" json:"peer_secgroup_id"`
}

func (*SecGroupRulesCreateOptions) Params

type SecGroupRulesListOptions

type SecGroupRulesListOptions struct {
	options.BaseListOptions
	Secgroup     string   `help:"Secgroup ID or Name"`
	SecgroupName string   `help:"Search rules by fuzzy secgroup name"`
	Projects     []string `help:"Filter rules by project"`
	Direction    string   `help:"filter Direction of rule" choices:"in|out"`
	Protocol     string   `help:"filter Protocol of rule" choices:"any|tcp|udp|icmp"`
	Action       string   `help:"filter Actin of rule" choices:"allow|deny"`
	Ports        string   `help:"filter Ports of rule"`
	Ip           string   `help:"filter cidr of rule"`
}

func (*SecGroupRulesListOptions) Params

type SecGroupRulesUpdateOptions

type SecGroupRulesUpdateOptions struct {
	options.BaseIdOptions
	Name           string `help:"New name of rule"`
	Priority       int64  `help:"priority of Rule"`
	Protocol       string `help:"Protocol of rule" choices:"any|tcp|udp|icmp"`
	Ports          string `help:"Ports of rule"`
	Cidr           string `help:"Cidr of rule"`
	Action         string `help:"filter Actin of rule" choices:"allow|deny"`
	Desc           string `help:"Description" metavar:"Description"`
	PeerSecgroupId string `help:"Peer Secgroup Id" json:"peer_secgroup_id"`
}

func (*SecGroupRulesUpdateOptions) Params

type ServerAssociateEipOptions

type ServerAssociateEipOptions struct {
	ServerIdOptions
	EIP string `help:"ID or name of EIP to associate"`
}

func (*ServerAssociateEipOptions) Description

func (o *ServerAssociateEipOptions) Description() string

func (*ServerAssociateEipOptions) Params

type ServerBatchMetadataOptions

type ServerBatchMetadataOptions struct {
	Guests []string `help:"IDs or names of server" json:"-"`
	TAGS   []string `help:"Tags info, eg: hypervisor=aliyun、os_type=Linux、os_version"`
}

func (*ServerBatchMetadataOptions) Params

type ServerCPUSetOptions

type ServerCPUSetOptions struct {
	options.BaseIdOptions
	SETS string `help:"Cgroup cpusets CPUs spec string, e.g. '0-2,16'"`
}

func (*ServerCPUSetOptions) Params

type ServerCancelDeleteOptions

type ServerCancelDeleteOptions struct {
	ServerIdsOptions
}

func (*ServerCancelDeleteOptions) Description

func (o *ServerCancelDeleteOptions) Description() string

type ServerChangeConfigOptions

type ServerChangeConfigOptions struct {
	ServerIdOptions
	VcpuCount *int     `help:"New number of Virtual CPU cores" json:"vcpu_count" token:"ncpu"`
	VmemSize  string   `help:"New memory size" json:"vmem_size" token:"vmem"`
	Disk      []string `help:"Data disk description, from the 1st data disk to the last one, empty string if no change for this data disk"`

	InstanceType string `help:"Instance Type, e.g. S2.SMALL2 for qcloud"`
}

func (*ServerChangeConfigOptions) Description

func (o *ServerChangeConfigOptions) Description() string

func (*ServerChangeConfigOptions) Params

type ServerChangeDiskStorageOptions

type ServerChangeDiskStorageOptions struct {
	options.BaseIdOptions
	DISKID         string `json:"disk_id" help:"Disk id or name"`
	TARGETSTORAGE  string `json:"target_storage_id" help:"Target storage id or name"`
	KeepOriginDisk bool   `json:"keep_origin_disk" help:"Keep origin disk when changed"`
}

func (*ServerChangeDiskStorageOptions) Params

type ServerChangeOwnerCandidateDomainsOptions

type ServerChangeOwnerCandidateDomainsOptions struct {
	ServerShowOptions
}

func (*ServerChangeOwnerCandidateDomainsOptions) Description

type ServerChangeOwnerOptions

type ServerChangeOwnerOptions struct {
	ID      string `help:"Server to change owner" json:"-"`
	PROJECT string `help:"Project ID or change" json:"tenant"`
}

func (*ServerChangeOwnerOptions) GetId

func (o *ServerChangeOwnerOptions) GetId() string

func (*ServerChangeOwnerOptions) Params

type ServerCloneOptions

type ServerCloneOptions struct {
	SOURCE      string `help:"Source server id or name"  json:"-"`
	TARGET_NAME string `help:"Name of newly server" json:"name"`
	AutoStart   bool   `help:"Auto start server after it is created"`

	EipBw         int    `help:"allocate EIP with bandwidth in MB when server is created" json:"eip_bw,omitzero"`
	EipChargeType string `help:"newly allocated EIP charge type" choices:"traffic|bandwidth" json:"eip_charge_type,omitempty"`
	Eip           string `help:"associate with an existing EIP when server is created" json:"eip,omitempty"`
}

func (*ServerCloneOptions) Description

func (o *ServerCloneOptions) Description() string

func (*ServerCloneOptions) GetId

func (o *ServerCloneOptions) GetId() string

func (*ServerCloneOptions) Params

type ServerCloseForwardOptions

type ServerCloseForwardOptions struct {
	ServerIdOptions
	Proto     string `json:"proto" help:"protocol" choices:"tcp|udp" default:"tcp"`
	ProxyAddr string `json:"proxy_addr" help:"proxy addr" required:"true"`
	ProxyPort int    `json:"proxy_port" help:"proxy port" required:"true"`
}

func (*ServerCloseForwardOptions) Params

type ServerConfigs

type ServerConfigs struct {
	Manager    string `help:"Preferred cloudprovider where virtual server should bd created" json:"prefer_manager"`
	Region     string `help:"Preferred region where virtual server should be created" json:"prefer_region"`
	Zone       string `help:"Preferred zone where virtual server should be created" json:"prefer_zone"`
	Wire       string `help:"Preferred wire where virtual server should be created" json:"prefer_wire"`
	Host       string `help:"Preferred host where virtual server should be created" json:"prefer_host"`
	BackupHost string `help:"Perfered host where virtual backup server should be created"`

	Hypervisor                   string `` /* 154-byte string literal not displayed */
	ResourceType                 string `help:"Resource type" choices:"shared|prepaid|dedicated"`
	Backup                       bool   `help:"Create server with backup server"`
	AutoSwitchToBackupOnHostDown bool   `help:"Auto switch to backup server on host down"`

	Schedtag []string `help:"Schedule policy, key = aggregate name, value = require|exclude|prefer|avoid" metavar:"<KEY:VALUE>"`
	Disk     []string `` /* 796-byte string literal not displayed */

	DiskSchedtag   []string `help:"Disk schedtag description, e.g. '0:<tag>:<strategy>'"`
	Net            []string `help:"Network descriptions" metavar:"NETWORK"`
	NetSchedtag    []string `help:"Network schedtag description, e.g. '0:<tag>:<strategy>'"`
	IsolatedDevice []string `help:"Isolated device model or ID" metavar:"ISOLATED_DEVICE"`
	RaidConfig     []string `help:"Baremetal raid config" json:"-"`
	Project        string   `help:"'Owner project ID or Name" json:"tenant"`
	User           string   `help:"Owner user ID or Name"`
	Count          int      `help:"Create multiple simultaneously" default:"1"`
}

func (ServerConfigs) Data

type ServerConvertToKvmOptions

type ServerConvertToKvmOptions struct {
	ServerIdsOptions

	PreferHost string `help:"Perfer host id or name" json:"prefer_host"`
}

func (*ServerConvertToKvmOptions) Params

type ServerCreateEipOptions

type ServerCreateEipOptions struct {
	options.BaseIdOptions
	Bandwidth  int     `help:"EIP bandwidth in Mbps" default:"5"`
	BgpType    *string `help:"desired BGP type"`
	ChargeType *string `help:"bandwidth charge type" choices:"traffic|bandwidth"`
}

func (*ServerCreateEipOptions) Params

type ServerCreateFromInstanceSnapshot

type ServerCreateFromInstanceSnapshot struct {
	InstaceSnapshotId string `help:"Instace snapshot id or name"`
	NAME              string `help:"Name of newly server" json:"name"`
	AutoStart         bool   `help:"Auto start server after it is created"`
	AllowDelete       bool   `help:"Unlock server to allow deleting"`

	EipBw         int    `help:"allocate EIP with bandwidth in MB when server is created" json:"eip_bw,omitzero"`
	EipChargeType string `help:"newly allocated EIP charge type" choices:"traffic|bandwidth" json:"eip_charge_type,omitempty"`
	Eip           string `help:"associate with an existing EIP when server is created" json:"eip,omitempty"`
}

type ServerCreateOptionalOptions

type ServerCreateOptionalOptions struct {
	ServerConfigs

	MemSpec        string `help:"Memory size Or Instance Type" metavar:"MEMSPEC" json:"-"`
	EnableMemclean bool   `help:"clean guest memory after guest exit" json:"enable_memclean"`

	Keypair          string   `help:"SSH Keypair"`
	Password         string   `help:"Default user password"`
	LoginAccount     string   `help:"Guest login account"`
	Iso              string   `help:"ISO image ID" metavar:"IMAGE_ID" json:"cdrom"`
	VcpuCount        int      `help:"#CPU cores of VM server, default 1" default:"1" metavar:"<SERVER_CPU_COUNT>" json:"vcpu_count" token:"ncpu"`
	InstanceType     string   `help:"instance flavor"`
	Vga              string   `help:"VGA driver" choices:"std|vmware|cirrus|qxl|virtio"`
	Vdi              string   `help:"VDI protocool" choices:"vnc|spice"`
	Bios             string   `help:"BIOS" choices:"BIOS|UEFI"`
	Machine          string   `help:"Machine type" choices:"pc|q35"`
	Desc             string   `help:"Description" metavar:"<DESCRIPTION>" json:"description"`
	Boot             string   `help:"Boot device" metavar:"<BOOT_DEVICE>" choices:"disk|cdrom" json:"-"`
	EnableCloudInit  bool     `help:"Enable cloud-init service"`
	NoAccountInit    *bool    `help:"Not reset account password"`
	AllowDelete      *bool    `help:"Unlock server to allow deleting" json:"-"`
	ShutdownBehavior string   `help:"Behavior after VM server shutdown" metavar:"<SHUTDOWN_BEHAVIOR>" choices:"stop|terminate"`
	AutoStart        bool     `help:"Auto start server after it is created"`
	Deploy           []string `help:"Specify deploy files in virtual server file system" json:"-"`
	DeployTelegraf   bool     `help:"Deploy telegraf agent if guest os is supported"`
	Group            []string `help:"Group ID or Name of virtual server"`
	System           bool     `help:"Create a system VM, sysadmin ONLY option" json:"is_system"`
	TaskNotify       *bool    `help:"Setup task notify" json:"-"`
	DryRun           *bool    `help:"Dry run to test scheduler" json:"-"`
	UserDataFile     string   `help:"user_data file path" json:"-"`
	InstanceSnapshot string   `help:"instance snapshot" json:"instance_snapshot"`
	Secgroups        []string `help:"secgroups" json:"secgroups"`

	OsType string `help:"os type, e.g. Linux, Windows, etc."`

	Duration  string `help:"valid duration of the server, e.g. 1H, 1D, 1W, 1M, 1Y, ADMIN ONLY option"`
	AutoRenew bool   `help:"auto renew for prepaid server"`

	AutoPrepaidRecycle bool `help:"automatically enable prepaid recycling after server is created successfully" json:"auto_prepaid_recycle,omitfalse"`

	GenerateName bool `help:"name is generated by pattern" json:"-"`

	EipBw         int    `help:"allocate EIP with bandwidth in MB when server is created" json:"eip_bw,omitzero"`
	EipBgpType    string `help:"desired BGP type of newly alloated EIP" json:"eip_bgp_type,omitzero"`
	EipChargeType string `help:"newly allocated EIP charge type" choices:"traffic|bandwidth" json:"eip_charge_type,omitempty"`
	Eip           string `help:"associate with an existing EIP when server is created" json:"eip,omitempty"`

	PublicIpBw         int    `help:"associate public ip with bandwidth in MB where server is created" json:"public_ip_bw,omitzero"`
	PublicIpChargeType string `help:"newly allocated public ip charge type" choices:"traffic|bandwidth" json:"public_ip_charge_type,omitempty"`

	GuestImageID string `help:"create from guest image, need to specify the guest image id"`

	EncryptKey string `help:"encryption key"`
}

func (*ServerCreateOptionalOptions) OptionalParams

type ServerCreateOptions

type ServerCreateOptions struct {
	ServerCreateOptionalOptions

	NAME string `help:"Name of server" json:"-"`
}

func (*ServerCreateOptions) Params

func (*ServerCreateOptions) ToScheduleInput

func (o *ServerCreateOptions) ToScheduleInput() (*schedapi.ScheduleInput, error)

type ServerDeleteBackupOptions

type ServerDeleteBackupOptions struct {
	ID    string `help:"ID of the server" json:"-"`
	Purge *bool  `help:"Purge Guest Backup" json:"purge"`
}

func (*ServerDeleteBackupOptions) GetId

func (o *ServerDeleteBackupOptions) GetId() string

func (*ServerDeleteBackupOptions) Params

type ServerDeleteOptions

type ServerDeleteOptions struct {
	ServerIdsOptions
	OverridePendingDelete *bool `help:"Delete server directly instead of pending delete" short-token:"f"`
	DeleteSnapshots       *bool `help:"Delete server snapshots"`
	DeleteDisks           *bool `help:"Delete server disks"`
	DeleteEip             *bool `help:"Delete eip"`
}

func (*ServerDeleteOptions) QueryParams

func (o *ServerDeleteOptions) QueryParams() (jsonutils.JSONObject, error)

type ServerDeployOptions

type ServerDeployOptions struct {
	ServerIdOptions
	Keypair        string   `help:"ssh Keypair used for login" json:"-"`
	DeleteKeypair  bool     `help:"Remove ssh Keypairs" json:"-"`
	Deploy         []string `help:"Specify deploy files in virtual server file system" json:"-"`
	ResetPassword  bool     `help:"Force reset password"`
	Password       string   `help:"Default user password"`
	AutoStart      bool     `help:"Auto start server after deployed"`
	DeployTelegraf bool     `help:"Deploy telegraf if guest os supported"`
}

func (*ServerDeployOptions) Description

func (opts *ServerDeployOptions) Description() string

func (*ServerDeployOptions) Params

func (opts *ServerDeployOptions) Params() (jsonutils.JSONObject, error)

type ServerDissociateEipOptions

type ServerDissociateEipOptions struct {
	ServerIdOptions
	AutoDelete bool `help:"automatically delete the dissociate EIP" json:"auto_delete,omitfalse"`
}

func (*ServerDissociateEipOptions) Description

func (o *ServerDissociateEipOptions) Description() string

func (*ServerDissociateEipOptions) Params

type ServerDomainStatisticsOptions

type ServerDomainStatisticsOptions struct {
	ServerListOptions
	options.DomainStatisticsOptions
}

type ServerGetPropertyDomainTagValuePairOptions

type ServerGetPropertyDomainTagValuePairOptions struct {
	ServerListOptions
	options.DomainTagValuePairsOptions
}

func (*ServerGetPropertyDomainTagValuePairOptions) Params

type ServerGetPropertyDomainTagValueTreeOptions

type ServerGetPropertyDomainTagValueTreeOptions struct {
	ServerListOptions
	options.DomainTagValueTreeOptions
}

func (*ServerGetPropertyDomainTagValueTreeOptions) Params

type ServerGetPropertyProjectTagValuePairOptions

type ServerGetPropertyProjectTagValuePairOptions struct {
	ServerListOptions
	options.ProjectTagValuePairsOptions
}

func (*ServerGetPropertyProjectTagValuePairOptions) Params

type ServerGetPropertyProjectTagValueTreeOptions

type ServerGetPropertyProjectTagValueTreeOptions struct {
	ServerListOptions
	options.ProjectTagValueTreeOptions
}

func (*ServerGetPropertyProjectTagValueTreeOptions) Params

type ServerGetPropertyTagValuePairOptions

type ServerGetPropertyTagValuePairOptions struct {
	ServerListOptions
	options.TagValuePairsOptions
}

func (*ServerGetPropertyTagValuePairOptions) Params

type ServerGetPropertyTagValueTreeOptions

type ServerGetPropertyTagValueTreeOptions struct {
	ServerListOptions
	options.TagValueTreeOptions
}

func (*ServerGetPropertyTagValueTreeOptions) Params

type ServerHaveAgentOptions

type ServerHaveAgentOptions struct {
	options.BaseIdOptions
}

type ServerIdOptions

type ServerIdOptions struct {
	ID string `help:"ID or name of the server" json:"-"`
}

func (*ServerIdOptions) GetId

func (o *ServerIdOptions) GetId() string

func (*ServerIdOptions) Params

func (o *ServerIdOptions) Params() (jsonutils.JSONObject, error)

type ServerIdsOptions

type ServerIdsOptions struct {
	ID []string `help:"ID of servers to operate" metavar:"SERVER" json:"-"`
}

func (*ServerIdsOptions) GetIds

func (o *ServerIdsOptions) GetIds() []string

func (*ServerIdsOptions) Params

func (o *ServerIdsOptions) Params() (jsonutils.JSONObject, error)

type ServerIoThrottle

type ServerIoThrottle struct {
	ServerIdOptions
	BPS  int `help:"bps(MB) of throttle" json:"bps"`
	IOPS int `help:"iops of throttle" json:"iops"`
}

func (*ServerIoThrottle) Description

func (o *ServerIoThrottle) Description() string

func (*ServerIoThrottle) Params

func (o *ServerIoThrottle) Params() (jsonutils.JSONObject, error)

type ServerListForwardOptions

type ServerListForwardOptions struct {
	ServerIdOptions
	Proto *string `json:"proto" help:"protocol" choices:"tcp|udp"`
	Port  *int    `json:"port" help:"port"`
	Addr  *string `json:"addr"`
}

func (*ServerListForwardOptions) Params

type ServerListOptions

type ServerListOptions struct {
	Zone               string `help:"Zone ID or Name"`
	Wire               string `help:"Wire ID or Name"`
	Network            string `help:"Network ID or Name"`
	Disk               string `help:"Disk ID or Name"`
	Host               string `help:"Host ID or Name"`
	Baremetal          *bool  `help:"Show baremetal servers"`
	Gpu                *bool  `help:"Show gpu servers"`
	Secgroup           string `help:"Secgroup ID or Name"`
	AdminSecgroup      string `help:"AdminSecgroup ID or Name"`
	Hypervisor         string `` /* 165-byte string literal not displayed */
	Region             string `help:"Show servers in cloudregion"`
	WithEip            *bool  `help:"Show Servers with EIP"`
	WithoutEip         *bool  `help:"Show Servers without EIP"`
	OsType             string `help:"OS Type" choices:"linux|windows|vmware"`
	Vpc                string `help:"Vpc id or name"`
	UsableServerForEip string `help:"Eip id or name"`
	WithoutUserMeta    *bool  `help:"Show Servers without user metadata"`
	EipAssociable      *bool  `help:"Show Servers can associate with eip"`
	Group              string `help:"Instance Group ID or Name"`
	HostSn             string `help:"Host SN"`
	IpAddr             string `help:"Fileter by ip"`

	OrderByDisk    string `help:"Order by disk size" choices:"asc|desc"`
	OrderByHost    string `help:"Order by host name" choices:"asc|desc"`
	OrderByNetwork string `help:"Order by network name" choices:"asc|desc"`
	OrderByIp      string `help:"Order by ip" choices:"asc|desc"`

	ResourceType string `help:"Resource type" choices:"shared|prepaid|dedicated"`

	BillingType string `help:"billing type" choices:"postpaid|prepaid"`

	ScalingGroup string `help:"ScalingGroup's id or name'"`

	options.BaseListOptions
	options.MultiArchListOptions

	VpcProvider string `help:"filter by vpc's provider" json:"vpc_provider"`

	WithMeta *bool `help:"filter by metadata" negative:"without_meta"`

	WithUserMeta *bool `help:"filter by user metadata" negative:"without_user_meta"`

	WithHost *bool `help:"filter guest with host or not" negative:"without_host"`
}

func (*ServerListOptions) Params

type ServerLiveMigrateOptions

type ServerLiveMigrateOptions struct {
	ID              string `help:"ID of server" json:"-"`
	PreferHost      string `help:"Server migration prefer host id or name" json:"prefer_host"`
	SkipCpuCheck    *bool  `help:"Skip check CPU mode of the target host" json:"skip_cpu_check"`
	SkipKernelCheck *bool  `help:"Skip target kernel version check" json:"skip_kernel_check"`
	EnableTLS       *bool  `help:"Enable tls migration" json:"enable_tls"`
	QuicklyFinish   *bool  `help:"quickly finish, fix downtime after a few rounds of memory synchronization"`
	MaxBandwidthMb  *int64 `help:"live migrate downtime, unit MB"`

	KeepDestGuestOnFailed *bool `help:"do not delete dest guest on migrate failed, for debug"`
}

func (*ServerLiveMigrateOptions) GetId

func (o *ServerLiveMigrateOptions) GetId() string

func (*ServerLiveMigrateOptions) Params

type ServerLoginInfoOptions

type ServerLoginInfoOptions struct {
	ID  string `help:"ID or name of the server" json:"-"`
	Key string `help:"File name of private key, if password is encrypted by key"`
}

type ServerMakeSshableOptions

type ServerMakeSshableOptions struct {
	options.BaseIdOptions

	User       string `help:"ssh username for ssh connection" default:"root"`
	PrivateKey string `help:"ssh privatekey for ssh connection"`
	Password   string `help:"ssh password for ssh connection"`
}

func (*ServerMakeSshableOptions) Params

type ServerMigrateForecastOptions

type ServerMigrateForecastOptions struct {
	ID              string `help:"ID of server" json:"-"`
	PreferHost      string `help:"Server migration prefer host id or name" json:"prefer_host"`
	LiveMigrate     *bool  `help:"Use live migrate"`
	SkipCpuCheck    *bool  `help:"Skip check CPU mode of the target host" json:"skip_cpu_check"`
	SkipKernelCheck *bool  `help:"Skip target kernel version check" json:"skip_kernel_check"`
}

func (*ServerMigrateForecastOptions) GetId

func (*ServerMigrateForecastOptions) Params

type ServerMigrateNetworkOptions

type ServerMigrateNetworkOptions struct {
	options.BaseIdOptions

	computeapi.ServerMigrateNetworkInput
}

func (*ServerMigrateNetworkOptions) Params

type ServerMigrateOptions

type ServerMigrateOptions struct {
	ID         string `help:"ID of server" json:"-"`
	PreferHost string `help:"Server migration prefer host id or name" json:"prefer_host"`
	AutoStart  *bool  `help:"Server auto start after migrate" json:"auto_start"`
	RescueMode *bool  `help:"Migrate server in rescue mode, all disks must reside on shared storage" json:"rescue_mode"`
}

func (*ServerMigrateOptions) GetId

func (o *ServerMigrateOptions) GetId() string

func (*ServerMigrateOptions) Params

type ServerModifySrcCheckOptions

type ServerModifySrcCheckOptions struct {
	ID          string `help:"ID or Name of server" metavar:"Guest" json:"-"`
	SrcIpCheck  string `help:"Turn on/off src ip check" choices:"on|off"`
	SrcMacCheck string `help:"Turn on/off src mac check" choices:"on|off"`
}

func (*ServerModifySrcCheckOptions) Description

func (o *ServerModifySrcCheckOptions) Description() string

func (*ServerModifySrcCheckOptions) GetId

func (*ServerModifySrcCheckOptions) Params

type ServerMonitorOptions

type ServerMonitorOptions struct {
	ServerIdOptions

	Qmp     bool   `help:"Use qmp protocol, default is hmp"`
	COMMAND string `help:"Qemu Monitor command to send"`
}

func (*ServerMonitorOptions) Params

type ServerOpenForwardOptions

type ServerOpenForwardOptions struct {
	ServerIdOptions
	Proto string `json:"proto" help:"protocol" choices:"tcp|udp" default:"tcp"`
	Port  int    `json:"port" help:"port" required:"true"`
	Addr  string `json:"addr"`
}

func (*ServerOpenForwardOptions) Params

type ServerPrepaidRecycleOptions

type ServerPrepaidRecycleOptions struct {
	ServerIdOptions
	AutoDelete bool `help:"after joining the pool, remove the server automatically"`
}

func (*ServerPrepaidRecycleOptions) Params

type ServerProjectStatisticsOptions

type ServerProjectStatisticsOptions struct {
	ServerListOptions
	options.ProjectStatisticsOptions
}

type ServerPublicipToEip

type ServerPublicipToEip struct {
	ServerIdOptions
	AutoStart bool `help:"Auto start new guest"`
}

func (*ServerPublicipToEip) Description

func (o *ServerPublicipToEip) Description() string

func (*ServerPublicipToEip) Params

type ServerQgaCommand

type ServerQgaCommand struct {
	ServerIdOptions

	COMMAND string `help:"qga command"`
}

func (*ServerQgaCommand) Params

func (o *ServerQgaCommand) Params() (jsonutils.JSONObject, error)

type ServerQgaSetPassword

type ServerQgaSetPassword struct {
	ServerIdOptions

	USERNAME string `help:"Which user to set password" json:"username"`
	PASSWORD string `help:"Password content" json:"password"`
}

func (*ServerQgaSetPassword) Params

type ServerRebuildRootOptions

type ServerRebuildRootOptions struct {
	ID            string `help:"Server to rebuild root" json:"-"`
	ImageId       string `help:"New root Image template ID" json:"image_id" token:"image"`
	Keypair       string `help:"ssh Keypair used for login"`
	Password      string `help:"Default user password"`
	NoAccountInit *bool  `help:"Not reset account password"`
	AutoStart     *bool  `help:"Auto start server after it is created"`
	AllDisks      *bool  `help:"Rebuild all disks including data disks"`
}

func (*ServerRebuildRootOptions) Description

func (o *ServerRebuildRootOptions) Description() string

func (*ServerRebuildRootOptions) GetId

func (o *ServerRebuildRootOptions) GetId() string

func (*ServerRebuildRootOptions) Params

type ServerRemoteUpdateOptions

type ServerRemoteUpdateOptions struct {
	ServerIdOptions
	computeapi.ServerRemoteUpdateInput
}

type ServerRenewOptions

type ServerRenewOptions struct {
	ID       string `help:"ID or name of server to renew"`
	DURATION string `help:"Duration of renew, ADMIN only command"`
}

func (*ServerRenewOptions) GetId

func (o *ServerRenewOptions) GetId() string

func (*ServerRenewOptions) Params

type ServerResetOptions

type ServerResetOptions struct {
	ID   []string `help:"ID of servers to operate" metavar:"SERVER" json:"-"`
	Hard *bool    `help:"Hard reset or not; default soft" json:"is_hard"`
}

func (*ServerResetOptions) GetIds

func (o *ServerResetOptions) GetIds() []string

func (*ServerResetOptions) Params

type ServerRestartOptions

type ServerRestartOptions struct {
	ID      []string `help:"ID of servers to operate" metavar:"SERVER" json:"-"`
	IsForce *bool    `help:"Force reset or not; default false" json:"is_force"`
}

func (*ServerRestartOptions) GetIds

func (o *ServerRestartOptions) GetIds() []string

func (*ServerRestartOptions) Params

type ServerSSHLoginOptions

type ServerSSHLoginOptions struct {
	ServerLoginInfoOptions
	Host         string `help:"IP address or hostname of the server"`
	Port         int    `help:"SSH service port" default:"22"`
	User         string `help:"SSH login user"`
	Password     string `help:"SSH password"`
	UseCloudroot bool   `help:"SSH login with cloudroot"`
}

type ServerSaveGuestImageOptions

type ServerSaveGuestImageOptions struct {
	ServerIdOptions
	IMAGE     string `help:"Image name" json:"name"`
	AutoStart *bool  `help:"Auto start server after image saved"`
}

func (*ServerSaveGuestImageOptions) Description

func (o *ServerSaveGuestImageOptions) Description() string

func (*ServerSaveGuestImageOptions) Params

type ServerSaveImageOptions

type ServerSaveImageOptions struct {
	ServerIdOptions
	IMAGE     string `help:"Image name" json:"name"`
	Public    *bool  `help:"Make the image public available" json:"is_public"`
	Format    string `help:"image format" choices:"vmdk|qcow2"`
	Notes     string `help:"Notes about the image"`
	AutoStart *bool  `help:"Auto start server after image saved"`
}

func (*ServerSaveImageOptions) Description

func (o *ServerSaveImageOptions) Description() string

func (*ServerSaveImageOptions) Params

type ServerSaveTemplateOptions

type ServerSaveTemplateOptions struct {
	ServerIdOptions
	TemplateName string `help:"The name of guest template"`
}

func (*ServerSaveTemplateOptions) Description

func (o *ServerSaveTemplateOptions) Description() string

func (*ServerSaveTemplateOptions) Params

type ServerSecGroupOptions

type ServerSecGroupOptions struct {
	ID     string `help:"ID or Name of server" metavar:"Guest" json:"-"`
	Secgrp string `help:"ID of Security Group" metavar:"Security Group" positional:"true"`
}

func (*ServerSecGroupOptions) GetId

func (o *ServerSecGroupOptions) GetId() string

func (*ServerSecGroupOptions) Params

type ServerSecGroupsOptions

type ServerSecGroupsOptions struct {
	ID          string   `help:"ID or Name of server" metavar:"Guest" json:"-"`
	SecgroupIds []string `help:"Ids of Security Groups" metavar:"Security Groups" positional:"true"`
}

func (*ServerSecGroupsOptions) GetId

func (o *ServerSecGroupsOptions) GetId() string

func (*ServerSecGroupsOptions) Params

type ServerSendKeyOptions

type ServerSendKeyOptions struct {
	ID   string `help:"ID or Name of server" metavar:"Guest" json:"-"`
	KEYS string `help:"Special keys to send, eg. ctrl, alt, f12, shift, etc, separated by \"-\""`
	Hold *uint  `help:"Hold key for specified milliseconds" json:"duration"`
}

func (*ServerSendKeyOptions) Description

func (o *ServerSendKeyOptions) Description() string

func (*ServerSendKeyOptions) GetId

func (o *ServerSendKeyOptions) GetId() string

func (*ServerSendKeyOptions) Params

type ServerSetAutoRenew

type ServerSetAutoRenew struct {
	ServerIdOptions
	AutoRenew bool   `help:"Set server auto renew or manual renew"`
	Duration  string `help:"Duration for renew" default:"1M"`
}

func (*ServerSetAutoRenew) Description

func (o *ServerSetAutoRenew) Description() string

func (*ServerSetAutoRenew) Params

type ServerSetLiveMigrateParamsOptions

type ServerSetLiveMigrateParamsOptions struct {
	ID              string `help:"ID of server" json:"-"`
	MaxBandwidthMB  *int64 `help:"live migrate downtime, unit MB"`
	DowntimeLimitMS *int64 `help:"live migrate downtime limit"`
}

func (*ServerSetLiveMigrateParamsOptions) GetId

func (*ServerSetLiveMigrateParamsOptions) Params

type ServerSetPasswordOptions

type ServerSetPasswordOptions struct {
	ServerIdOptions

	Username      string `help:"Which user to set password" json:"username"`
	Password      string `help:"Password content" json:"password"`
	ResetPassword bool   `help:"Force reset password"`
	AutoStart     bool   `help:"Auto start server after reset password"`
}

func (*ServerSetPasswordOptions) Params

type ServerSetSshportOptions

type ServerSetSshportOptions struct {
	options.BaseIdOptions

	Port int `help:"ssh port" default:"22"`
}

func (*ServerSetSshportOptions) Params

type ServerShowOptions

type ServerShowOptions struct {
	options.BaseShowOptions `id->help:"ID or name of the server"`
}

func (*ServerShowOptions) GetId

func (o *ServerShowOptions) GetId() string

func (*ServerShowOptions) Params

type ServerStartOptions

type ServerStartOptions struct {
	ServerIdsOptions

	QemuVersion string `help:"prefer qemu version" json:"qemu_version"`
}

func (*ServerStartOptions) Params

type ServerStatusStatisticsOptions

type ServerStatusStatisticsOptions struct {
	ServerListOptions
	options.StatusStatisticsOptions
}

type ServerStopOptions

type ServerStopOptions struct {
	ID           []string `help:"ID or Name of server" json:"-"`
	Force        *bool    `help:"Stop server forcefully" json:"is_force"`
	StopCharging *bool    `help:"Stop charging when server stop"`
}

func (*ServerStopOptions) GetIds

func (o *ServerStopOptions) GetIds() []string

func (*ServerStopOptions) Params

type ServerSwitchToBackupOptions

type ServerSwitchToBackupOptions struct {
	ID           string `help:"ID of the server" json:"-"`
	PurgeBackup  *bool  `help:"Purge Guest Backup" json:"purge_backup"`
	DeleteBackup *bool  `help:"Delete Guest Backup" json:"delete_backup"`
}

func (*ServerSwitchToBackupOptions) Description

func (o *ServerSwitchToBackupOptions) Description() string

func (*ServerSwitchToBackupOptions) GetId

func (*ServerSwitchToBackupOptions) Params

type ServerUpdateOptions

type ServerUpdateOptions struct {
	ServerIdsOptions
	Name             string `help:"New name to change"`
	Vmem             string `help:"Memory size" json:"vmem_size"`
	Ncpu             *int   `help:"CPU count" json:"vcpu_count"`
	Vga              string `help:"VGA driver" choices:"std|vmware|cirrus|qxl|virtio"`
	Vdi              string `help:"VDI protocol" choices:"vnc|spice"`
	Bios             string `help:"BIOS" choices:"BIOS|UEFI"`
	Desc             string `help:"Description" json:"description"`
	Boot             string `help:"Boot device" choices:"disk|cdrom"`
	Delete           string `help:"Lock server to prevent from deleting" choices:"enable|disable" json:"-"`
	ShutdownBehavior string `help:"Behavior after VM server shutdown" choices:"stop|terminate"`
	Machine          string `help:"Machine type" choices:"q35|pc"`

	IsDaemon *bool `help:"Daemon server" negative:"no-daemon"`

	PendingDeletedAt string `help:"change pending deleted time"`
}

func (*ServerUpdateOptions) Params

func (opts *ServerUpdateOptions) Params() (jsonutils.JSONObject, error)

type ServerVncOptions

type ServerVncOptions struct {
	ServerIdOptions
	Origin bool
}

func (*ServerVncOptions) Params

func (o *ServerVncOptions) Params() (jsonutils.JSONObject, error)

type StorageCacheImageActionOptions

type StorageCacheImageActionOptions struct {
	options.BaseIdOptions
	IMAGE  string `help:"ID or name of image"`
	Force  bool   `help:"Force refresh cache, even if the image exists in cache"`
	Format string `help:"Image force" choices:"iso|vmdk|qcow2|vhd"`
}

func (*StorageCacheImageActionOptions) Params

type StorageCreateOptions

type StorageCreateOptions struct {
	NAME                  string `help:"Name of the Storage"`
	ZONE                  string `help:"Zone id of storage"`
	Capacity              int64  `help:"Capacity of the Storage"`
	MediumType            string `help:"Medium type" choices:"ssd|rotate" default:"ssd"`
	StorageType           string `help:"Storage type" choices:"local|nas|vsan|rbd|nfs|gpfs|baremetal"`
	RbdMonHost            string `help:"Ceph mon_host config"`
	RbdRadosMonOpTimeout  int64  `help:"ceph rados_mon_op_timeout"`
	RbdRadosOsdOpTimeout  int64  `help:"ceph rados_osd_op_timeout"`
	RbdClientMountTimeout int64  `help:"ceph client_mount_timeout"`
	RbdKey                string `help:"Ceph key config"`
	RbdPool               string `help:"Ceph Pool Name"`
	NfsHost               string `help:"NFS host"`
	NfsSharedDir          string `help:"NFS shared dir"`
}

func (*StorageCreateOptions) Params

func (opts *StorageCreateOptions) Params() (jsonutils.JSONObject, error)

type StorageForceDetachHost

type StorageForceDetachHost struct {
	options.BaseIdOptions
	HOST string `help:"ID or name of host"`
}

func (*StorageForceDetachHost) Params

type StorageListOptions

type StorageListOptions struct {
	options.BaseListOptions

	Share    *bool  `help:"Share storage list"`
	Local    *bool  `help:"Local storage list"`
	Usable   *bool  `help:"Usable storage list"`
	Zone     string `help:"List storages in zone" json:"-"`
	Region   string `help:"List storages in region"`
	Schedtag string `help:"filter storage by schedtag"`
	HostId   string `help:"filter storages which attached the specified host"`

	HostSchedtagId string `help:"filter storage by host schedtag"`
	ImageId        string `help:"filter storage by image"`
	IsBaremetal    *bool  `help:"Baremetal storage list"`
}

func (*StorageListOptions) GetContextId

func (opts *StorageListOptions) GetContextId() string

func (*StorageListOptions) Params

func (opts *StorageListOptions) Params() (jsonutils.JSONObject, error)

type StorageUncacheImageActionOptions

type StorageUncacheImageActionOptions struct {
	options.BaseIdOptions
	IMAGE string `help:"ID or name of image"`
	Force bool   `help:"Force uncache, even if the image exists in cache"`
}

func (*StorageUncacheImageActionOptions) Params

type StorageUpdateOptions

type StorageUpdateOptions struct {
	options.BaseUpdateOptions
	CommitBound           float64 `help:"Upper bound of storage overcommit rate" json:"cmtbound"`
	MediumType            string  `help:"Medium type" choices:"ssd|rotate"`
	RbdRadosMonOpTimeout  int64   `help:"ceph rados_mon_op_timeout"`
	RbdRadosOsdOpTimeout  int64   `help:"ceph rados_osd_op_timeout"`
	RbdClientMountTimeout int64   `help:"ceph client_mount_timeout"`
	RbdKey                string  `help:"ceph rbd key"`
	Reserved              string  `help:"Reserved storage space"`
	Capacity              int     `help:"Capacity for storage"`
}

func (*StorageUpdateOptions) Params

func (opts *StorageUpdateOptions) Params() (jsonutils.JSONObject, error)

type TablestoreListOptions

type TablestoreListOptions struct {
	options.BaseListOptions
}

func (*TablestoreListOptions) Params

func (opts *TablestoreListOptions) Params() (jsonutils.JSONObject, error)

type WafIPSetCacheListOptions

type WafIPSetCacheListOptions struct {
	options.BaseListOptions
}

func (*WafIPSetCacheListOptions) Params

type WafIPSetListOptions

type WafIPSetListOptions struct {
	options.BaseListOptions
}

func (*WafIPSetListOptions) Params

func (opts *WafIPSetListOptions) Params() (jsonutils.JSONObject, error)

type WafInstanceCreateOptions

type WafInstanceCreateOptions struct {
	options.BaseCreateOptions
	CloudregionId   string
	CloudproviderId string
	SourceIps       []string
}

func (*WafInstanceCreateOptions) Params

type WafInstanceListOptions

type WafInstanceListOptions struct {
	options.BaseListOptions
}

func (*WafInstanceListOptions) Params

type WafRegexSetCacheListOptions

type WafRegexSetCacheListOptions struct {
	options.BaseListOptions
}

func (*WafRegexSetCacheListOptions) Params

type WafRegexSetListOptions

type WafRegexSetListOptions struct {
	options.BaseListOptions
}

func (*WafRegexSetListOptions) Params

type WafRuleGroupCacheListOptions

type WafRuleGroupCacheListOptions struct {
	options.BaseListOptions
}

func (*WafRuleGroupCacheListOptions) Params

type WafRuleGroupListOptions

type WafRuleGroupListOptions struct {
	options.BaseListOptions

	IsSystem bool
}

func (*WafRuleGroupListOptions) Params

type WafRuleListOptions

type WafRuleListOptions struct {
	options.BaseListOptions

	WafInstanceId  string
	WafRuleGroupId string
}

func (*WafRuleListOptions) Params

func (opts *WafRuleListOptions) Params() (jsonutils.JSONObject, error)

type WafRuleOptions

type WafRuleOptions struct {
	RULE_FILE string
}

func (*WafRuleOptions) Params

func (opts *WafRuleOptions) Params() (jsonutils.JSONObject, error)

type WafRuleUpdateOptions

type WafRuleUpdateOptions struct {
	options.BaseIdOptions
	WafRuleOptions
}

func (*WafRuleUpdateOptions) Params

func (opts *WafRuleUpdateOptions) Params() (jsonutils.JSONObject, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL