options

package
v0.0.0-...-6410feb Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0, Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ListOrderAsc  = "asc"
	ListOrderDesc = "desc"
)

Variables

View Source
var BaseListOptionsType = reflect.TypeOf((*BaseListOptions)(nil)).Elem()

Functions

func Bool

func Bool(v bool) *bool

Bool returns a pointer to bool type with the same value as the argument. This is intended to be used for literal initialization of options

func BoolV

func BoolV(p *bool) bool

BoolV returns the bool value as pointed to by the argument if it's non-nil, return false otherwise

func Int

func Int(v int) *int

Int returns a pointer to int type with the same value as the argument. This is intended to be used for literal initialization of options

func IntV

func IntV(p *int) int

IntV returns the integer value as pointed to by the argument if it's non-nil, return 0 otherwise

func ListStructToParams

func ListStructToParams(v interface{}) (*jsonutils.JSONDict, error)

ListStructToParams converts the struct as pointed to by the argument to JSON dict params, taking into account .BaseListOptions.Params() if it exists

func SplitTag

func SplitTag(tag string) tagutils.TTagSet

func String

func String(v string) *string

func StringV

func StringV(p *string) string

func StructToParams

func StructToParams(v interface{}) (*jsonutils.JSONDict, error)

StructToParams converts the struct as pointed to by the argument to JSON dict params, ignoring any embedded in struct

Types

type AlarmEventListOptions

type AlarmEventListOptions struct {
	BaseListOptions
	NodeLabels     string `help:"Service tree node labels"`
	MetricName     string `help:"Metric name"`
	HostName       string `help:"Host name"`
	HostIp         string `help:"Host IP address"`
	AlarmLevel     string `help:"Alarm level"`
	AlarmCondition string `help:"Concrete alarm rule"`
	Template       string `help:"Template number of the alarm condition"`
	AckStatus      string `help:"Alarm event ack status"`
}

type AnsiblePlaybookCommonOptions

type AnsiblePlaybookCommonOptions struct {
	Host []string `help:"name or id of server or host in format '<[server:]id|host:id>|ipaddr var=val'"`
	Mod  []string `help:"ansible modules and their arguments in format 'name k1=v1 k2=v2'"`
	File []string `help:"files for use by modules, e.g. name=content, name=@file"`
}

func (*AnsiblePlaybookCommonOptions) ToPlaybook

func (opts *AnsiblePlaybookCommonOptions) ToPlaybook() (*ansible.Playbook, error)

type AnsiblePlaybookCreateOptions

type AnsiblePlaybookCreateOptions struct {
	NAME string `help:"name of the playbook"`
	AnsiblePlaybookCommonOptions
}

func (*AnsiblePlaybookCreateOptions) Params

type AnsiblePlaybookIdOptions

type AnsiblePlaybookIdOptions struct {
	ID string `help:"name/id of the playbook"`
}

type AnsiblePlaybookListOptions

type AnsiblePlaybookListOptions struct {
	BaseListOptions
}

type AnsiblePlaybookUpdateOptions

type AnsiblePlaybookUpdateOptions struct {
	ID   string `json:"-" help:"name/id of the playbook"`
	Name string
	AnsiblePlaybookCommonOptions
}

func (*AnsiblePlaybookUpdateOptions) Params

type BaseCreateOptions

type BaseCreateOptions struct {
	NAME string `json:"name" help:"Resource Name"`
	Desc string `metavar:"<DESCRIPTION>" help:"Description" json:"description"`
}

func (*BaseCreateOptions) Params

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

type BaseIdOptions

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

func (*BaseIdOptions) GetId

func (o *BaseIdOptions) GetId() string

func (*BaseIdOptions) Params

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

type BaseIdsOptions

type BaseIdsOptions struct {
	ID []string `json:"-"`
}

func (*BaseIdsOptions) GetIds

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

func (*BaseIdsOptions) Params

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

type BaseListOptions

