partner consortium (www.sonata-nfv.eu).
"""
from requests import get,put, delete
partner consortium (www.sonata-nfv.eu).
"""
from requests import get,put, delete
vnf_src_interface=self._parse_vnf_interface(args.get("source")),
vnf_dst_interface=self._parse_vnf_interface(args.get("destination")),
weight=args.get("weight"),
match=args.get("match"),
bidirectional=args.get("bidirectional"),
vnf_src_interface=self._parse_vnf_interface(args.get("source")),
vnf_dst_interface=self._parse_vnf_interface(args.get("destination")),
weight=args.get("weight"),
match=args.get("match"),
bidirectional=args.get("bidirectional"),
- response = put("%s/restapi/network/%s/%s" %
- (args.get("endpoint"),
- vnf_src_name,
- vnf_dst_name),
- json=params)
- pp.pprint(response.json())
+ response = put("{0}/restapi/network".format(args.get("endpoint")),
+ params=params)
+ pp.pprint(response.text)
vnf_src_interface=self._parse_vnf_interface(args.get("source")),
vnf_dst_interface=self._parse_vnf_interface(args.get("destination")),
weight=args.get("weight"),
match=args.get("match"),
bidirectional=args.get("bidirectional"),
vnf_src_interface=self._parse_vnf_interface(args.get("source")),
vnf_dst_interface=self._parse_vnf_interface(args.get("destination")),
weight=args.get("weight"),
match=args.get("match"),
bidirectional=args.get("bidirectional"),
- response = delete("%s/restapi/network/%s/%s" %
- (args.get("endpoint"),
- vnf_src_name,
- vnf_dst_name),
- json=params)
- pp.pprint(response.json())
+ response = delete("{0}/restapi/network".format(args.get("endpoint")),
+ params=params)
+ pp.pprint(response.text)
def _parse_vnf_name(self, vnf_name_str):
vnf_name = vnf_name_str.split(':')[0]
def _parse_vnf_name(self, vnf_name_str):
vnf_name = vnf_name_str.split(':')[0]
help="vnf name of the destination of the chain")
parser.add_argument(
"--weight", "-w", dest="weight",
help="vnf name of the destination of the chain")
parser.add_argument(
"--weight", "-w", dest="weight",
- help="weight metric to calculate the path")
+ 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(
parser.add_argument(
"--match", "-m", dest="match",
help="string holding extra matches for the flow entries")
parser.add_argument(
- "--bidirectional", "-b", dest="bidirectional",
- action='store_true',
+ "--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",
help="add/remove the flow entries from src to dst and back")
parser.add_argument(
"--cookie", "-c", dest="cookie",
parser.add_argument(
"--endpoint", "-e", dest="endpoint",
default="http://127.0.0.1:5001",
parser.add_argument(
"--endpoint", "-e", dest="endpoint",
default="http://127.0.0.1:5001",