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

Method getGuestIp

systemvm/debian/opt/cloud/bin/configure.py:1343–1354  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1341
1342 # Return the VR guest interface ip
1343 def getGuestIp(self):
1344 interfaces = []
1345 ipAddr = None
1346 for interface in self.config.address().get_interfaces():
1347 if interface.is_guest():
1348 interfaces.append(interface)
1349 if len(interfaces) > 0:
1350 ipAddr = sorted(interfaces)[-1]
1351 if ipAddr:
1352 return ipAddr.get_ip()
1353
1354 return None
1355
1356 def getGuestIpByIp(self, ipa):
1357 for interface in self.config.address().get_interfaces():

Callers 7

forward_vrMethod · 0.95
callMethod · 0.45
executeMethod · 0.45
executeMethod · 0.45
executeMethod · 0.45
executeMethod · 0.45

Calls 5

get_interfacesMethod · 0.80
addressMethod · 0.80
is_guestMethod · 0.80
appendMethod · 0.45
get_ipMethod · 0.45

Tested by

no test coverage detected