

def ex_create_network_domain(self, location, name, service_plan, description=None):
    '\n        Deploy a new network domain to a data center\n\n        :param      location: The data center to list\n        :type       location: :class:`NodeLocation` or ``str``\n\n        :param      name: The name of the network domain to create\n        :type       name: ``str``\n\n        :param      service_plan: The service plan, either "ESSENTIALS"\n            or "ADVANCED"\n        :type       service_plan: ``str``\n\n        :param      description: An additional description of\n                                 the network domain\n        :type       description: ``str``\n\n        :return: an instance of `DimensionDataNetworkDomain`\n        :rtype: :class:`DimensionDataNetworkDomain`\n        '
    create_node = ET.Element('deployNetworkDomain', {
        'xmlns': TYPES_URN,
    })
    ET.SubElement(create_node, 'datacenterId').text = self._location_to_location_id(location)
    ET.SubElement(create_node, 'name').text = name
    if (description is not None):
        ET.SubElement(create_node, 'description').text = description
    ET.SubElement(create_node, 'type').text = service_plan
    response = self.connection.request_with_orgId_api_2('network/deployNetworkDomain', method='POST', data=ET.tostring(create_node)).object
    network_domain_id = None
    for info in findall(response, 'info', TYPES_URN):
        if (info.get('name') == 'networkDomainId'):
            network_domain_id = info.get('value')
    return DimensionDataNetworkDomain(id=network_domain_id, name=name, description=description, location=location, status=NodeState.RUNNING, plan=service_plan)

dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/dimensiondata.py DimensionDataNodeDriver.ex_create_network_domain/original