Allow specifying diskimage metadata/tags
For drivers that support tagging/metadata (openstack, aws, azure), Add or enhance support for supplying tags for uploaded diskimages. This allows users to set metadata on the global diskimage object which will then be used as default values for metadata on the provider diskimage values. The resulting merged dictionary forms the basis of metadata to be associated with the uploaded image. The changes needed to reconcile this for the three drivers mentioned above are: All: the diskimages[].meta key is added to supply the default values for provider metadata. OpenStack: provider diskimage metadata is already supported using providers[].diskimages[].meta, so no further changes are needed. AWS, Azure: provider diskimage tags are added using the key providers[].diskimages[].tags since these providers already use the "tags" nomenclature for instances. This results in the somewhat incongruous situation where we have diskimage "metadata" being combined with provider "tags", but it's either that or have images with "metadata" while we have instances with "tags", both of which are "tags" in EC2. The chosen approach has consistency within the driver. Change-Id: I30aadadf022af3aa97772011cda8dbae0113a3d8
This commit is contained in:
@@ -196,7 +196,8 @@ class FakeOpenStackCloud(object):
|
||||
key_name=kw.get('key_name', None),
|
||||
should_fail=should_fail,
|
||||
over_quota=over_quota,
|
||||
event=threading.Event())
|
||||
event=threading.Event(),
|
||||
_kw=kw)
|
||||
instance_list.append(s)
|
||||
t = threading.Thread(target=self._finish,
|
||||
name='FakeProvider create',
|
||||
|
||||
Reference in New Issue
Block a user