Exemplo n.º 1
0
 def savevip(self, vip):
     f = open(self.VIP_FILE, "w")
     logger.log("myplc: saving successfully router id in %s" %
                self.VIP_FILE)
     pickle.dump(vip, f)
     f.close()
     logger.log_router(vip, "vip.txt", "This is writed to db")
Exemplo n.º 2
0
 def savevmac(self, vmac):
     f = open(self.VMAC_FILE, "w")
     logger.log("myplc: saving successfully router mac in %s" %
                self.VMAC_FILE)
     pickle.dump(vmac, f)
     f.close()
     logger.log_router(vmac, "vmac.txt", "This is writed to db")
Exemplo n.º 3
0
 def savevsliver(self, vsliver):
     f = open(GetPearl.VSLIVER_FILE, "w")
     logger.log("myplc: saving successfully vsliver in %s" %
                GetPearl.VIP_FILE)
     pickle.dump(vsliver, f)
     f.close()
     logger.log_router(vsliver, "vsliver.txt", "This is writed to db")
Exemplo n.º 4
0
 def savevlanid(self, vid):
     f = open(GetPearl.VLANID_FILE, "w")
     logger.log("myplc: saving successfully vlan id in %s" %
                GetPearl.VLANID_FILE)
     pickle.dump(vid, f)
     f.close()
     logger.log_router(vid, "vlanid.txt", "This is writed to db")
Exemplo n.º 5
0
 def savevlanid (self, vid):
     #fd = file(self.VLANID_FILE, 'w')
     #self.f = open('vlanid.txt', 'w+')
     #pickle.dump(vip,file("/var/myplc/vlanid.pickle",'wb'))
     #f = os.open("/var/myplc/vlanid.pickle", os.O_WRONLY, 0600)
     logger.log ("myplc: saving successfully vlan id in %s" % self.VLANID_FILE)
     #pickle.dump(vid, f)
     #f.close()
     logger.log_router(vid,"vlanid.txt","This is writed to db")
Exemplo n.º 6
0
 def savevlanid(self, vid):
     #fd = file(self.VLANID_FILE, 'w')
     #self.f = open('vlanid.txt', 'w+')
     #pickle.dump(vip,file("/var/myplc/vlanid.pickle",'wb'))
     #f = os.open("/var/myplc/vlanid.pickle", os.O_WRONLY, 0600)
     logger.log("myplc: saving successfully vlan id in %s" %
                self.VLANID_FILE)
     #pickle.dump(vid, f)
     #f.close()
     logger.log_router(vid, "vlanid.txt", "This is writed to db")
Exemplo n.º 7
0
 def savevmac (self, vmac):
     f = open(self.VMAC_FILE, "w")
     logger.log ("myplc: saving successfully router mac in %s" % self.VMAC_FILE)
     pickle.dump(vmac, f)
     f.close()
     logger.log_router(vmac,"vmac.txt","This is writed to db")
Exemplo n.º 8
0
 def savevip (self, vip):
     f = open(self.VIP_FILE, "w")
     logger.log ("myplc: saving successfully router id in %s" % self.VIP_FILE)
     pickle.dump(vip, f)
     f.close()
     logger.log_router(vip,"vip.txt","This is writed to db")
Exemplo n.º 9
0
 def savevsliver(self,vsliver):
     #f = open(self.VSLIVER_FILE, "w")
     logger.log ("myplc: saving successfully vsliver in %s" % self.VIP_FILE)
     #pickle.dump(vsliver, f)
     #f.close()
     logger.log_router(vsliver,"vsliver.txt","This is writed to db")
Exemplo n.º 10
0
 def savevlanid (self, vid):
     f = open(GetPearl.VLANID_FILE, "w")
     logger.log ("myplc: saving successfully vlan id in %s" % GetPearl.VLANID_FILE)
     pickle.dump(vid, f)
     f.close()
     logger.log_router(vid,"vlanid.txt","This is writed to db")