summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Lausuch <jose.lausuch@ericsson.com>2017-01-12 16:08:56 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-01-12 16:08:56 +0000
commit1d67b000f5def7093ae41d63d0d52f07b74b4948 (patch)
tree9a51aa988e7007dd1445a2cc07075c8e11f0afef
parent8d8493864406132bcc8e84a38a67b5fc3947d566 (diff)
parentd53bc21e5b8eed5fb24a0f994db289e2b50953f1 (diff)
Merge "Add a new installer daisy adapter to modules directory"
-rw-r--r--modules/opnfv/installer_adapters/InstallerHandler.py5
-rw-r--r--modules/opnfv/installer_adapters/daisy/DaisyAdapter.py32
-rw-r--r--modules/opnfv/installer_adapters/daisy/__init__.py0
-rw-r--r--modules/opnfv/utils/Credentials.py8
-rw-r--r--modules/opnfv/utils/constants.py2
5 files changed, 44 insertions, 3 deletions
diff --git a/modules/opnfv/installer_adapters/InstallerHandler.py b/modules/opnfv/installer_adapters/InstallerHandler.py
index e353ef3f4..dc5bdb9d6 100644
--- a/modules/opnfv/installer_adapters/InstallerHandler.py
+++ b/modules/opnfv/installer_adapters/InstallerHandler.py
@@ -11,9 +11,10 @@ from opnfv.installer_adapters.fuel.FuelAdapter import FuelAdapter
from opnfv.installer_adapters.apex.ApexAdapter import ApexAdapter
from opnfv.installer_adapters.compass.CompassAdapter import CompassAdapter
from opnfv.installer_adapters.joid.JoidAdapter import JoidAdapter
+from opnfv.installer_adapters.daisy.DaisyAdapter import DaisyAdapter
-INSTALLERS = ["fuel", "apex", "compass", "joid"]
+INSTALLERS = ["fuel", "apex", "compass", "joid", "daisy"]
class InstallerHandler:
@@ -38,6 +39,8 @@ class InstallerHandler:
self.InstallerAdapter = CompassAdapter(self.installer_ip)
elif self.installer == INSTALLERS[3]:
self.InstallerAdapter = JoidAdapter(self.installer_ip)
+ elif self.installer == INSTALLERS[4]:
+ self.InstallerAdapter = DaisyAdapter(self.installer_ip)
else:
print("Installer %s is not valid. "
"Please use one of the followings: %s"
diff --git a/modules/opnfv/installer_adapters/daisy/DaisyAdapter.py b/modules/opnfv/installer_adapters/daisy/DaisyAdapter.py
new file mode 100644
index 000000000..9b06f4c3c
--- /dev/null
+++ b/modules/opnfv/installer_adapters/daisy/DaisyAdapter.py
@@ -0,0 +1,32 @@
+##############################################################################
+# Copyright (c) 2016 Ericsson AB and others.
+# Author: Jose Lausuch (jose.lausuch@ericsson.com)
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+
+class DaisyAdapter:
+
+ def __init__(self, installer_ip):
+ self.installer_ip = installer_ip
+
+ def get_deployment_info(self):
+ pass
+
+ def get_nodes(self):
+ pass
+
+ def get_controller_ips(self):
+ pass
+
+ def get_compute_ips(self):
+ pass
+
+ def get_file_from_installer(self, origin, target, options=None):
+ pass
+
+ def get_file_from_controller(self, origin, target, ip=None, options=None):
+ pass
diff --git a/modules/opnfv/installer_adapters/daisy/__init__.py b/modules/opnfv/installer_adapters/daisy/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/opnfv/installer_adapters/daisy/__init__.py
diff --git a/modules/opnfv/utils/Credentials.py b/modules/opnfv/utils/Credentials.py
index 1882692b3..6441b841c 100644
--- a/modules/opnfv/utils/Credentials.py
+++ b/modules/opnfv/utils/Credentials.py
@@ -47,7 +47,7 @@ class Credentials(object):
password)
def __check_installer_name(self, installer):
- if installer not in ("apex", "compass", "fuel", "joid"):
+ if installer not in ("apex", "compass", "daisy", "fuel", "joid"):
return os.EX_CONFIG
else:
return os.EX_OK
@@ -69,6 +69,10 @@ class Credentials(object):
# TODO
pass
+ def __fetch_creds_daisy(self, target_path):
+ # TODO
+ pass
+
def __fetch_creds_fuel(self, target_path):
creds_file = '/root/openrc'
try:
@@ -95,6 +99,8 @@ class Credentials(object):
self.__fetch_creds_apex(target_path)
elif self.installer == "compass":
self.__fetch_creds_compass(target_path)
+ elif self.installer == "daisy":
+ self.__fetch_creds_daisy(target_path)
elif self.installer == "fuel":
self.__fetch_creds_fuel(target_path)
elif self.installer == "joid":
diff --git a/modules/opnfv/utils/constants.py b/modules/opnfv/utils/constants.py
index 29f0d02c5..a69cedda3 100644
--- a/modules/opnfv/utils/constants.py
+++ b/modules/opnfv/utils/constants.py
@@ -7,7 +7,7 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
-INSTALLERS = ['apex', 'fuel', 'compass', 'joid']
+INSTALLERS = ['apex', 'fuel', 'compass', 'joid', "daisy"]
VERSIONS = ['arno', 'brahmaputra', 'colorado', 'danube']
EXIT_OK = 0