@bottle.route(url_base + '/openflow/mapping', method='POST')
def http_of_port_mapping():
"""
- Insert a tenant into the database.
+ Create new compute port mapping entry
:return:
"""
my = config_dic['http_threads'][threading.current_thread().name]
@bottle.route(url_base + '/openflow/mapping', method='GET')
def get_of_port_mapping():
"""
- Insert a tenant into the database.
+ Get compute port mapping
:return:
"""
my = config_dic['http_threads'][threading.current_thread().name]
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':
#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")