Commit 3ce2cfc2 authored by Morten Knutsen's avatar Morten Knutsen

Make sure to only include mac addresses on the instance network. Fixes #1.

parent f9c55202
...@@ -41,7 +41,8 @@ def main(): ...@@ -41,7 +41,8 @@ def main():
nics = set() nics = set()
for nic in vmm_client.query_collection("VirtualNetworkAdapters"): for nic in vmm_client.query_collection("VirtualNetworkAdapters"):
mac = nic.properties["MACAddress"] mac = nic.properties["MACAddress"]
if mac is not None: vmnet = nic.properties["VMNetworkId"]
if mac is not None and vmnet == "5cc21a4c-a5b9-413d-b607-3ce7020c8b98":
nics.add(mac.lower()) nics.add(mac.lower())
for entry in etcd_client.list("/nova/iaas/instances"): for entry in etcd_client.list("/nova/iaas/instances"):
if not entry.dir: if not entry.dir:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment