Modify http get/clear openflows to handle n ofc_id
- Add ofc_id to http_get_openflow_ports
- Add ofc_id http_clear_openflow_rules
- Both http service will handle multimple ofc thread and the task will be injected in a thread nu ofc_id
- ofc_id Added to of_flow table to of_flows
Change-Id: Id9b1ec67341d70eaea8b678fa4ef34c5a81a3c21
Signed-off-by: mirabal <leonardo.mirabal@altran.com>
diff --git a/openflow_thread.py b/openflow_thread.py
index 638ab19..b797f2d 100644
--- a/openflow_thread.py
+++ b/openflow_thread.py
@@ -95,11 +95,14 @@
self.rules= {}
self.logger = logging.getLogger('vim.OF.TEST')
self.logger.setLevel(getattr(logging, params.get("of_debug", "ERROR")))
+ self.pp2ofi = {}
def get_of_switches(self):
return 0, ()
+
def obtain_port_correspondence(self):
return 0, ()
+
def del_flow(self, flow_name):
if flow_name in self.rules:
self.logger.debug("del_flow OK")
@@ -108,10 +111,12 @@
else:
self.logger.warning("del_flow not found")
return -1, "flow %s not found"
+
def new_flow(self, data):
self.rules[ data["name"] ] = data
self.logger.debug("new_flow OK")
return 0, None
+
def get_of_rules(self, translate_of_ports=True):
return 0, self.rules