Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Migrate relations #4487
Conversation
howbazaar
added some commits
Feb 14, 2016
mjs
reviewed
Feb 22, 2016
| + AddEndpoint(EndpointArgs) Endpoint | ||
| +} | ||
| + | ||
| +// Endpoint represents one end of a relation. A named end-point provided |
mjs
reviewed
Feb 22, 2016
| @@ -29,13 +30,14 @@ type ModelArgs struct { | ||
| func NewModel(args ModelArgs) Model { | ||
| m := &model{ | ||
| Version: 1, | ||
| - Owner_: args.Owner.Canonical(), | ||
| + Owner_: args.Owner.Id(), |
howbazaar
Feb 22, 2016
Owner
Because an empty tag does not result in an empty Canonical strings, but "@Local", which isn't useful.
I was wanting to test for an empty owner in the validation.
mjs
reviewed
Feb 22, 2016
| + | ||
| + // Make sure that for each endpoint in each relation has settings for all | ||
| + // units of that service. | ||
| + for _, relation := range m.Relations_.Relations_ { |
mjs
Feb 22, 2016
Contributor
This is big and ugly enough that perhaps it should be in it's own method.
mjs
reviewed
Feb 22, 2016
| + LeadershipSettings: map[string]interface{}{}, | ||
| + }) | ||
| + service.SetStatus(minimalStatusArgs()) | ||
| + machineId := 0 |
mjs
Feb 22, 2016
Contributor
Aren't i and machineId basically the same? Maybe call the loop variable machineId?
mjs
reviewed
Feb 22, 2016
| @@ -87,6 +90,9 @@ type importer struct { | ||
| dbModel *Model | ||
| model migration.Model | ||
| logger loggo.Logger | ||
| + // serviceUnits is populate at the end of loading the services, and is a map |
|
Ship It (with some minor fixes) |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
added a commit
that referenced
this pull request
Feb 22, 2016
jujubot
merged commit c710248
into
juju:model-migration
Feb 22, 2016
howbazaar
deleted the
howbazaar:migrate-relations
branch
Feb 22, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
howbazaar commentedFeb 21, 2016
Export and import relations.