Introduce state.IAASModel #7667

Merged
merged 5 commits into from Jul 25, 2017

Conversation

Projects
None yet
5 participants
Contributor

mjs commented Jul 25, 2017

Description of change

This is the first of a series of changes that moves IAAS specific functionality from state.State onto a new state.IAASModel type. This is in preparation for new model types. The idea is that State will only deal with generic functionality with model type specific functionality being available via new types accessible via State.

This change moves everything to do with storage onto a new IAASModel type. Future PRs will move more areas of functionality across.

QA steps

All unit tests pass. Deploying a simple storage charm works as expected:

$ juju deploy cs:~axwalk/trusty/storagetest-1 --storage filesystem=tmpfs --storage block=loop
$ juju ssh 0 -- mount  | grep /srv
filesystem-0-0 on /srv/filesystem/1 type tmpfs (rw,size=1024m)

Documentation changes

N.A. - internal only.

Bug reference

N.A.

4a6f656c and others added some commits Jul 4, 2017

apiserver,state: introduce state.IAASModel
Start work on splitting out the IAAS specific functionality from
state.State, in order to make it easier to implement additional
types of models. This change moves BlockDevices handling onto
the new type. Additional IAAS specific functionality will be
moved in future changes.
state: provide a reference from IAASModel to *State
This is intended as a temporary measure, to aid with the untangling
of *State and can hopefully be removed in the future.
state: migrate volume functions to IAASModel
This moves the volume related code onto the IAASModel type, another
step towards untangling the IAAS model code the the State type.
state: migrate filesystem functions to IAASModel
This moves the filesystem related code into the IAASModel type,
another step towards untangling the IAAS model code the the State
type.

axw approved these changes Jul 25, 2017

Contributor

mjs commented Jul 25, 2017

$$merge$$

Contributor

jujubot commented Jul 25, 2017

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

@jujubot jujubot merged commit a87ab19 into juju:develop Jul 25, 2017

1 check passed

github-check-merge-juju Use !!.*!! to request another build. IE, !!build!!, !!retry!!
Details
Owner

rogpeppe commented Jul 25, 2017

I'd like to see a bit of discussion in the doc comments about exactly what this "IAASModel" is and how it differs from any other Juju model. "Infrastructure as a service" is an very abstract thing - I have no idea from looking at this PR, or glancing through the code what this change is for or what the name actually implies.

@mjs mjs deleted the mjs:state-iaasmodel-storage branch Jul 25, 2017

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