Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove direct model cmr #7097

Merged
merged 4 commits into from Mar 14, 2017
Merged

Conversation

wallyworld
Copy link
Member

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

}

var st *state.State
fail := func(err error) (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}
// 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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes we should, was old code that i missed

@wallyworld
Copy link
Member Author

$$merge$$

@jujubot
Copy link
Collaborator

jujubot commented Mar 14, 2017

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

@jujubot
Copy link
Collaborator

jujubot commented Mar 14, 2017

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

@wallyworld
Copy link
Member Author

$$merge$$

@jujubot
Copy link
Collaborator

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
Labels
None yet
Projects
None yet
3 participants