Skip to content

Commit

Permalink
Merge pull request #35 from uoryon/QCOS-3248
Browse files Browse the repository at this point in the history
QCOS-3248 add config-service delete api
  • Loading branch information
nowenL authored Dec 6, 2016
2 parents 8b95b17 + 0a5d32b commit ca4ba4f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kirksdk/qcos_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@ type QcosClient interface {

// POST /v3/configservices/<namespace>
UpdateConfigServiceSpec(ctx context.Context, namespace string, args UpdateConfigServiceSpecArgs) (err error)

// DELETE /v3/configservices/<namespace>
DeleteConfigServiceSpec(ctx context.Context, namespace string) (err error)
}

const (
Expand Down
7 changes: 7 additions & 0 deletions kirksdk/qcos_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,13 @@ func (p *qcosClientImp) UpdateConfigServiceSpec(ctx context.Context, namespace s
return
}

// DELETE /v3/configservices/<namespace>
func (p *qcosClientImp) DeleteConfigServiceSpec(ctx context.Context, namespace string) (err error) {
url := fmt.Sprintf("%s/v3/configservices/%s", p.host, namespace)
err = p.client.Call(ctx, nil, "DELETE", url)
return
}

func (p *qcosClientImp) wait4StackRunning(stackName string, timeout time.Duration) (err error) {
if stackName == "" {
stackName = DefaultStack
Expand Down

0 comments on commit ca4ba4f

Please sign in to comment.