Commit 0d0ffd47 authored by David Johnson's avatar David Johnson

Stale old minor stuff that no longer matters!

parent 1b49af77
...@@ -403,6 +403,12 @@ class PLCagent: ...@@ -403,6 +403,12 @@ class PLCagent:
def SiteDelete(self,id): def SiteDelete(self,id):
return self.__server.DeleteSite(self.auth,id) return self.__server.DeleteSite(self.auth,id)
def SiteId(self,id):
retval = self.SiteInfo(id,['site_id'])
if retval and 'site_id' in retval:
return retval['site_id']
return None
def __keygen(self): def __keygen(self):
astr = "abcdefghijklmnopqrstuvwxyz" astr = "abcdefghijklmnopqrstuvwxyz"
astr = astr + astr.upper() + '0123456789' astr = astr + astr.upper() + '0123456789'
...@@ -494,6 +500,12 @@ class PLCagent: ...@@ -494,6 +500,12 @@ class PLCagent:
def NodeDelete(self,id): def NodeDelete(self,id):
return self.__server.DeleteNode(self.auth,id) return self.__server.DeleteNode(self.auth,id)
def NodeId(self,id):
retval = self.NodeInfo(id,['node_id'])
if retval and 'node_id' in retval:
return retval['node_id']
return None
def NodeSetBootState(self,id,boot_state): def NodeSetBootState(self,id,boot_state):
self.__server.UpdateNode(self.auth,id,{ 'boot_state':boot_state }) self.__server.UpdateNode(self.auth,id,{ 'boot_state':boot_state })
pass pass
...@@ -582,6 +594,12 @@ class PLCagent: ...@@ -582,6 +594,12 @@ class PLCagent:
def PersonDelete(self,id): def PersonDelete(self,id):
return self.__server.DeletePerson(self.auth,id) return self.__server.DeletePerson(self.auth,id)
def PersonId(self,id):
retval = self.PersonInfo(id,['person_id'])
if retval and 'person_id' in retval:
return retval['person_id']
return None
pass # end of PLCagent class pass # end of PLCagent class
class mod_PLC4: class mod_PLC4:
......
...@@ -358,8 +358,12 @@ sub updatenodepool($) { ...@@ -358,8 +358,12 @@ sub updatenodepool($) {
my $pnodename = $row[0]; my $pnodename = $row[0];
if (exists($ignore{$pnodename})) { if (exists($ignore{$pnodename})) {
print "Ignoring $pnodename\n";
next; next;
} }
else {
print "Did not ignore $pnodename\n";
}
if (!exists $poolpnodes->{$pnodename} ) { if (!exists $poolpnodes->{$pnodename} ) {
print "Adding $pnodename to pool: $pool->{'NAME'}\n"; print "Adding $pnodename to pool: $pool->{'NAME'}\n";
......
...@@ -11,11 +11,13 @@ sys.path.append("@prefix@/lib") ...@@ -11,11 +11,13 @@ sys.path.append("@prefix@/lib")
import libplab import libplab
from libtestbed import * from libtestbed import *
usage = "\t%prog [-vd] [-p plcname] [-e pid/eid] [-s slicename]" usage = "\t%prog [-vdf] [-p plcname] [-e pid/eid] [-s slicename]"
def main(args): def main(args):
me = args[0] me = args[0]
parser = TBParser(usage) parser = TBParser(usage)
parser.add_option("-f","--force",dest="force",action="store",
help="Force slice renewal",default=None)
parser.add_option("-p","--plc",dest="plc",action="store", parser.add_option("-p","--plc",dest="plc",action="store",
help="PLC name",default=None) help="PLC name",default=None)
parser.add_option("-e","--expt",dest="expt",action="store", parser.add_option("-e","--expt",dest="expt",action="store",
...@@ -44,7 +46,7 @@ def main(args): ...@@ -44,7 +46,7 @@ def main(args):
pass pass
plab = libplab.Plab() plab = libplab.Plab()
plab.renew(opts.plc,pid,eid,opts.slicename) plab.renew(opts.plc,pid,eid,opts.slicename,opts.force)
return return
......
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