in marketplace/deployer_util/config_helper.py [0:0]
def __init__(self, dictionary):
self._type = None
self._creation_guidance = None
self._gke = None
self._type = dictionary.get('type', None)
_must_contain(self._type, self._ASSISTED_CC_TYPES,
"Invalid type of AssistedClusterCreation")
self._creation_guidance = dictionary.get('creationGuidance')
self._gke = _maybe_get_and_apply(dictionary, 'gke', lambda v: SchemaGke(v))
if self._type == self._ASSISTED_CC_TYPE_DISABLED and not self._creation_guidance:
raise InvalidSchema(
'assistedClusterCreation.creationGuidance must be specified when '
'assistedClusterCreation.type is DISABLED')
if self._type == self._ASSISTED_CC_TYPE_STRICT and not self._gke:
raise InvalidSchema('assistedClusterCreation.gke must be specified when '
'assistedClusterCreation.type is STRICT')