type BaseListOptions struct {
	Limit          *int     `default:"20" help:"Page limit"`
	Offset         *int     `default:"0" help:"Page offset"`
	OrderBy        []string `help:"Name of the field to be ordered by"`
	Order          string   `help:"List order" choices:"desc|asc"`
	Details        *bool    `help:"Show more details" default:"false"`
	ShowFailReason *bool    `help:"show fail reason fields"`
	Search         string   `help:"Filter results by a simple keyword search"`
	Meta           *bool    `help:"Piggyback metadata information" json:"with_meta" token:"meta"`
	Filter         []string `help:"Filters"`
	JointFilter    []string `help:"Filters with joint table col; joint_tbl.related_key(origin_key).filter_col.filter_cond(filters)"`
	FilterAny      *bool    `help:"If true, match if any of the filters matches; otherwise, match if all of the filters match"`

	Admin         *bool    `help:"Is an admin call?"`
	Tenant        string   `help:"Tenant ID or Name" alias:"project"`
	ProjectDomain string   `help:"Project domain filter"`
	User          string   `help:"User ID or Name"`
	Field         []string `help:"Show only specified fields"`
	Scope         string   `help:"resource scope" choices:"system|domain|project|user"`

	System           *bool `help:"Show system resource"`
	PendingDelete    *bool `help:"Show only pending deleted resources"`
	PendingDeleteAll *bool `help:"Show also pending-deleted resources" json:"-"`
	DeleteAll        *bool `help:"Show also deleted resources" json:"-"`
	ShowEmulated     *bool `help:"Show all resources including the emulated resources"`

	ExportKeys string `help:"Export field keys"`
	ExtraListOptions

	Tags      []string `` /* 151-byte string literal not displayed */
	NoTags    []string `` /* 148-byte string literal not displayed */
	UserTags  []string `help:"UserTags info, key and value separated by \"=\", keyvalue pairs separated by \";\", eg: group=rd" json:"-"`
	CloudTags []string `help:"CloudTags info, key and value separated by \"=\", keyvalue pairs separated by \";\", eg: price_key=cn-beijing" json:"-"`

	NoUserTags  []string `` /* 131-byte string literal not displayed */
	NoCloudTags []string `` /* 139-byte string literal not displayed */

	ProjectTags   []string `help:"filter by project tags, key and value separated by \"=\", keyvalue pairs separated by \";\"" json:"-"`
	NoProjectTags []string `help:"filter by no these project tags, key and value separated by \"=\", keyvalue pairs separated by \";\"" json:"-"`
	DomainTags    []string `help:"filter by domain project tags, key and value separated by \"=\", keyvalue pairs separated by \";\"" json:"-"`
	NoDomainTags  []string `help:"filter by no these domain tags, key and value separated by \"=\", keyvalue pairs separated by \";\"" json:"-"`

	ProjectOrganizations []string `help:"filter by projects of specified organizations"`
	DomainOrganizations  []string `help:"filter by domains of specified organizations"`

	Manager      []string `help:"List objects belonging to the cloud provider" json:"manager,omitempty"`
	Account      string   `help:"List objects belonging to the cloud account" json:"account,omitempty"`
	Provider     []string `` /* 328-byte string literal not displayed */
	Brand        []string `help:"List objects belonging to a special brand"`
	CloudEnv     string   `help:"Cloud environment" choices:"public|private|onpremise|private_or_onpremise" json:"cloud_env,omitempty"`
	PublicCloud  *bool    `help:"List objects belonging to public cloud" json:"public_cloud"`
	PrivateCloud *bool    `help:"List objects belonging to private cloud" json:"private_cloud"`
	IsOnPremise  *bool    `help:"List objects belonging to on premise infrastructures" token:"on-premise" json:"is_on_premise"`
	IsManaged    *bool    `help:"List objects managed by external providers" token:"managed" json:"is_managed"`

	PagingMarker string `help:"Marker for pagination" json:"paging_marker"`
	PagingOrder  string `help:"paging order" choices:"DESC|ASC"`

	OrderByTag string `help:"Order results by tag values, composed by a tag key and order, e.g user:部门:ASC"`

	Delete string `help:"show deleted records"`

	Id []string `help:"filter by id"`
}

func (*BaseListOptions) GetExportKeys

func (o *BaseListOptions) GetExportKeys() string

func (*BaseListOptions) Params

func (opts *BaseListOptions) Params() (*jsonutils.JSONDict, error)

type BasePublicOptions

type BasePublicOptions struct {
	ID             string   `help:"ID or name of resource" json:"-"`
	Scope          string   `help:"sharing scope" choices:"system|domain|project"`
	SharedDomains  []string `help:"share to domains"`
	SharedProjects []string `help:"share to projects"`
}

func (*BasePublicOptions) GetId

func (opts *BasePublicOptions) GetId() string

func (*BasePublicOptions) Params

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

type BaseShowOptions

type BaseShowOptions struct {
	BaseIdOptions
	WithMeta       *bool `help:"With meta data"`
	ShowFailReason *bool `help:"show fail reason fields"`
}

