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).
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
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/~wallyworl d/juju- core/image- metadata- defaults/ +merge/ 164072
Requires: /code.launchpad .net/~wallyworl d/juju- core/signed- simplestreams/ +merge/ 163824
https:/
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/9303051/
Affected files: ec2/config. go ec2/config_ test.go ec2/export_ test.go ec2/image_ test.go instances/ image.go instances/ image_test. go instances/ instancetype. go instances/ instancetype_ test.go openstack/ config. go openstack/ config_ test.go openstack/ export_ test.go openstack/ local_test. go openstack/ provider. go
A [revision details]
M environs/
M environs/
M environs/ec2/ec2.go
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/