Beispiel #1
0
 def newtickets(self):
     """Use first agent in broker's agent list to obtain tickets for slice"""
     agent = self.brokerconf.agents[0]
     cconf = self.clientconf
     sconf = self.sliceconf
     proxy = agentproxy.agentproxy(agent["host"], agent["xmlport"],
                                   agent["xmlsslport"], cconf.key, cconf.cert,
                                   cconf.cacert)
     return proxy.newtickets(sconf.name, sconf.numnodes, sconf.leaselen, sconf.ips)
Beispiel #2
0
 def gettickets(self, args, flags):
     ip = args[0]
     principle = digest.sha1file(self.clientconf.pubkey)
     ticketsdata = agentproxy.agentproxy(ip, agent.PORT).gettickets()
     for ticketdata in ticketsdata:
         t = ticket.ticket(ticketdata)
         if re.match(principle, t.principle):
             print ticketdata
     return 0
Beispiel #3
0
 def gettickets(self, args, flags):
     ip = args[0]
     principle = digest.sha1file(self.clientconf.pubkey)
     ticketsdata = agentproxy.agentproxy(ip, agent.PORT).gettickets()
     for ticketdata in ticketsdata:
         t = ticket.ticket(ticketdata)
         if re.match(principle, t.principle):
             print ticketdata
     return 0
Beispiel #4
0
 def newtickets(self):
     """Use first agent in broker's agent list to obtain tickets for slice"""
     agent = self.brokerconf.agents[0]
     cconf = self.clientconf
     sconf = self.sliceconf
     proxy = agentproxy.agentproxy(agent["host"], agent["xmlport"],
                                   agent["xmlsslport"], cconf.key,
                                   cconf.cert, cconf.cacert)
     return proxy.newtickets(sconf.name, sconf.numnodes, sconf.leaselen,
                             sconf.ips)
Beispiel #5
0
 def getslices(self, args, flags):
     ip = args[0]
     slices = agentproxy.agentproxy(ip, agent.PORT).getslices()
     for slice in slices:
         print slice
     return 0
Beispiel #6
0
 def getads(self, args, flags):
     ip = args[0]
     ads = agentproxy.agentproxy(ip, agent.PORT).getads()
     for ad in ads:
         print ad
     return 0
Beispiel #7
0
 def agentconfig(self, args, flags):
     ip = args[0]
     config = agentproxy.agentproxy(ip, agent.PORT).getconfig()
     for attr in config:
         print attr + ":" + " " + str(config[attr])
     return 0
Beispiel #8
0
 def getslices(self, args, flags):
     ip = args[0]
     slices = agentproxy.agentproxy(ip, agent.PORT).getslices()
     for slice in slices:
         print slice
     return 0
Beispiel #9
0
 def getads(self, args, flags):
     ip = args[0]
     ads = agentproxy.agentproxy(ip, agent.PORT).getads()
     for ad in ads:
         print ad
     return 0
Beispiel #10
0
 def agentconfig(self, args, flags):
     ip = args[0]
     config = agentproxy.agentproxy(ip, agent.PORT).getconfig()
     for attr in config:
         print attr + ":" + " " + str(config[attr])
     return 0