The package rpms/golang-github-aliyun-cli.git has added or updated architecture specific
content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/golang-github-aliyun-cli.git/comm....
Change:
+ExcludeArch: i686 # (Bug rhbz#1956389)
Thanks.
Full change:
============
commit ea8b64212615e9856abcbb15c3f11f733b22d872
Author: Brandon Perkins <bperkins(a)redhat.com>
Date: Mon May 3 11:37:19 2021 -0400
ExcludeArch i686 due to build failing from running out of memory (Fixes rhbz#1956389)
diff --git a/golang-github-aliyun-cli.spec b/golang-github-aliyun-cli.spec
index 205216d..6598b8d 100644
--- a/golang-github-aliyun-cli.spec
+++ b/golang-github-aliyun-cli.spec
@@ -32,7 +32,7 @@ Alibaba Cloud (Aliyun) CLI.}
%global godocs1 README-openapi-meta.md
Name: %{goname}
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: %{godevelsummary0}
# Upstream license specification: Apache-2.0 and MIT
@@ -41,9 +41,11 @@ URL: %{gourl}
Source0: %{gosource0}
Source1: %{gosource1}
-#
https://bugzilla.redhat.com/show_bug.cgi?id=1866529
#
https://github.com/aliyun/aliyun-cli/issues/303
+#
https://bugzilla.redhat.com/show_bug.cgi?id=1866529
ExcludeArch: armv7hl # (Bug rhbz#1866529)
+#
https://bugzilla.redhat.com/show_bug.cgi?id=1956389
+ExcludeArch: i686 # (Bug rhbz#1956389)
BuildRequires: golang-github-shulhan-bindata
BuildRequires:
golang(github.com/alibabacloud-go/tea/tea)
@@ -129,6 +131,9 @@ cp -Trv /etc/skel %{getenv:HOME}
%gopkgfiles
%changelog
+* Mon May 03 2021 Brandon Perkins <bperkins(a)redhat.com> - 3.0.74-2
+- ExcludeArch i686 due to build failing from running out of memory (Fixes rhbz#1956389)
+
* Mon May 03 2021 Brandon Perkins <bperkins(a)redhat.com> - 3.0.74-1
- Update to version 3.0.74 (Fixes rhbz#1955892)
- Update to aliyun-openapi-meta to commit
commit 6f1305476cd7a50be83a52fa33defb799619eda2
Author: Brandon Perkins <bperkins(a)redhat.com>
Date: Mon May 3 10:56:19 2021 -0400
Update to version 3.0.74 (Fixes rhbz#1955892)
Update to aliyun-openapi-meta to commit
95a090031d4d5b4dd8d2d29104f33769b3ea66b4
Addition of oss LICENSE and CHANGELOG
Addition of MIT upstream license
Removal of patch for building against credentials-go-1.1.0
https://github.com/aliyun/aliyun-cli/pull/300
Addition of alibabacloud-go/tea/tea and
golang.org/x/crypto/ssh/terminal BuildRequires
diff --git a/.gitignore b/.gitignore
index 883ecf7..16cd04a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,3 +25,5 @@
/aliyun-openapi-meta-2d5d1aa75ba1fcc3648fb6d168c9b4868ee3d0b6.tar.gz
/aliyun-cli-3.0.73.tar.gz
/aliyun-openapi-meta-1e468f0cf8af08594022c94d3d6ff2ba40c574dd.tar.gz
+/aliyun-cli-3.0.74.tar.gz
+/aliyun-openapi-meta-95a090031d4d5b4dd8d2d29104f33769b3ea66b4.tar.gz
diff --git a/aliyun-cli-credentials-config.patch b/aliyun-cli-credentials-config.patch
deleted file mode 100644
index 180a797..0000000
--- a/aliyun-cli-credentials-config.patch
+++ /dev/null
@@ -1,4253 +0,0 @@
-From 0a9ceb9c501cb45303f75e3332a6d73a7caa911b Mon Sep 17 00:00:00 2001
-From: Brandon Perkins <bperkins(a)redhat.com>
-Date: Fri, 31 Jul 2020 12:29:14 -0400
-Subject: [PATCH] Changes to build against credentials-go-1.1.0
-
----
- config/flags_test.go | 4 +-
- config/profile.go | 10 ++--
- config/profile_test.go | 10 ++--
- openapi/commando_test.go | 2 +-
- oss/lib/allpart_size.go | 2 +-
- oss/lib/allpart_size_test.go | 10 ++--
- oss/lib/append_file.go | 2 +-
- oss/lib/append_file_test.go | 26 +++++-----
- oss/lib/bucket_cors.go | 2 +-
- oss/lib/bucket_cors_test.go | 14 +++---
- oss/lib/bucket_encryption.go | 2 +-
- oss/lib/bucket_encryption_test.go | 14 +++---
- oss/lib/bucket_lifecycle.go | 2 +-
- oss/lib/bucket_lifecycle_test.go | 18 +++----
- oss/lib/bucket_logging.go | 2 +-
- oss/lib/bucket_logging_test.go | 16 +++---
- oss/lib/bucket_policy.go | 2 +-
- oss/lib/bucket_policy_test.go | 18 +++----
- oss/lib/bucket_qos.go | 2 +-
- oss/lib/bucket_qos_test.go | 18 +++----
- oss/lib/bucket_referer.go | 2 +-
- oss/lib/bucket_referer_test.go | 32 ++++++------
- oss/lib/bucket_tagging.go | 2 +-
- oss/lib/bucket_tagging_test.go | 14 +++---
- oss/lib/bucket_versioning.go | 2 +-
- oss/lib/bucket_versioning_test.go | 12 ++---
- oss/lib/bucket_website.go | 2 +-
- oss/lib/bucket_website_test.go | 18 +++----
- oss/lib/cat.go | 2 +-
- oss/lib/cat_test.go | 20 ++++----
- oss/lib/cli_bridge.go | 53 +++++++++----------
- oss/lib/command.go | 20 ++++----
- oss/lib/command_test.go | 84 +++++++++++++++----------------
- oss/lib/config.go | 10 ++--
- oss/lib/config_helper.go | 4 +-
- oss/lib/config_test.go | 8 +--
- oss/lib/const.go | 2 +-
- oss/lib/cors_options.go | 2 +-
- oss/lib/cors_options_test.go | 8 +--
- oss/lib/cp.go | 4 +-
- oss/lib/cp_test.go | 82 +++++++++++++++---------------
- oss/lib/create_symlink.go | 2 +-
- oss/lib/du.go | 2 +-
- oss/lib/du_test.go | 18 +++----
- oss/lib/ecs_role_test.go | 28 +++++------
- oss/lib/listpart.go | 2 +-
- oss/lib/listpart_test.go | 10 ++--
- oss/lib/ls.go | 2 +-
- oss/lib/ls_test.go | 64 +++++++++++------------
- oss/lib/mb.go | 2 +-
- oss/lib/mb_test.go | 12 ++---
- oss/lib/mkdir.go | 2 +-
- oss/lib/mkdir_test.go | 6 +--
- oss/lib/monitor_test.go | 8 +--
- oss/lib/object_tagging.go | 2 +-
- oss/lib/object_tagging_test.go | 10 ++--
- oss/lib/option.go | 2 +-
- oss/lib/probe.go | 2 +-
- oss/lib/probe_test.go | 16 +++---
- oss/lib/read_symlink.go | 2 +-
- oss/lib/request_payment.go | 2 +-
- oss/lib/request_payment_test.go | 12 ++---
- oss/lib/restore.go | 2 +-
- oss/lib/restore_test.go | 2 +-
- oss/lib/rm.go | 2 +-
- oss/lib/rm_test.go | 52 +++++++++----------
- oss/lib/set_acl.go | 2 +-
- oss/lib/set_acl_test.go | 16 +++---
- oss/lib/set_meta.go | 2 +-
- oss/lib/set_meta_test.go | 16 +++---
- oss/lib/signurl.go | 2 +-
- oss/lib/signurl_test.go | 8 +--
- oss/lib/stat.go | 2 +-
- oss/lib/stat_test.go | 16 +++---
- oss/lib/symlink_test.go | 4 +-
- oss/lib/user_qos.go | 2 +-
- oss/lib/user_qos_test.go | 10 ++--
- 77 files changed, 452 insertions(+), 451 deletions(-)
-
-diff --git a/config/flags_test.go b/config/flags_test.go
-index bdf47ac0..ffca4a1c 100644
---- a/config/flags_test.go
-+++ b/config/flags_test.go
-@@ -60,7 +60,7 @@ func TestAddFlag(t *testing.T) {
- ExcludeWith: nil,
- Shorthand: 0,
- }
-- newAccessKeyIDFlag = &cli.Flag{
-+ newAccessKeyIdFlag = &cli.Flag{
- Category: "config",
- Name: AccessKeyIdFlagName,
- AssignedMode: cli.AssignedOnce,
-@@ -342,7 +342,7 @@ func TestAddFlag(t *testing.T) {
- assert.Equal(t, newModeFlag, f)
-
- f = NewAccessKeyIdFlag()
-- assert.Equal(t, newAccessKeyIDFlag, f)
-+ assert.Equal(t, newAccessKeyIdFlag, f)
-
- f = NewAccessKeySecretFlag()
- assert.Equal(t, newAccessKeySecretFlag, f)
-diff --git a/config/profile.go b/config/profile.go
-index 1224848e..a93b7fc7 100644
---- a/config/profile.go
-+++ b/config/profile.go
-@@ -283,11 +283,11 @@ func (cp *Profile) GetClientByRamRoleArnWithEcs(config *sdk.Config)
(*sdk.Client
- if err != nil {
- return nil, err
- }
-- accessKeyID, accessKeySecret, StsToken, err := cp.GetSessionCredential(client)
-+ accessKeyId, accessKeySecret, StsToken, err := cp.GetSessionCredential(client)
- if err != nil {
- return nil, err
- }
-- cred := credentials.NewStsTokenCredential(accessKeyID, accessKeySecret, StsToken)
-+ cred := credentials.NewStsTokenCredential(accessKeyId, accessKeySecret, StsToken)
- return sdk.NewClientWithOptions(cp.RegionId, config, cred)
- }
-
-@@ -313,13 +313,13 @@ func (cp *Profile) GetSessionCredential(client *sdk.Client)
(string, string, str
- if err != nil {
- return "", "", "", err
- }
-- accessKeyID, _ := jmespath.Search("Credentials.AccessKeyId", v)
-+ accessKeyId, _ := jmespath.Search("Credentials.AccessKeyId", v)
- accessKeySecret, _ := jmespath.Search("Credentials.AccessKeySecret", v)
- StsToken, _ := jmespath.Search("Credentials.SecurityToken", v)
-- if accessKeyID == nil || accessKeySecret == nil || StsToken == nil {
-+ if accessKeyId == nil || accessKeySecret == nil || StsToken == nil {
- return "", "", "", errors.New("get session
credential failed")
- }
-- return accessKeyID.(string), accessKeySecret.(string), StsToken.(string), nil
-+ return accessKeyId.(string), accessKeySecret.(string), StsToken.(string), nil
- }
-
- func (cp *Profile) GetClientByEcsRamRole(config *sdk.Config) (*sdk.Client, error) {
-diff --git a/config/profile_test.go b/config/profile_test.go
-index 7bc88617..146486bf 100644
---- a/config/profile_test.go
-+++ b/config/profile_test.go
-@@ -289,7 +289,7 @@ func TestOverwriteWithFlagsWithAccessKeySecretEnv(t *testing.T) {
-
- }
-
--func TestOverwriteWithFlagsWithAccessKeyIDEnv(t *testing.T) {
-+func TestOverwriteWithFlagsWithAccessKeyIdEnv(t *testing.T) {
- buf := new(bytes.Buffer)
- ctx := cli.NewCommandContext(buf)
- AddFlags(ctx.Flags())
-@@ -452,16 +452,16 @@ func TestIsRegion(t *testing.T) {
-
- func TestAutoModeRecognition(t *testing.T) {
-
-- p := &Profile{AccessKeyId: "accessKeyID", AccessKeySecret:
"accessKeySecret"}
-+ p := &Profile{AccessKeyId: "accessKeyId", AccessKeySecret:
"accessKeySecret"}
- assert.Equal(t, AuthenticateMode(""), p.Mode)
- AutoModeRecognition(p)
- assert.Equal(t, AK, p.Mode)
-
-- p = &Profile{AccessKeyId: "accessKeyID", AccessKeySecret:
"accessKeySecret", StsToken: "stsToken"}
-+ p = &Profile{AccessKeyId: "accessKeyId", AccessKeySecret:
"accessKeySecret", StsToken: "stsToken"}
- AutoModeRecognition(p)
- assert.Equal(t, StsToken, p.Mode)
-
-- p = &Profile{AccessKeyId: "accessKeyID", AccessKeySecret:
"accessKeySecret", RamRoleArn: "ramRoleArn"}
-+ p = &Profile{AccessKeyId: "accessKeyId", AccessKeySecret:
"accessKeySecret", RamRoleArn: "ramRoleArn"}
- AutoModeRecognition(p)
- assert.Equal(t, RamRoleArn, p.Mode)
-
-@@ -473,7 +473,7 @@ func TestAutoModeRecognition(t *testing.T) {
- AutoModeRecognition(p)
- assert.Equal(t, EcsRamRole, p.Mode)
-
-- p = &Profile{AccessKeyId: "accessKeyID", AccessKeySecret:
"accessKeySecret", StsToken: "stsToken", Mode: AK}
-+ p = &Profile{AccessKeyId: "accessKeyId", AccessKeySecret:
"accessKeySecret", StsToken: "stsToken", Mode: AK}
- AutoModeRecognition(p)
- assert.Equal(t, AK, p.Mode)
-
-diff --git a/openapi/commando_test.go b/openapi/commando_test.go
-index d1f5d62e..b77fcb2a 100644
---- a/openapi/commando_test.go
-+++ b/openapi/commando_test.go
-@@ -67,7 +67,7 @@ func Test_main(t *testing.T) {
- ctx.Flags().Get("region").SetValue("cn-hangzhou")
- ctx.Flags().Add(config.NewAccessKeyIdFlag())
- ctx.Flags().Get("access-key-id").SetAssigned(true)
-- ctx.Flags().Get("access-key-id").SetValue("AccessKeyID")
-+ ctx.Flags().Get("access-key-id").SetValue("AccessKeyId")
- ctx.Flags().Add(config.NewAccessKeySecretFlag())
- ctx.Flags().Get("access-key-secret").SetAssigned(true)
- ctx.Flags().Get("access-key-secret").SetValue("AccessKeySecret")
-diff --git a/oss/lib/allpart_size.go b/oss/lib/allpart_size.go
-index 89447a7b..cd5a160a 100644
---- a/oss/lib/allpart_size.go
-+++ b/oss/lib/allpart_size.go
-@@ -86,7 +86,7 @@ var allPartSizeCommand = AllPartSizeCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/allpart_size_test.go b/oss/lib/allpart_size_test.go
-index f78cede2..8f9d00e9 100644
---- a/oss/lib/allpart_size_test.go
-+++ b/oss/lib/allpart_size_test.go
-@@ -32,7 +32,7 @@ func (s *OssutilCommandSuite) TestAllPartSize(c *C) {
- defer fd.Close()
-
- // begin upload part
-- client, err := oss.New(endpoint, accessKeyID, accessKeySecret)
-+ client, err := oss.New(endpoint, accessKeyId, accessKeySecret)
- c.Assert(err, IsNil)
-
- bucket, err := client.Bucket(bucketName)
-@@ -55,7 +55,7 @@ func (s *OssutilCommandSuite) TestAllPartSize(c *C) {
- var str string
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -93,7 +93,7 @@ func (s *OssutilCommandSuite) TestAllPartSizeBucketError(c *C) {
- var str string
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -111,7 +111,7 @@ func (s *OssutilCommandSuite) TestAllPartSizeEmptyEndpoint(c *C) {
- var str string
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -121,7 +121,7 @@ func (s *OssutilCommandSuite) TestAllPartSizeEmptyEndpoint(c *C) {
- oldConfigStr, err := ioutil.ReadFile(configFile)
- c.Assert(err, IsNil)
- fd, _ := os.OpenFile(configFile, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0664)
-- configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyID=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
-+ configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyId=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
- fd.WriteString(configStr)
- fd.Close()
-
-diff --git a/oss/lib/append_file.go b/oss/lib/append_file.go
-index 270827ff..563522f9 100644
---- a/oss/lib/append_file.go
-+++ b/oss/lib/append_file.go
-@@ -138,7 +138,7 @@ var appendFileCommand = AppendFileCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/append_file_test.go b/oss/lib/append_file_test.go
-index 152148d8..533d47e4 100644
---- a/oss/lib/append_file_test.go
-+++ b/oss/lib/append_file_test.go
-@@ -26,7 +26,7 @@ func (s *OssutilCommandSuite) TestAppendFileSuccessWithoutMeta(c *C) {
- var str string
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -47,7 +47,7 @@ func (s *OssutilCommandSuite) TestAppendFileSuccessWithoutMeta(c *C) {
- cpDir := CheckpointDir
- cpOptions := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "checkpointDir": &cpDir,
-@@ -86,7 +86,7 @@ func (s *OssutilCommandSuite) TestAppendFileSuccessWithMeta(c *C) {
- strMeta := "x-oss-meta-author:luxun"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -104,7 +104,7 @@ func (s *OssutilCommandSuite) TestAppendFileSuccessWithMeta(c *C) {
- cpDir := CheckpointDir
- cpOptions := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "checkpointDir": &cpDir,
-@@ -121,7 +121,7 @@ func (s *OssutilCommandSuite) TestAppendFileSuccessWithMeta(c *C) {
- c.Assert(strText, Equals, string(fileBody))
-
- // check meta
-- client, err := oss.New(endpoint, accessKeyID, accessKeySecret)
-+ client, err := oss.New(endpoint, accessKeyId, accessKeySecret)
- c.Assert(err, IsNil)
-
- bucket, err := client.Bucket(bucketName)
-@@ -157,7 +157,7 @@ func (s *OssutilCommandSuite) TestAppendFileError(c *C) {
- var str string
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -213,7 +213,7 @@ func (s *OssutilCommandSuite) TestAppendFileClientError(c *C) {
- var str string
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -224,7 +224,7 @@ func (s *OssutilCommandSuite) TestAppendFileClientError(c *C) {
- c.Assert(err, IsNil)
-
- fd, _ := os.OpenFile(configFile, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0664)
-- configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyID=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
-+ configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyId=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
- fd.WriteString(configStr)
- fd.Close()
-
-@@ -258,7 +258,7 @@ func (s *OssutilCommandSuite) TestAppendFileObjectExistMetaError(c
*C) {
- strMeta := "x-oss-meta-author:luxun"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -291,7 +291,7 @@ func (s *OssutilCommandSuite) TestAppendFileParserMetaError(c *C) {
- strMeta := "x-oss-meta-author#luxun"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -323,7 +323,7 @@ func (s *OssutilCommandSuite) TestAppendFileAppendFromFileError(c *C)
{
- var testCommand AppendFileCommand
- testCommand.afOption.fileName = randLowStr(12)
-
-- client, err := oss.New(endpoint, accessKeyID, accessKeySecret)
-+ client, err := oss.New(endpoint, accessKeyId, accessKeySecret)
- c.Assert(err, IsNil)
-
- bucket, err := client.Bucket(bucketName)
-@@ -372,7 +372,7 @@ func (s *OssutilCommandSuite) TestAppendFileWithPayer(c *C) {
- requester := "requester"
- options := OptionMapType{
- "endpoint": &payerBucketEndPoint,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -390,7 +390,7 @@ func (s *OssutilCommandSuite) TestAppendFileWithPayer(c *C) {
- cpDir := CheckpointDir
- cpOptions := OptionMapType{
- "endpoint": &payerBucketEndPoint,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "checkpointDir": &cpDir,
-diff --git a/oss/lib/bucket_cors.go b/oss/lib/bucket_cors.go
-index fab406db..d3f611a0 100644
---- a/oss/lib/bucket_cors.go
-+++ b/oss/lib/bucket_cors.go
-@@ -137,7 +137,7 @@ var corsCommand = CorsCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/bucket_cors_test.go b/oss/lib/bucket_cors_test.go
-index 26b0724e..7ff3bcc2 100644
---- a/oss/lib/bucket_cors_test.go
-+++ b/oss/lib/bucket_cors_test.go
-@@ -33,7 +33,7 @@ func (s *OssutilCommandSuite) TestCorsPutSuccess(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -49,7 +49,7 @@ func (s *OssutilCommandSuite) TestCorsPutSuccess(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -87,7 +87,7 @@ func (s *OssutilCommandSuite) TestCorsPutError(c *C) {
- strMethod := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -186,7 +186,7 @@ func (s *OssutilCommandSuite) TestCorsGetConfirm(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -202,7 +202,7 @@ func (s *OssutilCommandSuite) TestCorsGetConfirm(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -247,7 +247,7 @@ func (s *OssutilCommandSuite) TestCorsDelete(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -263,7 +263,7 @@ func (s *OssutilCommandSuite) TestCorsDelete(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-diff --git a/oss/lib/bucket_encryption.go b/oss/lib/bucket_encryption.go
-index 4a2fd73a..a4d918f2 100644
---- a/oss/lib/bucket_encryption.go
-+++ b/oss/lib/bucket_encryption.go
-@@ -108,7 +108,7 @@ var bucketEncryptionCommand = BucketEncryptionCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/bucket_encryption_test.go b/oss/lib/bucket_encryption_test.go
-index 4a1b02ac..9a3dc108 100644
---- a/oss/lib/bucket_encryption_test.go
-+++ b/oss/lib/bucket_encryption_test.go
-@@ -18,7 +18,7 @@ func (s *OssutilCommandSuite) TestBucketEncryptionPutSuccess(c *C) {
- strSSEAlgorithm := "KMS"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -83,7 +83,7 @@ func (s *OssutilCommandSuite) TestBucketEncryptionDeleteSuccess(c *C)
{
- strSSEAlgorithm := "KMS"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -124,7 +124,7 @@ func (s *OssutilCommandSuite) TestBucketEncryptionError(c *C) {
- var str string
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -155,7 +155,7 @@ func (s *OssutilCommandSuite) TestBucketEncryptionPutEmptyEndpoint(c
*C) {
- strSSEAlgorithm := "KMS"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -168,7 +168,7 @@ func (s *OssutilCommandSuite) TestBucketEncryptionPutEmptyEndpoint(c
*C) {
- oldConfigStr, err := ioutil.ReadFile(configFile)
- c.Assert(err, IsNil)
- fd, _ := os.OpenFile(configFile, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0664)
-- configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyID=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
-+ configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyId=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
- fd.WriteString(configStr)
- fd.Close()
-
-@@ -191,7 +191,7 @@ func (s *OssutilCommandSuite) TestBucketEncryptionGetEmptyEndpoint(c
*C) {
- strSSEAlgorithm := "KMS"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -204,7 +204,7 @@ func (s *OssutilCommandSuite) TestBucketEncryptionGetEmptyEndpoint(c
*C) {
- oldConfigStr, err := ioutil.ReadFile(configFile)
- c.Assert(err, IsNil)
- fd, _ := os.OpenFile(configFile, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0664)
-- configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyID=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
-+ configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyId=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
- fd.WriteString(configStr)
- fd.Close()
-
-diff --git a/oss/lib/bucket_lifecycle.go b/oss/lib/bucket_lifecycle.go
-index f3194a78..63f9c3e5 100644
---- a/oss/lib/bucket_lifecycle.go
-+++ b/oss/lib/bucket_lifecycle.go
-@@ -156,7 +156,7 @@ var bucketLifeCycleCommand = BucketLifeCycleCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/bucket_lifecycle_test.go b/oss/lib/bucket_lifecycle_test.go
-index 51a45f73..da0c1942 100644
---- a/oss/lib/bucket_lifecycle_test.go
-+++ b/oss/lib/bucket_lifecycle_test.go
-@@ -39,7 +39,7 @@ func (s *OssutilCommandSuite) TestLifecyclePutSuccess(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -55,7 +55,7 @@ func (s *OssutilCommandSuite) TestLifecyclePutSuccess(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -97,7 +97,7 @@ func (s *OssutilCommandSuite) TestLifecyclePutError(c *C) {
- strMethod := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -183,7 +183,7 @@ func (s *OssutilCommandSuite) TestLifecycleOptionsEmptyEndpoint(c *C)
{
- strMethod := "get"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -195,7 +195,7 @@ func (s *OssutilCommandSuite) TestLifecycleOptionsEmptyEndpoint(c *C)
{
- oldConfigStr, err := ioutil.ReadFile(configFile)
- c.Assert(err, IsNil)
- fd, _ := os.OpenFile(configFile, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0664)
-- configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyID=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
-+ configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyId=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
- fd.WriteString(configStr)
- fd.Close()
-
-@@ -235,7 +235,7 @@ func (s *OssutilCommandSuite) TestLifecycleGetConfirm(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -251,7 +251,7 @@ func (s *OssutilCommandSuite) TestLifecycleGetConfirm(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -301,7 +301,7 @@ func (s *OssutilCommandSuite) TestLifecycleDelete(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -317,7 +317,7 @@ func (s *OssutilCommandSuite) TestLifecycleDelete(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-diff --git a/oss/lib/bucket_logging.go b/oss/lib/bucket_logging.go
-index bd11e40d..f65671e1 100644
---- a/oss/lib/bucket_logging.go
-+++ b/oss/lib/bucket_logging.go
-@@ -116,7 +116,7 @@ var bucketLogCommand = BucketLogCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/bucket_logging_test.go b/oss/lib/bucket_logging_test.go
-index d43548ac..b3add1ba 100644
---- a/oss/lib/bucket_logging_test.go
-+++ b/oss/lib/bucket_logging_test.go
-@@ -21,7 +21,7 @@ func (s *OssutilCommandSuite) TestBucketLogPutSuccess(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -37,7 +37,7 @@ func (s *OssutilCommandSuite) TestBucketLogPutSuccess(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -77,7 +77,7 @@ func (s *OssutilCommandSuite) TestBucketLogDeleteSuccess(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -150,7 +150,7 @@ func (s *OssutilCommandSuite) TestBucketLogGetToStdout(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -185,7 +185,7 @@ func (s *OssutilCommandSuite) TestBucketLogGetConfirm(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -201,7 +201,7 @@ func (s *OssutilCommandSuite) TestBucketLogGetConfirm(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -246,7 +246,7 @@ func (s *OssutilCommandSuite) TestBucketLogPutError(c *C) {
- strMethod := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -314,7 +314,7 @@ func (s *OssutilCommandSuite) TestBucketLogDeleteError(c *C) {
- strKey := "aaa"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &strKey,
- "stsToken": &str,
- "configFile": &configFile,
-diff --git a/oss/lib/bucket_policy.go b/oss/lib/bucket_policy.go
-index 11699124..67d4d092 100644
---- a/oss/lib/bucket_policy.go
-+++ b/oss/lib/bucket_policy.go
-@@ -153,7 +153,7 @@ var bucketPolicyCommand = BucketPolicyCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/bucket_policy_test.go b/oss/lib/bucket_policy_test.go
-index fdb34483..0206045f 100644
---- a/oss/lib/bucket_policy_test.go
-+++ b/oss/lib/bucket_policy_test.go
-@@ -36,7 +36,7 @@ func (s *OssutilCommandSuite) TestPolicyPutSuccess(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -52,7 +52,7 @@ func (s *OssutilCommandSuite) TestPolicyPutSuccess(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -86,7 +86,7 @@ func (s *OssutilCommandSuite) TestPolicyPutError(c *C) {
- strMethod := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -172,7 +172,7 @@ func (s *OssutilCommandSuite) TestPolicyOptionsEmptyEndpoint(c *C) {
- strMethod := "get"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -184,7 +184,7 @@ func (s *OssutilCommandSuite) TestPolicyOptionsEmptyEndpoint(c *C) {
- oldConfigStr, err := ioutil.ReadFile(configFile)
- c.Assert(err, IsNil)
- fd, _ := os.OpenFile(configFile, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0664)
-- configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyID=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
-+ configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyId=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
- fd.WriteString(configStr)
- fd.Close()
-
-@@ -227,7 +227,7 @@ func (s *OssutilCommandSuite) TestPolicyGetConfirm(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -243,7 +243,7 @@ func (s *OssutilCommandSuite) TestPolicyGetConfirm(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -296,7 +296,7 @@ func (s *OssutilCommandSuite) TestPolicyDelete(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -312,7 +312,7 @@ func (s *OssutilCommandSuite) TestPolicyDelete(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-diff --git a/oss/lib/bucket_qos.go b/oss/lib/bucket_qos.go
-index 2f84b2de..a77ba024 100644
---- a/oss/lib/bucket_qos.go
-+++ b/oss/lib/bucket_qos.go
-@@ -142,7 +142,7 @@ var bucketQosCommand = BucketQosCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/bucket_qos_test.go b/oss/lib/bucket_qos_test.go
-index c9ed5cdb..7cca919b 100644
---- a/oss/lib/bucket_qos_test.go
-+++ b/oss/lib/bucket_qos_test.go
-@@ -39,7 +39,7 @@ func (s *OssutilCommandSuite) TestBucketQosPutSuccess(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -58,7 +58,7 @@ func (s *OssutilCommandSuite) TestBucketQosPutSuccess(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -104,7 +104,7 @@ func (s *OssutilCommandSuite) TestBucketQosPutError(c *C) {
- strMethod := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -190,7 +190,7 @@ func (s *OssutilCommandSuite) TestBucketQosOptionsEmptyEndpoint(c *C)
{
- strMethod := "get"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -202,7 +202,7 @@ func (s *OssutilCommandSuite) TestBucketQosOptionsEmptyEndpoint(c *C)
{
- oldConfigStr, err := ioutil.ReadFile(configFile)
- c.Assert(err, IsNil)
- fd, _ := os.OpenFile(configFile, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0664)
-- configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyID=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
-+ configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyId=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
- fd.WriteString(configStr)
- fd.Close()
-
-@@ -241,7 +241,7 @@ func (s *OssutilCommandSuite) TestBucketQosGetConfirm(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -257,7 +257,7 @@ func (s *OssutilCommandSuite) TestBucketQosGetConfirm(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -305,7 +305,7 @@ func (s *OssutilCommandSuite) TestBucketQosDelete(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -321,7 +321,7 @@ func (s *OssutilCommandSuite) TestBucketQosDelete(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-diff --git a/oss/lib/bucket_referer.go b/oss/lib/bucket_referer.go
-index edcc96c9..3e61a4cb 100644
---- a/oss/lib/bucket_referer.go
-+++ b/oss/lib/bucket_referer.go
-@@ -121,7 +121,7 @@ var bucketRefererCommand = BucketRefererCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/bucket_referer_test.go b/oss/lib/bucket_referer_test.go
-index 2b16fa50..9b6a1361 100644
---- a/oss/lib/bucket_referer_test.go
-+++ b/oss/lib/bucket_referer_test.go
-@@ -19,7 +19,7 @@ func (s *OssutilCommandSuite) TestBucketRefererPutSuccess(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -37,7 +37,7 @@ func (s *OssutilCommandSuite) TestBucketRefererPutSuccess(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -80,7 +80,7 @@ func (s *OssutilCommandSuite) TestBucketRefererDisableEmpty(c *C) {
- disableEmptyRefer := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -99,7 +99,7 @@ func (s *OssutilCommandSuite) TestBucketRefererDisableEmpty(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -141,7 +141,7 @@ func (s *OssutilCommandSuite) TestBucketRefererGetConfirm(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -159,7 +159,7 @@ func (s *OssutilCommandSuite) TestBucketRefererGetConfirm(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -205,7 +205,7 @@ func (s *OssutilCommandSuite) TestBucketRefererGetToStdout(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -228,7 +228,7 @@ func (s *OssutilCommandSuite) TestBucketRefererGetToStdout(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -265,7 +265,7 @@ func (s *OssutilCommandSuite) TestBucketRefererBucketError(c *C) {
- disableEmptyRefer := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -290,7 +290,7 @@ func (s *OssutilCommandSuite) TestBucketRefererDeleteSuccess(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -308,7 +308,7 @@ func (s *OssutilCommandSuite) TestBucketRefererDeleteSuccess(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -373,7 +373,7 @@ func (s *OssutilCommandSuite) TestBucketRefererError(c *C) {
- var str string
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -412,7 +412,7 @@ func (s *OssutilCommandSuite) TestBucketRefererPutEmptyEndpoint(c *C)
{
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -424,7 +424,7 @@ func (s *OssutilCommandSuite) TestBucketRefererPutEmptyEndpoint(c *C)
{
- oldConfigStr, err := ioutil.ReadFile(configFile)
- c.Assert(err, IsNil)
- fd, _ := os.OpenFile(configFile, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0664)
-- configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyID=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
-+ configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyId=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
- fd.WriteString(configStr)
- fd.Close()
-
-@@ -450,7 +450,7 @@ func (s *OssutilCommandSuite) TestBucketRefererGetEmptyEndpoint(c *C)
{
- strMethod := "get"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -462,7 +462,7 @@ func (s *OssutilCommandSuite) TestBucketRefererGetEmptyEndpoint(c *C)
{
- oldConfigStr, err := ioutil.ReadFile(configFile)
- c.Assert(err, IsNil)
- fd, _ := os.OpenFile(configFile, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0664)
-- configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyID=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
-+ configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyId=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
- fd.WriteString(configStr)
- fd.Close()
-
-diff --git a/oss/lib/bucket_tagging.go b/oss/lib/bucket_tagging.go
-index 93b1453e..7c3fb37d 100644
---- a/oss/lib/bucket_tagging.go
-+++ b/oss/lib/bucket_tagging.go
-@@ -106,7 +106,7 @@ var bucketTagCommand = BucketTagCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/bucket_tagging_test.go b/oss/lib/bucket_tagging_test.go
-index 3efc75d2..6403eecc 100644
---- a/oss/lib/bucket_tagging_test.go
-+++ b/oss/lib/bucket_tagging_test.go
-@@ -17,7 +17,7 @@ func (s *OssutilCommandSuite) TestBucketTaggingPutSuccess(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -51,7 +51,7 @@ func (s *OssutilCommandSuite) TestBucketTaggingDeleteSuccess(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -94,7 +94,7 @@ func (s *OssutilCommandSuite) TestBucketTaggingError(c *C) {
- var str string
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -137,7 +137,7 @@ func (s *OssutilCommandSuite) TestBucketTaggingPutEmptyEndpoint(c *C)
{
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -149,7 +149,7 @@ func (s *OssutilCommandSuite) TestBucketTaggingPutEmptyEndpoint(c *C)
{
- oldConfigStr, err := ioutil.ReadFile(configFile)
- c.Assert(err, IsNil)
- fd, _ := os.OpenFile(configFile, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0664)
-- configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyID=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
-+ configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyId=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
- fd.WriteString(configStr)
- fd.Close()
-
-@@ -172,7 +172,7 @@ func (s *OssutilCommandSuite) TestBucketTaggingGetEmptyEndpoint(c *C)
{
- strMethod := "get"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -184,7 +184,7 @@ func (s *OssutilCommandSuite) TestBucketTaggingGetEmptyEndpoint(c *C)
{
- oldConfigStr, err := ioutil.ReadFile(configFile)
- c.Assert(err, IsNil)
- fd, _ := os.OpenFile(configFile, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0664)
-- configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyID=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
-+ configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyId=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
- fd.WriteString(configStr)
- fd.Close()
-
-diff --git a/oss/lib/bucket_versioning.go b/oss/lib/bucket_versioning.go
-index e520686d..9afe463a 100644
---- a/oss/lib/bucket_versioning.go
-+++ b/oss/lib/bucket_versioning.go
-@@ -98,7 +98,7 @@ var bucketVersioningCommand = BucketVersioningCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/bucket_versioning_test.go b/oss/lib/bucket_versioning_test.go
-index a19148da..c285b888 100644
---- a/oss/lib/bucket_versioning_test.go
-+++ b/oss/lib/bucket_versioning_test.go
-@@ -16,7 +16,7 @@ func (s *OssutilCommandSuite) TestBucketVersioningPutSuccess(c *C) {
- strMethod := "get"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -65,7 +65,7 @@ func (s *OssutilCommandSuite) TestBucketVersioningError(c *C) {
- var str string
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -105,7 +105,7 @@ func (s *OssutilCommandSuite) TestBucketVersioningPutEmptyEndpoint(c
*C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -117,7 +117,7 @@ func (s *OssutilCommandSuite) TestBucketVersioningPutEmptyEndpoint(c
*C) {
- oldConfigStr, err := ioutil.ReadFile(configFile)
- c.Assert(err, IsNil)
- fd, _ := os.OpenFile(configFile, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0664)
-- configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyID=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
-+ configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyId=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
- fd.WriteString(configStr)
- fd.Close()
-
-@@ -139,7 +139,7 @@ func (s *OssutilCommandSuite) TestBucketVersioningGetEmptyEndpoint(c
*C) {
- strMethod := "get"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -151,7 +151,7 @@ func (s *OssutilCommandSuite) TestBucketVersioningGetEmptyEndpoint(c
*C) {
- oldConfigStr, err := ioutil.ReadFile(configFile)
- c.Assert(err, IsNil)
- fd, _ := os.OpenFile(configFile, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0664)
-- configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyID=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
-+ configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyId=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
- fd.WriteString(configStr)
- fd.Close()
-
-diff --git a/oss/lib/bucket_website.go b/oss/lib/bucket_website.go
-index db9a7b11..97d20223 100644
---- a/oss/lib/bucket_website.go
-+++ b/oss/lib/bucket_website.go
-@@ -230,7 +230,7 @@ var bucketWebsiteCommand = BucketWebSiteCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/bucket_website_test.go b/oss/lib/bucket_website_test.go
-index 01f27aa8..71ad688c 100644
---- a/oss/lib/bucket_website_test.go
-+++ b/oss/lib/bucket_website_test.go
-@@ -52,7 +52,7 @@ func (s *OssutilCommandSuite) TestWebsitePutSuccess(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -68,7 +68,7 @@ func (s *OssutilCommandSuite) TestWebsitePutSuccess(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -111,7 +111,7 @@ func (s *OssutilCommandSuite) TestWebsitePutError(c *C) {
- strMethod := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -197,7 +197,7 @@ func (s *OssutilCommandSuite) TestWebsiteOptionsEmptyEndpoint(c *C)
{
- strMethod := "get"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -209,7 +209,7 @@ func (s *OssutilCommandSuite) TestWebsiteOptionsEmptyEndpoint(c *C)
{
- oldConfigStr, err := ioutil.ReadFile(configFile)
- c.Assert(err, IsNil)
- fd, _ := os.OpenFile(configFile, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0664)
-- configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyID=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
-+ configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyId=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
- fd.WriteString(configStr)
- fd.Close()
-
-@@ -262,7 +262,7 @@ func (s *OssutilCommandSuite) TestWebsiteGetConfirm(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -278,7 +278,7 @@ func (s *OssutilCommandSuite) TestWebsiteGetConfirm(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -341,7 +341,7 @@ func (s *OssutilCommandSuite) TestWebsiteDelete(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -357,7 +357,7 @@ func (s *OssutilCommandSuite) TestWebsiteDelete(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-diff --git a/oss/lib/cat.go b/oss/lib/cat.go
-index ac92bff3..c9c2b101 100644
---- a/oss/lib/cat.go
-+++ b/oss/lib/cat.go
-@@ -92,7 +92,7 @@ var catCommand = CatCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/cat_test.go b/oss/lib/cat_test.go
-index 1cc88831..dd3a99b2 100644
---- a/oss/lib/cat_test.go
-+++ b/oss/lib/cat_test.go
-@@ -11,7 +11,7 @@ import (
-
- func (s *OssutilCommandSuite) TestCatObjectSuccess(c *C) {
- // create client and bucket
-- client, err := oss.New(endpoint, accessKeyID, accessKeySecret)
-+ client, err := oss.New(endpoint, accessKeyId, accessKeySecret)
- c.Assert(err, IsNil)
-
- bucketName := bucketNamePrefix + randLowStr(5)
-@@ -32,7 +32,7 @@ func (s *OssutilCommandSuite) TestCatObjectSuccess(c *C) {
- var str string
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -62,7 +62,7 @@ func (s *OssutilCommandSuite) TestCatObjectSuccess(c *C) {
-
- func (s *OssutilCommandSuite) TestCatObjectError(c *C) {
- // create client and bucket
-- client, err := oss.New(endpoint, accessKeyID, accessKeySecret)
-+ client, err := oss.New(endpoint, accessKeyId, accessKeySecret)
- c.Assert(err, IsNil)
-
- bucketName := bucketNamePrefix + randLowStr(5)
-@@ -73,7 +73,7 @@ func (s *OssutilCommandSuite) TestCatObjectError(c *C) {
- var str string
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -98,7 +98,7 @@ func (s *OssutilCommandSuite) TestCatObjectError(c *C) {
-
- func (s *OssutilCommandSuite) TestCatObjecEndpointEmptyError(c *C) {
- // create client and bucket
-- client, err := oss.New(endpoint, accessKeyID, accessKeySecret)
-+ client, err := oss.New(endpoint, accessKeyId, accessKeySecret)
- c.Assert(err, IsNil)
-
- bucketName := bucketNamePrefix + randLowStr(5)
-@@ -109,7 +109,7 @@ func (s *OssutilCommandSuite) TestCatObjecEndpointEmptyError(c *C) {
- var str string
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -121,7 +121,7 @@ func (s *OssutilCommandSuite) TestCatObjecEndpointEmptyError(c *C) {
- c.Assert(err, IsNil)
-
- fd, _ := os.OpenFile(configFile, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0664)
-- configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyID=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
-+ configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyId=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
- fd.WriteString(configStr)
- fd.Close()
-
-@@ -176,7 +176,7 @@ func (s *OssutilCommandSuite) TestCatObjectWithVersion(c *C) {
- var str string
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -202,7 +202,7 @@ func (s *OssutilCommandSuite) TestCatObjectWithVersion(c *C) {
- //begin cat with version id v1
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -242,7 +242,7 @@ func (s *OssutilCommandSuite) TestCatObjectWithPayer(c *C) {
- requester := "requester"
- options := OptionMapType{
- "endpoint": &payerBucketEndPoint,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-diff --git a/oss/lib/cli_bridge.go b/oss/lib/cli_bridge.go
-index 31a41afc..a6455198 100644
---- a/oss/lib/cli_bridge.go
-+++ b/oss/lib/cli_bridge.go
-@@ -8,6 +8,7 @@ import (
- "github.com/aliyun/aliyun-cli/cli"
- "github.com/aliyun/aliyun-cli/config"
- "github.com/aliyun/aliyun-cli/i18n"
-+ "github.com/alibabacloud-go/tea/tea"
- "github.com/aliyun/credentials-go/credentials"
- )
-
-@@ -100,13 +101,13 @@ func ParseAndRunCommandFromCli(ctx *cli.Context, args []string)
error {
- return fmt.Errorf("config failed: %s", err.Error())
- }
-
-- accessKeyID, accessSecret, stsToken, err := getSessionCredential(&profile)
-+ accessKeyId, accessSecret, stsToken, err := getSessionCredential(&profile)
- if err != nil {
- return fmt.Errorf("can't get credential %s", err)
- }
-
- configs := make(map[string]string, 0)
-- configs["access-key-id"] = accessKeyID
-+ configs["access-key-id"] = accessKeyId
- configs["access-key-secret"] = accessSecret
- configs["sts-token"] = stsToken
-
-@@ -154,35 +155,35 @@ func ParseAndRunCommandFromCli(ctx *cli.Context, args []string)
error {
- }
-
- func getSessionCredential(profile *config.Profile) (string, string, string, error) {
-- var conf *credentials.Configuration
-+ var conf *credentials.Config
- switch profile.Mode {
- case config.AK:
-- conf = &credentials.Configuration{
-- Type: "access_key",
-- AccessKeyID: profile.AccessKeyId,
-- AccessKeySecret: profile.AccessKeySecret,
-+ conf = &credentials.Config{
-+ Type: tea.String("access_key"),
-+ AccessKeyId: tea.String(profile.AccessKeyId),
-+ AccessKeySecret: tea.String(profile.AccessKeySecret),
- }
- case config.StsToken:
-- conf = &credentials.Configuration{
-- Type: "sts",
-- AccessKeyID: profile.AccessKeyId,
-- AccessKeySecret: profile.AccessKeySecret,
-- SecurityToken: profile.StsToken,
-+ conf = &credentials.Config{
-+ Type: tea.String("sts"),
-+ AccessKeyId: tea.String(profile.AccessKeyId),
-+ AccessKeySecret: tea.String(profile.AccessKeySecret),
-+ SecurityToken: tea.String(profile.StsToken),
- }
- case config.RamRoleArn:
-- conf = &credentials.Configuration{
-- Type: "ram_role_arn",
-- AccessKeyID: profile.AccessKeyId,
-- AccessKeySecret: profile.AccessKeySecret,
-- RoleArn: profile.RamRoleArn,
-- RoleSessionName: profile.RoleSessionName,
-- Policy: "",
-- RoleSessionExpiration: profile.ExpiredSeconds,
-+ conf = &credentials.Config{
-+ Type: tea.String("ram_role_arn"),
-+ AccessKeyId: tea.String(profile.AccessKeyId),
-+ AccessKeySecret: tea.String(profile.AccessKeySecret),
-+ RoleArn: tea.String(profile.RamRoleArn),
-+ RoleSessionName: tea.String(profile.RoleSessionName),
-+ Policy: tea.String(""),
-+ RoleSessionExpiration: tea.Int(profile.ExpiredSeconds),
- }
- case config.EcsRamRole:
-- conf = &credentials.Configuration{
-- Type: "ecs_ram_role",
-- RoleName: profile.RamRoleName,
-+ conf = &credentials.Config{
-+ Type: tea.String("ecs_ram_role"),
-+ RoleName: tea.String(profile.RamRoleName),
- }
- case config.RamRoleArnWithEcs:
- client, _ := sdk.NewClientWithEcsRamRole(profile.RegionId, profile.RamRoleName)
-@@ -193,11 +194,11 @@ func getSessionCredential(profile *config.Profile) (string, string,
string, erro
- return "", "", "", err
- }
- var lastErr error
-- accessKeyID, err := credential.GetAccessKeyID()
-+ accessKeyId, err := credential.GetAccessKeyId()
- if err != nil {
- lastErr = err
- }
-- accessSecret, err := credential.GetAccessSecret()
-+ accessSecret, err := credential.GetAccessKeySecret()
- if err != nil {
- lastErr = err
- }
-@@ -208,5 +209,5 @@ func getSessionCredential(profile *config.Profile) (string, string,
string, erro
- if lastErr != nil {
- return "", "", "", lastErr
- }
-- return accessKeyID, accessSecret, stsToken, nil
-+ return tea.StringValue(accessKeyId), tea.StringValue(accessSecret),
tea.StringValue(stsToken), nil
- }
-diff --git a/oss/lib/command.go b/oss/lib/command.go
-index 5d990d4c..8cf54fc3 100644
---- a/oss/lib/command.go
-+++ b/oss/lib/command.go
-@@ -127,7 +127,7 @@ func (cmd *Command) loadConfig(configFile string, cmder interface{})
error {
- }
-
- func (cmd *Command) needConfigFile() bool {
-- for _, name := range []string{OptionEndpoint, OptionAccessKeyID, OptionAccessKeySecret,
OptionSTSToken} {
-+ for _, name := range []string{OptionEndpoint, OptionAccessKeyId, OptionAccessKeySecret,
OptionSTSToken} {
- val, _ := GetString(name, cmd.options)
- if val != "" {
- return false
-@@ -282,7 +282,7 @@ func (cmd *Command) formatOption(option Option) string {
- // get oss client according to bucket(if bucket not empty)
- func (cmd *Command) ossClient(bucket string) (*oss.Client, error) {
- endpoint, isCname := cmd.getEndpoint(bucket)
-- accessKeyID, _ := GetString(OptionAccessKeyID, cmd.options)
-+ accessKeyId, _ := GetString(OptionAccessKeyId, cmd.options)
- accessKeySecret, _ := GetString(OptionAccessKeySecret, cmd.options)
- stsToken, _ := GetString(OptionSTSToken, cmd.options)
- disableCRC64, _ := GetBool(OptionDisableCRC64, cmd.options)
-@@ -292,12 +292,12 @@ func (cmd *Command) ossClient(bucket string) (*oss.Client, error)
{
- ecsUrl, _ := cmd.getEcsRamAkService()
- localHost, _ := GetString(OptionLocalHost, cmd.options)
-
-- if accessKeyID == "" && ecsUrl == "" {
-- return nil, fmt.Errorf("accessKeyID and ecsUrl are both empty")
-+ if accessKeyId == "" && ecsUrl == "" {
-+ return nil, fmt.Errorf("accessKeyId and ecsUrl are both empty")
- }
-
- if ecsUrl == "" {
-- if err := cmd.checkCredentials(endpoint, accessKeyID, accessKeySecret); err != nil {
-+ if err := cmd.checkCredentials(endpoint, accessKeyId, accessKeySecret); err != nil {
- return nil, err
- }
- }
-@@ -331,13 +331,13 @@ func (cmd *Command) ossClient(bucket string) (*oss.Client, error)
{
- options = append(options, oss.SetLogger(utilLogger))
- }
-
-- if accessKeyID == "" {
-+ if accessKeyId == "" {
- LogInfo("using user ak service:%s\n", ecsUrl)
- ecsRoleAKBuild := EcsRoleAKBuild{url: ecsUrl}
- options = append(options, oss.SetCredentialsProvider(&ecsRoleAKBuild))
- }
-
-- client, err := oss.New(endpoint, accessKeyID, accessKeySecret, options...)
-+ client, err := oss.New(endpoint, accessKeyId, accessKeySecret, options...)
- if err != nil {
- return nil, err
- }
-@@ -359,12 +359,12 @@ func (cmd *Command) ossClient(bucket string) (*oss.Client, error)
{
- return client, nil
- }
-
--func (cmd *Command) checkCredentials(endpoint, accessKeyID, accessKeySecret string)
error {
-+func (cmd *Command) checkCredentials(endpoint, accessKeyId, accessKeySecret string)
error {
- if strings.TrimSpace(endpoint) == "" {
- return fmt.Errorf("invalid endpoint, endpoint is empty, please check your
config")
- }
-- if strings.TrimSpace(accessKeyID) == "" {
-- return fmt.Errorf("invalid accessKeyID, accessKeyID is empty, please check your
config")
-+ if strings.TrimSpace(accessKeyId) == "" {
-+ return fmt.Errorf("invalid accessKeyId, accessKeyId is empty, please check your
config")
- }
- if strings.TrimSpace(accessKeySecret) == "" {
- return fmt.Errorf("invalid accessKeySecret, accessKeySecret is empty, please
check your config")
-diff --git a/oss/lib/command_test.go b/oss/lib/command_test.go
-index a56cd018..d9e5ad88 100644
---- a/oss/lib/command_test.go
-+++ b/oss/lib/command_test.go
-@@ -31,7 +31,7 @@ var _ = Suite(&OssutilCommandSuite{})
- var (
- // Update before running test
- endpoint = ""
-- accessKeyID = ""
-+ accessKeyId = ""
- accessKeySecret = ""
- stsToken = ""
- payerBucket = ""
-@@ -92,8 +92,8 @@ func SetUpCredential() {
- if strings.HasPrefix(endpoint, "http://") {
- endpoint = endpoint[7:]
- }
-- if accessKeyID == "" {
-- accessKeyID = os.Getenv("OSS_TEST_ACCESS_KEY_ID")
-+ if accessKeyId == "" {
-+ accessKeyId = os.Getenv("OSS_TEST_ACCESS_KEY_ID")
- }
- if accessKeySecret == "" {
- accessKeySecret = os.Getenv("OSS_TEST_ACCESS_KEY_SECRET")
-@@ -200,7 +200,7 @@ func getFileList(dpath string) ([]string, error) {
-
- func (s *OssutilCommandSuite) PutObject(bucketName string, object string, body string, c
*C) {
- // create client and bucket
-- client, err := oss.New(endpoint, accessKeyID, accessKeySecret)
-+ client, err := oss.New(endpoint, accessKeyId, accessKeySecret)
- c.Assert(err, IsNil)
-
- bucket, err := client.Bucket(bucketName)
-@@ -213,7 +213,7 @@ func (s *OssutilCommandSuite) PutObject(bucketName string, object
string, body s
-
- func (s *OssutilCommandSuite) AppendObject(bucketName string, object string, body
string, position int64, c *C) {
- // create client and bucket
-- client, err := oss.New(endpoint, accessKeyID, accessKeySecret)
-+ client, err := oss.New(endpoint, accessKeyId, accessKeySecret)
- c.Assert(err, IsNil)
-
- bucket, err := client.Bucket(bucketName)
-@@ -228,7 +228,7 @@ func (s *OssutilCommandSuite) configNonInteractive(c *C) {
- var args []string
- options := OptionMapType{
- "endpoint": &endpoint,
-- "accessKeyID": &accessKeyID,
-+ "accessKeyId": &accessKeyId,
- "accessKeySecret": &accessKeySecret,
- "configFile": &configFile,
- }
-@@ -241,7 +241,7 @@ func (s *OssutilCommandSuite) configNonInteractive(c *C) {
- c.Assert(len(opts), Equals, 4)
- c.Assert(opts[OptionLanguage], Equals, DefaultLanguage)
- c.Assert(opts[OptionEndpoint], Equals, endpoint)
-- c.Assert(opts[OptionAccessKeyID], Equals, accessKeyID)
-+ c.Assert(opts[OptionAccessKeyId], Equals, accessKeyId)
- c.Assert(opts[OptionAccessKeySecret], Equals, accessKeySecret)
- }
-
-@@ -294,7 +294,7 @@ func (s *OssutilCommandSuite) rawList(args []string, cmdline string,
optionPairs
- limitedNum := strconv.FormatInt(-1, 10)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -363,7 +363,7 @@ func (s *OssutilCommandSuite) rawListLimitedMarker(args []string,
cmdline string
- limitedNumStr := strconv.FormatInt(limitedNum, 10)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -461,7 +461,7 @@ func (s *OssutilCommandSuite) rawRemove(args []string, recursive,
force, bucket
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -482,7 +482,7 @@ func (s *OssutilCommandSuite) removeBucketObjectVersions(bucket
string, c *C) (b
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -522,7 +522,7 @@ func (s *OssutilCommandSuite) removeWrapper(cmdline string, bucket
string, objec
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -558,7 +558,7 @@ func (s *OssutilCommandSuite) initRemove(bucket string, object
string, cmdline s
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -629,7 +629,7 @@ func (s *OssutilCommandSuite) rawPutBucketWithACL(args []string, acl
string) (bo
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -644,7 +644,7 @@ func (s *OssutilCommandSuite) rawPutBucketWithACLLanguage(args
[]string, acl, la
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -661,7 +661,7 @@ func (s *OssutilCommandSuite) putBucket(bucket string, c *C) {
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -677,7 +677,7 @@ func (s *OssutilCommandSuite) putBucketWithEndPoint(bucket string,
strEndPoint s
- str := ""
- options := OptionMapType{
- "endpoint": &strEndPoint,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -694,7 +694,7 @@ func (s *OssutilCommandSuite) putBucketVersioning(bucket string,
status string,
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -717,7 +717,7 @@ func (s *OssutilCommandSuite) initPutBucketWithStorageClass(args
[]string, stora
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -741,7 +741,7 @@ func (s *OssutilCommandSuite) rawCPWithArgs(args []string, recursive,
force, upd
- partSize := strconv.FormatInt(DefaultPartSize, 10)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -817,7 +817,7 @@ func (s *OssutilCommandSuite) rawCPWithFilter(args []string,
recursive, force, u
-
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -847,7 +847,7 @@ func (s *OssutilCommandSuite) rawCPWithOutputDir(srcURL, destURL
string, recursi
- cpDir := CheckpointDir
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -873,7 +873,7 @@ func (s *OssutilCommandSuite) rawCPWithPayer(args []string,
recursive, force, up
- cpDir := CheckpointDir
- options := OptionMapType{
- "endpoint": &payerBucketEndPoint,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -898,7 +898,7 @@ func (s *OssutilCommandSuite) initCopyCommand(srcURL, destURL string,
recursive,
- partSize := strconv.FormatInt(DefaultPartSize, 10)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -924,7 +924,7 @@ func (s *OssutilCommandSuite) initCopyWithSnapshot(srcURL, destURL
string, recur
- cpDir := CheckpointDir
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -950,7 +950,7 @@ func (s *OssutilCommandSuite) initCopyWithRange(srcURL, destURL
string, recursiv
- cpDir := CheckpointDir
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -999,7 +999,7 @@ func (s *OssutilCommandSuite) rawGetStatWithArgs(args []string)
(bool, error) {
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1070,7 +1070,7 @@ func (s *OssutilCommandSuite) rawSetACLWithArgs(args []string,
recursive, bucket
- routines := strconv.Itoa(Routines)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1090,7 +1090,7 @@ func (s *OssutilCommandSuite) rawSetAclWithFilter(args []string,
recursive, forc
-
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1112,7 +1112,7 @@ func (s *OssutilCommandSuite) initSetACL(bucket, object, acl
string, recursive,
- routines := strconv.Itoa(Routines)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1146,7 +1146,7 @@ func (s *OssutilCommandSuite) initSetACLWithArgs(args []string,
cmdline string,
- routines := strconv.Itoa(Routines)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1187,7 +1187,7 @@ func (s *OssutilCommandSuite) rawSetMetaWithArgs(args []string,
update, delete,
- routines := strconv.Itoa(Routines)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1214,7 +1214,7 @@ func (s *OssutilCommandSuite) rawSetMetaWithArgsWithPattern(args
[]string, updat
- routines := strconv.Itoa(Routines)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1237,7 +1237,7 @@ func (s *OssutilCommandSuite) rawSetMetaWithFilter(args []string,
update, delete
-
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1316,7 +1316,7 @@ func (s *OssutilCommandSuite) initSetMeta(bucket, object, meta
string, update, d
- routines := strconv.Itoa(Routines)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1362,7 +1362,7 @@ func (s *OssutilCommandSuite) initSetMetaWithArgs(args []string,
cmdline string,
- routines := strconv.Itoa(Routines)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1396,7 +1396,7 @@ func (s *OssutilCommandSuite) initCreateSymlink(cmdline string)
error {
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1441,7 +1441,7 @@ func (s *OssutilCommandSuite) initReadSymlink(cmdline string) error
{
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1465,7 +1465,7 @@ func (s *OssutilCommandSuite) initSignURL(cmdline, encodingType
string, timeout
- t := strconv.FormatInt(timeout, 10)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1536,7 +1536,7 @@ func (s *OssutilCommandSuite) initRestoreObject(args []string,
cmdline string, o
- routines := strconv.Itoa(Routines)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1740,7 +1740,7 @@ func (s *OssutilCommandSuite) TestErrOssDownloadFile(c *C) {
- partSize := strconv.FormatInt(DefaultPartSize, 10)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1807,7 +1807,7 @@ func (s *OssutilCommandSuite) TestNeedConfig(c *C) {
- e := "a"
- options := OptionMapType{
- "endpoint": &e,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &str,
-diff --git a/oss/lib/config.go b/oss/lib/config.go
-index 0d9ba431..b4a0f12c 100644
---- a/oss/lib/config.go
-+++ b/oss/lib/config.go
-@@ -66,7 +66,7 @@ var specChineseConfig = SpecText{
- 或者非法,将采用默认语言:` + DefaultLanguage + `。
- 注意:该配置项在此次config成功结束后才会生效,在执行config命令过
- 程中语言显示不会受用户的选择影响。
-- (3) endpoint, accessKeyID, accessKeySecret
-+ (3) endpoint, accessKeyId, accessKeySecret
- 回车代表着跳过相应配置项的设置。注意:endpoint应该为一个二级域
- 名(SLD),例如:` + DefaultEndpoint + `。
- 以上选项一般为必选项。
-@@ -121,7 +121,7 @@ var specChineseConfig = SpecText{
- [Credentials]
- language = CH
- endpoint = ` + DefaultEndpoint + `
-- accessKeyID = your_key_id
-+ accessKeyId = your_key_id
- accessKeySecret = your_key_secret
- stsToken = your_sts_token
- outputDir = your_output_dir
-@@ -207,7 +207,7 @@ Usage:
- default language: ` + DefaultLanguage + `.
- Notice that the configuration will go into effect after the config
- command successfully executed, it's dimmed while execute the command.
-- (3) endpoint, accessKeyID, accessKeySecret
-+ (3) endpoint, accessKeyId, accessKeySecret
- Carriage return means skip the configuration of these options.
- Note: Endpoint means a second-level domain(SLD), eg: ` + DefaultEndpoint + `.
- The three options are necessary in normal condition.
-@@ -264,7 +264,7 @@ Credential File Format:
- [Credentials]
- language = EN
- endpoint = ` + DefaultEndpoint + `
-- accessKeyID = your_key_id
-+ accessKeyId = your_key_id
- accessKeySecret = your_key_secret
- stsToken = your_sts_token
- outputDir = your_output_dir
-@@ -301,7 +301,7 @@ var configCommand = ConfigCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionOutputDir,
-diff --git a/oss/lib/config_helper.go b/oss/lib/config_helper.go
-index 4ca1c43c..a7906dfb 100644
---- a/oss/lib/config_helper.go
-+++ b/oss/lib/config_helper.go
-@@ -38,7 +38,7 @@ type configOption struct {
- var CredOptionList = []string{
- OptionLanguage,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionOutputDir,
-@@ -49,7 +49,7 @@ var CredOptionList = []string{
- var CredOptionMap = map[string]configOption{
- OptionLanguage: configOption{[]string{"language",
"Language"}, false, true, "", ""},
- OptionEndpoint: configOption{[]string{"endpoint", "host"},
true, true, "", ""},
-- OptionAccessKeyID: configOption{[]string{"accessKeyID",
"accessKeyId", "AccessKeyID", "AccessKeyId",
"access_key_id", "access_id", "accessid",
"access-key-id", "access-id"}, true, false, "",
""},
-+ OptionAccessKeyId: configOption{[]string{"accessKeyId",
"accessKeyId", "AccessKeyId", "AccessKeyId",
"access_key_id", "access_id", "accessid",
"access-key-id", "access-id"}, true, false, "",
""},
- OptionAccessKeySecret: configOption{[]string{"accessKeySecret",
"AccessKeySecret", "access_key_secret", "access_key",
"accesskey", "access-key-secret", "access-key"}, true,
false, "", ""},
- OptionSTSToken: configOption{[]string{"stsToken",
"ststoken", "STSToken", "sts_token", "sts-token"},
true, false, "", ""},
- OptionOutputDir: configOption{[]string{"outputDir",
"output-dir", "output_dir", "output_directory"}, false,
true, "ossutil生成的文件的输出目录, ", "the directory to store files generated by
ossutil, "},
-diff --git a/oss/lib/config_test.go b/oss/lib/config_test.go
-index a2524256..d2b0d36b 100644
---- a/oss/lib/config_test.go
-+++ b/oss/lib/config_test.go
-@@ -56,7 +56,7 @@ func (s *OssutilConfigSuite) TestConfigNonInteractive(c *C) {
- var args []string
- options := OptionMapType{
- "endpoint": &endpoint,
-- "accessKeyID": &accessKeyID,
-+ "accessKeyId": &accessKeyId,
- "accessKeySecret": &accessKeySecret,
- "stsToken": &stsToken,
- "configFile": &configFile,
-@@ -74,7 +74,7 @@ func (s *OssutilConfigSuite) TestConfigNonInteractive(c *C) {
- c.Assert(len(opts), Equals, 5)
- c.Assert(opts[OptionLanguage], Equals, DefaultLanguage)
- c.Assert(opts[OptionEndpoint], Equals, endpoint)
-- c.Assert(opts[OptionAccessKeyID], Equals, accessKeyID)
-+ c.Assert(opts[OptionAccessKeyId], Equals, accessKeyId)
- c.Assert(opts[OptionAccessKeySecret], Equals, accessKeySecret)
- c.Assert(opts[OptionSTSToken], Equals, stsToken)
- }
-@@ -200,7 +200,7 @@ func (s *OssutilConfigSuite) TestConfigOptionEmptyValue(c *C) {
- id := ""
- options := OptionMapType{
- "endpoint": &endp,
-- "accessKeyID": &id,
-+ "accessKeyId": &id,
- "accessKeySecret": &accessKeySecret,
- "stsToken": &stsToken,
- "configFile": &configFile,
-@@ -217,7 +217,7 @@ func (s *OssutilConfigSuite) TestConfigOptionEmptyValue(c *C) {
- c.Assert(err, IsNil)
- c.Assert(len(opts), Equals, 3)
- c.Assert(opts[OptionEndpoint], IsNil)
-- c.Assert(opts[OptionAccessKeyID], IsNil)
-+ c.Assert(opts[OptionAccessKeyId], IsNil)
- c.Assert(opts[OptionLanguage], Equals, DefaultLanguage)
- c.Assert(opts[OptionAccessKeySecret], Equals, accessKeySecret)
- c.Assert(opts[OptionSTSToken], Equals, stsToken)
-diff --git a/oss/lib/const.go b/oss/lib/const.go
-index 11e7d1f8..f3c9e27b 100644
---- a/oss/lib/const.go
-+++ b/oss/lib/const.go
-@@ -10,7 +10,7 @@ import (
- const (
- OptionConfigFile string = "configFile"
- OptionEndpoint = "endpoint"
-- OptionAccessKeyID = "accessKeyID"
-+ OptionAccessKeyId = "accessKeyId"
- OptionAccessKeySecret = "accessKeySecret"
- OptionSTSToken = "stsToken"
- OptionACL = "acl"
-diff --git a/oss/lib/cors_options.go b/oss/lib/cors_options.go
-index a0373360..15353569 100644
---- a/oss/lib/cors_options.go
-+++ b/oss/lib/cors_options.go
-@@ -79,7 +79,7 @@ var corsOptionsCommand = OptionsCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/cors_options_test.go b/oss/lib/cors_options_test.go
-index 2f3bd13e..4a58e790 100644
---- a/oss/lib/cors_options_test.go
-+++ b/oss/lib/cors_options_test.go
-@@ -36,7 +36,7 @@ func (s *OssutilCommandSuite) TestCorsOptionsSuccess(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -79,7 +79,7 @@ func (s *OssutilCommandSuite) TestCorsOptionsError(c *C) {
- strMethod := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -119,7 +119,7 @@ func (s *OssutilCommandSuite) TestCorsOptionsEmptyEndpoint(c *C) {
- strMethod := "get"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -131,7 +131,7 @@ func (s *OssutilCommandSuite) TestCorsOptionsEmptyEndpoint(c *C) {
- oldConfigStr, err := ioutil.ReadFile(configFile)
- c.Assert(err, IsNil)
- fd, _ := os.OpenFile(configFile, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0664)
-- configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyID=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
-+ configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyId=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
- fd.WriteString(configStr)
- fd.Close()
-
-diff --git a/oss/lib/cp.go b/oss/lib/cp.go
-index d16a7eec..fe76e8f4 100644
---- a/oss/lib/cp.go
-+++ b/oss/lib/cp.go
-@@ -199,7 +199,7 @@ var specChineseCopy = SpecText{
- (1)如果未进入批量文件迭代过程,错误已经发生,则不会产生report文件,ossutil会终止
- 运行,不继续迭代过程。如,用户输入cp命令出错时,不会产生report文件,而是屏幕输出错
- 误并退出。
-- (2)如果批量操作过程某文件发生的错误为:Bucket不存在、accessKeyID/accessKeySecret
-+ (2)如果批量操作过程某文件发生的错误为:Bucket不存在、accessKeyId/accessKeySecret
- 错误造成的权限验证非法等错误,ossutil会屏幕输出错误并退出。
-
- report文件名为:` + ReportPrefix + `日期_时间` + ReportSuffix + `。report文件是ossutil输出文件的一种,
-@@ -1265,7 +1265,7 @@ var copyCommand = CopyCommand{
- OptionACL,
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/cp_test.go b/oss/lib/cp_test.go
-index 5df88afc..99c4c159 100644
---- a/oss/lib/cp_test.go
-+++ b/oss/lib/cp_test.go
-@@ -578,7 +578,7 @@ func (s *OssutilCommandSuite) TestUploadErrSrc(c *C) {
- partSize := strconv.FormatInt(DefaultPartSize, 10)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1080,7 +1080,7 @@ func (s *OssutilCommandSuite) TestCPIDKey(c *C) {
- s.createFile(ufile, data, c)
-
- cfile := randStr(10)
-- data =
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s[Bucket-Cname]\n%s=%s",
"abc", "def", "ghi", bucketName, "abc",
bucketName, "abc")
-+ data =
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s[Bucket-Cname]\n%s=%s",
"abc", "def", "ghi", bucketName, "abc",
bucketName, "abc")
- s.createFile(cfile, data, c)
-
- command := "cp"
-@@ -1093,7 +1093,7 @@ func (s *OssutilCommandSuite) TestCPIDKey(c *C) {
- partSize := strconv.FormatInt(DefaultPartSize, 10)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -1108,7 +1108,7 @@ func (s *OssutilCommandSuite) TestCPIDKey(c *C) {
-
- options = OptionMapType{
- "endpoint": &endpoint,
-- "accessKeyID": &accessKeyID,
-+ "accessKeyId": &accessKeyId,
- "accessKeySecret": &accessKeySecret,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -1158,7 +1158,7 @@ func (s *OssutilCommandSuite) TestUploadOutputDir(c *C) {
- // SignatureDoesNotMatch err copy -> no outputdir
- cfile := configFile
- configFile = randStr(10)
-- data =
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s",
endpoint, accessKeyID, "abc", bucketName, endpoint)
-+ data =
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s",
endpoint, accessKeyId, "abc", bucketName, endpoint)
- s.createFile(configFile, data, c)
-
- showElapse, err = s.rawCPWithOutputDir(ufile, CloudURLToString(bucketName, object),
true, true, false, 1, dir)
-@@ -1168,7 +1168,7 @@ func (s *OssutilCommandSuite) TestUploadOutputDir(c *C) {
- c.Assert(err, NotNil)
- c.Assert(os.IsNotExist(err), Equals, true)
-
-- data =
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\n[Bucket-Cname]\n%s=%s",
endpoint, accessKeyID, accessKeySecret, bucketName, "abc")
-+ data =
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\n[Bucket-Cname]\n%s=%s",
endpoint, accessKeyId, accessKeySecret, bucketName, "abc")
- s.createFile(configFile, data, c)
-
- // err copy without -r -> no outputdir
-@@ -1262,7 +1262,7 @@ func (s *OssutilCommandSuite) TestBatchUploadOutputDir(c *C) {
- // err copy -> outputdir
- cfile := configFile
- configFile = randStr(10)
-- data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\n",
"abc", accessKeyID, accessKeySecret)
-+ data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\n",
"abc", accessKeyId, accessKeySecret)
- s.createFile(configFile, data, c)
- testResultFile, _ = os.OpenFile(resultPath, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0664)
- out := os.Stdout
-@@ -1342,7 +1342,7 @@ func (s *OssutilCommandSuite) TestDownloadOutputDir(c *C) {
- // err copy without -r -> no outputdir
- cfile := configFile
- configFile = randStr(10)
-- data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\n[Bucket-Cname]\n%s=%s",
endpoint, accessKeyID, accessKeySecret, bucketName, "abc")
-+ data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\n[Bucket-Cname]\n%s=%s",
endpoint, accessKeyId, accessKeySecret, bucketName, "abc")
- s.createFile(configFile, data, c)
-
- showElapse, err = s.rawCPWithOutputDir(CloudURLToString(bucketName, object),
downloadFileName, false, true, false, 1, dir)
-@@ -1405,7 +1405,7 @@ func (s *OssutilCommandSuite) TestCopyOutputDir(c *C) {
- // list err copy without -r -> no outputdir
- cfile := configFile
- configFile = randStr(10)
-- data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\n[Bucket-Cname]\n%s=%s",
endpoint, accessKeyID, accessKeySecret, srcBucket, "abc")
-+ data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\n[Bucket-Cname]\n%s=%s",
endpoint, accessKeyId, accessKeySecret, srcBucket, "abc")
- s.createFile(configFile, data, c)
- showElapse, err = s.rawCPWithOutputDir(CloudURLToString(srcBucket, object),
CloudURLToString(destBucket, object), false, true, false, 1, dir)
- c.Assert(err, NotNil)
-@@ -1471,7 +1471,7 @@ func (s *OssutilCommandSuite) TestBatchCopyOutputDir(c *C) {
- // test objectStatistic err
- cfile := configFile
- configFile = randStr(10)
-- data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s[Bucket-Cname]\n%s=%s",
"abc", "def", "ghi", srcBucket, "abc", srcBucket,
"abc")
-+ data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s[Bucket-Cname]\n%s=%s",
"abc", "def", "ghi", srcBucket, "abc", srcBucket,
"abc")
- s.createFile(configFile, data, c)
-
- showElapse, err = s.rawCPWithOutputDir(CloudURLToString(srcBucket, ""),
CloudURLToString(destBucket, ""), true, true, false, 1, dir)
-@@ -1508,7 +1508,7 @@ func (s *OssutilCommandSuite) TestConfigOutputDir(c *C) {
- // err copy -> outputdir
- cfile := configFile
- configFile = randStr(10)
-- data =
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\n[Bucket-Cname]\n%s=%s",
endpoint, accessKeyID, accessKeySecret, bucketName, "abc")
-+ data =
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\n[Bucket-Cname]\n%s=%s",
endpoint, accessKeyId, accessKeySecret, bucketName, "abc")
- s.createFile(configFile, data, c)
-
- showElapse, err := s.rawCPWithOutputDir(ufile, CloudURLToString(bucketName, object),
true, true, false, 1, edir)
-@@ -1525,7 +1525,7 @@ func (s *OssutilCommandSuite) TestConfigOutputDir(c *C) {
- os.RemoveAll(DefaultOutputDir)
-
- // config outputdir
-- data =
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\noutputDir=%s\n[Bucket-Endpoint]\n%s=%s[Bucket-Cname]\n%s=%s",
endpoint, accessKeyID, accessKeySecret, dir, bucketName, endpoint, bucketName,
"abc")
-+ data =
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\noutputDir=%s\n[Bucket-Endpoint]\n%s=%s[Bucket-Cname]\n%s=%s",
endpoint, accessKeyId, accessKeySecret, dir, bucketName, endpoint, bucketName,
"abc")
- s.createFile(configFile, data, c)
-
- showElapse, err = s.rawCPWithOutputDir(ufile, CloudURLToString(bucketName, object),
true, true, false, 1, "")
-@@ -1663,7 +1663,7 @@ func (s *OssutilCommandSuite) TestCPURLEncoding(c *C) {
- ok := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -3205,7 +3205,7 @@ func (s *OssutilCommandSuite) TestCPObjectLimitSpeed(c *C) {
- routines := strconv.Itoa(Routines)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -3267,7 +3267,7 @@ func (s *OssutilCommandSuite) TestCPDirLimitSpeed(c *C) {
- recursive := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -3355,7 +3355,7 @@ func (s *OssutilCommandSuite) TestCPPartionDownloadSuccess(c *C) {
- routines := strconv.Itoa(Routines)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &ConfigFile,
- "checkpointDir": &cpDir,
-@@ -3414,7 +3414,7 @@ func (s *OssutilCommandSuite)
TestCPPartitionDownloadParameterError(c *C) {
- routines := strconv.Itoa(Routines)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &ConfigFile,
- "checkpointDir": &cpDir,
-@@ -3491,7 +3491,7 @@ func (s *OssutilCommandSuite) TestCPDownloadSnapshot(c *C) {
- recursive := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -3563,7 +3563,7 @@ func (s *OssutilCommandSuite) TestCPVersioingParameterError(c *C)
{
- versionId := "123"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -3611,7 +3611,7 @@ func (s *OssutilCommandSuite) TestCPVersioingDownloadSuccess(c *C)
{
- routines := strconv.Itoa(Routines)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -3663,7 +3663,7 @@ func (s *OssutilCommandSuite) TestCPVersioingCopySuccess(c *C) {
- routines := strconv.Itoa(Routines)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -3712,7 +3712,7 @@ func (s *OssutilCommandSuite) TestCPWithAuthProxy(c *C) {
- routines := strconv.Itoa(Routines)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &ConfigFile,
- "checkpointDir": &cpDir,
-@@ -3753,7 +3753,7 @@ func (s *OssutilCommandSuite) TestCPWithAuthProxyError(c *C) {
- routines := strconv.Itoa(Routines)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &ConfigFile,
- "checkpointDir": &cpDir,
-@@ -3803,7 +3803,7 @@ func (s *OssutilCommandSuite) TestCPSetLocalAddrSuccess(c *C) {
- routines := strconv.Itoa(Routines)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -3852,7 +3852,7 @@ func (s *OssutilCommandSuite) TestCPSetLocalAddrError(c *C) {
- routines := strconv.Itoa(Routines)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -3904,7 +3904,7 @@ func (s *OssutilCommandSuite) TestUploadSymlinkDir(c *C) {
- recursive := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -3971,7 +3971,7 @@ func (s *OssutilCommandSuite) TestUploadSubSymlinkDir(c *C) {
- enableSymlinkDir := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -4043,7 +4043,7 @@ func (s *OssutilCommandSuite) TestUploadOnlyCurrentDir(c *C) {
- onlyCurrentDir := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -4110,7 +4110,7 @@ func (s *OssutilCommandSuite) TestDownloadOnlyCurrentDir(c *C) {
- onlyCurrentDir := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -4194,7 +4194,7 @@ func (s *OssutilCommandSuite) TestUploadDisableDirObject(c *C) {
- disableDirObject := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -4263,7 +4263,7 @@ func (s *OssutilCommandSuite)
TestCPObjectProgressBarNetErrorRetry(c *C) {
- strRetryTimes := "3"
- options := OptionMapType{
- "endpoint": &mockHost,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -4307,7 +4307,7 @@ func (s *OssutilCommandSuite)
TestUploadWithDisableAllSymlinkDirFailure(c *C) {
-
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -4367,7 +4367,7 @@ func (s *OssutilCommandSuite)
TestUploadWithDisableAllSymlinkDirSuccess(c *C) {
- disableAllSymlink := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -4439,7 +4439,7 @@ func (s *OssutilCommandSuite)
TestUploadSymlinkFileProgressPrecise(c *C) {
- disableAllSymlink := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -4503,7 +4503,7 @@ func (s *OssutilCommandSuite)
TestDownLoadWithoutDisableIgnoreError(c *C) {
- recursive := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -4582,7 +4582,7 @@ func (s *OssutilCommandSuite) TestDownLoadWithDisableIgnoreError(c
*C) {
- disableIgnoreError := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -4637,7 +4637,7 @@ func (s *OssutilCommandSuite) TestCpWithTaggingError(c *C) {
- tagging := "tagA=A&&tagb=B"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -4688,7 +4688,7 @@ func (s *OssutilCommandSuite) TestUploadFileWithTagging(c *C) {
- tagging := "tagA=A&tagb=B&tagc=C"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -4726,7 +4726,7 @@ func (s *OssutilCommandSuite) TestCopyFileWithoutTagging(c *C) {
- tagging := "tagA=A&tagb=B&tagc=C"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -4779,7 +4779,7 @@ func (s *OssutilCommandSuite) TestCopyFileWithTagging(c *C) {
- tagging := "tagA=A&tagb=B&tagc=C"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-@@ -4828,7 +4828,7 @@ func (s *OssutilCommandSuite) TestUploadMultiFileFileWithTagging(c
*C) {
- tagging := "tagA=A&tagb=B&tagc=C"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "checkpointDir": &cpDir,
-diff --git a/oss/lib/create_symlink.go b/oss/lib/create_symlink.go
-index b40371d2..4722cb52 100644
---- a/oss/lib/create_symlink.go
-+++ b/oss/lib/create_symlink.go
-@@ -108,7 +108,7 @@ var createSymlinkCommand = CreateSymlinkCommand{
- OptionEncodingType,
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/du.go b/oss/lib/du.go
-index 6b230090..e8068467 100644
---- a/oss/lib/du.go
-+++ b/oss/lib/du.go
-@@ -109,7 +109,7 @@ var duSizeCommand = DuCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/du_test.go b/oss/lib/du_test.go
-index c6065fa8..f40592e3 100644
---- a/oss/lib/du_test.go
-+++ b/oss/lib/du_test.go
-@@ -47,7 +47,7 @@ func (s *OssutilCommandSuite) TestDuObjectSize(c *C) {
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &ConfigFile,
- }
-@@ -104,7 +104,7 @@ func (s *OssutilCommandSuite) TestDuPartSize(c *C) {
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &ConfigFile,
- }
-@@ -150,7 +150,7 @@ func (s *OssutilCommandSuite) TestDuObjectAndPartSize(c *C) {
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &ConfigFile,
- }
-@@ -189,7 +189,7 @@ func (s *OssutilCommandSuite) TestDuPayerObject(c *C) {
- requester := "requester"
- options := OptionMapType{
- "endpoint": &payerBucketEndPoint,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &ConfigFile,
-@@ -216,7 +216,7 @@ func (s *OssutilCommandSuite) TestDuPayerErrorObject(c *C) {
- requester := "requester_test"
- options := OptionMapType{
- "endpoint": &payerBucketEndPoint,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &ConfigFile,
-@@ -235,7 +235,7 @@ func (s *OssutilCommandSuite) TestDuPayerErrorObject(c *C) {
-
- func (s *OssutilCommandSuite) TestDuPayerPart(c *C) {
- bucketName := payerBucket
-- client, err := oss.New(payerBucketEndPoint, accessKeyID, accessKeySecret)
-+ client, err := oss.New(payerBucketEndPoint, accessKeyId, accessKeySecret)
- bucket, err := client.Bucket(bucketName)
-
- content_len := 100
-@@ -256,7 +256,7 @@ func (s *OssutilCommandSuite) TestDuPayerPart(c *C) {
- requester := "requester"
- options := OptionMapType{
- "endpoint": &payerBucketEndPoint,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &ConfigFile,
-@@ -297,7 +297,7 @@ func (s *OssutilCommandSuite) TestDuVersionsObjectAndStorageClass(c
*C) {
- strMethod := "put"
- versionsOptions := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -339,7 +339,7 @@ func (s *OssutilCommandSuite) TestDuVersionsObjectAndStorageClass(c
*C) {
- command := "du"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &ConfigFile,
- "allVersions": &allVersions,
-diff --git a/oss/lib/ecs_role_test.go b/oss/lib/ecs_role_test.go
-index 666ba1dd..1b5a6747 100644
---- a/oss/lib/ecs_role_test.go
-+++ b/oss/lib/ecs_role_test.go
-@@ -20,15 +20,15 @@ const (
- func StsHttpHandlerOk(w http.ResponseWriter, r *http.Request) {
- akJson := &STSAkJson{}
-
-- if accessKeyID == "" {
-- accessKeyID = os.Getenv("OSS_TEST_ACCESS_KEY_ID")
-+ if accessKeyId == "" {
-+ accessKeyId = os.Getenv("OSS_TEST_ACCESS_KEY_ID")
- }
-
- if accessKeySecret == "" {
- accessKeySecret = os.Getenv("OSS_TEST_ACCESS_KEY_SECRET")
- }
-
-- akJson.AccessKeyId = accessKeyID
-+ akJson.AccessKeyId = accessKeyId
- akJson.AccessKeySecret = accessKeySecret
- akJson.SecurityToken = ""
- nowLocalTime := time.Now()
-@@ -78,7 +78,7 @@ func startHttpServer(handler func(http.ResponseWriter, *http.Request))
*http.Ser
- }
-
- func (s *OssutilCommandSuite) TestEcsRoleSuccess(c *C) {
-- accessKeyID = ""
-+ accessKeyId = ""
- accessKeySecret = ""
- stsToken = ""
-
-@@ -112,14 +112,14 @@ func (s *OssutilCommandSuite) TestEcsRoleAkTimeout(c *C) {
- time.Sleep(time.Duration(1) * time.Second)
-
- ecsRole := EcsRoleAKBuild{url:
"http://127.0.0.1:32915/latest/meta-data/Ram/security-credentials/EcsRamRoleTesting"}
-- strKeyId1 := ecsRole.GetCredentials().GetAccessKeyID()
-+ strKeyId1 := ecsRole.GetCredentials().GetAccessKeyId()
- c.Assert(strKeyId1 == "", Equals, false)
- Expiration1 := ecsRole.Expiration
-
- // wait Ak timeout
- time.Sleep(time.Duration(1+TestEcsTimeout) * time.Second)
-
-- strKeyId2 := ecsRole.GetCredentials().GetAccessKeyID()
-+ strKeyId2 := ecsRole.GetCredentials().GetAccessKeyId()
- c.Assert(strKeyId2 == "", Equals, false)
- Expiration2 := ecsRole.Expiration
-
-@@ -131,7 +131,7 @@ func (s *OssutilCommandSuite) TestEcsRoleAkTimeout(c *C) {
- }
-
- func (s *OssutilCommandSuite) TestEcsRoleNotHttpServerError(c *C) {
-- accessKeyID = ""
-+ accessKeyId = ""
- accessKeySecret = ""
- stsToken = ""
-
-@@ -153,7 +153,7 @@ func (s *OssutilCommandSuite) TestEcsRoleNotHttpServerError(c *C) {
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -166,7 +166,7 @@ func (s *OssutilCommandSuite) TestEcsRoleNotHttpServerError(c *C) {
- }
-
- func (s *OssutilCommandSuite) TestEcsRoleAkEmptyError(c *C) {
-- accessKeyID = ""
-+ accessKeyId = ""
- accessKeySecret = ""
- stsToken = ""
-
-@@ -191,7 +191,7 @@ func (s *OssutilCommandSuite) TestEcsRoleAkEmptyError(c *C) {
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -205,7 +205,7 @@ func (s *OssutilCommandSuite) TestEcsRoleAkEmptyError(c *C) {
- }
-
- func (s *OssutilCommandSuite) TestEcsRoleCodeError(c *C) {
-- accessKeyID = ""
-+ accessKeyId = ""
- accessKeySecret = ""
- stsToken = ""
-
-@@ -230,7 +230,7 @@ func (s *OssutilCommandSuite) TestEcsRoleCodeError(c *C) {
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -244,7 +244,7 @@ func (s *OssutilCommandSuite) TestEcsRoleCodeError(c *C) {
- }
-
- func (s *OssutilCommandSuite) TestEcsRoleJsonError(c *C) {
-- accessKeyID = ""
-+ accessKeyId = ""
- accessKeySecret = ""
- stsToken = ""
-
-@@ -269,7 +269,7 @@ func (s *OssutilCommandSuite) TestEcsRoleJsonError(c *C) {
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-diff --git a/oss/lib/listpart.go b/oss/lib/listpart.go
-index b435f207..4c3f30d6 100644
---- a/oss/lib/listpart.go
-+++ b/oss/lib/listpart.go
-@@ -86,7 +86,7 @@ var listPartCommand = ListPartCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/listpart_test.go b/oss/lib/listpart_test.go
-index 2434bc29..63b7c53e 100644
---- a/oss/lib/listpart_test.go
-+++ b/oss/lib/listpart_test.go
-@@ -32,7 +32,7 @@ func (s *OssutilCommandSuite) TestListPartSuccess(c *C) {
- defer fd.Close()
-
- // begin upload part
-- client, err := oss.New(endpoint, accessKeyID, accessKeySecret)
-+ client, err := oss.New(endpoint, accessKeyId, accessKeySecret)
- c.Assert(err, IsNil)
-
- bucket, err := client.Bucket(bucketName)
-@@ -55,7 +55,7 @@ func (s *OssutilCommandSuite) TestListPartSuccess(c *C) {
- var str string
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -106,7 +106,7 @@ func (s *OssutilCommandSuite) TestListPartError(c *C) {
- var str string
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -148,7 +148,7 @@ func (s *OssutilCommandSuite) TestListPartClientError(c *C) {
- var str string
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -159,7 +159,7 @@ func (s *OssutilCommandSuite) TestListPartClientError(c *C) {
- c.Assert(err, IsNil)
-
- fd, _ := os.OpenFile(configFile, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0664)
-- configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyID=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
-+ configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyId=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
- fd.WriteString(configStr)
- fd.Close()
-
-diff --git a/oss/lib/ls.go b/oss/lib/ls.go
-index ca115af1..2b651708 100644
---- a/oss/lib/ls.go
-+++ b/oss/lib/ls.go
-@@ -379,7 +379,7 @@ var listCommand = ListCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/ls_test.go b/oss/lib/ls_test.go
-index fac6c8bf..b4199ae4 100644
---- a/oss/lib/ls_test.go
-+++ b/oss/lib/ls_test.go
-@@ -21,7 +21,7 @@ func (s *OssutilCommandSuite) TestListLoadConfig(c *C) {
- limitedNum := strconv.FormatInt(-1, 10)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -34,7 +34,7 @@ func (s *OssutilCommandSuite) TestListLoadConfig(c *C) {
- args = []string{"oss://"}
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -53,7 +53,7 @@ func (s *OssutilCommandSuite) TestListNotExistConfigFile(c *C) {
- limitedNum := strconv.FormatInt(-1, 10)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -74,7 +74,7 @@ func (s *OssutilCommandSuite) TestListErrConfigFile(c *C) {
- limitedNum := strconv.FormatInt(-1, 10)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -89,7 +89,7 @@ func (s *OssutilCommandSuite) TestListErrConfigFile(c *C) {
-
- func (s *OssutilCommandSuite) TestListConfigFile(c *C) {
- cfile := randStr(10)
-- data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\nretryTimes=%s",
endpoint, accessKeyID, accessKeySecret, "errretry")
-+ data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\nretryTimes=%s",
endpoint, accessKeyId, accessKeySecret, "errretry")
- s.createFile(cfile, data, c)
-
- command := "ls"
-@@ -98,7 +98,7 @@ func (s *OssutilCommandSuite) TestListConfigFile(c *C) {
- limitedNum := strconv.FormatInt(-1, 10)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -115,7 +115,7 @@ func (s *OssutilCommandSuite) TestListWithBucketEndpoint(c *C) {
- bucketName := bucketNameExist
-
- cfile := randStr(10)
-- data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s",
"abc", accessKeyID, accessKeySecret, bucketName, endpoint)
-+ data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s",
"abc", accessKeyId, accessKeySecret, bucketName, endpoint)
- s.createFile(cfile, data, c)
-
- command := "ls"
-@@ -124,7 +124,7 @@ func (s *OssutilCommandSuite) TestListWithBucketEndpoint(c *C) {
- limitedNum := strconv.FormatInt(-1, 10)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -142,7 +142,7 @@ func (s *OssutilCommandSuite) TestListWithBucketCname(c *C) {
- s.putBucket(bucketName, c)
-
- cfile := randStr(10)
-- data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s\n[Bucket-Cname]\n%s=%s",
"abc", accessKeyID, accessKeySecret, bucketName, "abc", bucketName,
bucketName+"."+endpoint)
-+ data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s\n[Bucket-Cname]\n%s=%s",
"abc", accessKeyId, accessKeySecret, bucketName, "abc", bucketName,
bucketName+"."+endpoint)
- s.createFile(cfile, data, c)
-
- command := "ls"
-@@ -151,7 +151,7 @@ func (s *OssutilCommandSuite) TestListWithBucketCname(c *C) {
- limitedNum := strconv.FormatInt(-1, 10)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -174,7 +174,7 @@ func (s *OssutilCommandSuite) TestListObjectsBucketNotExist(c *C) {
- limitedNum := strconv.FormatInt(-1, 10)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -298,7 +298,7 @@ func (s *OssutilCommandSuite) TestListIDKey(c *C) {
- s.putBucket(bucketName, c)
-
- cfile := randStr(10)
-- data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s[Bucket-Cname]\n%s=%s",
"abc", "def", "ghi", bucketName, "abc",
bucketName, "abc")
-+ data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s[Bucket-Cname]\n%s=%s",
"abc", "def", "ghi", bucketName, "abc",
bucketName, "abc")
- s.createFile(cfile, data, c)
-
- command := "ls"
-@@ -307,7 +307,7 @@ func (s *OssutilCommandSuite) TestListIDKey(c *C) {
- limitedNum := strconv.FormatInt(-1, 10)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -318,7 +318,7 @@ func (s *OssutilCommandSuite) TestListIDKey(c *C) {
-
- options = OptionMapType{
- "endpoint": &endpoint,
-- "accessKeyID": &accessKeyID,
-+ "accessKeyId": &accessKeyId,
- "accessKeySecret": &accessKeySecret,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -337,7 +337,7 @@ func (s *OssutilCommandSuite) TestListBucketIDKey(c *C) {
- bucketName := bucketNameExist
-
- cfile := randStr(10)
-- data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s[Bucket-Cname]\n%s=%s",
"abc", "def", "ghi", bucketName, "abc",
bucketName, "abc")
-+ data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s[Bucket-Cname]\n%s=%s",
"abc", "def", "ghi", bucketName, "abc",
bucketName, "abc")
- s.createFile(cfile, data, c)
-
- command := "ls"
-@@ -346,7 +346,7 @@ func (s *OssutilCommandSuite) TestListBucketIDKey(c *C) {
- limitedNum := strconv.FormatInt(-1, 10)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -357,7 +357,7 @@ func (s *OssutilCommandSuite) TestListBucketIDKey(c *C) {
-
- options = OptionMapType{
- "endpoint": &endpoint,
-- "accessKeyID": &accessKeyID,
-+ "accessKeyId": &accessKeyId,
- "accessKeySecret": &accessKeySecret,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -373,7 +373,7 @@ func (s *OssutilCommandSuite) TestListBucketIDKey(c *C) {
- // list without config file
- options = OptionMapType{
- "endpoint": &endpoint,
-- "accessKeyID": &accessKeyID,
-+ "accessKeyId": &accessKeyId,
- "accessKeySecret": &accessKeySecret,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -396,7 +396,7 @@ func (s *OssutilCommandSuite) TestListMultipartUploads(c *C) {
- limitedNum := strconv.FormatInt(-1, 10)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -466,7 +466,7 @@ func (s *OssutilCommandSuite) TestListMultipartUploadsError(c *C) {
- s.putBucket(bucketName, c)
-
- cfile := randStr(10)
-- data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s",
endpoint, "abc", accessKeySecret)
-+ data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s",
endpoint, "abc", accessKeySecret)
- s.createFile(cfile, data, c)
-
- command := "ls"
-@@ -476,7 +476,7 @@ func (s *OssutilCommandSuite) TestListMultipartUploadsError(c *C) {
- ok := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -735,7 +735,7 @@ func (s *OssutilCommandSuite) TestListObjectfilterInclude(c *C) {
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "limitedNum": &limitedNum,
-@@ -801,7 +801,7 @@ func (s *OssutilCommandSuite) TestListObjectfilterExclude(c *C) {
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "limitedNum": &limitedNum,
-@@ -886,7 +886,7 @@ func (s *OssutilCommandSuite) TestListDirectoryfilterInclude(c *C) {
- bDirectory := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "limitedNum": &limitedNum,
-@@ -968,7 +968,7 @@ func (s *OssutilCommandSuite) TestListDirectoryfilterExclude(c *C) {
- bDirectory := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "limitedNum": &limitedNum,
-@@ -1033,7 +1033,7 @@ func (s *OssutilCommandSuite) TestListPartfilterInclude(c *C) {
- bPart := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "limitedNum": &limitedNum,
-@@ -1089,7 +1089,7 @@ func (s *OssutilCommandSuite) TestListPartfilterExclude(c *C) {
- bPart := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "limitedNum": &limitedNum,
-@@ -1154,7 +1154,7 @@ func (s *OssutilCommandSuite) TestListObjectVersionsNormal(c *C) {
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "allVersions": &allVersions,
-@@ -1196,7 +1196,7 @@ func (s *OssutilCommandSuite) TestListObjectVersionsNormal(c *C) {
- force := true
- deleteOptions := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1251,7 +1251,7 @@ func (s *OssutilCommandSuite) TestListObjectVersionsMarker(c *C) {
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "allVersions": &allVersions,
-@@ -1352,7 +1352,7 @@ func (s *OssutilCommandSuite) TestListObjectfilterIncludeVersions(c
*C) {
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "limitedNum": &limitedNum,
-@@ -1445,7 +1445,7 @@ func (s *OssutilCommandSuite)
TestListDirectoryfilterIncludeVersions(c *C) {
- allVersions := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "limitedNum": &limitedNum,
-diff --git a/oss/lib/mb.go b/oss/lib/mb.go
-index 111254c8..161fcf62 100644
---- a/oss/lib/mb.go
-+++ b/oss/lib/mb.go
-@@ -153,7 +153,7 @@ var makeBucketCommand = MakeBucketCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/mb_test.go b/oss/lib/mb_test.go
-index f8fc7afa..0d82127e 100644
---- a/oss/lib/mb_test.go
-+++ b/oss/lib/mb_test.go
-@@ -41,7 +41,7 @@ func (s *OssutilCommandSuite) TestMakeBucketErrorName(c *C) {
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -80,7 +80,7 @@ func (s *OssutilCommandSuite) TestMakeBucketErrorOption(c *C) {
- ok := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -106,7 +106,7 @@ func (s *OssutilCommandSuite) TestMakeBucketIDKey(c *C) {
- bucketName := bucketNamePrefix + randLowStr(10)
-
- cfile := randStr(10)
-- data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s",
"abc", "def", "ghi", bucketName, "abc")
-+ data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s",
"abc", "def", "ghi", bucketName, "abc")
- s.createFile(cfile, data, c)
-
- command := "mb"
-@@ -114,7 +114,7 @@ func (s *OssutilCommandSuite) TestMakeBucketIDKey(c *C) {
- args := []string{CloudURLToString(bucketName, "")}
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -124,7 +124,7 @@ func (s *OssutilCommandSuite) TestMakeBucketIDKey(c *C) {
-
- options = OptionMapType{
- "endpoint": &endpoint,
-- "accessKeyID": &accessKeyID,
-+ "accessKeyId": &accessKeyId,
- "accessKeySecret": &accessKeySecret,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -186,7 +186,7 @@ func (s *OssutilCommandSuite) TestMbCreateBucketWithRedundancy(c *C)
{
- strRedundancy := "ZRS"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-diff --git a/oss/lib/mkdir.go b/oss/lib/mkdir.go
-index 100bdd47..4da059d3 100644
---- a/oss/lib/mkdir.go
-+++ b/oss/lib/mkdir.go
-@@ -72,7 +72,7 @@ var mkdirCommand = MkdirCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/mkdir_test.go b/oss/lib/mkdir_test.go
-index d0d0ca1d..775ae5d1 100644
---- a/oss/lib/mkdir_test.go
-+++ b/oss/lib/mkdir_test.go
-@@ -10,7 +10,7 @@ import (
-
- func (s *OssutilCommandSuite) TestMkdirAll(c *C) {
- // create bucket
-- client, err := oss.New(endpoint, accessKeyID, accessKeySecret)
-+ client, err := oss.New(endpoint, accessKeyId, accessKeySecret)
- c.Assert(err, IsNil)
-
- bucketName := bucketNamePrefix + randLowStr(12)
-@@ -24,7 +24,7 @@ func (s *OssutilCommandSuite) TestMkdirAll(c *C) {
- var str string
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -91,7 +91,7 @@ func (s *OssutilCommandSuite) TestMkdirAllEncodingError(c *C) {
- strEncode := "url"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-diff --git a/oss/lib/monitor_test.go b/oss/lib/monitor_test.go
-index 5d671110..3456d1c3 100644
---- a/oss/lib/monitor_test.go
-+++ b/oss/lib/monitor_test.go
-@@ -301,7 +301,7 @@ func (s *OssutilCommandSuite) TestProgressBarStatisticErr(c *C) {
-
- cfile := configFile
- configFile = randStr(10)
-- data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s[Bucket-Cname]\n%s=%s",
"abc", "def", "ghi", bucketName, "abc",
bucketName, "abc")
-+ data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s[Bucket-Cname]\n%s=%s",
"abc", "def", "ghi", bucketName, "abc",
bucketName, "abc")
- s.createFile(configFile, data, c)
-
- err := s.initCopyCommand(CloudURLToString(bucketName, ""), downloadDir, true,
true, false, DefaultBigFileThreshold, CheckpointDir, DefaultOutputDir)
-@@ -372,7 +372,7 @@ func (s *OssutilCommandSuite) TestProgressBarContinueErr(c *C) {
-
- cfile := configFile
- configFile = randStr(10)
-- data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\n",
"abc", accessKeyID, accessKeySecret)
-+ data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\n",
"abc", accessKeyId, accessKeySecret)
- s.createFile(configFile, data, c)
-
- err = s.initCopyCommand(udir, CloudURLToString(bucketName, ""), true, true,
false, DefaultBigFileThreshold, CheckpointDir, DefaultOutputDir)
-@@ -670,7 +670,7 @@ func (s *OssutilCommandSuite) TestSetACLProgress(c *C) {
- // batch set acl list error
- cfile := configFile
- configFile = randStr(10)
-- data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\n",
endpoint, accessKeyID, "")
-+ data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\n",
endpoint, accessKeyId, "")
- s.createFile(configFile, data, c)
-
- err = s.initSetACL(bucketName, "TestSetACLProgress", "private",
true, false, true)
-@@ -787,7 +787,7 @@ func (s *OssutilCommandSuite) TestSetMetaProgress(c *C) {
- // batch set acl list error
- cfile := configFile
- configFile = randStr(10)
-- data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\n",
endpoint, accessKeyID, "")
-+ data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\n",
endpoint, accessKeyId, "")
- s.createFile(configFile, data, c)
-
- err = s.initSetMeta(bucketName, prefix,
"x-oss-object-acl:default#X-Oss-Meta-A:A", true, false, true, true,
DefaultLanguage)
-diff --git a/oss/lib/object_tagging.go b/oss/lib/object_tagging.go
-index 8c5eb270..826bee6d 100644
---- a/oss/lib/object_tagging.go
-+++ b/oss/lib/object_tagging.go
-@@ -131,7 +131,7 @@ var objectTagCommand = ObjectTagCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/object_tagging_test.go b/oss/lib/object_tagging_test.go
-index ad720a06..cbb1e2c6 100644
---- a/oss/lib/object_tagging_test.go
-+++ b/oss/lib/object_tagging_test.go
-@@ -23,7 +23,7 @@ func (s *OssutilCommandSuite) TestObjectTaggingSingleOperation(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -106,7 +106,7 @@ func (s *OssutilCommandSuite) TestObjectTaggingBatchOperation(c *C)
{
- routines := strconv.Itoa(Routines)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -198,7 +198,7 @@ func (s *OssutilCommandSuite) TestObjectTaggingVersionId(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -278,7 +278,7 @@ func (s *OssutilCommandSuite) TestObjectTaggingError(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -352,7 +352,7 @@ func (s *OssutilCommandSuite) TestObjectTaggingPayer(c *C) {
- requester := "requester"
- options := OptionMapType{
- "endpoint": &payerBucketEndPoint,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-diff --git a/oss/lib/option.go b/oss/lib/option.go
-index 7e801ffc..b1caa260 100644
---- a/oss/lib/option.go
-+++ b/oss/lib/option.go
-@@ -42,7 +42,7 @@ var OptionMap = map[string]Option{
- OptionEndpoint: Option{"-e", "--endpoint", "",
OptionTypeString, "", "",
- fmt.Sprintf("ossutil工具的基本endpoint配置(该选项值会覆盖配置文件中的相应设置),注意其必须为一个二级域名。"),
- fmt.Sprintf("Base endpoint for oss endpoint(Notice that the value of the option
will cover the value in config file). Take notice that it should be second-level
domain(SLD).")},
-- OptionAccessKeyID: Option{"-i", "--access-key-id",
"", OptionTypeString, "", "",
"访问oss使用的AccessKeyID(该选项值会覆盖配置文件中的相应设置)。", "AccessKeyID while access
oss(Notice that the value of the option will cover the value in config file)."},
-+ OptionAccessKeyId: Option{"-i", "--access-key-id",
"", OptionTypeString, "", "",
"访问oss使用的AccessKeyId(该选项值会覆盖配置文件中的相应设置)。", "AccessKeyId while access
oss(Notice that the value of the option will cover the value in config file)."},
- OptionAccessKeySecret: Option{"-k", "--access-key-secret",
"", OptionTypeString, "", "",
"访问oss使用的AccessKeySecret(该选项值会覆盖配置文件中的相应设置)。", "AccessKeySecret while
access oss(Notice that the value of the option will cover the value in config
file)."},
- OptionSTSToken: Option{"-t", "--sts-token", "",
OptionTypeString, "", "",
"访问oss使用的STSToken(该选项值会覆盖配置文件中的相应设置),非必须设置项。", "STSToken while access
oss(Notice that the value of the option will cover the value in config file), not
necessary."},
- OptionLimitedNum: Option{"", "--limited-num",
strconv.Itoa(DefaultLimitedNum), OptionTypeInt64, strconv.FormatInt(MinLimitedNum, 10),
"", "返回结果的最大个数。", "the limited number of return results."},
-diff --git a/oss/lib/probe.go b/oss/lib/probe.go
-index f00bc1c3..791760be 100644
---- a/oss/lib/probe.go
-+++ b/oss/lib/probe.go
-@@ -336,7 +336,7 @@ var probeCommand = ProbeCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/probe_test.go b/oss/lib/probe_test.go
-index 7e2b5120..ec3cc0b1 100644
---- a/oss/lib/probe_test.go
-+++ b/oss/lib/probe_test.go
-@@ -138,7 +138,7 @@ func (s *OssutilCommandSuite) probeDownloadWithParameter(c *C, object
string, do
- }
-
- tempStr := ""
-- options[OptionAccessKeyID] = &tempStr
-+ options[OptionAccessKeyId] = &tempStr
- options[OptionAccessKeySecret] = &tempStr
- options[OptionEndpoint] = &tempStr
-
-@@ -209,7 +209,7 @@ func (s *OssutilCommandSuite) probeUploadObject(c *C, object string,
uploadFileN
- }
-
- tempStr := ""
-- options[OptionAccessKeyID] = &tempStr
-+ options[OptionAccessKeyId] = &tempStr
- options[OptionAccessKeySecret] = &tempStr
- options[OptionEndpoint] = &tempStr
-
-@@ -369,7 +369,7 @@ func (s *OssutilCommandSuite) TestProbeUploadObjectBucketInvalid(c
*C) {
- }
-
- tempStr := ""
-- options[OptionAccessKeyID] = &tempStr
-+ options[OptionAccessKeyId] = &tempStr
- options[OptionAccessKeySecret] = &tempStr
- options[OptionEndpoint] = &tempStr
-
-@@ -566,7 +566,7 @@ func (s *OssutilCommandSuite) TestProbeUploadObjectRepeat(c *C) {
- }
-
- tempStr := ""
-- options[OptionAccessKeyID] = &tempStr
-+ options[OptionAccessKeyId] = &tempStr
- options[OptionAccessKeySecret] = &tempStr
- options[OptionEndpoint] = &tempStr
-
-@@ -740,7 +740,7 @@ func (s *OssutilCommandSuite) TestProbeUploadBandWidth(c *C) {
- str := ""
- options := OptionMapType{
- OptionEndpoint: &str,
-- OptionAccessKeyID: &str,
-+ OptionAccessKeyId: &str,
- OptionAccessKeySecret: &str,
- OptionConfigFile: &configFile,
- OptionBucketName: &bucketName,
-@@ -767,7 +767,7 @@ func (s *OssutilCommandSuite) TestProbeDownloadBandWidthSuccess(c *C)
{
- str := ""
- options := OptionMapType{
- OptionEndpoint: &str,
-- OptionAccessKeyID: &str,
-+ OptionAccessKeyId: &str,
- OptionAccessKeySecret: &str,
- OptionConfigFile: &configFile,
- OptionObject: &objectName,
-@@ -793,7 +793,7 @@ func (s *OssutilCommandSuite) TestProbeDownloadBandWidthError(c *C)
{
- str := ""
- options := OptionMapType{
- OptionEndpoint: &str,
-- OptionAccessKeyID: &str,
-+ OptionAccessKeyId: &str,
- OptionAccessKeySecret: &str,
- OptionConfigFile: &configFile,
- OptionObject: &objectName,
-@@ -831,7 +831,7 @@ func (s *OssutilCommandSuite) TestProbeItemNotSupported(c *C) {
- str := ""
- options := OptionMapType{
- OptionEndpoint: &str,
-- OptionAccessKeyID: &str,
-+ OptionAccessKeyId: &str,
- OptionAccessKeySecret: &str,
- OptionConfigFile: &configFile,
- OptionObject: &objectName,
-diff --git a/oss/lib/read_symlink.go b/oss/lib/read_symlink.go
-index 49d0a886..a5810b2c 100644
---- a/oss/lib/read_symlink.go
-+++ b/oss/lib/read_symlink.go
-@@ -105,7 +105,7 @@ var readSymlinkCommand = ReadSymlinkCommand{
- OptionEncodingType,
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/request_payment.go b/oss/lib/request_payment.go
-index a764ebba..8da1b7d8 100644
---- a/oss/lib/request_payment.go
-+++ b/oss/lib/request_payment.go
-@@ -98,7 +98,7 @@ var requestPaymentCommand = RequestPaymentCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/request_payment_test.go b/oss/lib/request_payment_test.go
-index 608044b2..2f547cc9 100644
---- a/oss/lib/request_payment_test.go
-+++ b/oss/lib/request_payment_test.go
-@@ -16,7 +16,7 @@ func (s *OssutilCommandSuite) TestRequestPaymentPutSuccess(c *C) {
- strMethod := "get"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -65,7 +65,7 @@ func (s *OssutilCommandSuite) TestRequestPaymentError(c *C) {
- var str string
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -105,7 +105,7 @@ func (s *OssutilCommandSuite) TestRequestPaymentPutEmptyEndpoint(c
*C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -117,7 +117,7 @@ func (s *OssutilCommandSuite) TestRequestPaymentPutEmptyEndpoint(c
*C) {
- oldConfigStr, err := ioutil.ReadFile(configFile)
- c.Assert(err, IsNil)
- fd, _ := os.OpenFile(configFile, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0664)
-- configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyID=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
-+ configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyId=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
- fd.WriteString(configStr)
- fd.Close()
-
-@@ -139,7 +139,7 @@ func (s *OssutilCommandSuite) TestRequestPaymentGetEmptyEndpoint(c
*C) {
- strMethod := "get"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -151,7 +151,7 @@ func (s *OssutilCommandSuite) TestRequestPaymentGetEmptyEndpoint(c
*C) {
- oldConfigStr, err := ioutil.ReadFile(configFile)
- c.Assert(err, IsNil)
- fd, _ := os.OpenFile(configFile, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0664)
-- configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyID=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
-+ configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyId=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
- fd.WriteString(configStr)
- fd.Close()
-
-diff --git a/oss/lib/restore.go b/oss/lib/restore.go
-index 9bb99eaa..655a312e 100644
---- a/oss/lib/restore.go
-+++ b/oss/lib/restore.go
-@@ -146,7 +146,7 @@ var restoreCommand = RestoreCommand{
- OptionEncodingType,
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/restore_test.go b/oss/lib/restore_test.go
-index 335803fd..58cd430d 100644
---- a/oss/lib/restore_test.go
-+++ b/oss/lib/restore_test.go
-@@ -405,7 +405,7 @@ func (s *OssutilCommandSuite) TestRestoreObjectWithPayerError400(c
*C) {
- requester := "requester"
- options := OptionMapType{
- "endpoint": &payerBucketEndPoint,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-diff --git a/oss/lib/rm.go b/oss/lib/rm.go
-index 4d4db948..ea0b37b2 100644
---- a/oss/lib/rm.go
-+++ b/oss/lib/rm.go
-@@ -309,7 +309,7 @@ var removeCommand = RemoveCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/rm_test.go b/oss/lib/rm_test.go
-index 8b25317e..01b0c82f 100644
---- a/oss/lib/rm_test.go
-+++ b/oss/lib/rm_test.go
-@@ -54,7 +54,7 @@ func (s *OssutilCommandSuite) TestRemoveObjects(c *C) {
- ok := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -95,12 +95,12 @@ func (s *OssutilCommandSuite) TestRemoveObjects(c *C) {
-
- // error remove bucket with config
- cfile := randStr(10)
-- data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s[Bucket-Cname]\n%s=%s",
"abc", "def", "ghi", bucketName, "abc",
bucketName, "abc")
-+ data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s[Bucket-Cname]\n%s=%s",
"abc", "def", "ghi", bucketName, "abc",
bucketName, "abc")
- s.createFile(cfile, data, c)
-
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -114,7 +114,7 @@ func (s *OssutilCommandSuite) TestRemoveObjects(c *C) {
-
- options = OptionMapType{
- "endpoint": &endpoint,
-- "accessKeyID": &accessKeyID,
-+ "accessKeyId": &accessKeyId,
- "accessKeySecret": &accessKeySecret,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -147,7 +147,7 @@ func (s *OssutilCommandSuite) TestRemoveObjectBucketOption(c *C) {
- ok := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -432,7 +432,7 @@ func (s *OssutilCommandSuite) TestRmObjectfilter(c *C) {
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "limitedNum": &limitedNum,
-@@ -462,7 +462,7 @@ func (s *OssutilCommandSuite) TestRmObjectfilter(c *C) {
- bForce := true
- rmOptions := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "recursive": &bRecusive,
-@@ -528,7 +528,7 @@ func (s *OssutilCommandSuite) TestRmPartfilter(c *C) {
- bPart := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "limitedNum": &limitedNum,
-@@ -582,7 +582,7 @@ func (s *OssutilCommandSuite) TestRmPartfilterExclude(c *C) {
- bPart := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "limitedNum": &limitedNum,
-@@ -614,7 +614,7 @@ func (s *OssutilCommandSuite) TestRmPartfilterExclude(c *C) {
- bMultiPart := true
- rmOptions := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "recursive": &bRecusive,
-@@ -669,7 +669,7 @@ func (s *OssutilCommandSuite) TestRmSpecialCharacterKey(c *C) {
- encodingType := "url"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -740,7 +740,7 @@ func (s *OssutilCommandSuite) TestRemoveObjectsInVersioningBucket(c
*C) {
- ok := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -781,12 +781,12 @@ func (s *OssutilCommandSuite) TestRemoveObjectsInVersioningBucket(c
*C) {
-
- // error remove bucket with config
- cfile := randStr(10)
-- data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s[Bucket-Cname]\n%s=%s",
"abc", "def", "ghi", bucketName, "abc",
bucketName, "abc")
-+ data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s[Bucket-Cname]\n%s=%s",
"abc", "def", "ghi", bucketName, "abc",
bucketName, "abc")
- s.createFile(cfile, data, c)
-
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -800,7 +800,7 @@ func (s *OssutilCommandSuite) TestRemoveObjectsInVersioningBucket(c
*C) {
-
- options = OptionMapType{
- "endpoint": &endpoint,
-- "accessKeyID": &accessKeyID,
-+ "accessKeyId": &accessKeyId,
- "accessKeySecret": &accessKeySecret,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -842,7 +842,7 @@ func (s *OssutilCommandSuite) TestRemoveObjectWithVersionId(c *C) {
- ok := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -859,7 +859,7 @@ func (s *OssutilCommandSuite) TestRemoveObjectWithVersionId(c *C) {
- args = []string{CloudURLToString(bucketName, "")}
- options = OptionMapType{
- "endpoint": &endpoint,
-- "accessKeyID": &accessKeyID,
-+ "accessKeyId": &accessKeyId,
- "accessKeySecret": &accessKeySecret,
- "stsToken": &str,
- "configFile": &str,
-@@ -900,7 +900,7 @@ func (s *OssutilCommandSuite) TestRemoveObjectWithAllVersion(c *C) {
- ok := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -918,7 +918,7 @@ func (s *OssutilCommandSuite) TestRemoveObjectWithAllVersion(c *C) {
- args = []string{CloudURLToString(bucketName, objectName)}
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -934,7 +934,7 @@ func (s *OssutilCommandSuite) TestRemoveObjectWithAllVersion(c *C) {
- args = []string{CloudURLToString(bucketName, "")}
- options = OptionMapType{
- "endpoint": &endpoint,
-- "accessKeyID": &accessKeyID,
-+ "accessKeyId": &accessKeyId,
- "accessKeySecret": &accessKeySecret,
- "stsToken": &str,
- "configFile": &str,
-@@ -974,7 +974,7 @@ func (s *OssutilCommandSuite) TestRmObjectfilterVersioning(c *C) {
- allVersions := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "limitedNum": &limitedNum,
-@@ -1005,7 +1005,7 @@ func (s *OssutilCommandSuite) TestRmObjectfilterVersioning(c *C) {
- bForce := true
- rmOptions := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "recursive": &bRecusive,
-@@ -1064,7 +1064,7 @@ func (s *OssutilCommandSuite) TestRmObjectWithPayer(c *C) {
- requester := "requester"
- rmOptions := OptionMapType{
- "endpoint": &payerBucketEndPoint,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "force": &bForce,
-@@ -1097,7 +1097,7 @@ func (s *OssutilCommandSuite) TestRmBatchObjectWithPayer(c *C) {
- requester := "requester"
- rmOptions := OptionMapType{
- "endpoint": &payerBucketEndPoint,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "force": &bForce,
-@@ -1113,7 +1113,7 @@ func (s *OssutilCommandSuite) TestRmBatchObjectWithPayer(c *C) {
-
- func (s *OssutilCommandSuite) TestRmBatchPartsWithPayer(c *C) {
- bucketName := payerBucket
-- client, err := oss.New(payerBucketEndPoint, accessKeyID, accessKeySecret)
-+ client, err := oss.New(payerBucketEndPoint, accessKeyId, accessKeySecret)
- bucket, err := client.Bucket(bucketName)
-
- content_len := 100
-@@ -1137,7 +1137,7 @@ func (s *OssutilCommandSuite) TestRmBatchPartsWithPayer(c *C) {
- requester := "requester"
- rmOptions := OptionMapType{
- "endpoint": &payerBucketEndPoint,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "configFile": &configFile,
- "force": &bForce,
-diff --git a/oss/lib/set_acl.go b/oss/lib/set_acl.go
-index f0558899..51e82339 100644
---- a/oss/lib/set_acl.go
-+++ b/oss/lib/set_acl.go
-@@ -237,7 +237,7 @@ var setACLCommand = SetACLCommand{
- OptionInclude,
- OptionExclude,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/set_acl_test.go b/oss/lib/set_acl_test.go
-index 5b00b735..f72bb429 100644
---- a/oss/lib/set_acl_test.go
-+++ b/oss/lib/set_acl_test.go
-@@ -205,7 +205,7 @@ func (s *OssutilCommandSuite) TestErrBatchSetACL(c *C) {
- ok := true
- options := OptionMapType{
- "endpoint": &str1,
-- "accessKeyID": &str1,
-+ "accessKeyId": &str1,
- "accessKeySecret": &str1,
- "stsToken": &str,
- "routines": &routines,
-@@ -229,7 +229,7 @@ func (s *OssutilCommandSuite) TestSetACLIDKey(c *C) {
- s.putBucket(bucketName, c)
-
- cfile := randStr(10)
-- data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s[Bucket-Cname]\n%s=%s",
"abc", "def", "ghi", bucketName, "abc",
bucketName, "abc")
-+ data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s[Bucket-Cname]\n%s=%s",
"abc", "def", "ghi", bucketName, "abc",
bucketName, "abc")
- s.createFile(cfile, data, c)
-
- command := "set-acl"
-@@ -239,7 +239,7 @@ func (s *OssutilCommandSuite) TestSetACLIDKey(c *C) {
- ok := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -252,7 +252,7 @@ func (s *OssutilCommandSuite) TestSetACLIDKey(c *C) {
-
- options = OptionMapType{
- "endpoint": &endpoint,
-- "accessKeyID": &accessKeyID,
-+ "accessKeyId": &accessKeyId,
- "accessKeySecret": &accessKeySecret,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -290,7 +290,7 @@ func (s *OssutilCommandSuite) TestSetACLURLEncoding(c *C) {
- encodingType := URLEncodingType
- options := OptionMapType{
- "endpoint": &endpoint,
-- "accessKeyID": &accessKeyID,
-+ "accessKeyId": &accessKeyId,
- "accessKeySecret": &accessKeySecret,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1233,7 +1233,7 @@ func (s *OssutilCommandSuite) TestSetObjectAclWithVersion(c *C) {
- var str string
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1274,7 +1274,7 @@ func (s *OssutilCommandSuite)
TestSetObjectAclWithInvalidVersionArgs(c *C) {
- flag := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1287,7 +1287,7 @@ func (s *OssutilCommandSuite)
TestSetObjectAclWithInvalidVersionArgs(c *C) {
-
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-diff --git a/oss/lib/set_meta.go b/oss/lib/set_meta.go
-index f24d9792..1a36de1b 100644
---- a/oss/lib/set_meta.go
-+++ b/oss/lib/set_meta.go
-@@ -283,7 +283,7 @@ var setMetaCommand = SetMetaCommand{
- OptionExclude,
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/set_meta_test.go b/oss/lib/set_meta_test.go
-index b9980018..cc5fdcf0 100644
---- a/oss/lib/set_meta_test.go
-+++ b/oss/lib/set_meta_test.go
-@@ -187,7 +187,7 @@ func (s *OssutilCommandSuite) TestErrBatchSetMeta(c *C) {
- routines := strconv.Itoa(Routines)
- options := OptionMapType{
- "endpoint": &str1,
-- "accessKeyID": &str1,
-+ "accessKeyId": &str1,
- "accessKeySecret": &str1,
- "stsToken": &str,
- "update": &ok,
-@@ -280,7 +280,7 @@ func (s *OssutilCommandSuite) TestSetMetaIDKey(c *C) {
- s.putObject(bucketName, object, uploadFileName, c)
-
- cfile := randStr(10)
-- data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s[Bucket-Cname]\n%s=%s",
"abc", "def", "ghi", bucketName, "abc",
bucketName, "abc")
-+ data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s[Bucket-Cname]\n%s=%s",
"abc", "def", "ghi", bucketName, "abc",
bucketName, "abc")
- s.createFile(cfile, data, c)
-
- command := "set-meta"
-@@ -290,7 +290,7 @@ func (s *OssutilCommandSuite) TestSetMetaIDKey(c *C) {
- routines := strconv.Itoa(Routines)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -303,7 +303,7 @@ func (s *OssutilCommandSuite) TestSetMetaIDKey(c *C) {
-
- options = OptionMapType{
- "endpoint": &endpoint,
-- "accessKeyID": &accessKeyID,
-+ "accessKeyId": &accessKeyId,
- "accessKeySecret": &accessKeySecret,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -341,7 +341,7 @@ func (s *OssutilCommandSuite) TestSetMetaURLEncoding(c *C) {
- encodingType := URLEncodingType
- options := OptionMapType{
- "endpoint": &endpoint,
-- "accessKeyID": &accessKeyID,
-+ "accessKeyId": &accessKeyId,
- "accessKeySecret": &accessKeySecret,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1495,7 +1495,7 @@ func (s *OssutilCommandSuite) TestSetObjectMetaWithVersion(c *C) {
- update := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1526,7 +1526,7 @@ func (s *OssutilCommandSuite)
TestSetObjectMetaWithInvalidVersionArgs(c *C) {
- flag := true
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -1539,7 +1539,7 @@ func (s *OssutilCommandSuite)
TestSetObjectMetaWithInvalidVersionArgs(c *C) {
-
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-diff --git a/oss/lib/signurl.go b/oss/lib/signurl.go
-index 3fcaacf9..acdd3e6d 100644
---- a/oss/lib/signurl.go
-+++ b/oss/lib/signurl.go
-@@ -120,7 +120,7 @@ var signURLCommand = SignurlCommand{
- OptionEncodingType,
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionLogLevel,
-diff --git a/oss/lib/signurl_test.go b/oss/lib/signurl_test.go
-index 64bd0c71..ecefd872 100644
---- a/oss/lib/signurl_test.go
-+++ b/oss/lib/signurl_test.go
-@@ -282,7 +282,7 @@ func (s *OssutilCommandSuite) TestSignurlWithVersion(c *C) {
- args := []string{CloudURLToString(bucketName, objectName)}
- options := OptionMapType{
- "endpoint": &str1,
-- "accessKeyID": &str1,
-+ "accessKeyId": &str1,
- "accessKeySecret": &str1,
- "stsToken": &str1,
- "configFile": &configFile,
-@@ -331,7 +331,7 @@ func (s *OssutilCommandSuite) TestSignUrlTraficLimit(c *C) {
- timeOut := strconv.FormatInt(60, 10)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -383,7 +383,7 @@ func (s *OssutilCommandSuite) TestSignUrlWithDisableEncodePathUrl(c
*C) {
- timeOut := strconv.FormatInt(60, 10)
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -438,7 +438,7 @@ func (s *OssutilCommandSuite) TestSignUrlWithRequestPayer(c *C) {
- timeOut := strconv.FormatInt(60, 10)
- options := OptionMapType{
- "endpoint": &payerBucketEndPoint,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-diff --git a/oss/lib/stat.go b/oss/lib/stat.go
-index ff04d895..b36c8477 100644
---- a/oss/lib/stat.go
-+++ b/oss/lib/stat.go
-@@ -102,7 +102,7 @@ var statCommand = StatCommand{
- OptionEncodingType,
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/stat_test.go b/oss/lib/stat_test.go
-index 463f384a..4bfd340a 100644
---- a/oss/lib/stat_test.go
-+++ b/oss/lib/stat_test.go
-@@ -20,7 +20,7 @@ func (s *OssutilCommandSuite) TestStatErrArgc(c *C) {
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -85,7 +85,7 @@ func (s *OssutilCommandSuite) TestGetStatRetryTimes(c *C) {
- retryTimes := "1"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -113,7 +113,7 @@ func (s *OssutilCommandSuite) TestStatIDKey(c *C) {
- s.putBucket(bucketName, c)
-
- cfile := randStr(10)
-- data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyID=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s[Bucket-Cname]\n%s=%s",
"abc", "def", "ghi", bucketName, "abc",
bucketName, "abc")
-+ data :=
fmt.Sprintf("[Credentials]\nendpoint=%s\naccessKeyId=%s\naccessKeySecret=%s\n[Bucket-Endpoint]\n%s=%s[Bucket-Cname]\n%s=%s",
"abc", "def", "ghi", bucketName, "abc",
bucketName, "abc")
- s.createFile(cfile, data, c)
-
- command := "stat"
-@@ -122,7 +122,7 @@ func (s *OssutilCommandSuite) TestStatIDKey(c *C) {
- retryTimes := "1"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -133,7 +133,7 @@ func (s *OssutilCommandSuite) TestStatIDKey(c *C) {
-
- options = OptionMapType{
- "endpoint": &endpoint,
-- "accessKeyID": &accessKeyID,
-+ "accessKeyId": &accessKeyId,
- "accessKeySecret": &accessKeySecret,
- "stsToken": &str,
- "configFile": &cfile,
-@@ -167,7 +167,7 @@ func (s *OssutilCommandSuite) TestStatURLEncoding(c *C) {
- encodingType := URLEncodingType
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -228,7 +228,7 @@ func (s *OssutilCommandSuite) TestStatVersioning(c *C) {
- encodingType := URLEncodingType
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -271,7 +271,7 @@ func (s *OssutilCommandSuite) TestStatObjectWithPayer(c *C) {
- requester := "requester"
- options := OptionMapType{
- "endpoint": &payerBucketEndPoint,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-diff --git a/oss/lib/symlink_test.go b/oss/lib/symlink_test.go
-index 2b33d6a2..3a58e331 100644
---- a/oss/lib/symlink_test.go
-+++ b/oss/lib/symlink_test.go
-@@ -252,7 +252,7 @@ func (s *OssutilCommandSuite) TestSymlinkVersioning(c *C) {
- str := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &ConfigFile,
-@@ -301,7 +301,7 @@ func (s *OssutilCommandSuite) TestSymlinkWithPayer(c *C) {
- requester := "requester"
- options := OptionMapType{
- "endpoint": &payerBucketEndPoint,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-diff --git a/oss/lib/user_qos.go b/oss/lib/user_qos.go
-index 0c43ad6f..b90a0aac 100644
---- a/oss/lib/user_qos.go
-+++ b/oss/lib/user_qos.go
-@@ -76,7 +76,7 @@ var userQosCommand = UserQosCommand{
- validOptionNames: []string{
- OptionConfigFile,
- OptionEndpoint,
-- OptionAccessKeyID,
-+ OptionAccessKeyId,
- OptionAccessKeySecret,
- OptionSTSToken,
- OptionProxyHost,
-diff --git a/oss/lib/user_qos_test.go b/oss/lib/user_qos_test.go
-index 99746b7e..c8a7e562 100644
---- a/oss/lib/user_qos_test.go
-+++ b/oss/lib/user_qos_test.go
-@@ -16,7 +16,7 @@ func (s *OssutilCommandSuite) TestUserQosGetError(c *C) {
- strMethod := ""
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -44,7 +44,7 @@ func (s *OssutilCommandSuite) TestUserQosOptionsEmptyEndpoint(c *C) {
- strMethod := "get"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -56,7 +56,7 @@ func (s *OssutilCommandSuite) TestUserQosOptionsEmptyEndpoint(c *C) {
- oldConfigStr, err := ioutil.ReadFile(configFile)
- c.Assert(err, IsNil)
- fd, _ := os.OpenFile(configFile, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0664)
-- configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyID=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
-+ configStr := "[Credentials]" + "\n" + "language=CH" +
"\n" + "accessKeyId=123" + "\n" +
"accessKeySecret=456" + "\n" + "endpoint="
- fd.WriteString(configStr)
- fd.Close()
-
-@@ -79,7 +79,7 @@ func (s *OssutilCommandSuite) TestUserQosGetConfirm(c *C) {
- strMethod := "put"
- options := OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
-@@ -95,7 +95,7 @@ func (s *OssutilCommandSuite) TestUserQosGetConfirm(c *C) {
- strMethod = "get"
- options = OptionMapType{
- "endpoint": &str,
-- "accessKeyID": &str,
-+ "accessKeyId": &str,
- "accessKeySecret": &str,
- "stsToken": &str,
- "configFile": &configFile,
diff --git a/golang-github-aliyun-cli.spec b/golang-github-aliyun-cli.spec
index f6bd9e7..205216d 100644
--- a/golang-github-aliyun-cli.spec
+++ b/golang-github-aliyun-cli.spec
@@ -6,12 +6,12 @@
#
https://github.com/aliyun/aliyun-cli
%global goipath0
github.com/aliyun/aliyun-cli
-Version: 3.0.73
+Version: 3.0.74
#
https://github.com/aliyun/aliyun-openapi-meta
%global goipath1
github.com/aliyun/aliyun-openapi-meta
%global version1 0
-%global commit1 1e468f0cf8af08594022c94d3d6ff2ba40c574dd
+%global commit1 95a090031d4d5b4dd8d2d29104f33769b3ea66b4
%gometa -a
@@ -23,9 +23,10 @@ Version: 3.0.73
%global common_description %{expand:
Alibaba Cloud (Aliyun) CLI.}
-%global golicenses0 LICENSE
+%global golicenses0 LICENSE LICENSE-oss
%global godocs0 CHANGELOG.md README-CN.md README.md README-bin.md\\\
- README-cli.md README-CN-oss.md README-oss.md
+ README-cli.md README-CN-oss.md README-oss.md\\\
+ CHANGELOG-oss.md
%global golicenses1 LICENSE
%global godocs1 README-openapi-meta.md
@@ -34,20 +35,18 @@ Name: %{goname}
Release: 1%{?dist}
Summary: %{godevelsummary0}
-# Upstream license specification: Apache-2.0
-License: ASL 2.0
+# Upstream license specification: Apache-2.0 and MIT
+License: ASL 2.0 and MIT
URL: %{gourl}
Source0: %{gosource0}
Source1: %{gosource1}
-#
https://github.com/aliyun/aliyun-cli/pull/300
-Patch0: aliyun-cli-credentials-config.patch
-
#
https://bugzilla.redhat.com/show_bug.cgi?id=1866529
#
https://github.com/aliyun/aliyun-cli/issues/303
ExcludeArch: armv7hl # (Bug rhbz#1866529)
BuildRequires: golang-github-shulhan-bindata
+BuildRequires:
golang(github.com/alibabacloud-go/tea/tea)
BuildRequires:
golang(github.com/aliyun/alibaba-cloud-sdk-go/sdk)
BuildRequires:
golang(github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials)
BuildRequires:
golang(github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints)
@@ -61,6 +60,7 @@ BuildRequires:
golang(github.com/droundy/goopt)
BuildRequires:
golang(github.com/jmespath/go-jmespath)
BuildRequires:
golang(github.com/posener/complete)
BuildRequires:
golang(github.com/syndtr/goleveldb/leveldb)
+BuildRequires:
golang(golang.org/x/crypto/ssh/terminal)
BuildRequires: golang(gopkg.in/ini.v1)
BuildRequires: golang(gopkg.in/yaml.v2)
BuildRequires: help2man
@@ -82,11 +82,12 @@ BuildRequires: zsh
%prep
%goprep -a
cd %{gosourcedir}
-%patch0 -p1
mv bin/README.md README-bin.md
mv cli/README.md README-cli.md
mv oss/README.md README-oss.md
mv oss/README-CN.md README-CN-oss.md
+mv oss/LICENSE LICENSE-oss
+mv oss/CHANGELOG.md CHANGELOG-oss.md
mv %{_builddir}/%{extractdir1}/README.md
%{_builddir}/%{extractdir1}/README-openapi-meta.md
rm %{gobuilddir}/src/%{goipath0} %{gobuilddir}/src/%{goipath1}
ln -fs %{_builddir}/%{extractdir1} %{_builddir}/aliyun-openapi-meta
@@ -116,8 +117,8 @@ cp -Trv /etc/skel %{getenv:HOME}
%endif
%files
-%license ../%{extractdir0}/LICENSE
-%doc ../%{extractdir0}/CHANGELOG.md
+%license ../%{extractdir0}/LICENSE ../%{extractdir0}/LICENSE-oss
+%doc ../%{extractdir0}/CHANGELOG.md ../%{extractdir0}/CHANGELOG-oss.md
%doc ../%{extractdir0}/README-CN.md ../%{extractdir0}/README.md
%doc ../%{extractdir0}/README-bin.md ../%{extractdir0}/README-cli.md
%doc ../%{extractdir0}/README-CN-oss.md ../%{extractdir0}/README-oss.md
@@ -128,6 +129,17 @@ cp -Trv /etc/skel %{getenv:HOME}
%gopkgfiles
%changelog
+* Mon May 03 2021 Brandon Perkins <bperkins(a)redhat.com> - 3.0.74-1
+- Update to version 3.0.74 (Fixes rhbz#1955892)
+- Update to aliyun-openapi-meta to commit
+ 95a090031d4d5b4dd8d2d29104f33769b3ea66b4
+- Addition of oss LICENSE and CHANGELOG
+- Addition of MIT upstream license
+- Removal of patch for building against credentials-go-1.1.0
+
https://github.com/aliyun/aliyun-cli/pull/300
+- Addition of alibabacloud-go/tea/tea and
+
golang.org/x/crypto/ssh/terminal BuildRequires
+
* Mon Feb 22 2021 Brandon Perkins <bperkins(a)redhat.com> - 3.0.73-1
- Update to version 3.0.73 (Fixes rhbz#1930798)
- Update to aliyun-openapi-meta to commit
diff --git a/sources b/sources
index b8f7312..647b174 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (aliyun-cli-3.0.73.tar.gz) =
4c1b4f88fef19d7d94a05b3c58be837eeefb8a6d935fe35f7861fd74828a62aef20c2fd90f71550dbcfe48f23bc667cd3e54de6fd99ac2074eb1539765d1d039
-SHA512 (aliyun-openapi-meta-1e468f0cf8af08594022c94d3d6ff2ba40c574dd.tar.gz) =
deffacd4b3a0815087b347258e9e63532b461544045b2125a8667f9c6ea749079dd4fb3e359e58b3c1492881a6508aba50bb52da6a1aaa0a9422b38028e68681
+SHA512 (aliyun-cli-3.0.74.tar.gz) =
2fcae76bfbb60291541e74a47979273e5dd9f3f8afd41f08ed25afdcc545e9824854e5a0d575d0a41b9f57535677c80a35e183c0769e9e4f95a8c426104560a1
+SHA512 (aliyun-openapi-meta-95a090031d4d5b4dd8d2d29104f33769b3ea66b4.tar.gz) =
cbc35d73276043a74613e7b39fc5ca7be5022ce97259840e5046561d80efa9a08dc2ac2de434ac11cf34f6555570d13deacbbc9641b7b30a1fada4fe4263f416