Adds ability to deploy from upstream openstack
[apex.git] / apex / builders / undercloud_builder.py
1 ##############################################################################
2 # Copyright (c) 2017 Tim Rozet (trozet@redhat.com) and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 # Used to modify undercloud qcow2 image
11
12 from apex.common import constants as con
13 from apex.virtual import utils as virt_utils
14
15
16 def add_upstream_packages(image):
17     """
18     Adds required base upstream packages to Undercloud for deployment
19     :param image:
20     :return: None
21     """
22     virt_ops = list()
23     pkgs = [
24         'openstack-utils',
25         'ceph-common',
26         'python2-networking-sfc',
27         'openstack-ironic-inspector',
28         'subunit-filters',
29         'docker-distribution',
30         'openstack-tripleo-validations',
31         'libguestfs-tools',
32     ]
33
34     for pkg in pkgs:
35         virt_ops.append({con.VIRT_INSTALL: pkg})
36     virt_utils.virt_customize(virt_ops, image)
37
38 # TODO(trozet): add rest of build for undercloud here as well