From 630b5985d084f90b413d326d97254acec7f92998 Mon Sep 17 00:00:00 2001
From: Paul Breaux
Date: Thu, 18 May 2017 09:03:35 -0600
Subject: [PATCH 1/2] setup.py install does not require openstack clients
Issues:
Fixes #60
Problem:
The setup.py installation of this repo does not require the proper
python client libraries for glance and keystone. This is currently done
in the f5-openstack-heat template with an apt-get install (which is not
correct). We'll move it to the setup.py here and then update the heat
template to remove that installation. The other big point is that we are
installation from latest with apt-get, so we're unsure of what we're
getting when we do the heat template install. With the setup.py change,
we'll fix it to a particular version that is tested and works.
Analysis:
Added install_requires to have the keystone and glance client for
openstack. These are pinned to specific versions. Those versions will
change between libert and mitaka etc.
Tests:
Tested with heat deployment from f5-openstack-heat repo.
---
setup.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index f980ee4..3a36ee1 100644
--- a/setup.py
+++ b/setup.py
@@ -13,7 +13,6 @@
# limitations under the License.
#
-from setuptools import find_packages
from setuptools import setup
import f5_image_prep
@@ -32,4 +31,6 @@
'Programming Language :: Python',
'Intended Audience :: System Administrators',
],
+ install_requires=['python-keystoneclient == 1.7.2',
+ 'python-glanceclient == 1.2.0']
)
From aab6576457ea44897b4bf479ac81cb9f599ce0be Mon Sep 17 00:00:00 2001
From: ssorenso
Date: Fri, 16 Jun 2017 13:56:20 -0600
Subject: [PATCH 2/2] Changes to dynamically handle MGMT IFACE over ETH0 for >=
13
Issues:
Fixes #65
Problem:
* 13+ will have MGMT interface (as far as we know) over ETH0
Analysis:
* To handle this, a bit of perl was implemented to grab from tmsh output
Tests:
---
lib/f5_image_prep/os-functions/openstack-network.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/f5_image_prep/os-functions/openstack-network.sh b/lib/f5_image_prep/os-functions/openstack-network.sh
index 8f416a5..afabcd0 100755
--- a/lib/f5_image_prep/os-functions/openstack-network.sh
+++ b/lib/f5_image_prep/os-functions/openstack-network.sh
@@ -50,7 +50,8 @@ function set_iface_value () {
# initial chars in a BIGIP version string. We do this
# because the name of the managment interface changes
# from eth0 to mgmt in version 13.
- if (( "$1" >= "13"))
+ version=$(tmsh show /sys version | grep -i version)
+ if [ $(perl -le "print (\"\$$version\" =~ /(\d+)\.\d+\.\d+/)") -ge 13 ]
then
echo mgmt
else