projects
/
osm
/
vim-emu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3e56f5e
)
Added priority field to network CLI.
author
peusterm
<manuel.peuster@uni-paderborn.de>
Thu, 8 Sep 2016 08:53:36 +0000
(10:53 +0200)
committer
peusterm
<manuel.peuster@uni-paderborn.de>
Thu, 15 Sep 2016 13:34:23 +0000
(15:34 +0200)
src/emuvim/cli/rest/network.py
patch
|
blob
|
history
diff --git
a/src/emuvim/cli/rest/network.py
b/src/emuvim/cli/rest/network.py
index
4f6a32d
..
91051dd
100755
(executable)
--- a/
src/emuvim/cli/rest/network.py
+++ b/
src/emuvim/cli/rest/network.py
@@
-53,7
+53,8
@@
class RestApiClient():
weight=args.get("weight"),
match=args.get("match"),
bidirectional=args.get("bidirectional"),
weight=args.get("weight"),
match=args.get("match"),
bidirectional=args.get("bidirectional"),
- cookie=args.get("cookie"))
+ cookie=args.get("cookie"),
+ priority=args.get("priority"))
response = put("%s/restapi/network/%s/%s" %
(args.get("endpoint"),
response = put("%s/restapi/network/%s/%s" %
(args.get("endpoint"),
@@
-72,7
+73,8
@@
class RestApiClient():
weight=args.get("weight"),
match=args.get("match"),
bidirectional=args.get("bidirectional"),
weight=args.get("weight"),
match=args.get("match"),
bidirectional=args.get("bidirectional"),
- cookie=args.get("cookie"))
+ cookie=args.get("cookie"),
+ priority=args.get("priority"))
response = delete("%s/restapi/network/%s/%s" %
(args.get("endpoint"),
response = delete("%s/restapi/network/%s/%s" %
(args.get("endpoint"),
@@
-113,6
+115,9
@@
parser.add_argument(
parser.add_argument(
"--weight", "-w", dest="weight",
help="weight edge attribute to calculate the path")
parser.add_argument(
"--weight", "-w", dest="weight",
help="weight edge attribute to calculate the path")
+parser.add_argument(
+ "--priority", "-p", dest="priority", default="0",
+ help="priority of flow rule")
parser.add_argument(
"--match", "-m", dest="match",
help="string holding extra matches for the flow entries")
parser.add_argument(
"--match", "-m", dest="match",
help="string holding extra matches for the flow entries")
@@
-130,4
+135,4
@@
parser.add_argument(
def main(argv):
args = vars(parser.parse_args(argv))
c = RestApiClient()
def main(argv):
args = vars(parser.parse_args(argv))
c = RestApiClient()
- c.execute_command(args)
\ No newline at end of file
+ c.execute_command(args)