def create_node(self, name, image, size, **kwargs):

        dc = None

        auth = self._get_and_check_auth(kwargs.get('auth'))

        if not self._is_valid_fqdn(name):
            raise HostVirtualException(
                500, "Name should be a valid FQDN (e.g, hostname.example.com)")

        # simply order a package first
        pkg = self.ex_order_package(size)

        if 'location' in kwargs:
            dc = kwargs['location'].id
        else:
            dc = DEFAULT_NODE_LOCATION_ID

        # create a stub node
        stub_node = self._to_node({
            'mbpkgid': pkg['id'],
            'status': 'PENDING',
            'fqdn': name,
            'plan_id': size.id,
            'os_id': image.id,
            'location_id': dc
        })

        # provisioning a server using the stub node
        self.ex_provision_node(node=stub_node, auth=auth)
        node = self._wait_for_node(stub_node.id)
        if getattr(auth, 'generated', False):
            node.extra['password'] = auth.password

        return node
Creates a node
dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/hostvirtual.py/HostVirtualNodeDriver.create_node