diff --git a/confluent_server/bin/confluentsrv.py b/confluent_server/bin/confluentsrv.py
index fbc929ea..39920e53 100644
--- a/confluent_server/bin/confluentsrv.py
+++ b/confluent_server/bin/confluentsrv.py
@@ -23,7 +23,7 @@ print(path)
if path.startswith('/opt'):
# if installed into system path, do not muck with things
sys.path.append(path)
-import confluentd.main
+import confluent.main
#import cProfile
#import time
@@ -33,7 +33,7 @@ import confluentd.main
import multiprocessing
if __name__ == '__main__':
multiprocessing.freeze_support()
- confluentd.main.run()
+ confluent.main.run()
#except:
# pass
#p.disable()
diff --git a/confluent_server/confluentd/__init__.py b/confluent_server/confluent/__init__.py
similarity index 100%
rename from confluent_server/confluentd/__init__.py
rename to confluent_server/confluent/__init__.py
diff --git a/confluent_server/confluentd/alerts.py b/confluent_server/confluent/alerts.py
similarity index 93%
rename from confluent_server/confluentd/alerts.py
rename to confluent_server/confluent/alerts.py
index 6acd3b62..81328470 100644
--- a/confluent_server/confluentd/alerts.py
+++ b/confluent_server/confluent/alerts.py
@@ -30,9 +30,9 @@
__author__ = 'jjohnson2'
-import confluentd.exceptions as exc
-import confluentd.lookuptools as lookuptools
-import confluentd.core
+import confluent.exceptions as exc
+import confluent.lookuptools as lookuptools
+import confluent.core
def decode_alert(varbinds, configmanager):
"""Decode an SNMP alert for a server
@@ -53,7 +53,7 @@ def decode_alert(varbinds, configmanager):
if node is None:
raise exc.InvalidArgumentException(
'Unable to find a node with specified manager')
- return confluentd.core.handle_path(
+ return confluent.core.handle_path(
'/nodes/{0}/events/hardware/decode'.format(node), 'update',
configmanager, varbinds, autostrip=False)
diff --git a/confluent_server/confluentd/auth.py b/confluent_server/confluent/auth.py
similarity index 99%
rename from confluent_server/confluentd/auth.py
rename to confluent_server/confluent/auth.py
index a06a59fe..709ac3ca 100644
--- a/confluent_server/confluentd/auth.py
+++ b/confluent_server/confluent/auth.py
@@ -19,7 +19,7 @@
# the PBKDF2 transform is skipped unless a user has been idle for sufficient
# time
-import confluentd.config.configmanager as configmanager
+import confluent.config.configmanager as configmanager
import eventlet
import eventlet.tpool
import Crypto.Protocol.KDF as KDF
diff --git a/confluent_server/confluentd/config/__init__.py b/confluent_server/confluent/config/__init__.py
similarity index 100%
rename from confluent_server/confluentd/config/__init__.py
rename to confluent_server/confluent/config/__init__.py
diff --git a/confluent_server/confluentd/config/attributes.py b/confluent_server/confluent/config/attributes.py
similarity index 100%
rename from confluent_server/confluentd/config/attributes.py
rename to confluent_server/confluent/config/attributes.py
diff --git a/confluent_server/confluentd/config/configmanager.py b/confluent_server/confluent/config/configmanager.py
similarity index 99%
rename from confluent_server/confluentd/config/configmanager.py
rename to confluent_server/confluent/config/configmanager.py
index 65e933af..97856739 100644
--- a/confluent_server/confluentd/config/configmanager.py
+++ b/confluent_server/confluent/config/configmanager.py
@@ -64,10 +64,10 @@ from Crypto.Hash import SHA256
import anydbm as dbm
import ast
import base64
-import confluentd.config.attributes as allattributes
-import confluentd.log
-import confluentd.util
-import confluentd.exceptions as exc
+import confluent.config.attributes as allattributes
+import confluent.log
+import confluent.util
+import confluent.exceptions as exc
import copy
import cPickle
import errno
@@ -276,11 +276,11 @@ def _generate_new_id():
# generate a random id outside the usual ranges used for normal users in
# /etc/passwd. Leave an equivalent amount of space near the end disused,
# just in case
- uid = str(confluentd.util.securerandomnumber(65537, 4294901759))
+ uid = str(confluent.util.securerandomnumber(65537, 4294901759))
if 'idmap' not in _cfgstore['main']:
return uid
while uid in _cfgstore['main']['idmap']:
- uid = str(confluentd.util.securerandomnumber(65537, 4294901759))
+ uid = str(confluent.util.securerandomnumber(65537, 4294901759))
return uid
@@ -1013,7 +1013,7 @@ class ConfigManager(object):
except Exception:
global tracelog
if tracelog is None:
- tracelog = confluentd.log.Logger('trace')
+ tracelog = confluent.log.Logger('trace')
tracelog.log(traceback.format_exc(), ltype=log.DataTypes.event,
event=log.Events.stacktrace)
diff --git a/confluent_server/confluentd/consoleserver.py b/confluent_server/confluent/consoleserver.py
similarity index 98%
rename from confluent_server/confluentd/consoleserver.py
rename to confluent_server/confluent/consoleserver.py
index 25eb1287..37a70161 100644
--- a/confluent_server/confluentd/consoleserver.py
+++ b/confluent_server/confluent/consoleserver.py
@@ -21,12 +21,12 @@
#we track nodes that are actively being logged, watched, or have attached
#there should be no more than one handler per node
import collections
-import confluentd.config.configmanager as configmodule
-import confluentd.exceptions as exc
-import confluentd.interface.console as conapi
-import confluentd.log as log
-import confluentd.core as plugin
-import confluentd.util as util
+import confluent.config.configmanager as configmodule
+import confluent.exceptions as exc
+import confluent.interface.console as conapi
+import confluent.log as log
+import confluent.core as plugin
+import confluent.util as util
import eventlet
import eventlet.event
import random
diff --git a/confluent_server/confluentd/core.py b/confluent_server/confluent/core.py
similarity index 98%
rename from confluent_server/confluentd/core.py
rename to confluent_server/confluent/core.py
index 4203e1b3..43ddce12 100644
--- a/confluent_server/confluentd/core.py
+++ b/confluent_server/confluent/core.py
@@ -33,14 +33,14 @@
# functions. Console is special and just get's passed through
# see API.txt
-import confluentd.alerts as alerts
-import confluentd.config.attributes as attrscheme
-import confluentd.interface.console as console
-import confluentd.exceptions as exc
-import confluentd.messages as msg
-import confluentd.noderange as noderange
+import confluent.alerts as alerts
+import confluent.config.attributes as attrscheme
+import confluent.interface.console as console
+import confluent.exceptions as exc
+import confluent.messages as msg
+import confluent.noderange as noderange
try:
- import confluentd.shellmodule as shellmodule
+ import confluent.shellmodule as shellmodule
except ImportError:
pass
import itertools
diff --git a/confluent_server/confluentd/exceptions.py b/confluent_server/confluent/exceptions.py
similarity index 100%
rename from confluent_server/confluentd/exceptions.py
rename to confluent_server/confluent/exceptions.py
diff --git a/confluent_server/confluentd/httpapi.py b/confluent_server/confluent/httpapi.py
similarity index 95%
rename from confluent_server/confluentd/httpapi.py
rename to confluent_server/confluent/httpapi.py
index 6901efed..ba818a53 100644
--- a/confluent_server/confluentd/httpapi.py
+++ b/confluent_server/confluent/httpapi.py
@@ -18,15 +18,15 @@
# It additionally manages httprequest console sessions
import base64
import Cookie
-import confluentd.auth as auth
-import confluentd.config.attributes as attribs
-import confluentd.consoleserver as consoleserver
-import confluentd.exceptions as exc
-import confluentd.log as log
-import confluentd.messages
-import confluentd.core as pluginapi
+import confluent.auth as auth
+import confluent.config.attributes as attribs
+import confluent.consoleserver as consoleserver
+import confluent.exceptions as exc
+import confluent.log as log
+import confluent.messages
+import confluent.core as pluginapi
import confluent.tlvdata
-import confluentd.util as util
+import confluent.util as util
import copy
import eventlet
import json
@@ -62,44 +62,44 @@ class RobustCookie(Cookie.SimpleCookie):
def group_creation_resources():
- yield confluentd.messages.Attributes(
+ yield confluent.messages.Attributes(
kv={'name': None}, desc="Name of the group").html() + '
'
- yield confluentd.messages.ListAttributes(kv={'nodes': []},
+ yield confluent.messages.ListAttributes(kv={'nodes': []},
desc='Nodes to add to the group'
).html() + '
\n'
for attr in sorted(attribs.node.iterkeys()):
if attr == 'groups':
continue
if attr.startswith("secret."):
- yield confluentd.messages.CryptedAttributes(
+ yield confluent.messages.CryptedAttributes(
kv={attr: None},
desc=attribs.node[attr]['description']).html() + '
\n'
elif ('type' in attribs.node[attr] and
list == attribs.node[attr]['type']):
- yield confluentd.messages.ListAttributes(
+ yield confluent.messages.ListAttributes(
kv={attr: []},
desc=attribs.node[attr]['description']).html() + '
\n'
else:
- yield confluentd.messages.Attributes(
+ yield confluent.messages.Attributes(
kv={attr: None},
desc=attribs.node[attr]['description']).html() + '
\n'
def node_creation_resources():
- yield confluentd.messages.Attributes(
+ yield confluent.messages.Attributes(
kv={'name': None}, desc="Name of the node").html() + '
'
for attr in sorted(attribs.node.iterkeys()):
if attr.startswith("secret."):
- yield confluentd.messages.CryptedAttributes(
+ yield confluent.messages.CryptedAttributes(
kv={attr: None},
desc=attribs.node[attr]['description']).html() + '
\n'
elif ('type' in attribs.node[attr] and
list == attribs.node[attr]['type']):
- yield confluentd.messages.ListAttributes(
+ yield confluent.messages.ListAttributes(
kv={attr: []},
desc=attribs.node[attr]['description']).html() + '
\n'
else:
- yield confluentd.messages.Attributes(
+ yield confluent.messages.Attributes(
kv={attr: None},
desc=attribs.node[attr]['description']).html() + '
\n'
@@ -121,11 +121,11 @@ def user_creation_resources():
}
for attr in sorted(credential.iterkeys()):
if attr == "password":
- yield confluentd.messages.CryptedAttributes(
+ yield confluent.messages.CryptedAttributes(
kv={attr: None},
desc=credential[attr]['description']).html() + '
\n'
else:
- yield confluentd.messages.Attributes(
+ yield confluent.messages.Attributes(
kv={attr: None},
desc=credential[attr]['description']).html() + '
\n'
@@ -466,7 +466,7 @@ def _assemble_html(responses, resource, querydict, url, extension):
extension)
pendingrsp = []
for rsp in responses:
- if isinstance(rsp, confluentd.messages.LinkRelation):
+ if isinstance(rsp, confluent.messages.LinkRelation):
yield rsp.html(extension) + "
"
else:
pendingrsp.append(rsp)
@@ -512,7 +512,7 @@ def _assemble_json(responses, resource, url, extension):
links['collection'] = {"href": "./" + extension}
rspdata = {}
for rsp in responses:
- if isinstance(rsp, confluentd.messages.LinkRelation):
+ if isinstance(rsp, confluent.messages.LinkRelation):
haldata = rsp.raw()
for hk in haldata.iterkeys():
if 'href' in haldata[hk]:
diff --git a/confluent_server/confluentd/interface/__init__.py b/confluent_server/confluent/interface/__init__.py
similarity index 100%
rename from confluent_server/confluentd/interface/__init__.py
rename to confluent_server/confluent/interface/__init__.py
diff --git a/confluent_server/confluentd/interface/console.py b/confluent_server/confluent/interface/console.py
similarity index 100%
rename from confluent_server/confluentd/interface/console.py
rename to confluent_server/confluent/interface/console.py
diff --git a/confluent_server/confluentd/log.py b/confluent_server/confluent/log.py
similarity index 98%
rename from confluent_server/confluentd/log.py
rename to confluent_server/confluent/log.py
index b95a2f75..f6aea0bd 100644
--- a/confluent_server/confluentd/log.py
+++ b/confluent_server/confluent/log.py
@@ -60,7 +60,7 @@
# or other fields)
import collections
-import confluentd.config.configmanager
+import confluent.config.configmanager
import eventlet
import json
import os
@@ -128,7 +128,7 @@ class Logger(object):
# we are just a copy of the same object
return
self.initialized = True
- self.filepath = confluentd.config.configmanager.get_global("logdirectory")
+ self.filepath = confluent.config.configmanager.get_global("logdirectory")
if self.filepath is None:
if os.name == 'nt':
self.filepath = os.path.join(
diff --git a/confluent_server/confluentd/lookuptools.py b/confluent_server/confluent/lookuptools.py
similarity index 97%
rename from confluent_server/confluentd/lookuptools.py
rename to confluent_server/confluent/lookuptools.py
index 2da19e32..6dbde2b2 100644
--- a/confluent_server/confluentd/lookuptools.py
+++ b/confluent_server/confluent/lookuptools.py
@@ -25,7 +25,7 @@
# service should have a null tenant and a tenant entry that correlates)
__author__ = 'jjohnson2'
-import confluentd.config.configmanager as configmanager
+import confluent.config.configmanager as configmanager
import itertools
import socket
diff --git a/confluent_server/confluentd/main.py b/confluent_server/confluent/main.py
similarity index 95%
rename from confluent_server/confluentd/main.py
rename to confluent_server/confluent/main.py
index 1feb80eb..230a404e 100644
--- a/confluent_server/confluentd/main.py
+++ b/confluent_server/confluent/main.py
@@ -26,14 +26,14 @@
# It also will optionally snoop SLP DA requests
import atexit
-import confluentd.auth as auth
-import confluentd.config.configmanager as configmanager
-import confluentd.consoleserver as consoleserver
-import confluentd.core as confluentcore
-import confluentd.httpapi as httpapi
-import confluentd.log as log
+import confluent.auth as auth
+import confluent.config.configmanager as configmanager
+import confluent.consoleserver as consoleserver
+import confluent.core as confluentcore
+import confluent.httpapi as httpapi
+import confluent.log as log
try:
- import confluentd.sockapi as sockapi
+ import confluent.sockapi as sockapi
except ImportError:
#On platforms without pwd, give up on the sockapi in general and be http
#only for now
diff --git a/confluent_server/confluentd/messages.py b/confluent_server/confluent/messages.py
similarity index 99%
rename from confluent_server/confluentd/messages.py
rename to confluent_server/confluent/messages.py
index eb9e93ff..08cad09c 100644
--- a/confluent_server/confluentd/messages.py
+++ b/confluent_server/confluent/messages.py
@@ -18,7 +18,7 @@
# This module implements client/server messages emitted from plugins.
# Things are defined here to 'encourage' developers to coordinate information
# format. This is also how different data formats are supported
-import confluentd.exceptions as exc
+import confluent.exceptions as exc
import json
valid_health_values = set([
diff --git a/confluent_server/confluentd/noderange.py b/confluent_server/confluent/noderange.py
similarity index 100%
rename from confluent_server/confluentd/noderange.py
rename to confluent_server/confluent/noderange.py
diff --git a/confluent_server/confluentd/plugins/__init__.py b/confluent_server/confluent/plugins/__init__.py
similarity index 100%
rename from confluent_server/confluentd/plugins/__init__.py
rename to confluent_server/confluent/plugins/__init__.py
diff --git a/confluent_server/confluentd/plugins/configuration/__init__.py b/confluent_server/confluent/plugins/configuration/__init__.py
similarity index 100%
rename from confluent_server/confluentd/plugins/configuration/__init__.py
rename to confluent_server/confluent/plugins/configuration/__init__.py
diff --git a/confluent_server/confluentd/plugins/configuration/attributes.py b/confluent_server/confluent/plugins/configuration/attributes.py
similarity index 98%
rename from confluent_server/confluentd/plugins/configuration/attributes.py
rename to confluent_server/confluent/plugins/configuration/attributes.py
index e05a824d..9ee0f149 100644
--- a/confluent_server/confluentd/plugins/configuration/attributes.py
+++ b/confluent_server/confluent/plugins/configuration/attributes.py
@@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import confluentd.exceptions as exc
-import confluentd.messages as msg
-import confluentd.config.attributes as allattributes
+import confluent.exceptions as exc
+import confluent.messages as msg
+import confluent.config.attributes as allattributes
def retrieve(nodes, element, configmanager, inputdata):
diff --git a/confluent_server/confluentd/plugins/hardwaremanagement/__init__.py b/confluent_server/confluent/plugins/hardwaremanagement/__init__.py
similarity index 100%
rename from confluent_server/confluentd/plugins/hardwaremanagement/__init__.py
rename to confluent_server/confluent/plugins/hardwaremanagement/__init__.py
diff --git a/confluent_server/confluentd/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py
similarity index 99%
rename from confluent_server/confluentd/plugins/hardwaremanagement/ipmi.py
rename to confluent_server/confluent/plugins/hardwaremanagement/ipmi.py
index 4140ef0c..a03e67b9 100644
--- a/confluent_server/confluentd/plugins/hardwaremanagement/ipmi.py
+++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py
@@ -14,9 +14,9 @@
# limitations under the License.
import atexit
-import confluentd.exceptions as exc
-import confluentd.interface.console as conapi
-import confluentd.messages as msg
+import confluent.exceptions as exc
+import confluent.interface.console as conapi
+import confluent.messages as msg
import eventlet
import eventlet.event
import eventlet.green.threading as threading
diff --git a/confluent_server/confluentd/shellmodule.py b/confluent_server/confluent/shellmodule.py
similarity index 99%
rename from confluent_server/confluentd/shellmodule.py
rename to confluent_server/confluent/shellmodule.py
index 811ea1ee..08b6a8ef 100644
--- a/confluent_server/confluentd/shellmodule.py
+++ b/confluent_server/confluent/shellmodule.py
@@ -22,7 +22,7 @@
# only by the process owner and such an owner would be able to read a file
# anyway. Regardless, it is advisable to 'unset'
-import confluentd.interface.console as conapi
+import confluent.interface.console as conapi
import eventlet
import eventlet.green.select as select
import eventlet.green.subprocess as subprocess
diff --git a/confluent_server/confluentd/sockapi.py b/confluent_server/confluent/sockapi.py
similarity index 97%
rename from confluent_server/confluentd/sockapi.py
rename to confluent_server/confluent/sockapi.py
index 9cb9ba70..9a67c3ca 100644
--- a/confluent_server/confluentd/sockapi.py
+++ b/confluent_server/confluent/sockapi.py
@@ -32,13 +32,13 @@ import eventlet.green.socket as socket
import eventlet.green.ssl as ssl
import eventlet
-import confluentd.auth as auth
+import confluent.auth as auth
import confluent.tlvdata as tlvdata
-import confluentd.consoleserver as consoleserver
-import confluentd.config.configmanager as configmanager
-import confluentd.exceptions as exc
-import confluentd.log as log
-import confluentd.core as pluginapi
+import confluent.consoleserver as consoleserver
+import confluent.config.configmanager as configmanager
+import confluent.exceptions as exc
+import confluent.log as log
+import confluent.core as pluginapi
tracelog = None
diff --git a/confluent_server/confluentd/util.py b/confluent_server/confluent/util.py
similarity index 100%
rename from confluent_server/confluentd/util.py
rename to confluent_server/confluent/util.py
diff --git a/confluent_server/confluentsrv.spec b/confluent_server/confluentsrv.spec
index 0847860c..0d558ad2 100644
--- a/confluent_server/confluentsrv.spec
+++ b/confluent_server/confluentsrv.spec
@@ -4,7 +4,7 @@ block_cipher = None
a = Analysis(['c:/Python27/Scripts/confluentsrv.py'],
- pathex=['c:\\Users\\jjohnson2\\Development\\confluent\\confluent_server'],
+ pathex=[],
hiddenimports=['pyghmi.constants', 'pyghmi.exceptions', 'pyghmi.ipmi.console', 'pyghmi.ipmi.private.constants', 'pyghmi.ipmi.private', 'pyghmi.ipmi.private.session', 'pyghmi.ipmi.command', 'pyghmi.ipmi.events', 'pyghmi.ipmi.fru', 'pyghmi.ipmi.private.spd', 'pyghmi.ipmi.oem.lookup', 'pyghmi.ipmi.oem.generic', 'pyghmi.ipmi.oem.lenovo', 'pyghmi.ipmi.private.util', 'pyghmi.ipmi.sdr'],
hookspath=None,
runtime_hooks=None,
@@ -24,7 +24,7 @@ coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
- Tree('confluentd/plugins', prefix='confluentd/plugins'),
+ Tree('confluent/plugins', prefix='confluent/plugins'),
strip=None,
upx=True,
name='confluentsrv')