summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-11-17 08:00:54 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-11-17 08:00:54 +0000
commitf1fdd2336a3d5175a41082da4c6173addc1fb6b9 (patch)
treeb1bd224d248fa0428eb7c8601d86ef46de1efb97
parent36699b770448f8a94d08402f1cc92fcf34e2eac0 (diff)
parent03d40b81352f1f9de985f2cf598ac6c18be13b69 (diff)
Merge "Move installer adapters to the new modules directory"
-rw-r--r--modules/README.rst (renamed from modules/Readme.txt)4
-rw-r--r--modules/opnfv/__init__.py (renamed from utils/installer-adapter/__init__.py)0
-rw-r--r--modules/opnfv/installer_adapters/InstallerHandler.py (renamed from utils/installer-adapter/InstallerHandler.py)0
-rw-r--r--modules/opnfv/installer_adapters/__init__.py (renamed from modules/__init.py__)0
-rw-r--r--modules/opnfv/installer_adapters/apex/ApexAdapter.py (renamed from utils/installer-adapter/ApexAdapter.py)0
-rw-r--r--modules/opnfv/installer_adapters/apex/__init__.py (renamed from modules/installer_adapters/__init.py__)0
-rw-r--r--modules/opnfv/installer_adapters/compass/CompassAdapter.py (renamed from utils/installer-adapter/CompassAdapter.py)0
-rw-r--r--modules/opnfv/installer_adapters/compass/__init__.py (renamed from modules/utils/__init.py__)0
-rw-r--r--modules/opnfv/installer_adapters/fuel/FuelAdapter.py (renamed from utils/installer-adapter/FuelAdapter.py)6
-rw-r--r--modules/opnfv/installer_adapters/fuel/__init__.py0
-rw-r--r--modules/opnfv/installer_adapters/fuel/example.py (renamed from utils/installer-adapter/example.py)0
-rw-r--r--modules/opnfv/installer_adapters/joid/JoidAdapter.py (renamed from utils/installer-adapter/JoidAdapter.py)0
-rw-r--r--modules/opnfv/installer_adapters/joid/__init__.py0
-rw-r--r--modules/opnfv/utils/OPNFVLogger.py (renamed from utils/installer-adapter/RelengLogger.py)0
-rw-r--r--modules/opnfv/utils/SSHUtils.py (renamed from utils/installer-adapter/SSHUtils.py)5
-rw-r--r--modules/opnfv/utils/__init__.py0
16 files changed, 8 insertions, 7 deletions
diff --git a/modules/Readme.txt b/modules/README.rst
index 32becc21e..7c91eca5a 100644
--- a/modules/Readme.txt
+++ b/modules/README.rst
@@ -3,8 +3,8 @@ This directory may be used to add new tools that might be useful for any
project in OPNFV. This tools must be python based and shall be imported
as follows:
- from releng.modules.utils import SSHUtils
- from releng.modules.utils import RelengLogger
+ from opnfv.utils import SSHUtils
+ from opnfv.utils import RelengLogger
...
For further information about how to use this modules directory, contact:
diff --git a/utils/installer-adapter/__init__.py b/modules/opnfv/__init__.py
index e69de29bb..e69de29bb 100644
--- a/utils/installer-adapter/__init__.py
+++ b/modules/opnfv/__init__.py
diff --git a/utils/installer-adapter/InstallerHandler.py b/modules/opnfv/installer_adapters/InstallerHandler.py
index b81b806ca..b81b806ca 100644
--- a/utils/installer-adapter/InstallerHandler.py
+++ b/modules/opnfv/installer_adapters/InstallerHandler.py
diff --git a/modules/__init.py__ b/modules/opnfv/installer_adapters/__init__.py
index e69de29bb..e69de29bb 100644
--- a/modules/__init.py__
+++ b/modules/opnfv/installer_adapters/__init__.py
diff --git a/utils/installer-adapter/ApexAdapter.py b/modules/opnfv/installer_adapters/apex/ApexAdapter.py
index 17a27b10a..17a27b10a 100644
--- a/utils/installer-adapter/ApexAdapter.py
+++ b/modules/opnfv/installer_adapters/apex/ApexAdapter.py
diff --git a/modules/installer_adapters/__init.py__ b/modules/opnfv/installer_adapters/apex/__init__.py
index e69de29bb..e69de29bb 100644
--- a/modules/installer_adapters/__init.py__
+++ b/modules/opnfv/installer_adapters/apex/__init__.py
diff --git a/utils/installer-adapter/CompassAdapter.py b/modules/opnfv/installer_adapters/compass/CompassAdapter.py
index 47cbc646d..47cbc646d 100644
--- a/utils/installer-adapter/CompassAdapter.py
+++ b/modules/opnfv/installer_adapters/compass/CompassAdapter.py
diff --git a/modules/utils/__init.py__ b/modules/opnfv/installer_adapters/compass/__init__.py
index e69de29bb..e69de29bb 100644
--- a/modules/utils/__init.py__
+++ b/modules/opnfv/installer_adapters/compass/__init__.py
diff --git a/utils/installer-adapter/FuelAdapter.py b/modules/opnfv/installer_adapters/fuel/FuelAdapter.py
index 672fd5175..95b2ab673 100644
--- a/utils/installer-adapter/FuelAdapter.py
+++ b/modules/opnfv/installer_adapters/fuel/FuelAdapter.py
@@ -8,8 +8,8 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-import SSHUtils as ssh_utils
-import RelengLogger as rl
+import opnfv.modules.utils.SSHUtils as ssh_utils
+import opnfv.modules.utils.OPNFVLogger as logger
class FuelAdapter:
@@ -22,7 +22,7 @@ class FuelAdapter:
installer_ip,
self.installer_user,
password=self.installer_password)
- self.logger = rl.Logger("Handler").getLogger()
+ self.logger = logger.Logger("FuelHandler").getLogger()
def runcmd_fuel_installer(self, cmd):
_, stdout, stderr = (self
diff --git a/modules/opnfv/installer_adapters/fuel/__init__.py b/modules/opnfv/installer_adapters/fuel/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/opnfv/installer_adapters/fuel/__init__.py
diff --git a/utils/installer-adapter/example.py b/modules/opnfv/installer_adapters/fuel/example.py
index 804d79c3d..804d79c3d 100644
--- a/utils/installer-adapter/example.py
+++ b/modules/opnfv/installer_adapters/fuel/example.py
diff --git a/utils/installer-adapter/JoidAdapter.py b/modules/opnfv/installer_adapters/joid/JoidAdapter.py
index be8c2ebac..be8c2ebac 100644
--- a/utils/installer-adapter/JoidAdapter.py
+++ b/modules/opnfv/installer_adapters/joid/JoidAdapter.py
diff --git a/modules/opnfv/installer_adapters/joid/__init__.py b/modules/opnfv/installer_adapters/joid/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/opnfv/installer_adapters/joid/__init__.py
diff --git a/utils/installer-adapter/RelengLogger.py b/modules/opnfv/utils/OPNFVLogger.py
index 6fa4ef2e2..6fa4ef2e2 100644
--- a/utils/installer-adapter/RelengLogger.py
+++ b/modules/opnfv/utils/OPNFVLogger.py
diff --git a/utils/installer-adapter/SSHUtils.py b/modules/opnfv/utils/SSHUtils.py
index c93888694..2f48addbf 100644
--- a/utils/installer-adapter/SSHUtils.py
+++ b/modules/opnfv/utils/SSHUtils.py
@@ -10,10 +10,10 @@
import paramiko
-import RelengLogger as rl
+import opnfv.modules.utils.OPNFVLogger as OPNFVLogger
import os
-logger = rl.Logger('SSHUtils').getLogger()
+logger = OPNFVLogger.Logger('SSHUtils').getLogger()
def get_ssh_client(hostname, username, password=None, jumphost=None):
@@ -66,6 +66,7 @@ class JumpHostHopClient(paramiko.SSHClient):
'''
Connect to a remote server using a jumphost hop
'''
+
def __init__(self, *args, **kwargs):
self.logger = rl.Logger("JumpHostHopClient").getLogger()
self.jumphost_ssh = None
diff --git a/modules/opnfv/utils/__init__.py b/modules/opnfv/utils/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/modules/opnfv/utils/__init__.py