Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Support removing a relation by its id #7744
Conversation
| @@ -124,7 +124,8 @@ func AllFacades() *facade.Registry { | ||
| reg("Application", 2, application.NewFacade) | ||
| reg("Application", 3, application.NewFacade) | ||
| reg("Application", 4, application.NewFacade) | ||
| - reg("Application", 5, application.NewFacade) // adds AttachStorage | ||
| + reg("Application", 5, application.NewFacade) // adds AttachStorage | ||
| + reg("Application", 6, application.NewFacadeV6) // adds remove relation by id |
| type DestroyRelation struct { | ||
| - Endpoints []string `json:"endpoints"` | ||
| + Endpoints []string `json:"endpoints"` |
| + mysql wordpress, or | ||
| + mediawiki:db mariadb:db | ||
| + | ||
| +It is also possible to specify the relation id, if known. This is useful to |
| -func (c *removeRelationCommand) Init(args []string) error { | ||
| +func (c *removeRelationCommand) Init(args []string) (err error) { | ||
| + if len(args) == 1 { | ||
| + if c.RelationId, err = strconv.Atoi(args[0]); err != nil { |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Tests failed |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
jujubot
merged commit 41a6d9b
into
juju:develop
Aug 16, 2017
1 check passed
continuous-integration/jenkins/pr-merge
This commit looks good
Details
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
wallyworld commentedAug 15, 2017
Description of change
When looking at relations to offers, only the relation id is known to the user. We need to provide a way for those relations to be removed. This PR adds support the the remove-relation command to allow a relation id to be used. The capability isn't CMR specific.
QA steps
Deploy a CMR scenario.
Use juju status to find a relation id to remove
$ juju remove-relation
Both consuming and offering sides should reflect broken relation.
Documentation changes
juju remove-relation CLI doc needs updating.