yorc
yorc copied to clipboard
bootvolume sourcetype was a requirement
Signed-off-by: Tim Beermann [email protected]
Pull Request description
- Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
- Please read our contribution guidelines
- PR with a decent set of unit tests have more chance to be reviewed and merged quickly
Description of the change
Yorc's openstack BootVolume type required the property source. This prevented e.g. importing topologies which did not have a BootVolume set. Leaving source as a requirement would force setting a boot volume in terraform resulting in automatically requiring an image_id if you want to boot from an image. Thogh if you want to boot a VM from Terraform from an image name you must leave out the boot volume OR query the image_id as a data source upfront. Anyway, the source attribute should never be a requirement.
What I did
Changed the required value from true
to false
for yorc.datatypes.openstack.BootVolume's property source.
How I did it
none
How to verify it
none
Description for the changelog
OpenStack type yorc.datatypes.openstack.BootVolume required the source propery. This prevented creating VMs without one directly from image names.
Applicable Issues
none
This issue should have been introduced by a change in Alien4Cloud management of nested properties.
With previous versions of Alien4Cloud, you could either define the property ìmageName
or image
and not define at all the property boot_volume
as this property boot_volume
is declared as not required.
And this worked well.
Now, Alien4cloud will systematically expect the boot_volume
property to be defined in the topology although it is declared as not required, apparently this should happen in Alien4Cloud because this property boot_volume
has a nested property delete_on_termination
with a default value true, or because a nested property is required (to be checked)
I just saw this as well on my setup during the substitution of abstract resource with on-demand resources, where Alien4Cloud is systematically adding a property boot_volume
in the topology with the default value of the nested property delete_on_termination
.
Then Alien4Cloud will complain during the deployment that the required property source has no value.
Will check with Alien4Cloud team if this behavior can be changed in Alien4Cloud, or if it could be avoided by just removing the default value true
for the nested property delete_on_termination
. Else this pull request would allow to fix the issue, although normally Alien4Cloud should not fail because the property boot_volume is not required.
Older than one year. Closing this PR.