X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Femuvim%2Fcli%2Frest%2Fnetwork.py;h=91051dd93220f2a5e696a56248eae695694f338f;hb=ee28ee3e423fa37f0abc48fc7b96e9830ab9a2fd;hp=86ed92b28b23414f0c72d84c1140ec6d24a2eb06;hpb=7d3b58ecf115dc6dc5932f5f4ac406ba05e739fd;p=osm%2Fvim-emu.git diff --git a/src/emuvim/cli/rest/network.py b/src/emuvim/cli/rest/network.py index 86ed92b..91051dd 100755 --- 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"), - cookie=args.get("cookie")) + cookie=args.get("cookie"), + priority=args.get("priority")) 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"), - cookie=args.get("cookie")) + cookie=args.get("cookie"), + priority=args.get("priority")) response = delete("%s/restapi/network/%s/%s" % (args.get("endpoint"), @@ -113,11 +115,14 @@ parser.add_argument( 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( - "--bidirectional", "-b", dest="bidirectional", + "--bidirectional", "-b", dest="bidirectional", action='store_true', help="add/remove the flow entries from src to dst and back") parser.add_argument( "--cookie", "-c", dest="cookie", @@ -130,4 +135,4 @@ parser.add_argument( 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)