diff options
| author | Dan Prince <dprince@redhat.com> | 2012-09-07 11:52:03 -0400 |
|---|---|---|
| committer | Dan Prince <dprince@redhat.com> | 2012-09-07 13:05:45 -0400 |
| commit | ff3b994f12edf28d187bb1987aa7094b7897b015 (patch) | |
| tree | 44b090314eea976abc6cd53ef8c4222d452fa27d /nova/tests | |
| parent | 37cc45b8fdaa199b248a7ef5f683d514733b8387 (diff) | |
Handle missing 'provider_location' in rm_export.
Updates the remove_export function in the ISCSIDriver so that
it handles the case where provider_location isn't set on
a volume. This can occur if a volume is created but not exported.
This was a regression from a previous commit
(66f6a9edce3ccd624aba5d2a6bf3362901ed57f7) which changed the way
iscsi targets are created/deleted.
With this commit the Nova Smoke Test volume tests should once
again pass.
Fixes LP Bug #1046484.
Change-Id: I4539d73691a058d8fdc6c864dee06c0d4e4813f7
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/api/ec2/test_cloud.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nova/tests/api/ec2/test_cloud.py b/nova/tests/api/ec2/test_cloud.py index ff84def77..6301ce180 100644 --- a/nova/tests/api/ec2/test_cloud.py +++ b/nova/tests/api/ec2/test_cloud.py @@ -99,6 +99,8 @@ class CloudTestCase(test.TestCase): self.flags(compute_driver='nova.virt.fake.FakeDriver', volumes_dir=vol_tmpdir) self.stubs.Set(iscsi.TgtAdm, '_get_target', self.fake_get_target) + self.stubs.Set(iscsi.TgtAdm, 'remove_iscsi_target', + self.fake_remove_iscsi_target) def fake_show(meh, context, id): return {'id': id, @@ -163,6 +165,9 @@ class CloudTestCase(test.TestCase): def fake_get_target(obj, iqn): return 1 + def fake_remove_iscsi_target(obj, tid, lun, vol_id, **kwargs): + pass + def _stub_instance_get_with_fixed_ips(self, func_name): orig_func = getattr(self.cloud.compute_api, func_name) |
