Skip to content

Commit

Permalink
Merge pull request #88 from qiniu/develop
Browse files Browse the repository at this point in the history
QCOS-3856 Merge develop into master for Release 3.0.0
  • Loading branch information
nowenL authored Mar 3, 2017
2 parents 74d939c + 112adf4 commit ba9fb4c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# vNext

# Release 3.0.0
- AP详情添加enabled字段,表示这个AP是否已被管理员禁用
- 修复GetContainerLogsRealtime连接错误导致panic的bug
- 下线CreateServiceVolume/SyncCreateServiceVolume接口

# Release 2.4.0
- 新增app配额查询接口
- 新增 app spec 申请接口
Expand Down
2 changes: 1 addition & 1 deletion kirksdk/kirksdk.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package kirksdk

const Version = "2.4.0"
const Version = "3.0.0"
9 changes: 5 additions & 4 deletions kirksdk/qcos_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ type QcosClient interface {
// POST /v3/stacks/<stackName>/services/<serviceName>/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/<stackName>/services/<serviceName>/volumes/<volumeName>/extend
// Async
Expand Down Expand Up @@ -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"`
Expand Down
12 changes: 8 additions & 4 deletions kirksdk/qcos_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ func (p *qcosClientImp) DeleteService(ctx context.Context, stackName string, ser
}

// POST /v3/stacks/<stackName>/services/<serviceName>/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 == "" {
Expand All @@ -437,7 +437,7 @@ func (p *qcosClientImp) SyncCreateServiceVolume(ctx context.Context, stackName s
return
}
return
}
}*/

// POST /v3/stacks/<stackName>/services/<serviceName>/volumes/<volumeName>/extend
func (p *qcosClientImp) ExtendServiceVolume(ctx context.Context, stackName string,
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit ba9fb4c

Please sign in to comment.