X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Fopenvim.git;a=blobdiff_plain;f=openvim;h=524e3485188b5e0868f50b921a93eec4599cf82c;hp=cb7321d0ca426403eec9d04f1e74168921d23f7d;hb=HEAD;hpb=9a61c6b761065160d0889e7bd1e0f9fc37de5310 diff --git a/openvim b/openvim index cb7321d..524e348 100755 --- a/openvim +++ b/openvim @@ -861,6 +861,9 @@ def openflow_action(args): if args.action=='port-list': url = "http://%s:%s/openvim/networks/openflow/ports" %(vim_config["HOST"], vim_config["PORT"]) r,c = vim_read(url) + elif args.action == 'port-mapping': + url = "http://%s:%s/openvim/openflow/mapping" % (vim_config["HOST"], vim_config["PORT"]) + r, c = vim_read(url) elif args.action=='rules-list' or args.action=='reinstall': PORT = vim_config["PORT"] if args.action=='reinstall': @@ -896,7 +899,7 @@ def openflow_action(args): if "ADMIN_PORT" not in vim_config: print "OPENVIM_ADMIN_PORT variable not defined" return 401 # HTTP_Unauthorized - url = "http://%s:%s/openvim/networks/openflow/clear" %(vim_config["HOST"], vim_config["ADMIN_PORT"]) + url = "http://%s:%s/openvim/networks/clear/openflow" %(vim_config["HOST"], vim_config["ADMIN_PORT"]) r,c = vim_delete(url) else: return 400 #HTTP_Bad_Request @@ -1013,6 +1016,9 @@ if __name__=="__main__": #openflow rules openflow_list_action = subparsers.add_parser("openflow-port-list", help="list openflow switch ports name") openflow_list_action.set_defaults(func=openflow_action, action="port-list") + + openflow_list_action = subparsers.add_parser("openflow-port-mapping-list", help="list computes port mapping") + openflow_list_action.set_defaults(func=openflow_action, action="port-mapping") openflow_list_action = subparsers.add_parser("openflow-clear-all", help="removes all openflow rules") openflow_list_action.set_defaults(func=openflow_action, action="clear-all")