In
f76c02a658ed1de54a380381932bb58b6ab91d41 we may leave out the placement
key when it is empty. If we take that path, we need to tolerate specs
that are missing that key.
Fixes: f76c02a658ed1de54a380381932bb58b6ab91d41
Signed-off-by: Sage Weil <sage@newdream.net>
try:
args['placement'] = PlacementSpec.from_json(json_drive_group.pop('placement'))
except KeyError:
- raise DriveGroupValidationError('OSD spec needs a `placement` key.')
+ args['placement'] = PlacementSpec()
args['service_type'] = json_drive_group.pop('service_type', 'osd')
re.escape('Service Spec is not an (JSON or YAML) object. got "None"'),
''
),
- (
- "Failed to validate Drive Group: OSD spec needs a `placement` key.",
- '{}'
- ),
(
'Failed to validate Drive Group: DeviceSelection cannot be empty', """
service_type: osd