From ad9e6c3d7ef129ea2d684c6e6c807de232f40ea1 Mon Sep 17 00:00:00 2001 From: wzj Date: Tue, 28 Feb 2017 16:36:26 +0800 Subject: [PATCH 1/7] remove add volume api --- kirksdk/qcos_api.go | 8 ++++---- kirksdk/qcos_client.go | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kirksdk/qcos_api.go b/kirksdk/qcos_api.go index f8c1669..db216a5 100644 --- a/kirksdk/qcos_api.go +++ b/kirksdk/qcos_api.go @@ -114,12 +114,12 @@ type QcosClient interface { // POST /v3/stacks//services//volumes // Async // Deprecated - CreateServiceVolume(ctx context.Context, stackName string, - serviceName string, args CreateServiceVolumeArgs) (err error) + //CreateServiceVolume(ctx context.Context, stackName string, + //serviceName string, args CreateServiceVolumeArgs) (err error) // Sync // Deprecated - SyncCreateServiceVolume(ctx context.Context, stackName string, - serviceName string, args CreateServiceVolumeArgs) (err error) + //SyncCreateServiceVolume(ctx context.Context, stackName string, + //serviceName string, args CreateServiceVolumeArgs) (err error) // POST /v3/stacks//services//volumes//extend // Async diff --git a/kirksdk/qcos_client.go b/kirksdk/qcos_client.go index ce46e39..f43ae36 100644 --- a/kirksdk/qcos_client.go +++ b/kirksdk/qcos_client.go @@ -81,7 +81,7 @@ func (p *qcosClientImp) ListStacks(ctx context.Context) (ret []StackInfo, err er } // POST /v3/stacks -func (p *qcosClientImp) CreateStack( +/*func (p *qcosClientImp) CreateStack( ctx context.Context, args CreateStackArgs) (err error) { url := fmt.Sprintf("%s/v3/stacks", p.host) @@ -100,7 +100,7 @@ func (p *qcosClientImp) SyncCreateStack( return } return -} +}*/ // POST /v3/stacks/ func (p *qcosClientImp) UpdateStack(ctx context.Context, stackName string, From d8dffdcab2286f55709b838d96b6749ce7f12353 Mon Sep 17 00:00:00 2001 From: Ru5her Date: Tue, 28 Feb 2017 16:37:46 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dkirk=20sdk=20logs=20tail?= =?UTF-8?q?=20conn=3D=3Dnil=20=E6=97=B6=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kirksdk/qcos_client.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kirksdk/qcos_client.go b/kirksdk/qcos_client.go index ce46e39..219c98c 100644 --- a/kirksdk/qcos_client.go +++ b/kirksdk/qcos_client.go @@ -881,14 +881,18 @@ func (p *qcosClientImp) GetContainerLogsRealtime(ctx context.Context, ip, since, if !isSSL { conn, err = net.DialTimeout("tcp", host, 10*time.Second) if err != nil { - conn.Close() + if conn != nil { + conn.Close() + } err = fmt.Errorf("net.DialTimeout err: %v", err) return } } else { conn, err = tls.DialWithDialer(&net.Dialer{Timeout: 10 * time.Second}, "tcp", host, nil) if err != nil { - conn.Close() + if conn != nil { + conn.Close() + } err = fmt.Errorf("tls.DialWithDialer err: %v", err) return } From 76fad1fcf3c59234361532484fb73a4429335c72 Mon Sep 17 00:00:00 2001 From: wzj Date: Tue, 28 Feb 2017 16:38:59 +0800 Subject: [PATCH 3/7] remove add volume api --- kirksdk/qcos_client.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kirksdk/qcos_client.go b/kirksdk/qcos_client.go index f43ae36..1d43317 100644 --- a/kirksdk/qcos_client.go +++ b/kirksdk/qcos_client.go @@ -81,7 +81,7 @@ func (p *qcosClientImp) ListStacks(ctx context.Context) (ret []StackInfo, err er } // POST /v3/stacks -/*func (p *qcosClientImp) CreateStack( +func (p *qcosClientImp) CreateStack( ctx context.Context, args CreateStackArgs) (err error) { url := fmt.Sprintf("%s/v3/stacks", p.host) @@ -100,7 +100,7 @@ func (p *qcosClientImp) SyncCreateStack( return } return -}*/ +} // POST /v3/stacks/ func (p *qcosClientImp) UpdateStack(ctx context.Context, stackName string, @@ -414,7 +414,7 @@ func (p *qcosClientImp) DeleteService(ctx context.Context, stackName string, ser } // POST /v3/stacks//services//volumes -func (p *qcosClientImp) CreateServiceVolume(ctx context.Context, stackName string, +/*func (p *qcosClientImp) CreateServiceVolume(ctx context.Context, stackName string, serviceName string, args CreateServiceVolumeArgs) (err error) { if stackName == "" { @@ -437,7 +437,7 @@ func (p *qcosClientImp) SyncCreateServiceVolume(ctx context.Context, stackName s return } return -} +}*/ // POST /v3/stacks//services//volumes//extend func (p *qcosClientImp) ExtendServiceVolume(ctx context.Context, stackName string, From ed3c1ba483533cfc104ac393ba7a935b2cc1b394 Mon Sep 17 00:00:00 2001 From: wzj Date: Tue, 28 Feb 2017 16:41:37 +0800 Subject: [PATCH 4/7] add changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index adda0b8..9f4cf88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ # vNext +- 下线CreateServiceVolume/SyncCreateServiceVolume接口 # Release 2.4.0 - 新增app配额查询接口 From 1d7181fd1a05b40ab38d654a28fb8075cfc1d9c4 Mon Sep 17 00:00:00 2001 From: Ru5her Date: Tue, 28 Feb 2017 16:50:42 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index adda0b8..3383ad6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ # vNext +- 修复GetContainerLogsRealtime连接错误导致panic的bug # Release 2.4.0 - 新增app配额查询接口 From a19a399b5e3b3d04d26bfe2f14ef685ca19ee5f9 Mon Sep 17 00:00:00 2001 From: Yi Tao Date: Wed, 22 Feb 2017 20:21:17 +0800 Subject: [PATCH 6/7] QCOS-3182 sdk add ap enabled --- CHANGELOG.md | 1 + kirksdk/qcos_api.go | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index adda0b8..8c9d9ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ # vNext +- AP详情添加enabled字段,表示这个AP是否已被管理员禁用 # Release 2.4.0 - 新增app配额查询接口 diff --git a/kirksdk/qcos_api.go b/kirksdk/qcos_api.go index f8c1669..7927055 100644 --- a/kirksdk/qcos_api.go +++ b/kirksdk/qcos_api.go @@ -668,6 +668,7 @@ type FullApInfo struct { Provider string `json:"provider"` Bandwidth int `json:"bandwidthMbps"` Traffic int `json:"trafficBytes"` + Enabled bool `json:"enabled"` UserDomains []string `json:"userDomains,omitempty"` Host string `json:"host,omitempty"` UnitType string `json:"unitType,omitempty"` From 9fa74907e84b1d5c2db806b764d3c2f5407abdbc Mon Sep 17 00:00:00 2001 From: nowenl Date: Fri, 3 Mar 2017 17:27:52 +0800 Subject: [PATCH 7/7] QCOS-3856 Prepare for Release 3.0.0 --- CHANGELOG.md | 2 ++ kirksdk/kirksdk.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a1a187..19f6ad7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ # vNext + +# Release 3.0.0 - AP详情添加enabled字段,表示这个AP是否已被管理员禁用 - 修复GetContainerLogsRealtime连接错误导致panic的bug - 下线CreateServiceVolume/SyncCreateServiceVolume接口 diff --git a/kirksdk/kirksdk.go b/kirksdk/kirksdk.go index 6d935f5..bca5a1e 100644 --- a/kirksdk/kirksdk.go +++ b/kirksdk/kirksdk.go @@ -1,3 +1,3 @@ package kirksdk -const Version = "2.4.0" +const Version = "3.0.0"