-
Notifications
You must be signed in to change notification settings - Fork 0
Allow work with CSE on user-mode (issue #36) #41
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work, just minor changes requested!
func (csets *CloudSpecificExtensionDeploymentService) DeleteDeployment(deploymentID string) (err error) { | ||
log.Debug("DeleteDeployment") | ||
|
||
data, status, err := csets.concertoService.Delete(fmt.Sprintf("/cse/deployments/%s", deploymentID)) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
if err = utils.CheckStandardStatus(status, data); err != nil { | ||
return err | ||
} | ||
|
||
return nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleting a CSE deployment just starts the undeploy process: you should return here a representation parsed from the response
} | ||
|
||
// CreateTemplate creates a cloud specific extension template | ||
func (csets *CloudSpecificExtensionTemplateService) CreateTemplate(templateVector *map[string]interface{}) (template *types.CloudSpecificExtensionTemplate, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
templateVector is a bad name, what about templateParams?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, additionally this should be done in more cases (added a note at issue #31 ).
func CloudSpecificExtensionDeploymentDelete(c *cli.Context) error { | ||
debugCmdFuncInfo(c) | ||
svc, formatter := WireUpCloudSpecificExtensionDeployment(c) | ||
|
||
checkRequiredFlags(c, []string{"id"}, formatter) | ||
err := svc.DeleteDeployment(c.String("id")) | ||
if err != nil { | ||
formatter.PrintFatal("Couldn't delete CSE deployment", err) | ||
} | ||
return nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should probably show here the CSED as decommissioning
- Additionally, rename parameters Closes #36
2766a92
to
c9b9681
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Description
New Cloud Specific Extension commands:

cio cloud-specific-extensions templates :

list > Lists List CSE templates
GET /v2/cse/templates
show -> Shows CSE template
GET /v2/cse/templates/:template_id
import -> Imports a CSE template
POST /v2/cse/templates
update -> Updates an existing CSE template identified by the given id
PUT /v2/cse/templates/:template_id
list-deployments -> List CSE deployments of a CSE template
GET /v2/cse/templates/:template_id/deployments
delete -> Deletes a CSE template
DELETE /v2/cse/templates/:template_id
cio cloud-specific-extensions deployments :

list > Lists List CSE deployments
GET /v2/cse/deployments
show -> Shows CSE deployment
GET /v2/cse/deployments/:deployment_id
deploy -> Deploys a new CSE deployment from CSE template
POST /v2/cse/templates/:template_id/deployments
update -> Updates an existing CSE deployment identified by the given id
PUT /v2/cse/deployments/:deployment_id
delete -> Deletes a CSE deployment
DELETE /v2/cse/deployments/:deployment_id
Description
Related Issue
Closes #36
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate)
Types of changes
Checklist