Code review comment for lp://staging/~wallyworld/juju-core/image-metadata-defaults

Revision history for this message
Ian Booth (wallyworld) wrote :

Reviewers: mp+164072_code.launchpad.net,

Message:
Please take a look.

Description:
Fix default image/instance type behaviour

Both EC2/Openstack support default-instance-type and default-image-id.
Openstack also supports override-image-id. The behaviour is:

1. default-instance-type
If more than one instance type matches the constraints, use this one.
An error is raised if no valid instance types can be found, eg arch is
specified as arm but only amd64 instance types are available.

2. default-image-id
If more than one valid image is available, use this one.
Used to allow a user to use their own custom image, so long as it

matches the available instance types and is in metadata.

3. override-image-id
If no image can be found, use this one. Ignored if an image is found.

The override-image-id is used in the same way PyJuju used
default-image-id
(for openstack installs where no image metadata is available).

https://code.launchpad.net/~wallyworld/juju-core/image-metadata-defaults/+merge/164072

Requires:
https://code.launchpad.net/~wallyworld/juju-core/signed-simplestreams/+merge/163824

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/9303051/

Affected files:
   A [revision details]
   M environs/ec2/config.go
   M environs/ec2/config_test.go
   M environs/ec2/ec2.go
   M environs/ec2/export_test.go
   M environs/ec2/image_test.go
   M environs/instances/image.go
   M environs/instances/image_test.go
   M environs/instances/instancetype.go
   M environs/instances/instancetype_test.go
   M environs/openstack/config.go
   M environs/openstack/config_test.go
   M environs/openstack/export_test.go
   M environs/openstack/local_test.go
   M environs/openstack/provider.go

« Back to merge proposal