Availability zone / metadata validation
Change-Id: I01ce19b1cd8331fbb5a8121a88ce9e23edd91752
This commit is contained in:
parent
3c6b639b68
commit
787a8edcbe
|
@ -493,3 +493,38 @@ class ProviderDriver(object):
|
||||||
'flavors.',
|
'flavors.',
|
||||||
operator_fault_string='This provider does not support validating '
|
operator_fault_string='This provider does not support validating '
|
||||||
'the supported flavor metadata.')
|
'the supported flavor metadata.')
|
||||||
|
|
||||||
|
# Availability Zone
|
||||||
|
def get_supported_availability_zone_metadata(self):
|
||||||
|
"""Returns a dict of supported availability zone metadata keys.
|
||||||
|
|
||||||
|
The returned dictionary will include key/value pairs, 'name' and
|
||||||
|
'description.'
|
||||||
|
|
||||||
|
:returns: The availability zone metadata dictionary
|
||||||
|
:raises DriverError: An unexpected error occurred in the driver.
|
||||||
|
:raises NotImplementedError: The driver does not support flavors.
|
||||||
|
"""
|
||||||
|
raise exceptions.NotImplementedError(
|
||||||
|
user_fault_string='This provider does not support getting the '
|
||||||
|
'supported availability zone metadata.',
|
||||||
|
operator_fault_string='This provider does not support getting '
|
||||||
|
'the supported availability zone metadata.')
|
||||||
|
|
||||||
|
def validate_availability_zone(self, flavor_metadata):
|
||||||
|
"""Validates if driver can support the availability zone.
|
||||||
|
|
||||||
|
:param availability_zone_metadata: Dictionary with az metadata.
|
||||||
|
:type availability_zone_metadata: dict
|
||||||
|
:return: Nothing if the availability zone is valid and supported.
|
||||||
|
:raises DriverError: An unexpected error occurred in the driver.
|
||||||
|
:raises NotImplementedError: The driver does not support availability
|
||||||
|
zones.
|
||||||
|
:raises UnsupportedOptionError: if driver does not
|
||||||
|
support one of the configuration options.
|
||||||
|
"""
|
||||||
|
raise exceptions.NotImplementedError(
|
||||||
|
user_fault_string='This provider does not support validating '
|
||||||
|
'availability zones.',
|
||||||
|
operator_fault_string='This provider does not support validating '
|
||||||
|
'the supported availability zone metadata.')
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Add driver interface for validating availability zone metadata and support.
|
Loading…
Reference in New Issue