Commit 038d4ee2 authored by David Johnson's avatar David Johnson

Ugh, fix stupid tuple/list bug in last commit.

parent e1a430b7
......@@ -1202,7 +1202,9 @@ class Slice:
# see if we have two tickets to insert (support the legacy ticket
# or not)
if type(tmpslicemeta) == list:
if type(tmpslicemeta) == tuple:
self.slicemeta = tmpslicemeta[0]
self.slicemeta_legacy = tmpslicemeta[1]
insertFieldsStr = "(exptidx,pid,eid,slicename,slicemeta," \
"slicemeta_legacy,leaseend,admin)"
insertValuesStr = "(%s,%s,%s,%s,%s,%s,%s,%s)"
......@@ -1214,6 +1216,7 @@ class Slice:
adminbit)
pass
else:
self.slicemeta = tmpslicemeta
insertFieldsStr = "(exptidx,pid,eid,slicename,slicemeta," \
"leaseend,admin)"
insertValuesStr = "(%s, %s, %s, %s, %s, %s, %s)"
......@@ -1223,10 +1226,11 @@ class Slice:
time.gmtime(self.leaseend)),
adminbit)
pass
qstr = "insert into plab_slices " + insertFieldsStr + \
" values " + insertValuesStr
DBQueryFatal("insert into plab_slices %s " \
"values %s" % (insertFieldsStr,insertValuesStr),
insertValuesTuple)
DBQueryFatal(qstr,insertValuesTuple)
pass
except:
self.plab.agent.deleteSlice(self)
......
......@@ -566,13 +566,15 @@ class mod_PLC4:
print "Failed to add nodes to slice %s" % slice.slicename
raise
(PLCticket,PLCticket_legacy) = ('','')
try:
# XXX - fix for new NM and rollout.
PLCticket = tryXmlrpcCmd(agent.SliceGetTicket)
PLCticket_legacy = tryXmlrpcCmd(agent.SliceGetTicketLegacy)
#if debug:
# print PLCticket
# pass
if debug:
print "ticket = %s" % str(PLCticket)
print "legacy ticket = %s" % str(PLCticket_legacy)
pass
pass
except:
print "Failed to get PLC ticket for slice %s" % slice.slicename
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment