更新cluster api方法
This commit is contained in:
parent
6c0c606238
commit
06b3ddb399
|
@ -483,8 +483,8 @@ func (s *ClusterService) DeleteClusters(i *DeleteClustersInput) (*DeleteClusters
|
|||
}
|
||||
|
||||
type DeleteClustersInput struct {
|
||||
Clusters []*string `json:"clusters" name:"clusters" location:"params"` // Required
|
||||
Force *int `json:"force" name:"force" location:"params"`
|
||||
Clusters []*string `json:"clusters" name:"clusters" location:"params"` // Required
|
||||
DirectCease *int `json:"direct_cease" name:"direct_cease" location:"params"`
|
||||
}
|
||||
|
||||
func (v *DeleteClustersInput) Validate() error {
|
||||
|
@ -710,26 +710,20 @@ func (s *ClusterService) DescribeClusters(i *DescribeClustersInput) (*DescribeCl
|
|||
type DescribeClustersInput struct {
|
||||
AppVersions []*string `json:"app_versions" name:"app_versions" location:"params"`
|
||||
Apps []*string `json:"apps" name:"apps" location:"params"`
|
||||
CfgmgmtID *string `json:"cfgmgmt_id" name:"cfgmgmt_id" location:"params"`
|
||||
ClusterName *string `json:"cluster_name" name:"cluster_name" location:"params"`
|
||||
Clusters []*string `json:"clusters" name:"clusters" location:"params"`
|
||||
Console *string `json:"console" name:"console" location:"params"`
|
||||
ExternalClusterID *string `json:"external_cluster_id" name:"external_cluster_id" location:"params"`
|
||||
Limit *int `json:"limit" name:"limit" location:"params"`
|
||||
Link *string `json:"link" name:"link" location:"params"`
|
||||
Name *string `json:"name" name:"name" location:"params"`
|
||||
Offset *int `json:"offset" name:"offset" location:"params"`
|
||||
Owner *string `json:"owner" name:"owner" location:"params"`
|
||||
Reverse *int `json:"reverse" name:"reverse" location:"params"`
|
||||
Role *string `json:"role" name:"role" location:"params"`
|
||||
// Scope's available values: all, cfgmgmt
|
||||
Scope *string `json:"scope" name:"scope" location:"params"`
|
||||
SearchWord *string `json:"search_word" name:"search_word" location:"params"`
|
||||
SortKey *string `json:"sort_key" name:"sort_key" location:"params"`
|
||||
Status *string `json:"status" name:"status" location:"params"`
|
||||
TransitionStatus *string `json:"transition_status" name:"transition_status" location:"params"`
|
||||
Users []*string `json:"users" name:"users" location:"params"`
|
||||
Verbose *int `json:"verbose" name:"verbose" location:"params"`
|
||||
VxNet *string `json:"vxnet" name:"vxnet" location:"params"`
|
||||
Scope *string `json:"scope" name:"scope" location:"params"`
|
||||
Status []*string `json:"status" name:"status" location:"params"`
|
||||
Tags []*string `json:"tags" name:"tags" location:"params"`
|
||||
Verbose *int `json:"verbose" name:"verbose" location:"params"`
|
||||
VxNet *string `json:"vxnet" name:"vxnet" location:"params"`
|
||||
}
|
||||
|
||||
func (v *DescribeClustersInput) Validate() error {
|
||||
|
|
|
@ -469,17 +469,12 @@ type Cluster struct {
|
|||
AppVersion *string `json:"app_version" name:"app_version"`
|
||||
AppVersionInfo interface{} `json:"app_version_info" name:"app_version_info"`
|
||||
AutoBackupTime *int `json:"auto_backup_time" name:"auto_backup_time"`
|
||||
Backup map[string]*bool `json:"backup" name:"backup"`
|
||||
BackupPolicy *string `json:"backup_policy" name:"backup_policy"`
|
||||
BackupService interface{} `json:"backup_service" name:"backup_service"`
|
||||
CfgmgmtID *string `json:"cfgmgmt_id" name:"cfgmgmt_id"`
|
||||
ClusterID *string `json:"cluster_id" name:"cluster_id"`
|
||||
ClusterType *int `json:"cluster_type" name:"cluster_type"`
|
||||
ConsoleID *string `json:"console_id" name:"console_id"`
|
||||
Controller *string `json:"controller" name:"controller"`
|
||||
CreateTime *time.Time `json:"create_time" name:"create_time" format:"ISO 8601"`
|
||||
CustomService interface{} `json:"custom_service" name:"custom_service"`
|
||||
Debug *bool `json:"debug" name:"debug"`
|
||||
Description *string `json:"description" name:"description"`
|
||||
DisplayTabs interface{} `json:"display_tabs" name:"display_tabs"`
|
||||
Endpoints interface{} `json:"endpoints" name:"endpoints"`
|
||||
|
@ -487,24 +482,16 @@ type Cluster struct {
|
|||
HealthCheckEnablement map[string]*bool `json:"health_check_enablement" name:"health_check_enablement"`
|
||||
IncrementalBackupSupported *bool `json:"incremental_backup_supported" name:"incremental_backup_supported"`
|
||||
LatestSnapshotTime *string `json:"latest_snapshot_time" name:"latest_snapshot_time"`
|
||||
Links map[string]*string `json:"links" name:"links"`
|
||||
MetadataRootAccess *int `json:"metadata_root_access" name:"metadata_root_access"`
|
||||
Name *string `json:"name" name:"name"`
|
||||
NodeCount *int `json:"node_count" name:"node_count"`
|
||||
Nodes []*ClusterNode `json:"nodes" name:"nodes"`
|
||||
Owner *string `json:"owner" name:"owner"`
|
||||
PartnerAccess *bool `json:"partner_access" name:"partner_access"`
|
||||
RestoreService interface{} `json:"restore_service" name:"restore_service"`
|
||||
ReuseHyper *int `json:"reuse_hyper" name:"reuse_hyper"`
|
||||
RoleCount map[string]*int `json:"role_count" name:"role_count"`
|
||||
Roles []*string `json:"roles" name:"roles"`
|
||||
RootUserID *string `json:"root_user_id" name:"root_user_id"`
|
||||
SecurityGroupID *string `json:"security_group_id" name:"security_group_id"`
|
||||
Status *string `json:"status" name:"status"`
|
||||
StatusTime *time.Time `json:"status_time" name:"status_time" format:"ISO 8601"`
|
||||
SubCode *int `json:"sub_code" name:"sub_code"`
|
||||
Tags []*string `json:"tags" name:"tags"`
|
||||
TransitionStatus *string `json:"transition_status" name:"transition_status"`
|
||||
UpgradePolicy []*string `json:"upgrade_policy" name:"upgrade_policy"`
|
||||
UpgradeStatus *string `json:"upgrade_status" name:"upgrade_status"`
|
||||
UpgradeTime *time.Time `json:"upgrade_time" name:"upgrade_time" format:"ISO 8601"`
|
||||
VxNet *VxNet `json:"vxnet" name:"vxnet"`
|
||||
|
@ -512,14 +499,6 @@ type Cluster struct {
|
|||
|
||||
func (v *Cluster) Validate() error {
|
||||
|
||||
if len(v.Nodes) > 0 {
|
||||
for _, property := range v.Nodes {
|
||||
if err := property.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if v.VxNet != nil {
|
||||
if err := v.VxNet.Validate(); err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue