Ejemplo n.º 1
0
 def setUp(self):
     self.driver_klass.connectionCls.conn_classes = (OpenStack_1_1_MockHttp, OpenStack_1_1_MockHttp)
     self.driver_klass.connectionCls.auth_url = "https://auth.api.example.com/v2.0/"
     OpenStack_1_1_MockHttp.type = None
     self.driver = self.create_driver()
     clear_pricing_data()
     self.node = self.driver.list_nodes()[1]
Ejemplo n.º 2
0
 def setUp(self):
     self.driver_klass.connectionCls.conn_classes = (OpenStackMockHttp,
                                                     OpenStackMockHttp)
     self.driver_klass.connectionCls.auth_url = "https://auth.api.example.com/v1.1/"
     OpenStackMockHttp.type = None
     self.driver = self.create_driver()
     clear_pricing_data()
 def setUp(self):
     self.driver_klass.connectionCls.conn_classes = (RackspaceNovaMockHttp, RackspaceNovaMockHttp)
     self.driver_klass.connectionCls.auth_url = "https://auth.api.example.com/v2.0/"
     self.driver = self.create_driver()
     # normally authentication happens lazily, but we force it here
     self.driver.connection._populate_hosts_and_request_paths()
     clear_pricing_data()
     self.node = self.driver.list_nodes()[1]
Ejemplo n.º 4
0
 def setUp(self):
     self.driver_klass.connectionCls.conn_classes = (RackspaceNovaMockHttp,
                                                     RackspaceNovaMockHttp)
     self.driver_klass.connectionCls.auth_url = "https://auth.api.example.com/v2.0/"
     self.driver = self.create_driver()
     # normally authentication happens lazily, but we force it here
     self.driver.connection._populate_hosts_and_request_paths()
     clear_pricing_data()
     self.node = self.driver.list_nodes()[1]
Ejemplo n.º 5
0
 def setUp(self):
     self.driver_klass.connectionCls.conn_class = self.conn_class
     self.driver_klass.connectionCls.auth_url = self.auth_url
     self.conn_class.type = None
     self.driver = self.create_driver()
     # normally authentication happens lazily, but we force it here
     self.driver.connection._populate_hosts_and_request_paths()
     clear_pricing_data()
     self.node = self.driver.list_nodes()[1]
Ejemplo n.º 6
0
 def setUp(self):
     self.driver_klass.connectionCls.conn_class = self.conn_class
     self.driver_klass.connectionCls.auth_url = self.auth_url
     self.conn_class.type = None
     self.driver = self.create_driver()
     # normally authentication happens lazily, but we force it here
     self.driver.connection._populate_hosts_and_request_paths()
     clear_pricing_data()
     self.node = self.driver.list_nodes()[1]
    def setUp(self):
        # monkeypatch get_endpoint because the base openstack driver doesn't actually
        # work with old devstack but this class/tests are still used by the rackspace
        # driver
        def get_endpoint(*args, **kwargs):
            return "https://servers.api.rackspacecloud.com/v1.0/slug"
        self.driver_klass.connectionCls.get_endpoint = get_endpoint

        self.driver_klass.connectionCls.conn_classes = (OpenStackMockHttp, OpenStackMockHttp)
        self.driver_klass.connectionCls.auth_url = "https://auth.api.example.com/v1.1/"
        OpenStackMockHttp.type = None
        self.driver = self.create_driver()
        # normally authentication happens lazily, but we force it here
        self.driver.connection._populate_hosts_and_request_paths()
        clear_pricing_data()
Ejemplo n.º 8
0
    def setUp(self):
        self.driver_klass.connectionCls.conn_classes = \
                (OpenStack_1_1_Auth_2_0_MockHttp, OpenStack_1_1_Auth_2_0_MockHttp)
        self.driver_klass.connectionCls.auth_url = "https://auth.api.example.com/v2.0/"
        OpenStack_1_1_MockHttp.type = None
        self.driver = self.create_driver()
        clear_pricing_data()
        self.node = self.driver.list_nodes()[1]

        server_url = 'https://servers.api.rackspacecloud.com/v1.0/1337'
        auth_token = 'aaaaaaaaaaaa-bbb-cccccccccccccc'
        tenant_compute = '1337'
        tenant_object_store = 'MossoCloudFS_11111-111111111-1111111111-1111111'

        self.assertEqual(self.driver.connection.server_url, server_url)
        self.assertEqual(self.driver.connection.auth_token, auth_token)
        self.assertEqual(self.driver.connection.tenant_ids, {
            'compute': tenant_compute,
            'object-store': tenant_object_store
        })