summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-04-24 15:44:06 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-04-25 10:45:14 -0400
commit044213c789c4f1ee214da3d70f02352b1aaa8673 (patch)
treefeb62ab035d27773f20be1e052a177c0c61299aa /src/lib/Bcfg2/Server/Plugins
parent0ff6b2788de683dd89203c7ae1393ea922a62c32 (diff)
downloadbcfg2-044213c789c4f1ee214da3d70f02352b1aaa8673.tar.gz
bcfg2-044213c789c4f1ee214da3d70f02352b1aaa8673.tar.bz2
bcfg2-044213c789c4f1ee214da3d70f02352b1aaa8673.zip
Fixing unit tests
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Cfg/CfgPrivateKeyCreator.py5
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Packages/Yum.py1
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Rules.py4
-rw-r--r--src/lib/Bcfg2/Server/Plugins/__init__.py4
4 files changed, 6 insertions, 8 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgPrivateKeyCreator.py b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgPrivateKeyCreator.py
index 735f23a1c..862726788 100644
--- a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgPrivateKeyCreator.py
+++ b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgPrivateKeyCreator.py
@@ -51,7 +51,7 @@ class CfgPrivateKeyCreator(CfgCreator, StructFile):
if (HAS_CRYPTO and
self.setup.cfp.has_section("sshkeys") and
self.setup.cfp.has_option("sshkeys", "passphrase")):
- return Bcfg2.Encrypption.get_passphrases()[
+ return Bcfg2.Server.Encryption.get_passphrases()[
self.setup.cfp.get("sshkeys", "passphrase")]
return None
@@ -196,7 +196,8 @@ class CfgPrivateKeyCreator(CfgCreator, StructFile):
privkey = open(filename).read()
if HAS_CRYPTO and self.passphrase:
self.debug_log("Cfg: Encrypting key data at %s" % filename)
- privkey = ssl_encrypt(privkey, self.passphrase)
+ privkey = Bcfg2.Server.Encryption.ssl_encrypt(privkey,
+ self.passphrase)
specificity['ext'] = '.crypt'
self.write_data(privkey, **specificity)
diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py b/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py
index ab96d3f59..b544eb47e 100644
--- a/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py
+++ b/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py
@@ -105,6 +105,7 @@ FL = '{http://linux.duke.edu/metadata/filelists}'
PULPSERVER = None
PULPCONFIG = None
+
def _setup_pulp():
""" Connect to a Pulp server and pass authentication credentials.
This only needs to be called once, but multiple calls won't hurt
diff --git a/src/lib/Bcfg2/Server/Plugins/Rules.py b/src/lib/Bcfg2/Server/Plugins/Rules.py
index fb294972c..3d4e8671d 100644
--- a/src/lib/Bcfg2/Server/Plugins/Rules.py
+++ b/src/lib/Bcfg2/Server/Plugins/Rules.py
@@ -25,8 +25,8 @@ class Rules(Bcfg2.Server.Plugin.PrioDir):
candidate):
return True
elif (entry.tag == "Path" and
- entry.get('name').rstrip("/") == \
- candidate.get("name").rstrip("/")):
+ entry.get('name').rstrip("/") ==
+ candidate.get("name").rstrip("/")):
# special case for Path tags:
# http://trac.mcs.anl.gov/projects/bcfg2/ticket/967
return True
diff --git a/src/lib/Bcfg2/Server/Plugins/__init__.py b/src/lib/Bcfg2/Server/Plugins/__init__.py
index ad51cf368..fdb20ed0a 100644
--- a/src/lib/Bcfg2/Server/Plugins/__init__.py
+++ b/src/lib/Bcfg2/Server/Plugins/__init__.py
@@ -1,5 +1 @@
"""Imports for Bcfg2.Server.Plugins."""
-
-from Bcfg2.Compat import walk_packages
-
-__all__ = [m[1] for m in walk_packages(path=__path__)]