summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Callaghan <dcallagh@redhat.com>2011-10-19 13:32:23 +1000
committerDan Callaghan <dcallagh@redhat.com>2011-10-19 13:32:23 +1000
commitd22b6f6a90733a4d8594fed1a1bf70fd5eb6e07b (patch)
treebd9fcf92e173a8bac825b9217a91250fab382044
parent6cce2af643677e74c2125df020d48c703e2ffd32 (diff)
/distribution/inventory: don't append /RPC2 to server urlbeaker-distribution-inventory-1_1-56
-rwxr-xr-xTasks/distribution/inventory/push-inventory.py9
-rwxr-xr-xTasks/distribution/inventory/pushInventory.py8
2 files changed, 6 insertions, 11 deletions
diff --git a/Tasks/distribution/inventory/push-inventory.py b/Tasks/distribution/inventory/push-inventory.py
index 5377d02..c1e82f6 100755
--- a/Tasks/distribution/inventory/push-inventory.py
+++ b/Tasks/distribution/inventory/push-inventory.py
@@ -339,20 +339,18 @@ def main():
global lab_server, hostname, method
lab_server = None
- server = None
hostname = None
debug = 0
method = "legacypush"
- rpc = "RPC2"
if ('LAB_SERVER' in os.environ.keys()):
- server = os.environ['LAB_SERVER']
+ lab_server = os.environ['LAB_SERVER']
if ('HOSTNAME' in os.environ.keys()):
hostname = os.environ['HOSTNAME']
args = sys.argv[1:]
try:
- opts, args = getopt.getopt(args, 'dh:S:l', ['server=','legacy'])
+ opts, args = getopt.getopt(args, 'dh:S', ['server='])
except:
usage()
for opt, val in opts:
@@ -364,9 +362,8 @@ def main():
if opt in ('-h', '--hostname'):
hostname = val
if opt in ('-S', '--server'):
- server = val
+ lab_server = val
- lab_server = "%s/%s" % (server, rpc)
inventory = read_inventory()
inventory.update(kernel_inventory())
if debug:
diff --git a/Tasks/distribution/inventory/pushInventory.py b/Tasks/distribution/inventory/pushInventory.py
index feefdc0..364e8c0 100755
--- a/Tasks/distribution/inventory/pushInventory.py
+++ b/Tasks/distribution/inventory/pushInventory.py
@@ -155,11 +155,10 @@ def main():
lab_server = None
hostname = None
- server = None
debug = 0
if ('LAB_SERVER' in os.environ.keys()):
- server = os.environ['LAB_SERVER']
+ lab_server = os.environ['LAB_SERVER']
if ('HOSTNAME' in os.environ.keys()):
hostname = os.environ['HOSTNAME']
@@ -174,17 +173,16 @@ def main():
if opt in ('-h', '--hostname'):
hostname = val
if opt in ('-S', '--server'):
- server = val
+ lab_server = val
if not hostname:
print "You must sepcify a hostname with the -h switch"
sys.exit(1)
- if not server:
+ if not lab_server:
print "You must sepcify a lab_server with the -S switch"
sys.exit(1)
- lab_server = "%s/RPC2" % (server)
inventory = read_inventory()
if debug:
print inventory