def __init__()

in marketplace/deployer_util/config_helper.py [0:0]


  def __init__(self, dictionary):
    self._num_nodes = _must_get(dictionary, 'numNodes',
                                'NodePoolDetails must have numNodes property')
    self._machine_type = _must_get(
        dictionary, 'machineType',
        'NodePoolDetails must have machineType property')
    if "custom-" in self._machine_type:
      splits = re.split("-", self._machine_type)
      if len(splits) < 3:
        raise InvalidSchema(
            'Custom machine types should be specified using following convention: '
            'custom-[NUMBER_OF_CPUS]-[NUMBER_OF_MB]')
      cores = int(splits[-2])
      if cores != 1 and cores % 2 != 0:
        raise InvalidSchema(
            'Number of cores for machineType could either be 1 or an even number'
        )