ctyun support crm account

This commit is contained in:
tb365
2021-11-12 11:09:50 +08:00
parent c998867d88
commit f8536611e4
12 changed files with 108 additions and 22 deletions
+4 -1
View File
@@ -20,12 +20,15 @@ import (
"yunion.io/x/structarg"
"yunion.io/x/onecloud/pkg/cloudprovider"
"yunion.io/x/onecloud/pkg/multicloud/ctyun"
_ "yunion.io/x/onecloud/pkg/multicloud/ctyun/shell"
"yunion.io/x/onecloud/pkg/util/shellutils"
)
type BaseOptions struct {
cloudprovider.SCtyunExtraOptions
Help bool `help:"Show help" default:"false"`
Debug bool `help:"Show debug" default:"false"`
AccessKey string `help:"Access key" default:"$CTYUN_ACCESS_KEY"`
@@ -86,7 +89,7 @@ func newClient(options *BaseOptions) (*ctyun.SRegion, error) {
cli, err := ctyun.NewSCtyunClient(
ctyun.NewSCtyunClientConfig(
options.AccessKey, options.Secret,
options.AccessKey, options.Secret, &options.SCtyunExtraOptions,
).Debug(options.Debug),
)
if err != nil {