Ejemplo n.º 1
0
	def createRange(instance):
		obj = Ip4Range.constructor(instance.getName(),instance.getStartIp(),instance.getEndIp(),instance.getNetmask(),instance.getGatewayIp(),instance.getDNS1(),instance.getDNS2(),instance.getIsGlobal())
		return obj
Ejemplo n.º 2
0
macRange = MacRange.objects.get(name="nouRange2")
macRange.allocateMac()
sys.exit()
server = createVTServer()

#server = XenServer.objects.get(name="nom")

#vm = server.vms.get(name="novaVM")
#server.deleteVM(vm)

#sys.exit()
#server = VTServer.objects.get(id=55)
#server.createVM()
#sys.exit()

Ip4Range.constructor("nouRange2", "192.168.0.0", "192.168.0.255",
                     "255.255.255.0", "192.168.0.1", "195.235.113.3", "")
ipRange = Ip4Range.objects.get(name="nouRange2")

#ipRange.addExcludedIp("192.168.0.1")
#ipRange.addExcludedIp("192.168.0.2")

macRange = MacRange.constructor("nouRange2", "00:00:00:00:00:00",
                                "00:FF:FF:FF:FF:FF")

print "a"

import time
macRange.addExcludedMac("00:00:00:00:00:01")
time.sleep(20)
macRange.addExcludedMac("00:00:00:00:00:02")
time.sleep(20)
Ejemplo n.º 3
0
macRange = MacRange.objects.get(name="nouRange2")
macRange.allocateMac()
sys.exit()
server = createVTServer()

#server = XenServer.objects.get(name="nom")

#vm = server.vms.get(name="novaVM")
#server.deleteVM(vm)

#sys.exit()
#server = VTServer.objects.get(id=55)
#server.createVM()
#sys.exit()

Ip4Range.constructor("nouRange2","192.168.0.0","192.168.0.255","255.255.255.0","192.168.0.1","195.235.113.3","")
ipRange = Ip4Range.objects.get(name="nouRange2")

#ipRange.addExcludedIp("192.168.0.1")
#ipRange.addExcludedIp("192.168.0.2")

macRange = MacRange.constructor("nouRange2","00:00:00:00:00:00","00:FF:FF:FF:FF:FF")

print "a"

import time
macRange.addExcludedMac("00:00:00:00:00:01")
time.sleep(20)
macRange.addExcludedMac("00:00:00:00:00:02")
time.sleep(20)
macRange.addExcludedMac("00:00:00:00:00:03")