summaryrefslogtreecommitdiffstats
path: root/doctor_tests/installer
diff options
context:
space:
mode:
Diffstat (limited to 'doctor_tests/installer')
-rw-r--r--doctor_tests/installer/apex.py1
-rw-r--r--doctor_tests/installer/base.py11
-rw-r--r--doctor_tests/installer/daisy.py10
3 files changed, 12 insertions, 10 deletions
diff --git a/doctor_tests/installer/apex.py b/doctor_tests/installer/apex.py
index 90304a27..e106f249 100644
--- a/doctor_tests/installer/apex.py
+++ b/doctor_tests/installer/apex.py
@@ -39,6 +39,7 @@ class ApexInstaller(BaseInstaller):
self.get_ssh_key_from_installer()
self.get_controller_ips()
+ self.create_flavor()
self.set_apply_patches()
self.setup_stunnel()
diff --git a/doctor_tests/installer/base.py b/doctor_tests/installer/base.py
index dcb5b1d8..27e75024 100644
--- a/doctor_tests/installer/base.py
+++ b/doctor_tests/installer/base.py
@@ -9,6 +9,9 @@
import abc
import six
+from doctor_tests.identity_auth import get_session
+from doctor_tests.os_clients import nova_client
+
@six.add_metaclass(abc.ABCMeta)
class BaseInstaller(object):
@@ -35,3 +38,11 @@ class BaseInstaller(object):
@abc.abstractmethod
def cleanup(self):
pass
+
+ def create_flavor(self):
+ self.nova = \
+ nova_client(self.conf.nova_version,
+ get_session())
+ flavors = {flavor.name: flavor for flavor in self.nova.flavors.list()}
+ if self.conf.flavor not in flavors:
+ self.nova.flavors.create(self.conf.flavor, 512, 1, 1)
diff --git a/doctor_tests/installer/daisy.py b/doctor_tests/installer/daisy.py
index 3b1fbb24..d8b6d863 100644
--- a/doctor_tests/installer/daisy.py
+++ b/doctor_tests/installer/daisy.py
@@ -15,9 +15,7 @@ import subprocess
from doctor_tests.common.utils import get_doctor_test_root_dir
from doctor_tests.common.utils import SSHClient
-from doctor_tests.identity_auth import get_session
from doctor_tests.installer.base import BaseInstaller
-from doctor_tests.os_clients import nova_client
class DaisyInstaller(BaseInstaller):
@@ -88,14 +86,6 @@ class DaisyInstaller(BaseInstaller):
% (host_ip, hostname))
return host_ip
- def create_flavor(self):
- self.nova = \
- nova_client(self.conf.nova_version,
- get_session())
- flavors = {flavor.name: flavor for flavor in self.nova.flavors.list()}
- if self.conf.flavor not in flavors:
- self.nova.flavors.create(self.conf.flavor, 512, 1, 1)
-
def setup_stunnel(self):
self.log.info('Setup ssh stunnel in controller nodes'
'in Daisy installer......')