func (BaseShowOptions) Params

func (o BaseShowOptions) Params() (jsonutils.JSONObject, error)

type BaseUpdateOptions

type BaseUpdateOptions struct {
	ID   string `help:"ID or Name of resource to update" json:"-"`
	Name string `help:"Name of resource to update" json:"name"`
	Desc string `metavar:"<DESCRIPTION>" help:"Description" json:"description"`
}

func (*BaseUpdateOptions) GetId

func (opts *BaseUpdateOptions) GetId() string

func (*BaseUpdateOptions) Params

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

type ChangeOwnerOptions

type ChangeOwnerOptions struct {
	BaseIdOptions
	ProjectDomain string `json:"project_domain" help:"target domain"`
}

func (ChangeOwnerOptions) Params

type DevtoolTemplateBindingOptions

type DevtoolTemplateBindingOptions struct {
	DevtoolTemplateIdOptions
	ServerID string `help:"host/vm name/id to apply"`
}

type DevtoolTemplateCommonOptions

type DevtoolTemplateCommonOptions struct {
	DevtoolTemplateCronjobOptions
	Host []string `help:"name or id of server or host in format '<[server:]id|host:id>|ipaddr var=val'"`
	Mod  []string `help:"ansible modules and their arguments in format 'name k1=v1 k2=v2'"`
	File []string `help:"files for use by modules, e.g. name=content, name=@file"`
}

func (*DevtoolTemplateCommonOptions) ToPlaybook

func (opts *DevtoolTemplateCommonOptions) ToPlaybook() (*ansible.Playbook, error)

type DevtoolTemplateCreateOptions

type DevtoolTemplateCreateOptions struct {
	NAME string `help:"name of the playbook"`
	DevtoolTemplateCommonOptions
}

func (*DevtoolTemplateCreateOptions) Params

type DevtoolTemplateCronjobOptions

type DevtoolTemplateCronjobOptions struct {
	Day      int   `help:"Cronjob runs at given day" default:"0"`
	Hour     int   `help:"Cronjob runs at given hour" default:"0"`
	Min      int   `help:"Cronjob runs at given min" default:"0"`
	Sec      int   `help:"Cronjob runs at given sec" default:"0"`
	Interval int64 `help:"Cronjob runs at given interval" default:"0"`
	Start    bool  `help:"start job when created" default:"false"`
	Enabled  bool  `help:"Set job status enabled" default:"false"`
}

type DevtoolTemplateIdOptions

type DevtoolTemplateIdOptions struct {
	ID string `help:"name/id of the playbook"`
}

type DevtoolTemplateListOptions

type DevtoolTemplateListOptions struct {
	BaseListOptions
}

type DevtoolTemplateUpdateOptions

type DevtoolTemplateUpdateOptions struct {
	ID   string `json:"-" help:"name/id of the playbook"`
	Name string
	DevtoolTemplateCommonOptions
	Rebind bool `help:"Unbind and Bind all related servers" default:"false"`
}

func (*DevtoolTemplateUpdateOptions) Params

type DomainStatisticsOptions

type DomainStatisticsOptions struct {
}

func (DomainStatisticsOptions) Property

func (o DomainStatisticsOptions) Property() string

type DomainTagValuePairsOptions

type DomainTagValuePairsOptions struct {
	TagValuePairsOptions
}

func (*DomainTagValuePairsOptions) Property

func (opts *DomainTagValuePairsOptions) Property() string

type DomainTagValueTreeOptions

type DomainTagValueTreeOptions struct {
	TagValueTreeOptions
}

func (*DomainTagValueTreeOptions) Property

func (opts *DomainTagValueTreeOptions) Property() string

type EmptyOption

type EmptyOption struct{}

type EnabledStatusCreateOptions

type EnabledStatusCreateOptions struct {
	BaseCreateOptions
	Status  string
	Enabled *bool `help:"turn on enabled flag"`
}

type EventPurgeSplitableOptions

type EventPurgeSplitableOptions struct {
	Service string `help:"service" choices:"compute|identity|image|log|cloudevent|monitor|notify" default:"compute"`
	Tables  []string
}

func (*EventPurgeSplitableOptions) Params

type EventSplitableOptions

type EventSplitableOptions struct {
	ID      string `choices:"splitable|splitable-export"`
	Service string `help:"service" choices:"compute|identity|image|log|cloudevent|monitor|notify" default:"compute"`
	Table   string `help:"when id is splitable-export table must be input"`
}

func (*EventSplitableOptions) GetId

