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

Function get_vm_id

scripts/vm/network/security_group.py:1257–1269  ·  view source on GitHub ↗
(vm_name)

Source from the content-addressed store, hash-verified

1255
1256
1257def get_vm_id(vm_name):
1258 conn = get_libvirt_connection()
1259 try:
1260 dom = (conn.lookupByName (vm_name))
1261 except libvirt.libvirtError:
1262 return None
1263
1264 conn.close()
1265
1266 res = dom.ID()
1267 if isinstance(res, int):
1268 res = str(res)
1269 return res
1270
1271
1272def get_br_fw(brname):

Callers 5

default_network_rulesFunction · 0.85
check_domid_changedFunction · 0.85
add_network_rulesFunction · 0.85

Calls 2

get_libvirt_connectionFunction · 0.85
closeMethod · 0.65

Tested by

no test coverage detected