From bf1754e2241e389c3b1dc14fb7d30ac58492e2e7 Mon Sep 17 00:00:00 2001 From: stevenvanrossem Date: Thu, 17 Nov 2016 10:20:52 +0100 Subject: [PATCH] updated code comments --- src/emuvim/api/rest/network.py | 3 +++ src/emuvim/dcemulator/net.py | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/emuvim/api/rest/network.py b/src/emuvim/api/rest/network.py index 63696a0..5375943 100755 --- a/src/emuvim/api/rest/network.py +++ b/src/emuvim/api/rest/network.py @@ -54,6 +54,9 @@ class NetworkAction(Resource): :param bidirectional: boolean value if the link needs to be implemented from src to dst and back :param cookie: cookie value, identifier of the flow entry to be installed. :param priority: integer indicating the priority of the flow entry + :param skip_vlan_tag: boolean to indicate whether a new vlan tag should be created for this chain + :param monitor: boolean to indicate whether a new vlan tag should be created for this chain + :param monitor_placement: 'tx'=place the monitoring flowrule at the beginning of the chain, 'rx'=place at the end of the chain :return: message string indicating if the chain action is succesful or not """ diff --git a/src/emuvim/dcemulator/net.py b/src/emuvim/dcemulator/net.py index 3b4dd54..cf85085 100755 --- a/src/emuvim/dcemulator/net.py +++ b/src/emuvim/dcemulator/net.py @@ -342,6 +342,17 @@ class DCNetwork(Containernet): def _addMonitorFlow(self, vnf_src_name, vnf_dst_name, vnf_src_interface=None, vnf_dst_interface=None, tag=None, **kwargs): + """ + Add a monitoring flow entry that adds a special flowentry/counter at the begin or end of a chain. + So this monitoring flowrule exists on top of a previously defined chain rule and uses the same vlan tag/routing. + :param vnf_src_name: + :param vnf_dst_name: + :param vnf_src_interface: + :param vnf_dst_interface: + :param tag: vlan tag to be used for this chain (same tag as existing chain) + :param monitor_placement: 'tx' or 'rx' indicating to place the extra flowentry resp. at the beginning or end of the chain + :return: + """ src_sw = None src_sw_inport_nr = 0 @@ -489,6 +500,8 @@ class DCNetwork(Containernet): :param cookie: cookie for the installed flowrules (can be used later as identifier for a set of installed chains) :param match: custom match entry to be added to the flowrules (default: only in_port and vlan tag) :param priority: custom flowrule priority + :param monitor: boolean to indicate whether this chain is a monitoring chain + :param tag: vlan tag to be used for this chain (pre-defined or new one if none is specified) :return: output log string """ -- 2.25.1