From: stevenvanrossem Date: Thu, 22 Dec 2016 09:08:22 +0000 (+0100) Subject: add code comments and cleanup X-Git-Tag: v3.1~45^2~28 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=9c221dbabf752546f3bbec740c13b12f9e8868ca;p=osm%2Fvim-emu.git add code comments and cleanup --- diff --git a/src/emuvim/api/rest/monitor.py b/src/emuvim/api/rest/monitor.py index 8de0379..737048d 100755 --- a/src/emuvim/api/rest/monitor.py +++ b/src/emuvim/api/rest/monitor.py @@ -113,7 +113,10 @@ class MonitorFlowAction(Resource): class MonitorLinkAction(Resource): """ - Add or remove chains between VNFs. These chain links are implemented as flow entries in the networks' SDN switches. + Add or remove flow monitoring on chains between VNFs. + These chain links are implemented as flow entries in the networks' SDN switches. + The monitoring is an extra flow entry on top of the existing chain, with a specific match. (preserving the chaining) + The counters of this new monitoring flow are exported :param vnf_src_name: VNF name of the source of the link :param vnf_dst_name: VNF name of the destination of the link :param vnf_src_interface: VNF interface name of the source of the link diff --git a/src/emuvim/api/rest/rest_api_endpoint.py b/src/emuvim/api/rest/rest_api_endpoint.py index 7a0fc4f..82a88c4 100755 --- a/src/emuvim/api/rest/rest_api_endpoint.py +++ b/src/emuvim/api/rest/rest_api_endpoint.py @@ -61,6 +61,7 @@ class RestApiEndpoint(object): # setup endpoints + # compute related actions (start/stop VNFs, get info) self.api.add_resource(Compute, "/restapi/compute//", "/restapi/compute////") @@ -71,16 +72,24 @@ class RestApiEndpoint(object): self.api.add_resource(DatacenterStatus, "/restapi/datacenter/") self.api.add_resource(DatacenterList, "/restapi/datacenter") + + # network related actions (setup chaining between VNFs) self.api.add_resource(NetworkAction, "/restapi/network//") + + # monitoring related actions + # export a network interface traffic rate counter self.api.add_resource(MonitorInterfaceAction, "/restapi/monitor/vnf//", "/restapi/monitor/vnf///", "/restapi/monitor/vnf////") + # export flow traffic counter, of a manually pre-installed flow entry, specified by its cookie self.api.add_resource(MonitorFlowAction, "/restapi/monitor/flow///", "/restapi/monitor/flow////") + # install monitoring of a specific flow on a pre-existing link in the service. + # the traffic counters of the newly installed monitor flow are exported self.api.add_resource(MonitorLinkAction, "/restapi/monitor/link//")