From c5cb5649d58a41f32d96ab130d0207e54774f2cf Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 6 May 2014 13:37:31 -0400 Subject: [PATCH] Begin reorganizing content for packaging --- TODO | 3 ++- {bin => client/bin}/confetty | 4 ++-- {bin => client/bin}/nodepower | 2 +- {confluent => client/confluent}/__init__.py | 0 {confluent/common => client/confluent}/client.py | 2 +- client/requirements.txt | 1 + {confluent/common => confluent_common}/__init__.py | 0 {confluent/config => confluent_common/confluent}/__init__.py | 0 {confluent/common => confluent_common/confluent}/tlv.py | 0 {confluent/common => confluent_common/confluent}/tlvdata.py | 0 bin/confluent-server.py => confluent_server/bin/confluent | 5 ++++- .../interface => confluent_server/confluent}/__init__.py | 0 {confluent => confluent_server/confluent}/auth.py | 0 confluent_server/confluent/config/__init__.py | 0 .../confluent}/config/attributes.py | 0 .../confluent}/config/configmanager.py | 0 {confluent => confluent_server/confluent}/consoleserver.py | 0 {confluent => confluent_server/confluent}/core.py | 0 {confluent => confluent_server/confluent}/exceptions.py | 0 {confluent => confluent_server/confluent}/httpapi.py | 0 confluent_server/confluent/interface/__init__.py | 0 .../confluent}/interface/console.py | 0 {confluent => confluent_server/confluent}/log.py | 0 {confluent => confluent_server/confluent}/main.py | 0 {confluent => confluent_server/confluent}/messages.py | 0 {confluent => confluent_server/confluent}/noderange.py | 0 {confluent => confluent_server/confluent}/sockapi.py | 2 +- {confluent => confluent_server/confluent}/util.py | 0 .../plugins}/configuration/attributes.py | 0 .../plugins}/hardwaremanagement/ipmi.py | 0 30 files changed, 12 insertions(+), 7 deletions(-) rename {bin => client/bin}/confetty (99%) rename {bin => client/bin}/nodepower (95%) rename {confluent => client/confluent}/__init__.py (100%) rename {confluent/common => client/confluent}/client.py (99%) create mode 100644 client/requirements.txt rename {confluent/common => confluent_common}/__init__.py (100%) rename {confluent/config => confluent_common/confluent}/__init__.py (100%) rename {confluent/common => confluent_common/confluent}/tlv.py (100%) rename {confluent/common => confluent_common/confluent}/tlvdata.py (100%) rename bin/confluent-server.py => confluent_server/bin/confluent (87%) mode change 100644 => 100755 rename {confluent/interface => confluent_server/confluent}/__init__.py (100%) rename {confluent => confluent_server/confluent}/auth.py (100%) create mode 100644 confluent_server/confluent/config/__init__.py rename {confluent => confluent_server/confluent}/config/attributes.py (100%) rename {confluent => confluent_server/confluent}/config/configmanager.py (100%) rename {confluent => confluent_server/confluent}/consoleserver.py (100%) rename {confluent => confluent_server/confluent}/core.py (100%) rename {confluent => confluent_server/confluent}/exceptions.py (100%) rename {confluent => confluent_server/confluent}/httpapi.py (100%) create mode 100644 confluent_server/confluent/interface/__init__.py rename {confluent => confluent_server/confluent}/interface/console.py (100%) rename {confluent => confluent_server/confluent}/log.py (100%) rename {confluent => confluent_server/confluent}/main.py (100%) rename {confluent => confluent_server/confluent}/messages.py (100%) rename {confluent => confluent_server/confluent}/noderange.py (100%) rename {confluent => confluent_server/confluent}/sockapi.py (99%) rename {confluent => confluent_server/confluent}/util.py (100%) rename {plugins => confluent_server/plugins}/configuration/attributes.py (100%) rename {plugins => confluent_server/plugins}/hardwaremanagement/ipmi.py (100%) diff --git a/TODO b/TODO index bdd38ab3..3af93b9a 100644 --- a/TODO +++ b/TODO @@ -29,4 +29,5 @@ KeyError: '' -confetty to do right thing with respect to status updates when run right on a console. It currently clutters up the screen with data that would land in a titlebar --audit log did not show confetty activity for starting console \ No newline at end of file +-audit log did not show confetty activity for starting console +-read exclusive and full exclusive console access modes diff --git a/bin/confetty b/client/bin/confetty similarity index 99% rename from bin/confetty rename to client/bin/confetty index 735963f6..8d28a405 100755 --- a/bin/confetty +++ b/client/bin/confetty @@ -59,8 +59,8 @@ path = os.path.dirname(os.path.realpath(__file__)) path = os.path.realpath(os.path.join(path, '..')) sys.path.append(path) -import confluent.common.tlvdata as tlvdata -import confluent.common.client as client +import confluent.tlvdata as tlvdata +import confluent.client as client conserversequence = '\x05c' # ctrl-e, c diff --git a/bin/nodepower b/client/bin/nodepower similarity index 95% rename from bin/nodepower rename to client/bin/nodepower index 77c38b96..5c38fc4f 100644 --- a/bin/nodepower +++ b/client/bin/nodepower @@ -22,7 +22,7 @@ path = os.path.dirname(os.path.realpath(__file__)) path = os.path.realpath(os.path.join(path, '..')) sys.path.append(path) -import confluent.common.client as client +import confluent.client as client node = sys.argv[1] diff --git a/confluent/__init__.py b/client/confluent/__init__.py similarity index 100% rename from confluent/__init__.py rename to client/confluent/__init__.py diff --git a/confluent/common/client.py b/client/confluent/client.py similarity index 99% rename from confluent/common/client.py rename to client/confluent/client.py index 660b9f51..4f08f2e8 100644 --- a/confluent/common/client.py +++ b/client/confluent/client.py @@ -19,7 +19,7 @@ import errno import os import socket import ssl -import confluent.common.tlvdata as tlvdata +import confluent.tlvdata as tlvdata SO_PASSCRED = 16 diff --git a/client/requirements.txt b/client/requirements.txt new file mode 100644 index 00000000..e57912ee --- /dev/null +++ b/client/requirements.txt @@ -0,0 +1 @@ +confluent_common>=0.1 diff --git a/confluent/common/__init__.py b/confluent_common/__init__.py similarity index 100% rename from confluent/common/__init__.py rename to confluent_common/__init__.py diff --git a/confluent/config/__init__.py b/confluent_common/confluent/__init__.py similarity index 100% rename from confluent/config/__init__.py rename to confluent_common/confluent/__init__.py diff --git a/confluent/common/tlv.py b/confluent_common/confluent/tlv.py similarity index 100% rename from confluent/common/tlv.py rename to confluent_common/confluent/tlv.py diff --git a/confluent/common/tlvdata.py b/confluent_common/confluent/tlvdata.py similarity index 100% rename from confluent/common/tlvdata.py rename to confluent_common/confluent/tlvdata.py diff --git a/bin/confluent-server.py b/confluent_server/bin/confluent old mode 100644 new mode 100755 similarity index 87% rename from bin/confluent-server.py rename to confluent_server/bin/confluent index eeb4ef82..9187ad0e --- a/bin/confluent-server.py +++ b/confluent_server/bin/confluent @@ -1,3 +1,4 @@ +#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2014 IBM Corporation @@ -18,7 +19,9 @@ import sys import os path = os.path.dirname(os.path.realpath(__file__)) path = os.path.realpath(os.path.join(path, '..')) -sys.path.append(path) +if not path.startswith('/usr'): + # if installed into system path, do not muck with things + sys.path.append(path) from confluent import main #import cProfile diff --git a/confluent/interface/__init__.py b/confluent_server/confluent/__init__.py similarity index 100% rename from confluent/interface/__init__.py rename to confluent_server/confluent/__init__.py diff --git a/confluent/auth.py b/confluent_server/confluent/auth.py similarity index 100% rename from confluent/auth.py rename to confluent_server/confluent/auth.py diff --git a/confluent_server/confluent/config/__init__.py b/confluent_server/confluent/config/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/confluent/config/attributes.py b/confluent_server/confluent/config/attributes.py similarity index 100% rename from confluent/config/attributes.py rename to confluent_server/confluent/config/attributes.py diff --git a/confluent/config/configmanager.py b/confluent_server/confluent/config/configmanager.py similarity index 100% rename from confluent/config/configmanager.py rename to confluent_server/confluent/config/configmanager.py diff --git a/confluent/consoleserver.py b/confluent_server/confluent/consoleserver.py similarity index 100% rename from confluent/consoleserver.py rename to confluent_server/confluent/consoleserver.py diff --git a/confluent/core.py b/confluent_server/confluent/core.py similarity index 100% rename from confluent/core.py rename to confluent_server/confluent/core.py diff --git a/confluent/exceptions.py b/confluent_server/confluent/exceptions.py similarity index 100% rename from confluent/exceptions.py rename to confluent_server/confluent/exceptions.py diff --git a/confluent/httpapi.py b/confluent_server/confluent/httpapi.py similarity index 100% rename from confluent/httpapi.py rename to confluent_server/confluent/httpapi.py diff --git a/confluent_server/confluent/interface/__init__.py b/confluent_server/confluent/interface/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/confluent/interface/console.py b/confluent_server/confluent/interface/console.py similarity index 100% rename from confluent/interface/console.py rename to confluent_server/confluent/interface/console.py diff --git a/confluent/log.py b/confluent_server/confluent/log.py similarity index 100% rename from confluent/log.py rename to confluent_server/confluent/log.py diff --git a/confluent/main.py b/confluent_server/confluent/main.py similarity index 100% rename from confluent/main.py rename to confluent_server/confluent/main.py diff --git a/confluent/messages.py b/confluent_server/confluent/messages.py similarity index 100% rename from confluent/messages.py rename to confluent_server/confluent/messages.py diff --git a/confluent/noderange.py b/confluent_server/confluent/noderange.py similarity index 100% rename from confluent/noderange.py rename to confluent_server/confluent/noderange.py diff --git a/confluent/sockapi.py b/confluent_server/confluent/sockapi.py similarity index 99% rename from confluent/sockapi.py rename to confluent_server/confluent/sockapi.py index 2d490f9f..eac250bf 100644 --- a/confluent/sockapi.py +++ b/confluent_server/confluent/sockapi.py @@ -30,7 +30,7 @@ import eventlet.green.ssl as ssl import eventlet import confluent.auth as auth -import confluent.common.tlvdata as tlvdata +import confluent.tlvdata as tlvdata import confluent.consoleserver as consoleserver import confluent.config.configmanager as configmanager import confluent.exceptions as exc diff --git a/confluent/util.py b/confluent_server/confluent/util.py similarity index 100% rename from confluent/util.py rename to confluent_server/confluent/util.py diff --git a/plugins/configuration/attributes.py b/confluent_server/plugins/configuration/attributes.py similarity index 100% rename from plugins/configuration/attributes.py rename to confluent_server/plugins/configuration/attributes.py diff --git a/plugins/hardwaremanagement/ipmi.py b/confluent_server/plugins/hardwaremanagement/ipmi.py similarity index 100% rename from plugins/hardwaremanagement/ipmi.py rename to confluent_server/plugins/hardwaremanagement/ipmi.py