Remove direct model cmr #7097

Merged
merged 4 commits into from Mar 14, 2017

Conversation

Projects
None yet
3 participants
Owner

wallyworld commented Mar 14, 2017

Description of change

Please see the first commit.
The second commit is a drive by rename of service->application in the test suite.

We remove the ability to relate to other applications without first having that application offered in the remote model. Essentially we add a juju offer step to the workflow.

The work is essentially refactoring existing code and removing some now obsolete methods.

Note: there's still work required to fix the URL format and until that is done, juju offer is clumsy and requires a full URL to be specified even though it's not used.

QA steps

juju bootstrap
juju deploy mysql
juju offer mysql:db local:/u/me/hosted-mysql
juju switch controller
juju deploy mediawiki
juju relate mediawiki:db default.hosted-mysql

axw approved these changes Mar 14, 2017

apiserver/application/application.go
+ }
+
+ var st *state.State
+ fail := func(err error) (
@axw

axw Mar 14, 2017

Member

move this to the top of the method, and use it everywhere?

apiserver/application/application.go
}
// Get the backend state for the source model so we can lookup the application.
- st, err := api.backend.ForModel(sourceModelTag)
+ st, err = api.backend.ForModel(sourceModelTag)
@axw

axw Mar 14, 2017

Member

shouldn't we be using the StatePool provided to apiserver facades?

@wallyworld

wallyworld Mar 14, 2017

Owner

yes we should, was old code that i missed

Owner

wallyworld commented Mar 14, 2017

$$merge$$

Contributor

jujubot commented Mar 14, 2017

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

Contributor

jujubot commented Mar 14, 2017

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/10452

Owner

wallyworld commented Mar 14, 2017

$$merge$$

Contributor

jujubot commented Mar 14, 2017

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

@jujubot jujubot merged commit 5c9f3ac into juju:develop Mar 14, 2017

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