func (self *EventSplitableOptions) GetId() string

func (*EventSplitableOptions) Params

func (self *EventSplitableOptions) Params() (jsonutils.JSONObject, error)

type ExtraListOptions

type ExtraListOptions struct {
	ExportFile  string `help:"Export to file" metavar:"<EXPORT_FILE_PATH>" json:"-"`
	ExportTexts string `help:"Export field displayname texts" json:"-"`
}

func (ExtraListOptions) GetContextId

func (o ExtraListOptions) GetContextId() string

func (ExtraListOptions) GetExportFile

func (o ExtraListOptions) GetExportFile() string

func (ExtraListOptions) GetExportTexts

func (o ExtraListOptions) GetExportTexts() string

type IParamsOptions

type IParamsOptions interface {
	Params() (*jsonutils.JSONDict, error)
}

type InterVpcNetworkAddVpcOPtions

type InterVpcNetworkAddVpcOPtions struct {
	ID    string `json:"Vpc peering connection ID"`
	VpcId string `json:"Vpc ID"`
}

func (*InterVpcNetworkAddVpcOPtions) GetId

func (opts *InterVpcNetworkAddVpcOPtions) GetId() string

func (*InterVpcNetworkAddVpcOPtions) Params

type InterVpcNetworkCreateOPtions

type InterVpcNetworkCreateOPtions struct {
	EnabledStatusCreateOptions
	ManagerId string
}

func (*InterVpcNetworkCreateOPtions) Params

type InterVpcNetworkIdOPtions

type InterVpcNetworkIdOPtions struct {
	ID string `json:"Vpc peering connection ID"`
}

func (*InterVpcNetworkIdOPtions) GetId

func (opts *InterVpcNetworkIdOPtions) GetId() string

func (*InterVpcNetworkIdOPtions) Params

type InterVpcNetworkListOPtions

type InterVpcNetworkListOPtions struct {
	BaseListOptions

	OrderByVpcCount string
}

func (*InterVpcNetworkListOPtions) Params

type InterVpcNetworkRemoveVpcOPtions

type InterVpcNetworkRemoveVpcOPtions struct {
	ID    string `json:"Vpc peering connection ID"`
	VpcId string `json:"Vpc ID"`
}

func (*InterVpcNetworkRemoveVpcOPtions) GetId

func (*InterVpcNetworkRemoveVpcOPtions) Params

type InterVpcNetworkRouteIdptions

type InterVpcNetworkRouteIdptions struct {
	ID string
}

func (*InterVpcNetworkRouteIdptions) GetId

func (opts *InterVpcNetworkRouteIdptions) GetId() string

func (*InterVpcNetworkRouteIdptions) Params

type InterVpcNetworkRouteListOptions

type InterVpcNetworkRouteListOptions struct {
	BaseListOptions
	InterVpcNetworkId string
	Cidr              string
}

func (*InterVpcNetworkRouteListOptions) Params

type MetadataListOptions

type MetadataListOptions struct {
	Resources []string `help:"list of resource e.g server、disk、eip、snapshot, empty will show all metadata"`
	Service   string   `help:"service type"`

	SysMeta   *bool `help:"Show sys metadata only"`
	CloudMeta *bool `help:"Show cloud metadata olny"`
	UserMeta  *bool `help:"Show user metadata olny"`

	Admin *bool `help:"Show all metadata"`

	WithSysMeta   *bool `help:"Show sys metadata"`
	WithCloudMeta *bool `help:"Show cloud metadata"`
	WithUserMeta  *bool `help:"Show user metadata"`

	Key   []string `help:"key"`
	Value []string `help:"value"`

	Limit  *int `help:"limit"`
	Offset *int `help:"offset"`

	KeyOnly *bool `help:"show key only"`
}

type MultiArchListOptions

type MultiArchListOptions struct {
	OsArch string `help:"Filter resource by arch" choices:"i386|x86|x86_32|x86_64|arm|aarch32|aarch64"`
}

func (*MultiArchListOptions) Params

func (o *MultiArchListOptions) Params() (*jsonutils.JSONDict, error)

type PodBaseOptions

type PodBaseOptions struct {
	WebConsoleOptions
	NAME      string `help:"Name of k8s pod to connect"`
	Namespace string `help:"Namespace of this pod"`
	Container string `help:"Container in this pod"`
	Cluster   string `default:"$K8S_CLUSTER|default" help:"Kubernetes cluster name"`
}

func (*PodBaseOptions) Params

