summaryrefslogtreecommitdiffstats
path: root/utils/infra_setup/heat
diff options
context:
space:
mode:
Diffstat (limited to 'utils/infra_setup/heat')
-rwxr-xr-xutils/infra_setup/heat/common.py3
-rwxr-xr-xutils/infra_setup/heat/consts/parameters.py1
-rw-r--r--utils/infra_setup/heat/manager.py7
-rwxr-xr-xutils/infra_setup/heat/template.py4
-rwxr-xr-xutils/infra_setup/heat/tests/generate_template_test.py4
5 files changed, 13 insertions, 6 deletions
diff --git a/utils/infra_setup/heat/common.py b/utils/infra_setup/heat/common.py
index 28257ac7..ab0dadf5 100755
--- a/utils/infra_setup/heat/common.py
+++ b/utils/infra_setup/heat/common.py
@@ -97,6 +97,7 @@ def get_heat_api_version():
return api_version
return DEFAULT_HEAT_API_VERSION
+
def get_nova_api_version():
api_version = os.getenv('OS_COMPUTE_API_VERSION')
if api_version is not None:
@@ -110,4 +111,4 @@ def get_glance_api_version():
if api_version is not None:
log.info("GLANCE_API_VERSION is set in env as '%s'", api_version)
return api_version
- return DEFAULT_GLANCE_API_VERSION \ No newline at end of file
+ return DEFAULT_GLANCE_API_VERSION
diff --git a/utils/infra_setup/heat/consts/parameters.py b/utils/infra_setup/heat/consts/parameters.py
index f275c25b..15aa5b5d 100755
--- a/utils/infra_setup/heat/consts/parameters.py
+++ b/utils/infra_setup/heat/consts/parameters.py
@@ -7,7 +7,6 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-import files
# ------------------------------------------------------
# Directories and file locations
diff --git a/utils/infra_setup/heat/manager.py b/utils/infra_setup/heat/manager.py
index 3a270ac1..5c181ae6 100644
--- a/utils/infra_setup/heat/manager.py
+++ b/utils/infra_setup/heat/manager.py
@@ -11,6 +11,7 @@ import time
import common as op_utils
from glanceclient.client import Client as GlanceClient
from novaclient.client import Client as NovaClient
+from neutronclient.v2_0.client import Client as NeutronClient
def _get_glance_client():
@@ -28,6 +29,12 @@ def _get_nova_client():
session=sess)
+def _get_neutron_client():
+ sess = op_utils.get_session()
+ neutron_client = NeutronClient(session=sess)
+ return neutron_client
+
+
def stack_create_images(
imagefile=None,
image_name="bottlenecks_image"):
diff --git a/utils/infra_setup/heat/template.py b/utils/infra_setup/heat/template.py
index 28c20b72..cc652fb4 100755
--- a/utils/infra_setup/heat/template.py
+++ b/utils/infra_setup/heat/template.py
@@ -114,9 +114,9 @@ class HeatStack(HeatObject):
i += 1
if self.uuid is not None:
- sys.exit("delete stack failed!!!")
+ sys.exit("delete stack failed!!!")
else:
- HeatStack.stacks.remove(self)
+ HeatStack.stacks.remove(self)
@staticmethod
def delete_all():
diff --git a/utils/infra_setup/heat/tests/generate_template_test.py b/utils/infra_setup/heat/tests/generate_template_test.py
index 83c905ad..374ca30e 100755
--- a/utils/infra_setup/heat/tests/generate_template_test.py
+++ b/utils/infra_setup/heat/tests/generate_template_test.py
@@ -7,14 +7,14 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+import template
+import common
import os
import unittest
import mock
import sys
sys.path.append("..")
-import template
-import common
def reset_common():