示例#1
0
文件: connection.py 项目: scpham/nova
 def __init__(self, url, user, pw):
     super(XenAPIConnection, self).__init__()
     self._session = XenAPISession(url, user, pw)
     self._volumeops = volumeops.VolumeOps(self._session)
     self._host_state = None
     self._host = host.Host(self._session)
     self._vmops = vmops.VMOps(self._session)
     self._initiator = None
     self._pool = pool.ResourcePool(self._session)
示例#2
0
    def __init__(self, url, user, pw):
        super(XenAPIConnection, self).__init__()
        self._session = XenAPISession(url, user, pw)
        self._volumeops = VolumeOps(self._session)
        self._host_state = None
        self._host = host.Host(self._session)
        self._product_version = self._session.get_product_version()
        self._vmops = VMOps(self._session, self._product_version)
        self._initiator = None
        self._pool = pool.ResourcePool(self._session)

        self._capture_dom0_hostname()
示例#3
0
文件: driver.py 项目: zhimin711/nova
    def __init__(self, virtapi, read_only=False):
        super(XenAPIDriver, self).__init__(virtapi)

        url = CONF.xenserver.connection_url
        username = CONF.xenserver.connection_username
        password = CONF.xenserver.connection_password
        if not url or password is None:
            raise Exception(_('Must specify connection_url, '
                              'connection_username (optionally), and '
                              'connection_password to use '
                              'compute_driver=xenapi.XenAPIDriver'))

        self._session = session.XenAPISession(url, username, password)
        self._volumeops = volumeops.VolumeOps(self._session)
        self._host_state = None
        self._host = host.Host(self._session, self.virtapi)
        self._vmops = vmops.VMOps(self._session, self.virtapi)
        self._initiator = None
        self._hypervisor_hostname = None
        self._pool = pool.ResourcePool(self._session, self.virtapi)
示例#4
0
    def __init__(self, read_only=False):
        super(XenAPIDriver, self).__init__()

        url = FLAGS.xenapi_connection_url
        username = FLAGS.xenapi_connection_username
        password = FLAGS.xenapi_connection_password
        if not url or password is None:
            raise Exception(
                _('Must specify xenapi_connection_url, '
                  'xenapi_connection_username (optionally), and '
                  'xenapi_connection_password to use '
                  'connection_type=xenapi'))

        self._session = XenAPISession(url, username, password)
        self._volumeops = volumeops.VolumeOps(self._session)
        self._host_state = None
        self._host = host.Host(self._session)
        self._vmops = vmops.VMOps(self._session)
        self._initiator = None
        self._hypervisor_hostname = None
        self._pool = pool.ResourcePool(self._session)