func (opt *PodBaseOptions) Params() (*jsonutils.JSONDict, error)

type PodLogOptoins

type PodLogOptoins struct {
	PodBaseOptions
	Since string `help:"Only return logs newer than a relative duration like 5s, 2m or 3h"`
}

func (*PodLogOptoins) Params

func (opt *PodLogOptoins) Params() (*jsonutils.JSONDict, error)

type PodShellOptions

type PodShellOptions struct {
	PodBaseOptions
}

type ProjectStatisticsOptions

type ProjectStatisticsOptions struct {
}

func (ProjectStatisticsOptions) Property

func (o ProjectStatisticsOptions) Property() string

type ProjectTagValuePairsOptions

type ProjectTagValuePairsOptions struct {
	TagValuePairsOptions
}

func (*ProjectTagValuePairsOptions) Property

func (opts *ProjectTagValuePairsOptions) Property() string

type ProjectTagValueTreeOptions

type ProjectTagValueTreeOptions struct {
	TagValueTreeOptions
}

func (*ProjectTagValueTreeOptions) Property

func (opts *ProjectTagValueTreeOptions) Property() string

type ProxySettingCreateOptions

type ProxySettingCreateOptions struct {
	NAME string

	HTTPProxy  string
	HTTPSProxy string
	NoProxy    string
}

type ProxySettingDeleteOptions

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

type ProxySettingGetOptions

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

type ProxySettingListOptions

type ProxySettingListOptions struct {
	BaseListOptions
}

type ProxySettingPrivateOptions

type ProxySettingPrivateOptions struct {
	ProxySettingGetOptions
}

type ProxySettingPublicOptions

type ProxySettingPublicOptions struct {
	ProxySettingGetOptions
	Scope        string   `json:"scope" help:"share scope" choices:"domain|system"`
	SharedDomain []string `json:"share"`
}

type ProxySettingTestOptions

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

type ProxySettingUpdateOptions

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

	HTTPProxy  string
	HTTPSProxy string
	NoProxy    string
}

type ResourceIdOptions

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

func (*ResourceIdOptions) GetId

func (o *ResourceIdOptions) GetId() string

func (*ResourceIdOptions) Params

type ResourceMetadataOptions

type ResourceMetadataOptions struct {
	ID   string   `help:"ID or name of resources" json:"-"`
	TAGS []string `help:"Tags info, eg: hypervisor=aliyun、os_type=Linux、os_version"`
}

func (*ResourceMetadataOptions) GetId

func (opts *ResourceMetadataOptions) GetId() string

func (*ResourceMetadataOptions) Params

type ScopedResourceListOptions

type ScopedResourceListOptions struct {
	BelongScope string `help:"Filter by resource belong scope" choices:"system|domain|project"`
}

func (*ScopedResourceListOptions) Params

type ServiceCertificateCreateOptions

