def ex_create_network(self, location, name, description=None):
        network_location = self._location_to_location_id(location)

        create_node = ET.Element('NewNetworkWithLocation',
                                 {'xmlns': NETWORK_NS})
        ET.SubElement(create_node, "name").text = name
        if description is not None:
            ET.SubElement(create_node, "description").text = description
        ET.SubElement(create_node, "location").text = network_location

        self.connection.request_with_orgId_api_1(
            'networkWithLocation',
            method='POST',
            data=ET.tostring(create_node))

        # MCP1 API does not return the ID, but name is unique for location
        network = list(
            filter(lambda x: x.name == name,
                   self.ex_list_networks(location)))[0]

        return network
Create a new network in an MCP 1.0 location
dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/dimensiondata.py/DimensionDataNodeDriver.ex_create_network