This patch puts a simple check around the 'extra_specs'
key, and makes sure it's there, while trying to inject
the multiattach capabilities filtering.
If we want to change the approach, we can do so in early
Liberty, when we enable multiattach for drivers. At this
stage of the release, lets just do the simple and safe thing.
Change-Id: I45496e4325122ba20e79351f85945ca9804eaa61
Closes-Bug:
1438141
multiattach = volume_properties.get('multiattach', False)
if multiattach and 'multiattach' not in resource_type.get(
'extra_specs', {}):
+ if 'extra_specs' not in resource_type:
+ resource_type['extra_specs'] = {}
+
resource_type['extra_specs'].update(
multiattach='<is> True')