type ServiceCertificateCreateOptions struct {
	NAME string

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

func (*ServiceCertificateCreateOptions) Params

type SharableProjectizedResourceBaseCreateInput

type SharableProjectizedResourceBaseCreateInput struct {
	apis.ProjectizedResourceCreateInput
	apis.SharableResourceBaseCreateInput
}

func (*SharableProjectizedResourceBaseCreateInput) Params

type SharableResourcePublicBaseOptions

type SharableResourcePublicBaseOptions struct {
	Scope          string   `help:"sharing scope" choices:"system|domain|project"`
	SharedProjects []string `help:"Share to projects"`
	SharedDomains  []string `help:"Share to domains"`
}

type StatusStatisticsOptions

type StatusStatisticsOptions struct {
}

func (StatusStatisticsOptions) Property

func (o StatusStatisticsOptions) Property() string

type SwirePublicOptions

type SwirePublicOptions struct {
	Scope         string   `help:"sharing scope" choices:"system|domain"`
	SharedDomains []string `help:"share to domains"`
}

type SwireupdateOptions

type SwireupdateOptions struct {
	Name string `help:"Name of wire" json:"name"`
	Desc string `metavar:"<DESCRIPTION>" help:"Description" json:"description"`
	Bw   int64  `help:"Bandwidth in mbps" json:"bandwidth"`
	Mtu  int64  `help:"mtu in bytes" json:"mtu"`
}

type TagListOptions

type TagListOptions MetadataListOptions

type TagValuePairsOptions

type TagValuePairsOptions struct {
	KeyOnly bool `help:"show key only"`

	SysMeta bool `help:"show system tags only"`

	CloudMeta bool `help:"show cloud tags only"`

	UserMeta bool `help:"show user tags only"`
}

func (*TagValuePairsOptions) Params

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

func (*TagValuePairsOptions) Property

func (opts *TagValuePairsOptions) Property() string

type TagValueTreeOptions

type TagValueTreeOptions struct {
	Key     []string `help:"the sequence of key to construct the tree"`
	ShowMap bool     `help:"show map only"`
}

func (*TagValueTreeOptions) Params

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

func (*TagValueTreeOptions) Property

func (opts *TagValueTreeOptions) Property() string

type WebConsoleBaremetalOptions

type WebConsoleBaremetalOptions struct {
	WebConsoleOptions
	ID string `help:"Baremetal host id or name"`
}

func (*WebConsoleBaremetalOptions) Params

type WebConsoleOptions

type WebConsoleOptions struct {
	WebconsoleUrl string `help:"Frontend webconsole url" short-token:"w" default:"$WEBCONSOLE_URL"`
}

type WebConsoleServerOptions

type WebConsoleServerOptions struct {
	WebConsoleOptions
	ID string `help:"Server id or name"`
}

type WebConsoleServerRdpOptions

type WebConsoleServerRdpOptions struct {
	WebConsoleOptions
	ID string `help:"Server id or name"`

	Host     *string
	Port     *int
	Username *string
	Password *string

	Width  *int
	Height *int
	Dpi    *int
}

type WebConsoleSshOptions

type WebConsoleSshOptions struct {
	WebConsoleOptions
	ID           string `help:"ID of server" json:"-"`
	Ip           string `help:"IP to connect if multiple IPs on server"`
	Port         int    `help:"Remote server port"`
	Username     string `help:"Remote server username"`
	KeepUsername bool   `help:"Keep remove username"`
	Password     string `help:"Remote server password"`
	ResourceType string `help:"Resource Type" choices:"host|server"`
}

func (*WebConsoleSshOptions) Params

func (opt *WebConsoleSshOptions) Params() (*jsonutils.JSONDict, error)

type WireCreateOptions

type WireCreateOptions struct {
	ZONE string `help:"Zone ID or Name"`
	Vpc  string `help:"VPC ID or Name" default:"default"`
	NAME string `help:"Name of wire"`
	BW   int64  `help:"Bandwidth in mbps"`
	Mtu  int64  `help:"mtu in bytes"`
	Desc string `metavar:"<DESCRIPTION>" help:"Description"`
}

func (*WireCreateOptions) Params

func (wo *WireCreateOptions) Params() (jsonutils.JSONObject, error)

type WireListOptions

type WireListOptions struct {
	BaseListOptions

	Bandwidth *int `help:"List wires by bandwidth"`

	Region   string `help:"List wires in region"`
	Zone     string `help:"list wires in zone" json:"-"`
	Vpc      string `help:"List wires in vpc"`
	Host     string `help:"List wires attached to a host"`
	HostType string `help:"List wires attached to host with HostType"`

	OrderByNetworkCount string
}

func (*WireListOptions) GetContextId

func (wo *WireListOptions) GetContextId() string

func (*WireListOptions) Params

func (wo *WireListOptions) Params() (jsonutils.JSONObject, error)

type WireMergeOptions

type WireMergeOptions struct {
	Froms        []string `help:"IDs or names of merge wire from" json:"sources"`
	TARGET       string   `help:"ID or name of merge wire target"`
	MergeNetwork bool     `help:"whether to merge network under wire"`
}

func (*WireMergeOptions) GetId

func (wo *WireMergeOptions) GetId() string

func (*WireMergeOptions) Params

func (wo *WireMergeOptions) Params() (jsonutils.JSONObject, error)

type WireOptions

type WireOptions struct {
	ID string `help:"Id or Name of wire to update"`
}

func (*WireOptions) GetId

func (wo *WireOptions) GetId() string

func (*WireOptions) Params

func (wo *WireOptions) Params() (jsonutils.JSONObject, error)

type WirePublicOptions

type WirePublicOptions struct {
	WireOptions
	SwirePublicOptions
}

func (*WirePublicOptions) Params

func (wo *WirePublicOptions) Params() (jsonutils.JSONObject, error)

type WireUpdateOptions

type WireUpdateOptions struct {
	WireOptions
	SwireupdateOptions
}

func (*WireUpdateOptions) Params

func (wo *WireUpdateOptions) Params() (jsonutils.JSONObject, error)

Jump to

Keyboard shortcuts

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