'Provision a server on a VR package and get it booted
:keyword node: node which should be used
:type    node: :class:`Node`
:keyword image: The distribution to deploy on your server (mandatory)
:type    image: :class:`NodeImage`
:keyword auth: an SSH key or root password (mandatory)
:type    auth: :class:`NodeAuthSSHKey` or :class:`NodeAuthPassword`
:keyword location: which datacenter to create the server in
:type    location: :class:`NodeLocation`
:return: Node representing the newly built server
:rtype: :class:`Node`'

def ex_provision_node(self, **kwargs):

    node = kwargs['node']
    if ('image' in kwargs):
        image = kwargs['image']
    else:
        image = node.extra['image']
    params = {'mbpkgid': node.id, 'image': image, 'fqdn': node.name, 'location': node.extra['location']}
    auth = kwargs['auth']
    ssh_key = None
    password = None
    if isinstance(auth, NodeAuthSSHKey):
        ssh_key = auth.pubkey
        params['ssh_key'] = ssh_key
    elif isinstance(auth, NodeAuthPassword):
        password = auth.password
        params['password'] = password
    if ((not ssh_key) and (not password)):
        raise HostVirtualException(500, 'SSH    key    or    Root    password    is    required')
    try:
        result = self.connection.request((API_ROOT + '/cloud/server/build'), data=json.dumps(params), method='POST').object
        return bool(result)
    except HostVirtualException:
        self.ex_cancel_package(node)
