state: Add support for CAAS models #7770

Merged
merged 2 commits into from Aug 23, 2017

Conversation

Projects
None yet
3 participants
Contributor

mjs commented Aug 22, 2017

Description of change

If the CAAS featureflag is enabled, allow models to be created of type "caas". The model type must be specified when creating a model.

Migration support for model type field has also been added. This doesn't mean that migrations will "just work" for CAAS models but these changes are required to support that anyway.

This change caused plenty of tedious fallout in tests throughout Juju.

QA steps

(coming)

Documentation changes

N.A.

Bug reference

N.A.

+ if err != nil {
+ return nil, nil, errors.Trace(err)
+ }
+ prereqOps = append(prereqOps, assertCloudRegionOp)
}
@mikemccracken

mikemccracken Aug 22, 2017

Member

Should we do something here if the type is CAAS? Maybe if it's CAAS we should be checking that args.CloudRegion should be ""?

@mjs

mjs Aug 22, 2017

Contributor

Yep, I'll add that.

@mjs

mjs Aug 23, 2017

Contributor

Fixed

+ c.Assert(model.ControllerTag(), gc.Equals, s.State.ControllerTag())
+ c.Assert(model.Owner(), gc.Equals, owner)
+ c.Assert(model.Name(), gc.Equals, "testing")
+ c.Assert(model.Life(), gc.Equals, state.Alive)
@mikemccracken

mikemccracken Aug 22, 2017

Member

Should we test CloudRegion here? I'm assuming that for now we say that CAAS clouds don't support regions, so the CAAS model's region should always be ""

@mjs

mjs Aug 22, 2017

Contributor

Good catch. Will fix.

@mjs

mjs Aug 23, 2017

Contributor

Fixed

mjs added some commits Aug 22, 2017

state: Add "caas" model type
If the CAAS featureflag is enabled, allow models to be created of type
"caas". The model type must be specified when creating a model.

This change caused plenty of tedious fallout in tests throughout Juju.
state: Add migration support for model type field
This doesn't mean that migrations will work for CAAS models but these
changes are required to support that anyway.
Contributor

mjs commented Aug 23, 2017

$$merge$$

Contributor

jujubot commented Aug 23, 2017

Status: merge request accepted. Url: http://ci.jujucharms.com/job/github-merge-juju

@jujubot jujubot merged commit 3d45aab into juju:develop Aug 23, 2017

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details

@mjs mjs deleted the mjs:caas-model-type branch Aug 23, 2017

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