summaryrefslogtreecommitdiffstats
path: root/apex/undercloud
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2017-09-12 17:32:56 -0400
committerTim Rozet <trozet@redhat.com>2017-11-06 04:35:02 +0000
commitb3c610b205f88dddb02cdac39638c52eafaaf82c (patch)
tree4826027e2d968e61c8024d972f3665ff3a8a09d7 /apex/undercloud
parent3c7556eb0734706f28588fb952eedea2d424c6d2 (diff)
Adds ability to deploy from upstream openstack
To deploy with upstream openstack branch, use new deploy setting 'os_version'. A default scenario file for nosdn with pike has been included in this patch. If 'os_version' is a version other than the default version for this OPNFV release, then upstream is used. In order to use upstream with the current OS version use '--upstream' argument to the deploy command, to force an upstream deployment. Also include '-e upstream-environment.yaml' to use default upstream deployment settings. Supports nosdn and odl-nofeature deployments. Change-Id: Ic07e308827b449637b4e86cdd086434e4de2fb69 Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'apex/undercloud')
-rw-r--r--apex/undercloud/undercloud.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/apex/undercloud/undercloud.py b/apex/undercloud/undercloud.py
index 50035638..5d73dd49 100644
--- a/apex/undercloud/undercloud.py
+++ b/apex/undercloud/undercloud.py
@@ -30,13 +30,15 @@ class Undercloud:
This class represents an Apex Undercloud VM
"""
def __init__(self, image_path, template_path,
- root_pw=None, external_network=False):
+ root_pw=None, external_network=False,
+ image_name='undercloud.qcow2'):
self.ip = None
self.root_pw = root_pw
self.external_net = external_network
self.volume = os.path.join(constants.LIBVIRT_VOLUME_PATH,
'undercloud.qcow2')
self.image_path = image_path
+ self.image_name = image_name
self.template_path = template_path
self.vm = None
if Undercloud._get_vm():
@@ -134,9 +136,14 @@ class Undercloud:
def setup_volumes(self):
for img_file in ('overcloud-full.vmlinuz', 'overcloud-full.initrd',
- 'undercloud.qcow2'):
+ self.image_name):
src_img = os.path.join(self.image_path, img_file)
- dest_img = os.path.join(constants.LIBVIRT_VOLUME_PATH, img_file)
+ if img_file == self.image_name:
+ dest_img = os.path.join(constants.LIBVIRT_VOLUME_PATH,
+ 'undercloud.qcow2')
+ else:
+ dest_img = os.path.join(constants.LIBVIRT_VOLUME_PATH,
+ img_file)
if not os.path.isfile(src_img):
raise ApexUndercloudException(
"Required source file does not exist:{}".format(src_img))
@@ -147,7 +154,6 @@ class Undercloud:
# TODO(trozet):check if resize needed right now size is 50gb
# there is a lib called vminspect which has some dependencies and is
# not yet available in pip. Consider switching to this lib later.
- # execute ansible playbook
def inject_auth(self):
virt_ops = list()