Esempio n. 1
0
    def setUp(self):
        super(CoraidDriverTestCase, self).setUp()
        configuration = mox.MockObject(conf.Configuration)
        configuration.append_config_values(mox.IgnoreArg())
        configuration.coraid_esm_address = fake_esm_ipaddress
        configuration.coraid_user = fake_esm_username
        configuration.coraid_group = fake_esm_group
        configuration.coraid_password = fake_esm_password
        configuration.volume_name_template = "volume-%s"
        configuration.snapshot_name_template = "snapshot-%s"
        configuration.coraid_repository_key = fake_coraid_repository_key
        configuration.use_multipath_for_image_xfer = False
        configuration.num_volume_device_scan_tries = 3
        configuration.volume_dd_blocksize = '1M'
        self.fake_rpc = FakeRpc()

        self.stubs.Set(coraid.CoraidRESTClient, 'rpc', self.fake_rpc)

        self.driver = coraid.CoraidDriver(configuration=configuration)
        self.driver.do_setup({})
Esempio n. 2
0
    def setUp(self):
        super(CoraidDriverTestCase, self).setUp()

        self.mox = mox.Mox()

        configuration = mox.MockObject(conf.Configuration)
        configuration.append_config_values(mox.IgnoreArg())
        configuration.coraid_esm_address = fake_esm_ipaddress
        configuration.coraid_user = fake_esm_username
        configuration.coraid_group = fake_esm_group
        configuration.coraid_password = fake_esm_password
        configuration.volume_name_template = "volume-%s"
        configuration.snapshot_name_template = "snapshot-%s"
        configuration.coraid_repository_key = fake_coraid_repository_key
        configuration.use_multipath_for_image_xfer = False
        self.fake_rpc = FakeRpc()

        self.mox.StubOutWithMock(coraid.CoraidRESTClient, 'rpc')
        coraid.CoraidRESTClient.rpc = self.fake_rpc

        self.driver = coraid.CoraidDriver(configuration=configuration)
        self.driver.do_setup({})