import threading
import uuid
import networkx as nx
-import chain_api
+import emuvim.api.openstack.chain_api as chain_api
import json
import random
from emuvim.api.openstack.resources.net import Net
# dependent!
self.chain = chain_api.ChainApi(ip, port, self)
self.thread = threading.Thread(target=self.chain._start_flask, args=())
- self.thread.daemon = True
self.thread.name = self.chain.__class__
self.thread.start()
self.floating_intf = None
self.floating_links = dict()
+ def stop(self):
+ self.chain.stop()
+ self.thread.join()
+
@property
def net(self):
return self._net
port.ip_address = root_ip
# floating ip network setup
# wierd way of getting a datacenter object
- first_dc = self.net.dcs.values()[0]
+ first_dc = list(self.net.dcs.values())[0]
# set a dpid for the switch. for this we have to get the id of the
# next possible dc
self.floating_switch = self.net.addSwitch(