support-neonsan
This commit is contained in:
parent
3692eebc9e
commit
8cc6cde715
|
@ -5,13 +5,13 @@ services:
|
|||
|
||||
language: go
|
||||
go:
|
||||
- 1.7
|
||||
- 1.11
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- GO_VERSION=1.7
|
||||
- GO_VERSION=1.6
|
||||
- GO_VERSION=1.5
|
||||
- GO_VERSION=1.11
|
||||
- GO_VERSION=1.10
|
||||
- GO_VERSION=1.9
|
||||
|
||||
cache:
|
||||
directories:
|
||||
|
|
65
Makefile
65
Makefile
|
@ -11,6 +11,7 @@ FILES_TO_RELEASE=$(shell find . -name "*.go" | grep -vE "/vendor/|/test|.*_test.
|
|||
FILES_TO_RELEASE_WITH_VENDOR=$(shell find . -name "*.go" | grep -vE "/test|.*_test.go")
|
||||
LINT_IGNORE_DOC="service\/.*\.go:.+(comment on exported|should have comment or be unexported)"
|
||||
LINT_IGNORE_CONFLICT="service\/.*\.go:.+(type name will be used as)"
|
||||
LINT_IGNORE_METHOD="GetGlobalUniqueId"
|
||||
|
||||
help:
|
||||
@echo "Please use \`make <target>\` where <target> is one of"
|
||||
|
@ -41,7 +42,7 @@ vet:
|
|||
lint:
|
||||
@echo "golint, skipping vendor packages"
|
||||
@lint=$$(for pkg in ${PKGS_TO_CHECK}; do golint $${pkg}; done); \
|
||||
lint=$$(echo "$${lint}" | grep -vE -e ${LINT_IGNORE_DOC} -e ${LINT_IGNORE_CONFLICT}); \
|
||||
lint=$$(echo "$${lint}" | grep -vE -e ${LINT_IGNORE_DOC} -e ${LINT_IGNORE_CONFLICT} -e ${LINT_IGNORE_METHOD}); \
|
||||
if [[ -n $${lint} ]]; then echo "$${lint}"; exit 1; fi
|
||||
@echo "ok"
|
||||
|
||||
|
@ -97,10 +98,10 @@ unit-race:
|
|||
go test -v -race -cpu=1,2,4 ${PKGS_TO_CHECK}
|
||||
@echo "ok"
|
||||
|
||||
unit-runtime: unit-runtime-go-1.5 unit-runtime-go-1.6 unit-runtime-go-1.7
|
||||
unit-runtime: unit-runtime-go-1.9 unit-runtime-go-1.10 unit-runtime-go-1.11
|
||||
|
||||
export define DOCKERFILE_GO_1_7
|
||||
FROM golang:1.7
|
||||
export define DOCKERFILE_GO_1_11
|
||||
FROM golang:1.11
|
||||
|
||||
ADD . /go/src/github.com/yunify/qingcloud-sdk-go
|
||||
WORKDIR /go/src/github.com/yunify/qingcloud-sdk-go
|
||||
|
@ -108,18 +109,18 @@ WORKDIR /go/src/github.com/yunify/qingcloud-sdk-go
|
|||
CMD ["make", "build", "unit"]
|
||||
endef
|
||||
|
||||
unit-runtime-go-1.7:
|
||||
@echo "run test in go 1.7"
|
||||
echo "$${DOCKERFILE_GO_1_7}" > "dockerfile_go_1.7"
|
||||
docker build -f "./dockerfile_go_1.7" -t "${PREFIX}:go-1.7" .
|
||||
rm -f "./dockerfile_go_1.7"
|
||||
docker run --name "${PREFIX}-go-1.7-unit" -t "${PREFIX}:go-1.7"
|
||||
docker rm "${PREFIX}-go-1.7-unit"
|
||||
docker rmi "${PREFIX}:go-1.7"
|
||||
unit-runtime-go-1.11:
|
||||
@echo "run test in go 1.11"
|
||||
echo "$${DOCKERFILE_GO_1_11}" > "dockerfile_go_1.11"
|
||||
docker build -f "./dockerfile_go_1.11" -t "${PREFIX}:go-1.11" .
|
||||
rm -f "./dockerfile_go_1.11"
|
||||
docker run --name "${PREFIX}-go-1.11-unit" -t "${PREFIX}:go-1.11"
|
||||
docker rm "${PREFIX}-go-1.11-unit"
|
||||
docker rmi "${PREFIX}:go-1.11"
|
||||
@echo "ok"
|
||||
|
||||
export define DOCKERFILE_GO_1_6
|
||||
FROM golang:1.6
|
||||
export define DOCKERFILE_GO_1_10
|
||||
FROM golang:1.10
|
||||
|
||||
ADD . /go/src/github.com/yunify/qingcloud-sdk-go
|
||||
WORKDIR /go/src/github.com/yunify/qingcloud-sdk-go
|
||||
|
@ -127,18 +128,18 @@ WORKDIR /go/src/github.com/yunify/qingcloud-sdk-go
|
|||
CMD ["make", "build", "unit"]
|
||||
endef
|
||||
|
||||
unit-runtime-go-1.6:
|
||||
@echo "run test in go 1.6"
|
||||
echo "$${DOCKERFILE_GO_1_6}" > "dockerfile_go_1.6"
|
||||
docker build -f "./dockerfile_go_1.6" -t "${PREFIX}:go-1.6" .
|
||||
rm -f "./dockerfile_go_1.6"
|
||||
docker run --name "${PREFIX}-go-1.6-unit" -t "${PREFIX}:go-1.6"
|
||||
docker rm "${PREFIX}-go-1.6-unit"
|
||||
docker rmi "${PREFIX}:go-1.6"
|
||||
unit-runtime-go-1.10:
|
||||
@echo "run test in go 1.10"
|
||||
echo "$${DOCKERFILE_GO_1_10}" > "dockerfile_go_1.10"
|
||||
docker build -f "./dockerfile_go_1.10" -t "${PREFIX}:go-1.10" .
|
||||
rm -f "./dockerfile_go_1.10"
|
||||
docker run --name "${PREFIX}-go-1.10-unit" -t "${PREFIX}:go-1.10"
|
||||
docker rm "${PREFIX}-go-1.10-unit"
|
||||
docker rmi "${PREFIX}:go-1.10"
|
||||
@echo "ok"
|
||||
|
||||
export define DOCKERFILE_GO_1_5
|
||||
FROM golang:1.5
|
||||
export define DOCKERFILE_GO_1_9
|
||||
FROM golang:1.9
|
||||
ENV GO15VENDOREXPERIMENT="1"
|
||||
|
||||
ADD . /go/src/github.com/yunify/qingcloud-sdk-go
|
||||
|
@ -147,14 +148,14 @@ WORKDIR /go/src/github.com/yunify/qingcloud-sdk-go
|
|||
CMD ["make", "build", "unit"]
|
||||
endef
|
||||
|
||||
unit-runtime-go-1.5:
|
||||
@echo "run test in go 1.5"
|
||||
echo "$${DOCKERFILE_GO_1_5}" > "dockerfile_go_1.5"
|
||||
docker build -f "./dockerfile_go_1.5" -t "${PREFIX}:go-1.5" .
|
||||
rm -f "./dockerfile_go_1.5"
|
||||
docker run --name "${PREFIX}-go-1.5-unit" -t "${PREFIX}:go-1.5"
|
||||
docker rm "${PREFIX}-go-1.5-unit"
|
||||
docker rmi "${PREFIX}:go-1.5"
|
||||
unit-runtime-go-1.9:
|
||||
@echo "run test in go 1.9"
|
||||
echo "$${DOCKERFILE_GO_1_9}" > "dockerfile_go_1.9"
|
||||
docker build -f "./dockerfile_go_1.9" -t "${PREFIX}:go-1.9" .
|
||||
rm -f "./dockerfile_go_1.9"
|
||||
docker run --name "${PREFIX}-go-1.9-unit" -t "${PREFIX}:go-1.9"
|
||||
docker rm "${PREFIX}-go-1.9-unit"
|
||||
docker rmi "${PREFIX}:go-1.9"
|
||||
@echo "ok"
|
||||
|
||||
test:
|
||||
|
|
|
@ -61,7 +61,7 @@ func (b *Builder) build() (*http.Request, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if b.operation.RequestMethod == "POST"{
|
||||
if b.operation.RequestMethod == "POST" {
|
||||
httpRequest.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||
}
|
||||
|
||||
|
|
|
@ -294,3 +294,45 @@ type DescribeAppsOutput struct {
|
|||
RetCode *int `json:"ret_code" name:"ret_code" location:"elements"`
|
||||
TotalCount *int `json:"total_count" name:"total_count" location:"elements"`
|
||||
}
|
||||
|
||||
// Documentation URL: https://docs.qingcloud.com/api/bot/describe_app_version_attachments.html
|
||||
func (s *AppService) GetGlobalUniqueId(i *GetGlobalUniqueIdInput) (*GetGlobalUniqueIdOutput, error) {
|
||||
if i == nil {
|
||||
i = &GetGlobalUniqueIdInput{}
|
||||
}
|
||||
o := &data.Operation{
|
||||
Config: s.Config,
|
||||
Properties: s.Properties,
|
||||
APIName: "GetGlobalUniqueId",
|
||||
RequestMethod: "GET",
|
||||
}
|
||||
|
||||
x := &GetGlobalUniqueIdOutput{}
|
||||
r, err := request.New(o, i, x)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = r.Send()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return x, err
|
||||
}
|
||||
|
||||
type GetGlobalUniqueIdInput struct {
|
||||
UserID *string `json:"user_id" name:"user_id" location:"params"`
|
||||
}
|
||||
|
||||
func (v *GetGlobalUniqueIdInput) Validate() error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetGlobalUniqueIdOutput struct {
|
||||
Message *string `json:"message" name:"message"`
|
||||
Action *string `json:"action" name:"action" location:"elements"`
|
||||
RetCode *int `json:"ret_code" name:"ret_code" location:"elements"`
|
||||
UUID *string `json:"uuid" name:"uuid" location:"elements"`
|
||||
}
|
||||
|
|
|
@ -483,8 +483,8 @@ func (s *ClusterService) DeleteClusters(i *DeleteClustersInput) (*DeleteClusters
|
|||
}
|
||||
|
||||
type DeleteClustersInput struct {
|
||||
Clusters []*string `json:"clusters" name:"clusters" location:"params"` // Required
|
||||
DirectCease *int `json:"direct_cease" name:"direct_cease" location:"params"`
|
||||
Clusters []*string `json:"clusters" name:"clusters" location:"params"` // Required
|
||||
Force *int `json:"force" name:"force" location:"params"`
|
||||
}
|
||||
|
||||
func (v *DeleteClustersInput) Validate() error {
|
||||
|
@ -710,20 +710,26 @@ 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"`
|
||||
ClusterName *string `json:"cluster_name" name:"cluster_name" location:"params"`
|
||||
CfgmgmtID *string `json:"cfgmgmt_id" name:"cfgmgmt_id" 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"`
|
||||
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"`
|
||||
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"`
|
||||
}
|
||||
|
||||
func (v *DescribeClustersInput) Validate() error {
|
||||
|
|
|
@ -465,16 +465,21 @@ func (v *CachePrivateIP) Validate() error {
|
|||
type Cluster struct {
|
||||
AdvancedActions map[string]*string `json:"advanced_actions" name:"advanced_actions"`
|
||||
AppID *string `json:"app_id" name:"app_id"`
|
||||
AppInfo *App `json:"app_info" name:"app_info"`
|
||||
AppInfo interface{} `json:"app_info" name:"app_info"`
|
||||
AppVersion *string `json:"app_version" name:"app_version"`
|
||||
AppVersionInfo *AppVersion `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"`
|
||||
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"`
|
||||
|
@ -482,16 +487,24 @@ 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"`
|
||||
Tags []*string `json:"tags" name:"tags"`
|
||||
StatusTime *time.Time `json:"status_time" name:"status_time" format:"ISO 8601"`
|
||||
SubCode *int `json:"sub_code" name:"sub_code"`
|
||||
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"`
|
||||
|
@ -499,15 +512,11 @@ type Cluster struct {
|
|||
|
||||
func (v *Cluster) Validate() error {
|
||||
|
||||
if v.AppInfo != nil {
|
||||
if err := v.AppInfo.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if v.AppVersionInfo != nil {
|
||||
if err := v.AppVersionInfo.Validate(); err != nil {
|
||||
return err
|
||||
if len(v.Nodes) > 0 {
|
||||
for _, property := range v.Nodes {
|
||||
if err := property.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -262,7 +262,7 @@ type DescribeVolumesInput struct {
|
|||
Tags []*string `json:"tags" name:"tags" location:"params"`
|
||||
// Verbose's available values: 0, 1
|
||||
Verbose *int `json:"verbose" name:"verbose" default:"0" location:"params"`
|
||||
// VolumeType's available values: 0, 1, 2, 3
|
||||
// VolumeType's available values: 0, 1, 2, 3, 5
|
||||
VolumeType *int `json:"volume_type" name:"volume_type" location:"params"`
|
||||
Volumes []*string `json:"volumes" name:"volumes" location:"params"`
|
||||
}
|
||||
|
@ -290,7 +290,7 @@ func (v *DescribeVolumesInput) Validate() error {
|
|||
}
|
||||
|
||||
if v.VolumeType != nil {
|
||||
volumeTypeValidValues := []string{"0", "1", "2", "3"}
|
||||
volumeTypeValidValues := []string{"0", "1", "2", "3", "5"}
|
||||
volumeTypeParameterValue := fmt.Sprint(*v.VolumeType)
|
||||
|
||||
volumeTypeIsValid := false
|
||||
|
|
Loading…
Reference in New Issue