X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Femuvim%2Fdcemulator%2Fnet.py;h=3556535784a2d4c792096573571343bccf39c606;hb=7fce49bc94c4ca2c6d478c6a662397a5d0c72ce5;hp=115b9e51d753282d26f1a42c4aa96909148f1c80;hpb=241e3e951c4871d956c29887ab101adce4817363;p=osm%2Fvim-emu.git diff --git a/src/emuvim/dcemulator/net.py b/src/emuvim/dcemulator/net.py index 115b9e5..3556535 100755 --- a/src/emuvim/dcemulator/net.py +++ b/src/emuvim/dcemulator/net.py @@ -366,7 +366,6 @@ class DCNetwork(Containernet): flow = {} flow['dpid'] = int(node.dpid, 16) - logging.info('node name:{0}'.format(node.name)) if cookie: flow['cookie'] = int(cookie) @@ -401,14 +400,14 @@ class DCNetwork(Containernet): action['type'] = 'OUTPUT' action['port'] = switch_outport_nr flow['actions'].append(action) - #flow['match'] = self._parse_match(match) + elif cmd == 'del-flows': - #del(flow['actions']) prefix = 'stats/flowentry/delete' + + # if cookie is given, only delete flows by cookie + # do not specify other match -> also other cookies can be matched if cookie: - flow['cookie_mask'] = cookie - #if cookie is None: - # flow['match'] = self._parse_match(match) + flow['cookie_mask'] = int('0xffffffffffffffff', 16) # need full mask to match complete cookie action = {} action['type'] = 'OUTPUT' @@ -480,6 +479,7 @@ class DCNetwork(Containernet): self.ryu_process.kill() def ryu_REST(self, prefix, dpid=None, data=None): + if data: logging.info('log POST: {0}'.format(str(data))) try: if dpid: url = self.ryu_REST_api + '/' + str(prefix) + '/' + str(dpid)