projects
/
osm
/
vim-emu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Support (simple) classifiers"
[osm/vim-emu.git]
/
src
/
emuvim
/
dcemulator
/
net.py
diff --git
a/src/emuvim/dcemulator/net.py
b/src/emuvim/dcemulator/net.py
index
1bbc5bf
..
6be973f
100755
(executable)
--- a/
src/emuvim/dcemulator/net.py
+++ b/
src/emuvim/dcemulator/net.py
@@
-759,6
+759,7
@@
class DCNetwork(Containernet):
cmd = kwargs.get('cmd')
path = kwargs.get('path')
index = kwargs.get('pathindex')
cmd = kwargs.get('cmd')
path = kwargs.get('path')
index = kwargs.get('pathindex')
+ mod_dl_dst = kwargs.get('mod_dl_dst')
vlan = kwargs.get('vlan')
priority = kwargs.get('priority', DEFAULT_PRIORITY)
vlan = kwargs.get('vlan')
priority = kwargs.get('priority', DEFAULT_PRIORITY)
@@
-826,6
+827,12
@@
class DCNetwork(Containernet):
else: # middle nodes
match += ',dl_vlan=%s' % vlan
else: # middle nodes
match += ',dl_vlan=%s' % vlan
+ if mod_dl_dst:
+ action = {}
+ action['type'] = 'SET_FIELD'
+ action['field'] = 'eth_dst'
+ action['value'] = mod_dl_dst
+ flow['actions'].append(action)
# output action must come last
action = {}
# output action must come last
action = {}
@@
-939,6
+946,8
@@
class DCNetwork(Containernet):
url = self.ryu_REST_api + '/' + str(prefix) + '/' + str(dpid)
else:
url = self.ryu_REST_api + '/' + str(prefix)
url = self.ryu_REST_api + '/' + str(prefix) + '/' + str(dpid)
else:
url = self.ryu_REST_api + '/' + str(prefix)
+
+ LOG.debug('sending RYU command: %s, payload: %s', url, data)
if data:
req = self.RyuSession.post(url, json=data)
else:
if data:
req = self.RyuSession.post(url, json=data)
else:
@@
-946,7
+955,7
@@
class DCNetwork(Containernet):
# do extra logging if status code is not 200 (OK)
if req.status_code is not requests.codes.ok:
# do extra logging if status code is not 200 (OK)
if req.status_code is not requests.codes.ok:
-
logging
.info(
+
LOG
.info(
'type {0} encoding: {1} text: {2} headers: {3} history: {4}'.format(req.headers['content-type'],
req.encoding, req.text,
req.headers, req.history))
'type {0} encoding: {1} text: {2} headers: {3} history: {4}'.format(req.headers['content-type'],
req.encoding, req.text,
req.headers, req.history))