mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-05-06 21:52:54 +08:00
vet: bad syntax for struct tag value
This commit is contained in:
@@ -164,16 +164,8 @@ func init() {
|
||||
|
||||
type ServiceConfigOptions struct {
|
||||
SERVICE string `help:"service name or id"`
|
||||
Config []string `help:"config options, can be a JSON, a YAML or a key=value pair, e.g:
|
||||
* JSON
|
||||
'{\"default\":{\"password_expiration_seconds\":300}}'
|
||||
* YAML
|
||||
default:
|
||||
password_expiration_seconds: 300
|
||||
* A key=value pair (under default section)
|
||||
password_expiration_seconds=300
|
||||
"`
|
||||
Remove bool `help:"remove config"`
|
||||
Config []string `help:"config options, can be a JSON, a YAML or a key=value pair, e.g:\n * JSON\n '{\"default\":{\"password_expiration_seconds\":300}}'\n * YAML\n default:\n password_expiration_seconds: 300\n * A key=value pair (under default section)\n password_expiration_seconds=300\n"`
|
||||
Remove bool `help:"remove config"`
|
||||
}
|
||||
R(&ServiceConfigOptions{}, "service-config", "Add config to service", func(s *mcclient.ClientSession, args *ServiceConfigOptions) error {
|
||||
config := jsonutils.NewDict()
|
||||
|
||||
@@ -105,7 +105,7 @@ type GuestTemplateSku struct {
|
||||
Name string `json:"name"`
|
||||
CpuCoreCount int `json:"cpu_core_count"`
|
||||
MemorySizeMb int `json:"memory_size_mb"`
|
||||
InstanceTypeCategory string `json:"instance_type_category`
|
||||
InstanceTypeCategory string `json:"instance_type_category"`
|
||||
InstanceTypeFamily string `json:"instance_type_family"`
|
||||
}
|
||||
|
||||
|
||||
@@ -134,8 +134,7 @@ type ComputeOptions struct {
|
||||
|
||||
FetchEtcdServiceInfoAndUseEtcdLock bool `default:"true" help:"fetch etcd service info and use etcd lock"`
|
||||
|
||||
GuestTemplateCheckInterval int `help:"The interval between two consecutive inspections about Guest Template,
|
||||
unit: h" default:"12"`
|
||||
GuestTemplateCheckInterval int `help:"interval between two consecutive inspections of Guest Template in hour unit" default:"12"`
|
||||
|
||||
SCapabilityOptions
|
||||
SASControllerOptions
|
||||
|
||||
@@ -33,7 +33,7 @@ type SHostOptions struct {
|
||||
Hostname string `help:"Customized host name"`
|
||||
|
||||
ServersPath string `help:"Path for virtual server configuration files" default:"/opt/cloud/workspace/servers"`
|
||||
ImageCachePath string `help:"Path for storing image caches" default:/opt/cloud/workspace/disks/image_cache"`
|
||||
ImageCachePath string `help:"Path for storing image caches" default:"/opt/cloud/workspace/disks/image_cache"`
|
||||
// ImageCacheLimit int `help:"Maximal storage space for image caching, in GB" default:"20"`
|
||||
AgentTempPath string `help:"Path for ESXi agent"`
|
||||
AgentTempLimit int `help:"Maximal storage space for ESXi agent, in GB" default:"10"`
|
||||
|
||||
@@ -11,8 +11,8 @@ type InfluxdbShemaListOptions struct {
|
||||
|
||||
type InfluxdbShemaShowOptions struct {
|
||||
ID string `help:"attribute of the inluxdb" choices:"databases|measurements|metric-measurement"`
|
||||
Database string `help:influxdb database`
|
||||
Measurement string `help:influxdb table`
|
||||
Database string `help:"influxdb database"`
|
||||
Measurement string `help:"influxdb table"`
|
||||
}
|
||||
|
||||
func (opt InfluxdbShemaShowOptions) Params() (jsonutils.JSONObject, error) {
|
||||
|
||||
@@ -625,9 +625,7 @@ 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 disk must store in shared storage;
|
||||
default false" json:"rescue_mode"`
|
||||
RescueMode *bool `help:"Migrate server in rescue mode, all disks must reside on shared storage" json:"rescue_mode"`
|
||||
}
|
||||
|
||||
type ServerLiveMigrateOptions struct {
|
||||
|
||||
Reference in New Issue
Block a user