Beispiel #1
0
 def getleases(self, args, flags):
     ip = args[0]
     principle = digest.sha1file(self.clientconf.pubkey)
     leasesdata = nodemgrproxy.nodemgrproxy(ip, nodemgr.PORT).getleases()
     for leasedata in leasesdata:
         l = lease.lease(leasedata)
         if re.match(principle, l.principle):
             print leasedata
     return 0
Beispiel #2
0
 def getleases(self, args, flags):
     ip = args[0]
     principle = digest.sha1file(self.clientconf.pubkey)
     leasesdata = nodemgrproxy.nodemgrproxy(ip, nodemgr.PORT).getleases()
     for leasedata in leasesdata:
         l = lease.lease(leasedata)
         if re.match(principle, l.principle):
             print leasedata
     return 0
Beispiel #3
0
 def getprinciple(self, args, flags):
     ip = args[0]
     slice = args[1]
     print nodemgrproxy.nodemgrproxy(ip, nodemgr.PORT).getprinciple(slice)
     return 0
Beispiel #4
0
 def getslivers(self, args, flags):
     ip = args[0]
     slivers = nodemgrproxy.nodemgrproxy(ip, nodemgr.PORT).getslivers()
     for sliver in slivers:
         print sliver
     return 0
Beispiel #5
0
 def nodemgrconfig(self, args, flags):
     ip = args[0]
     config = nodemgrproxy.nodemgrproxy(ip, nodemgr.PORT).getconfig()
     for attr in config:
         print attr + ":" + " " + str(config[attr])
     return 0
Beispiel #6
0
 def nodemgrproxy(self, ip):
     return nodemgrproxy.nodemgrproxy(ip, nodemgr.PORT, nodemgr.SSLPORT,
                                      self.clientconf.key,
                                      self.clientconf.cert,
                                      self.clientconf.cacert)
Beispiel #7
0
 def getprinciple(self, args, flags):
     ip = args[0]
     slice = args[1]
     print nodemgrproxy.nodemgrproxy(ip, nodemgr.PORT).getprinciple(slice)
     return 0
Beispiel #8
0
 def getslivers(self, args, flags):
     ip = args[0]
     slivers = nodemgrproxy.nodemgrproxy(ip, nodemgr.PORT).getslivers()
     for sliver in slivers:
         print sliver
     return 0
Beispiel #9
0
 def nodemgrconfig(self, args, flags):
     ip = args[0]
     config = nodemgrproxy.nodemgrproxy(ip, nodemgr.PORT).getconfig()
     for attr in config:
         print attr + ":" + " " + str(config[attr])
     return 0
Beispiel #10
0
 def nodemgrproxy(self, ip):
     return nodemgrproxy.nodemgrproxy(ip, nodemgr.PORT, nodemgr.SSLPORT,
                                      self.clientconf.key, self.clientconf.cert,
                                      self.clientconf.cacert)