MCPcopy Create free account
hub / github.com/apache/cloudstack / getFreeIP

Method getFreeIP

python/incubation/cloud-web-ipallocator.py:69–75  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

67 return socket.inet_ntoa(struct.pack('!I', num))
68
69 def getFreeIP(self):
70 if len(self.availIP) > 0:
71 ip = self.numToIp(self.availIP[0])
72 self.availIP.remove(self.availIP[0])
73 return ip
74 else:
75 return None
76
77 def getNetmask(self):
78 return self.netmask

Callers 1

allocateIPMethod · 0.95

Calls 2

numToIpMethod · 0.95
removeMethod · 0.65

Tested by

no test coverage detected