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")
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")
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")
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")
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")
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")
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")
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")
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")
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")