Include remote applications in model dump #7049

Merged
merged 4 commits into from Feb 28, 2017

Conversation

Projects
None yet
3 participants
Member

babbageclunk commented Feb 28, 2017

Description of change

This means that we can see remote applications in the dump-model output. At the moment we don't support importing models with remote applications - that requires a lot of other changes to work correctly.

Uses the new RemoteApplication and RemoteEndpoint added to the description in juju/description#1

QA steps

  • Bootstrap a controller and add two models
  • Deploy wordpress to one model and mysql to the other and relate them.
  • Run juju dump-model on each model and verify that the YAML includes the remote application information.

babbageclunk added some commits Feb 23, 2017

Update the description dependency
That version has RemoteApplication and RemoteEndpoint.
Prevent importing models with remote applications
At the moment it's not supported.
Member

babbageclunk commented Feb 28, 2017

!!build!!

state/migration_import.go
@@ -53,6 +53,10 @@ func (st *State) Import(model description.Model) (_ *Model, _ *State, err error)
return nil, nil, errors.Trace(err)
}
+ if len(model.RemoteApplications()) != 0 {
+ return nil, nil, errors.New("can't import models with remote applications")
@wallyworld

wallyworld Feb 28, 2017

Owner

could you add a comment here saying why - that CMR is currently limited to models on the one controller

@@ -1118,6 +1118,47 @@ func (s *MigrationImportSuite) TestPayloads(c *gc.C) {
c.Check(payload.Machine, gc.Equals, machineID)
}
+func (s *MigrationImportSuite) TestRemoteApplications(c *gc.C) {
+ // For now we want to prevent importing models that have remote
@wallyworld

wallyworld Feb 28, 2017

Owner

ditto - expand comment a bit to say why

Member

babbageclunk commented Feb 28, 2017

$$merge$$

Contributor

jujubot commented Feb 28, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit 1a5f8bb into juju:develop Feb 28, 2017

@babbageclunk babbageclunk deleted the babbageclunk:dump-remote-apps-split branch Mar 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment