更新cluster api方法
This commit is contained in:
parent
6c0c606238
commit
06b3ddb399
|
@ -484,7 +484,7 @@ func (s *ClusterService) DeleteClusters(i *DeleteClustersInput) (*DeleteClusters
|
||||||
|
|
||||||
type DeleteClustersInput struct {
|
type DeleteClustersInput struct {
|
||||||
Clusters []*string `json:"clusters" name:"clusters" location:"params"` // Required
|
Clusters []*string `json:"clusters" name:"clusters" location:"params"` // Required
|
||||||
Force *int `json:"force" name:"force" location:"params"`
|
DirectCease *int `json:"direct_cease" name:"direct_cease" location:"params"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v *DeleteClustersInput) Validate() error {
|
func (v *DeleteClustersInput) Validate() error {
|
||||||
|
@ -710,24 +710,18 @@ func (s *ClusterService) DescribeClusters(i *DescribeClustersInput) (*DescribeCl
|
||||||
type DescribeClustersInput struct {
|
type DescribeClustersInput struct {
|
||||||
AppVersions []*string `json:"app_versions" name:"app_versions" location:"params"`
|
AppVersions []*string `json:"app_versions" name:"app_versions" location:"params"`
|
||||||
Apps []*string `json:"apps" name:"apps" 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"`
|
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"`
|
ExternalClusterID *string `json:"external_cluster_id" name:"external_cluster_id" location:"params"`
|
||||||
Limit *int `json:"limit" name:"limit" location:"params"`
|
Limit *int `json:"limit" name:"limit" location:"params"`
|
||||||
Link *string `json:"link" name:"link" 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"`
|
Offset *int `json:"offset" name:"offset" location:"params"`
|
||||||
Owner *string `json:"owner" name:"owner" location:"params"`
|
Owner *string `json:"owner" name:"owner" location:"params"`
|
||||||
Reverse *int `json:"reverse" name:"reverse" 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's available values: all, cfgmgmt
|
||||||
Scope *string `json:"scope" name:"scope" location:"params"`
|
Scope *string `json:"scope" name:"scope" location:"params"`
|
||||||
SearchWord *string `json:"search_word" name:"search_word" location:"params"`
|
Status []*string `json:"status" name:"status" location:"params"`
|
||||||
SortKey *string `json:"sort_key" name:"sort_key" location:"params"`
|
Tags []*string `json:"tags" name:"tags" 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"`
|
Verbose *int `json:"verbose" name:"verbose" location:"params"`
|
||||||
VxNet *string `json:"vxnet" name:"vxnet" location:"params"`
|
VxNet *string `json:"vxnet" name:"vxnet" location:"params"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -469,17 +469,12 @@ type Cluster struct {
|
||||||
AppVersion *string `json:"app_version" name:"app_version"`
|
AppVersion *string `json:"app_version" name:"app_version"`
|
||||||
AppVersionInfo interface{} `json:"app_version_info" name:"app_version_info"`
|
AppVersionInfo interface{} `json:"app_version_info" name:"app_version_info"`
|
||||||
AutoBackupTime *int `json:"auto_backup_time" name:"auto_backup_time"`
|
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"`
|
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"`
|
ClusterID *string `json:"cluster_id" name:"cluster_id"`
|
||||||
ClusterType *int `json:"cluster_type" name:"cluster_type"`
|
ClusterType *int `json:"cluster_type" name:"cluster_type"`
|
||||||
ConsoleID *string `json:"console_id" name:"console_id"`
|
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"`
|
CreateTime *time.Time `json:"create_time" name:"create_time" format:"ISO 8601"`
|
||||||
CustomService interface{} `json:"custom_service" name:"custom_service"`
|
CustomService interface{} `json:"custom_service" name:"custom_service"`
|
||||||
Debug *bool `json:"debug" name:"debug"`
|
|
||||||
Description *string `json:"description" name:"description"`
|
Description *string `json:"description" name:"description"`
|
||||||
DisplayTabs interface{} `json:"display_tabs" name:"display_tabs"`
|
DisplayTabs interface{} `json:"display_tabs" name:"display_tabs"`
|
||||||
Endpoints interface{} `json:"endpoints" name:"endpoints"`
|
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"`
|
HealthCheckEnablement map[string]*bool `json:"health_check_enablement" name:"health_check_enablement"`
|
||||||
IncrementalBackupSupported *bool `json:"incremental_backup_supported" name:"incremental_backup_supported"`
|
IncrementalBackupSupported *bool `json:"incremental_backup_supported" name:"incremental_backup_supported"`
|
||||||
LatestSnapshotTime *string `json:"latest_snapshot_time" name:"latest_snapshot_time"`
|
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"`
|
Name *string `json:"name" name:"name"`
|
||||||
NodeCount *int `json:"node_count" name:"node_count"`
|
NodeCount *int `json:"node_count" name:"node_count"`
|
||||||
Nodes []*ClusterNode `json:"nodes" name:"nodes"`
|
|
||||||
Owner *string `json:"owner" name:"owner"`
|
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"`
|
RoleCount map[string]*int `json:"role_count" name:"role_count"`
|
||||||
Roles []*string `json:"roles" name:"roles"`
|
Roles []*string `json:"roles" name:"roles"`
|
||||||
RootUserID *string `json:"root_user_id" name:"root_user_id"`
|
RootUserID *string `json:"root_user_id" name:"root_user_id"`
|
||||||
SecurityGroupID *string `json:"security_group_id" name:"security_group_id"`
|
SecurityGroupID *string `json:"security_group_id" name:"security_group_id"`
|
||||||
Status *string `json:"status" name:"status"`
|
Status *string `json:"status" name:"status"`
|
||||||
StatusTime *time.Time `json:"status_time" name:"status_time" format:"ISO 8601"`
|
Tags []*string `json:"tags" name:"tags"`
|
||||||
SubCode *int `json:"sub_code" name:"sub_code"`
|
|
||||||
TransitionStatus *string `json:"transition_status" name:"transition_status"`
|
TransitionStatus *string `json:"transition_status" name:"transition_status"`
|
||||||
UpgradePolicy []*string `json:"upgrade_policy" name:"upgrade_policy"`
|
|
||||||
UpgradeStatus *string `json:"upgrade_status" name:"upgrade_status"`
|
UpgradeStatus *string `json:"upgrade_status" name:"upgrade_status"`
|
||||||
UpgradeTime *time.Time `json:"upgrade_time" name:"upgrade_time" format:"ISO 8601"`
|
UpgradeTime *time.Time `json:"upgrade_time" name:"upgrade_time" format:"ISO 8601"`
|
||||||
VxNet *VxNet `json:"vxnet" name:"vxnet"`
|
VxNet *VxNet `json:"vxnet" name:"vxnet"`
|
||||||
|
@ -512,14 +499,6 @@ type Cluster struct {
|
||||||
|
|
||||||
func (v *Cluster) Validate() error {
|
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 v.VxNet != nil {
|
||||||
if err := v.VxNet.Validate(); err != nil {
|
if err := v.VxNet.Validate(); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue