summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/create_instance.py
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2018-03-07 13:01:37 -0700
committerspisarski <s.pisarski@cablelabs.com>2018-03-08 14:02:05 -0700
commitf77540b440d3e5224eb1648339dc8c945f29bbe2 (patch)
tree84856cebdfb36f9c758d43bb127d1b91b88cc7d6 /snaps/openstack/create_instance.py
parente4563aec1eb8f98e5e42fe513918432eddadcd37 (diff)
Ensure the project for volumes are handled properly.
Although this patch has added the project_name member to VolumeConfig, it does not work properly due to a cinder bug https://bugs.launchpad.net/cinder/+bug/1641982. However, the code will now allow for volumes with the same name to be created on the same pod just as long as they do not exist within the same project/tenant. JIRA: SNAPS-270 Change-Id: Ia6f98e9b66793a69c0205d2d8e38bb3d03f3333e Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'snaps/openstack/create_instance.py')
-rw-r--r--snaps/openstack/create_instance.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/snaps/openstack/create_instance.py b/snaps/openstack/create_instance.py
index eb4ade3..f897434 100644
--- a/snaps/openstack/create_instance.py
+++ b/snaps/openstack/create_instance.py
@@ -164,7 +164,8 @@ class OpenStackVmInstance(OpenStackComputeObject):
for volume_name in self.instance_settings.volume_names:
cinder = cinder_utils.cinder_client(self._os_creds)
volume = cinder_utils.get_volume(
- cinder, volume_name=volume_name)
+ cinder, self.__keystone, volume_name=volume_name,
+ project_name=self._os_creds.project_name)
if volume and self.vm_active(block=True):
vm = nova_utils.attach_volume(