def elan_interfaces(store, args):
- return ElanInstances(NAME, ElanInstances.CONTAINER, store, args)
+ return ElanInterfaces(NAME, ElanInterfaces.CONTAINER, store, args)
class ElanInstances(Model):
class ElanInterfaces(Model):
CONTAINER = "elan-interfaces"
- ELAN_INSTANCE = "elan-instance"
+ ELAN_INSTANCE = "elan-interface"
def get_elan_interfaces(self):
return self.data[self.CONTAINER][self.ELAN_INSTANCE]
return None
for entry in entries:
entry['mac'] = entry['mac'].lower()
- d[entry.get('mac')][entry.get('network-id')] = entry
+ d[entry.get('mac')][entry.get('network-id')] = entry
return d
self.get_kv(k, item, values)
return values
- def get_dpn_from_ofnodeid(self, node_id):
+ @staticmethod
+ def get_dpn_from_ofnodeid(node_id):
return node_id.split(':')[1] if node_id else 'none'
- def get_ofport_from_ncid(self, ncid):
+ @staticmethod
+ def get_ofport_from_ncid(ncid):
return ncid.split(':')[2] if ncid and ncid.startswith('openflow') else 0
from model import Model
+class Singleton(object):
+ def __new__(cls, *args, **kwds):
+ it = cls.__dict__.get("__it__")
+ if it is not None:
+ return it
+ cls.__it__ = it = object.__new__(cls)
+ it.init(*args, **kwds)
+ return it
+
+ def init(self, *args, **kwds):
+ pass
+
+
+def singleton(cls):
+ instances = {}
+
+ def getinstance():
+ if cls not in instances:
+ instances[cls] = cls()
+ return instances[cls]
+ return getinstance
+
+
+@singleton
class Models:
- def __init__(self, outdir="/tmp", ip="localhost", port="8181", user="admin", pw="admin", pretty_print=False):
- self.outdir = outdir
- self.ip = ip
- self.port = port
- self.user = user
- self.pw = pw
- self.pretty_print = pretty_print
-
- self.elan_elan_instances = elan.elan_instances(Model.CONFIG, outdir)
- self.elan_elan_interfaces = elan.elan_interfaces(Model.CONFIG, outdir)
- self.id_manager_id_pools = id_manager.id_pools(Model.CONFIG, outdir)
- self.ietf_interfaces_interfaces = ietf_interfaces.interfaces(Model.CONFIG, outdir)
- self.ietf_interfaces_interfaces_state = ietf_interfaces.interfaces_state(Model.OPERATIONAL, outdir)
- self.interface_service_bindings_service_bindings = interface_service_bindings.service_bindings(Model.CONFIG, outdir)
- self.itm_state_tunnels_state = itm_state.tunnels_state(Model.OPERATIONAL, outdir)
- self.l3vpn_vpn_interfaces = l3vpn.vpn_instance_to_vpn_id(Model.CONFIG, outdir)
- self.mip_mac = mip.mac(Model.CONFIG, outdir)
- self.neutron_neutron = neutron.neutron(Model.CONFIG, outdir)
- self.network_topology_network_topology_config = network_topology.network_topology(Model.CONFIG, outdir)
- self.network_topology_network_topology_operational = network_topology.network_topology(Model.CONFIG, outdir)
- self.neutron_neutron = neutron.neutron(Model.CONFIG, outdir)
- self.odl_fib_fib_entries = odl_fib.fib_entries(Model.CONFIG, outdir)
- self.odl_interface_meta_if_index_interface_map = odl_interface_meta.if_indexes_interface_map(Model.OPERATIONAL, outdir)
- self.odl_inventory_nodes_config = opendaylight_inventory.nodes(Model.CONFIG, outdir)
- self.odl_inventory_nodes_operational = opendaylight_inventory.nodes(Model.OPERATIONAL, outdir)
- self.odl_l3vpn_vpn_instance_to_vpn_id = odl_l3vpn.vpn_instance_to_vpn_id(Model.CONFIG, outdir)
+
+ def __init__(self):
+ self.args = None
+ self.elan_elan_instances = None
+ self.elan_elan_interfaces = None
+ self.id_manager_id_pools = None
+ self.ietf_interfaces_interfaces = None
+ self.ietf_interfaces_interfaces_state = None
+ self.interface_service_bindings_service_bindings = None
+ self.itm_state_tunnels_state = None
+ self.l3vpn_vpn_interfaces = None
+ self.mip_mac = None
+ self.network_topology_network_topology_config = None
+ self.network_topology_network_topology_operational = None
+ self.neutron_neutron = None
+ self.odl_fib_fib_entries = None
+ self.odl_interface_meta_if_index_interface_map = None
+ self.odl_inventory_nodes_config = None
+ self.odl_inventory_nodes_operational = None
+ self.odl_l3vpn_vpn_instance_to_vpn_id = None
+
+ def get_all_models(self, args):
+ self.args = args
+ self.elan_elan_instances = elan.elan_instances(Model.CONFIG, args)
+ self.elan_elan_interfaces = elan.elan_interfaces(Model.CONFIG, args)
+ self.id_manager_id_pools = id_manager.id_pools(Model.CONFIG, args)
+ self.ietf_interfaces_interfaces = ietf_interfaces.interfaces(Model.CONFIG, args)
+ self.ietf_interfaces_interfaces_state = ietf_interfaces.interfaces_state(Model.OPERATIONAL, args)
+ self.interface_service_bindings_service_bindings = interface_service_bindings.service_bindings(Model.CONFIG, args)
+ self.itm_state_tunnels_state = itm_state.tunnels_state(Model.OPERATIONAL, args)
+ self.l3vpn_vpn_interfaces = l3vpn.vpn_instance_to_vpn_id(Model.CONFIG, args)
+ self.mip_mac = mip.mac(Model.CONFIG, args)
+ self.network_topology_network_topology_config = network_topology.network_topology(Model.CONFIG, args)
+ self.network_topology_network_topology_operational = network_topology.network_topology(Model.CONFIG, args)
+ self.neutron_neutron = neutron.neutron(Model.CONFIG, args)
+ self.odl_fib_fib_entries = odl_fib.fib_entries(Model.CONFIG, args)
+ self.odl_interface_meta_if_index_interface_map = odl_interface_meta.if_indexes_interface_map(Model.OPERATIONAL, args)
+ self.odl_inventory_nodes_config = opendaylight_inventory.nodes(Model.CONFIG, args)
+ self.odl_inventory_nodes_operational = opendaylight_inventory.nodes(Model.OPERATIONAL, args)
+ self.odl_l3vpn_vpn_instance_to_vpn_id = odl_l3vpn.vpn_instance_to_vpn_id(Model.CONFIG, args)
+
+ def get_models(self, args, models):
+ self.args = args
+
+ if "elan_elan_instances" in models:
+ self.elan_elan_instances = elan.elan_instances(Model.CONFIG, args)
+ if "elan_elan_interfaces" in models:
+ self.elan_elan_interfaces = elan.elan_interfaces(Model.CONFIG, args)
+ if "id_manager_id_pools" in models:
+ self.id_manager_id_pools = id_manager.id_pools(Model.CONFIG, args)
+ if "ietf_interfaces_interfaces" in models:
+ self.ietf_interfaces_interfaces = ietf_interfaces.interfaces(Model.CONFIG, args)
+ if "ietf_interfaces_interfaces_state" in models:
+ self.ietf_interfaces_interfaces_state = ietf_interfaces.interfaces_state(Model.OPERATIONAL, args)
+ if "interface_service_bindings_service_bindings" in models:
+ self.interface_service_bindings_service_bindings = interface_service_bindings.service_bindings(Model.CONFIG, args)
+ if "itm_state_tunnels_state" in models:
+ self.itm_state_tunnels_state = itm_state.tunnels_state(Model.OPERATIONAL, args)
+ if "l3vpn_vpn_interfaces" in models:
+ self.l3vpn_vpn_interfaces = l3vpn.vpn_instance_to_vpn_id(Model.CONFIG, args)
+ if "mip_mac" in models:
+ self.mip_mac = mip.mac(Model.CONFIG, args)
+ if "network_topology_network_topology_config" in models:
+ self.neutron_neutron = neutron.neutron(Model.CONFIG, args)
+ if "network_topology_network_topology_config" in models:
+ self.network_topology_network_topology_config = network_topology.network_topology(Model.CONFIG, args)
+ if "network_topology_network_topology_operational" in models:
+ self.network_topology_network_topology_operational = network_topology.network_topology(Model.CONFIG, args)
+ if "neutron_neutron" in models:
+ self.neutron_neutron = neutron.neutron(Model.CONFIG, args)
+ if "odl_fib_fib_entries" in models:
+ self.odl_fib_fib_entries = odl_fib.fib_entries(Model.CONFIG, args)
+ if "odl_interface_meta_if_index_interface_map" in models:
+ self.odl_interface_meta_if_index_interface_map = odl_interface_meta.if_indexes_interface_map(Model.OPERATIONAL, args)
+ if "odl_inventory_nodes_config" in models:
+ self.odl_inventory_nodes_config = opendaylight_inventory.nodes(Model.CONFIG, args)
+ if "odl_inventory_nodes_operational" in models:
+ self.odl_inventory_nodes_operational = opendaylight_inventory.nodes(Model.OPERATIONAL, args)
+ if "odl_l3vpn_vpn_instance_to_vpn_id" in models:
+ self.odl_l3vpn_vpn_instance_to_vpn_id = odl_l3vpn.vpn_instance_to_vpn_id(Model.CONFIG, args)
-from odltools.netvirt import utils
from odltools.mdsal.models import constants
from odltools.mdsal.models import ietf_interfaces
from odltools.mdsal.models import itm_state
from odltools.mdsal.models import l3vpn
from odltools.mdsal.models import neutron
from odltools.mdsal.models.model import Model
+from odltools.netvirt import utils
+from odltools.netvirt.utils import sort
def get_all_flows(modules=['ifm'], filter=[]):
return []
-def sort(data, field):
- return sorted(data, key=lambda x: x[field])
-
-
def print_keys(ifaces, ifstates):
print "InterfaceNames: {}\n".format(ifaces.keys())
print
sifstate = ifstates.get(sport_id)
subport['SubNeutronPort'] = 'Correct' if snport else 'Wrong'
subport['SubVpnInterface'] = 'Correct' if svpniface else 'Wrong'
- subport['ofport'] = Model.get_ofport_from_ncid(sifstate.get('lower-layer-if')[0])
+ subport['ofport'] = Model.get_ofport_from_ncid()
if siface:
vlan_mode = siface.get('odl-interface:l2vlan-mode')
parent_iface_id = siface.get('odl-interface:parent-interface')
import analyze
+import argparse
import show
def add_common_args(parser):
- parser.add_argument("path",
+ parser.add_argument("--path",
help="the directory that the parsed data is written into")
parser.add_argument("-i", "--ip", default="localhost",
help="OpenDaylight ip address")
parser.set_defaults(func=analyze.analyze_trunks)
+def call_func(args):
+ args.func2(args)
+
+
def add_show_parser(parsers):
parser = parsers.add_parser("elan-instances")
add_common_args(parser)
parser.set_defaults(func=show.show_elan_instances)
+ parser = parsers.add_parser("flows")
+ add_common_args(parser)
+ parser.add_argument("--modules",
+ help="service module owning the flow")
+ parser.add_argument("flowtype", choices=["all", "duplicate", "elan", "learned", "stale"])
+ parser.set_defaults(func=show.show_flows)
+
parser = parsers.add_parser("id-pools")
add_common_args(parser)
parser.set_defaults(func=show.show_idpools)
parser = parsers.add_parser("stale-bindings")
add_common_args(parser)
- parser.set_defaults(func=show.show_stale_bindings)
+ # parser.set_defaults(func=show.show_stale_bindings)
+ parser.add_argument("--func2", default=show.show_stale_bindings, help=argparse.SUPPRESS)
+ parser.set_defaults(func=call_func)
parser = parsers.add_parser("tables")
add_common_args(parser)
--- /dev/null
+from odltools.mdsal.models.models import Models
+
+
+gmodels = None
+
+
+def get_models(args, models):
+ global gmodels
+ gmodels = Models()
+ gmodels.get_models(args, models)
+
+
import json
-from collections import defaultdict
-
-import constants as const
-import flow_parser as fp
-import netvirt_utils as utils
-from odltools.mdsal.models.models import Model
+import utils
# Required
ifaces = None
for flow in flows:
print 'Table:', flow['table']
print 'FlowId:', flow['id'], 'FlowName:', flow.get('name')
-
-
-
-
-def get_stale_flows(modules=['ifm']):
- if not modules:
- return 'No modules specified'
- ifaces = {}
- ifstates = {}
- ifindexes = {}
- bindings = {}
- einsts = {}
- eifaces = {}
- fibentries = {}
- vpnids = {}
- vpninterfaces = {}
- groups = {}
- table_list = list(set([table for module in modules for table in const.TABLE_MAP[module]]))
- ##table_list = [214, 244]
- of_nodes = odl_inventory_nodes_config.get_nodes_by_key()
- if 'ifm' in modules:
- ifaces = ietf_interfaces_interfaces.get_interfaces_by_key()
- ifstates = ietf_interfaces_interfaces_state.get_interfaces_by_key()
- if 'l3vpn' in modules:
- ifaces = ifaces or ietf_interfaces_interfaces.get_interfaces_by_key()
- ifindexes = ifindexes or odl_interface_meta_if_index_interface_map.get_if_index_interfaces_by_key()
- fibentries = fibentries or odl_fib_fib_entries.get_vrf_entries_by_key()
- vpnids = vpnids or odl_l3vpn_vpn_instance_to_vpn_id.get_vpn_ids_by_key()
- vpninterfaces = vpninterfaces or l3vpn_vpn_interfaces.get_vpn_ids_by_key()
- groups = groups or get_groups(of_nodes)
- if 'acl' in modules:
- ifaces = ifaces or ietf_interfaces_interfaces.get_interfaces_by_key()
- ifindexes = ifindexes or odl_interface_meta_if_index_interface_map.get_if_index_interfaces_by_key()
- einsts = einsts or elan_elan_instances.get_elan_instances_by_key()
- eifaces = eifaces or elan_elan_interfaces.get_elan_interfaces()
- if 'elan' in modules:
- ifaces = ifaces or ietf_interfaces_interfaces.get_interfaces_by_key()
- einsts = einsts or elan_elan_instances.get_elan_instances_by_key()
- eifaces = eifaces or elan_elan_interfaces.get_elan_interfaces()
- ifindexes = ifindexes or odl_interface_meta_if_index_interface_map.get_if_index_interfaces_by_key()
- stale_flows = []
- for node in of_nodes.itervalues():
- tables = [x for x in node[const.NODE_TABLE] if x['id'] in table_list]
- for table in tables:
- for flow in table.get('flow', []):
- flow_dict = None
- flow_info = {}
- flow_info['dpnid'] = Model.get_dpn_from_ofnodeid(node['id'])
- if 'ifm' in modules and table['id'] in const.TABLE_MAP['ifm']:
- flow_dict = fp.stale_ifm_flow(flow, flow_info, ifaces, ifstates)
- if 'l3vpn' in modules and table['id'] in const.TABLE_MAP['l3vpn']:
- flow_dict = fp.stale_l3vpn_flow(flow, flow_info, groups, ifaces, ifindexes, vpnids, vpninterfaces, fibentries)
- if 'elan' in modules and table['id'] in const.TABLE_MAP['elan']:
- flow_dict = fp.stale_elan_flow(flow, flow_info, ifaces, ifindexes, einsts, eifaces)
- if 'acl' in modules and table['id'] in const.TABLE_MAP['acl']:
- flow_dict = fp.stale_acl_flow(flow, flow_info, ifaces, ifindexes, einsts, eifaces)
- if flow_dict is not None:
- stale_flows.append(flow_dict)
-
- return stale_flows
-
-
-def get_ips_for_iface(nports, ifname):
- ips = []
- port = nports.get(ifname) if ifname else None
- fixed_ips = port.get('fixed-ips', []) if port else []
- for fixed_ip in fixed_ips:
- ips.append(fixed_ip['ip-address'])
- return ips
-
-
-def show_link_flow_binding():
- stale_ids, bindings = get_stale_bindings()
- flows = get_stale_flows()
- print len(stale_ids), len(flows)
- for flow in flows:
- if flow['ifname'] in stale_ids and 'bound-services' in bindings[flow['ifname']]:
- print 'Flow with binding: ', flow['ifname']
- else:
- print 'Flow without binding: ', flow['ifname']
-
-
-def show_stale_flows(sort_by='table'):
- compute_map = Model.get_dpn_host_mapping()
- nports = neutron_neutron.get_ports_by_key()
- for flow in utils.sort(get_stale_flows(['ifm', 'acl', 'elan', 'l3vpn']), sort_by):
- host = compute_map.get(flow.get('dpnid'), flow.get('dpnid'))
- ip_list = get_ips_for_iface(nports, flow.get('ifname'))
- if ip_list:
- flow['iface-ips'] = ip_list
- result = 'Table:{},Host:{},FlowId:{}{}'.format(
- flow['table'], host, flow['id'],
- utils.show_optionals(flow))
- print result
- ##path = get_data_path('flows', flow)
- #print('http://192.168.2.32:8383/restconf/config/{}'.format(path))
- #print 'Flow:', json.dumps(parse_flow(flow['flow']))
-
-
-def get_all_flows(modules=['ifm'], filter=[]):
- if not modules:
- return 'No modules specified'
- ifaces = {}
- ifstates = {}
- ifindexes = {}
- bindings = {}
- einsts = {}
- eifaces = {}
- fibentries = {}
- vpnids = {}
- vpninterfaces = {}
- groups = {}
- if 'all' in modules:
- table_list = list(range(0, 255))
- else:
- table_list = list(set([table for module in modules for table in const.TABLE_MAP[module]]))
- ##table_list = [214, 244]
- of_nodes = odl_inventory_nodes_config.get_nodes_by_key()
- if 'ifm' in modules:
- ifaces = ietf_interfaces_interfaces.get_interfaces_by_key()
- ifstates = ietf_interfaces_interfaces_state.get_interfaces_by_key()
- if 'l3vpn' in modules:
- ifaces = ifaces or ietf_interfaces_interfaces.get_interfaces_by_key()
- ifindexes = ifindexes or odl_interface_meta_if_index_interface_map.get_if_index_interfaces_by_key()
- fibentries = fibentries or dsg.get_fibentries_by_label()
- vpnids = vpnids or odl_l3vpn_vpn_instance_to_vpn_id.get_vpn_ids_by_key()
- vpninterfaces = vpninterfaces or l3vpn_vpn_interfaces.get_vpn_ids_by_key()
- groups = groups or get_groups(of_nodes)
- if 'acl' in modules:
- ifaces = ifaces or ietf_interfaces_interfaces.get_interfaces_by_key()
- ifindexes = ifindexes or odl_interface_meta_if_index_interface_map.get_if_index_interfaces_by_key()
- einsts = einsts or elan_elan_instances.get_elan_instances_by_key()
- eifaces = eifaces or elan_elan_interfaces.get_elan_interfaces()
- if 'elan' in modules:
- ifaces = ifaces or ietf_interfaces_interfaces.get_interfaces_by_key()
- einsts = einsts or elan_elan_instances.get_elan_instances_by_key()
- eifaces = eifaces or elan_elan_interfaces.get_elan_interfaces()
- ifindexes = ifindexes or odl_interface_meta_if_index_interface_map.get_if_index_interfaces_by_key()
- if 'all' in modules:
- groups = groups or get_groups(of_nodes)
- ifaces = ifaces or ietf_interfaces_interfaces.get_interfaces_by_key()
- ifstates = ifstates or ietf_interfaces_interfaces_state.get_interfaces_by_key()
- ifindexes = ifindexes or odl_interface_meta_if_index_interface_map.get_if_index_interfaces_by_key()
- fibentries = fibentries or dsg.get_fibentries_by_label()
- vpnids = vpnids or odl_l3vpn_vpn_instance_to_vpn_id.get_vpn_ids_by_key()
- vpninterfaces = vpninterfaces or l3vpn_vpn_interfaces.get_vpn_ids_by_key()
- einsts = einsts or elan_elan_instances.get_elan_instances_by_key()
- eifaces = eifaces or elan_elan_interfaces.get_elan_interfaces()
- flows = []
- for node in of_nodes.itervalues():
- tables = [x for x in node[const.NODE_TABLE] if x['id'] in table_list]
- for table in tables:
- for flow in table.get('flow', []):
- flow_dict = None
- flow_info = {}
- flow_info['dpnid'] = Model.get_dpn_from_ofnodeid(node['id'])
- flow_dict = fp.get_any_flow(flow, flow_info, groups,
- ifaces, ifstates, ifindexes,
- fibentries, vpnids, vpninterfaces,
- einsts, eifaces)
- if (flow_dict is not None and
- utils.filter_flow(flow_dict, filter)):
- flows.append(flow_dict)
- return flows
-
-
-def show_flows(modules=['ifm'], sort_by='table', filter_by=[]):
- compute_map = Model.get_dpn_host_mapping()
- nports = neutron_neutron.get_ports_by_key()
- for flow in utils.sort(get_all_flows(modules, filter_by), sort_by):
- host = compute_map.get(flow.get('dpnid'), flow.get('dpnid'))
- ip_list = get_ips_for_iface(nports, flow.get('ifname'))
- if ip_list:
- flow['iface-ips'] = ip_list
- result = 'Table:{},Host:{},FlowId:{}{}'.format(
- flow['table'], host, flow['id'],
- utils.show_optionals(flow))
- print result
- print 'Flow:', json.dumps(parse_flow(flow['flow']))
-
-
-def show_all_flows():
- show_flows(modules=['all'])
-
-
-def show_elan_flows():
- compute_map = Model.get_dpn_host_mapping()
- for flow in utils.sort(get_all_flows(['elan']), 'id'):
- host = compute_map.get(flow.get('dpnid'), flow.get('dpnid'))
- result = 'MacHost:{}{},Table:{},FlowId:{},{},Flow:{}'.format(flow['id'][-17:],host,flow['table'],flow['id'],utils.show_optionals(flow),json.dumps(parse_flow(flow['flow'])))
- print result
- #print 'Flow:', json.dumps(parse_flow(flow['flow']))
-
-
-def get_matchstr(flow):
- if flow and flow.get('flow') and flow.get('flow').get('match'):
- return json.dumps(flow.get('flow').get('match', None))
-
-
-def get_key_for_dup_detect(flow):
- result = '{}:{}:{}'.format(flow.get('dpnid'), flow.get('table'), get_matchstr(flow))
- return result
-
-
-def show_dup_flows():
- mmac = mip_mac.get_entries_by_key()
- einsts = elan_elan_instances.get_elan_instances_by_key()
- flows = utils.sort(get_all_flows(['elan']), 'table')
- matches = defaultdict(list)
- compute_map = Model.get_dpn_host_mapping()
- for flow in flows:
- dup_key = get_key_for_dup_detect(flow)
- if dup_key:
- if matches and matches.get(dup_key):
- matches[dup_key].append(flow)
- else:
- matches[dup_key].append(flow)
- for k, v in matches.iteritems():
- if len(v) > 1:
- dpnid = k.split(':')[0]
- host = compute_map.get(dpnid, dpnid)
- result = 'Host:{},FlowCount:{},MatchKey:{},ElanTag:{}'.format(host, len(v), k,v[0].get('elan-tag'))
- print result
- for idx, flow in enumerate(v):
- result = "Duplicate"
- mac_addr = flow.get('dst-mac')
- if mac_addr and mmac.get(mac_addr):
- result = fp.is_correct_elan_flow(flow, mmac.get(mac_addr), einsts, host)
- print ' {}Flow-{}:{}'.format(result, idx, json.dumps(parse_flow(flow.get('flow'))))
-
-
-def show_learned_mac_flows():
- nports = neutron_neutron.get_ports_by_key(key_field='mac-address')
- flows = utils.sort(get_all_flows(['elan']), 'table')
- compute_map = Model.get_dpn_host_mapping()
- for flow_info in flows:
- flow = flow_info.get('flow')
- dpnid = flow_info.get('dpnid')
- host = compute_map.get(dpnid, dpnid)
- if ((flow_info.get('table') == 50 and
- flow.get('idle-timeout') == 300 and not
- nports.get(flow_info.get('src-mac'))) or
- (flow_info.get('table') == 51 and
- not nports.get(flow_info.get('dst-mac')))):
- result = 'Table:{},Host:{},FlowId:{}{}'.format(
- flow_info.get('table'), host, flow.get('id'),
- utils.show_optionals(flow_info))
- print result
- print 'Flow:{}'.format(json.dumps(parse_flow(flow)))
-
-
-
-def parse_flow(flow):
- #parse flow fields
- #hex(int(mask, 16) & int(data, 16))
- if flow['cookie']:
- utils.to_hex(flow, 'cookie')
- # parse instructions
- for instruction in flow['instructions'].get('instruction', []):
- if 'write-metadata' in instruction:
- utils.to_hex(instruction['write-metadata'],'metadata')
- utils.to_hex(instruction['write-metadata'],'metadata-mask')
- if 'apply-actions' in instruction:
- for action in instruction['apply-actions'].get('action', []):
- if 'openflowplugin-extension-nicira-action:nx-reg-load' in action:
- utils.to_hex(action['openflowplugin-extension-nicira-action:nx-reg-load'], 'value')
- # parse matches
- if 'metadata' in flow['match']:
- metadata = flow['match']['metadata']
- utils.to_hex(metadata,'metadata')
- utils.to_hex(metadata,'metadata-mask')
-
- for ofex in flow['match'].get('openflowplugin-extension-general:extension-list', []):
- if ofex['extension-key'] == 'openflowplugin-extension-nicira-match:nxm-nx-reg6-key':
- utils.to_hex(ofex['extension']['openflowplugin-extension-nicira-match:nxm-nx-reg'], 'value')
-
- return flow
-
-
from odltools.mdsal.models.model import Model
+import utils
-OPTIONALS = ['ifname', 'lport', 'elan-tag', 'mpls', 'vpnid', 'reason',
- 'dst-mac', 'src-mac', 'ofport', 'vlanid']
MAC_LEN = 17
# Flow table constants
PREFIX_244 = 'Ingress_Fixed_Conntrk_Drop'
PREFIX_245 = 'Ingress_Fixed_NonConntrk_Drop'
-
PREFIX_FOR_LPORT = {211: [PREFIX_211_GOTO, PREFIX_211_DHCPSv4,
PREFIX_211_DHCPSv6, PREFIX_211_DHCPCv4,
PREFIX_211_DHCPCv6, PREFIX_211_ARP,
VRFID_MASK = 0x0000000000fffffe
-def create_flow_dict(flow_info, flow):
- flow_dict = {}
- flow_dict['table'] = flow['table_id']
- flow_dict['id'] = flow['id']
- flow_dict['name'] = flow.get('flow-name')
- flow_dict['flow'] = flow
- flow_dict['dpnid'] = flow_info['dpnid']
- for opt in OPTIONALS:
- if flow_info.get(opt):
- flow_dict[opt] = flow_info.get(opt)
- return flow_dict
-
-
-def get_any_flow(flow, flow_info, groups, ifaces, ifstates, ifindexes,
- fibentries, vpnids, vpninterfaces, einsts, eifaces):
- table = flow['table_id']
- if table in const.TABLE_MAP['ifm']:
- stale_ifm = stale_ifm_flow(flow, flow_info, ifaces, ifstates)
- flow_info = stale_ifm if stale_ifm else get_flow_info_from_ifm_table(flow_info, flow)
- elif table in const.TABLE_MAP['acl']:
- stale_acl = stale_acl_flow(flow, flow_info, ifaces, ifindexes, einsts, eifaces)
- flow_info = stale_acl if stale_acl else get_flow_info_from_acl_table(flow_info, flow)
- elif table in const.TABLE_MAP['elan']:
- stale_elan = stale_elan_flow(flow, flow_info, ifaces, ifindexes, einsts, eifaces)
- flow_info = stale_elan if stale_elan else get_flow_info_from_elan_table(flow_info, flow)
- elif table in const.TABLE_MAP['l3vpn']:
- stale_l3vpn = stale_l3vpn_flow(flow, flow_info, groups, ifaces, ifindexes, vpnids, vpninterfaces, fibentries)
- flow_info = stale_l3vpn if stale_l3vpn else get_flow_info_from_l3vpn_table(flow_info, flow)
- else:
- flow_info = get_flow_info_from_any(flow_info, flow)
- iface = (get_iface_for_lport(ifaces, ifindexes, flow_info.get('lport'))
- if flow_info.get('lport') else None)
- if iface and iface.get('name'):
- flow_info['ifname'] = iface['name']
- return create_flow_dict(flow_info, flow)
-
-
-def stale_ifm_flow(flow, flow_info, ifaces, ifstates):
- get_flow_info_from_ifm_table(flow_info, flow)
- flow_ifname = flow_info['ifname']
- iface = ifaces.get(flow_ifname)
- if flow_ifname is not None and not iface:
- flow_info['reason'] = 'Interface doesnt exist'
- return create_flow_dict(flow_info, flow)
- elif flow_ifname and ifstates.get(flow_ifname):
- ifstate = ifstates.get(flow_ifname)
- ncid_list = ifstate.get('lower-layer-if')
- ncid = ncid_list[0] if ncid_list else None
- dpn = Model.get_dpn_from_ofnodeid(ncid)
- if dpn and dpn != flow_info['dpnid']:
- flow_info['reason'] = 'DpnId mismatch for flow and Interface'
- return create_flow_dict(flow_info, flow)
- if (flow_info.get('lport') and ifstate.get('if-index')
- and flow_info['lport'] != ifstate['if-index']):
- flow_info['reason'] = 'Lport and IfIndex mismatch'
- return create_flow_dict(flow_info, flow)
- if (flow_info.get('ofport') and ifstate.get('lower-layer-if')
- and flow_info['ofport'] != utils.get_ofport_from_ncid(
- ifstate.get('lower-layer-if')[0])):
- flow_info['reason'] = 'OfPort mismatch'
- if (flow_info.get('vlanid') and iface.get('odl-interface:vlan-id')
- and flow_info['vlanid'] != iface.get('odl-interface:vlan-id')):
- flow_info['reason'] = 'VlanId mismatch'
- return None
- # return create_flow_dict(flow_info, flow)
-
-
-def stale_l3vpn_flow(flow, flow_info, groups, ifaces, ifindexes,
- vpnids, vpninterfaces, fibentries):
- get_flow_info_from_l3vpn_table(flow_info, flow)
- lport = flow_info.get('lport')
- iface = get_iface_for_lport(ifaces, ifindexes, lport)
- if lport and not iface:
- flow_info['reason'] = 'Interface for lport not found'
- return create_flow_dict(flow_info, flow)
- if iface:
- flow_info['ifname'] = iface['name']
- vpninterface = vpninterfaces.get(iface.get('name')) if iface else None
- if not vpninterfaces:
- flow_info['reason'] = 'VpnInterface for Lport not found'
- return create_flow_dict(flow_info, flow)
- vpnid = flow_info.get('vpnid')
- if vpnid and not vpnids.get(vpnid):
- flow_info['reason'] = 'VpnInstance for VpnId not found'
- return create_flow_dict(flow_info, flow)
- if vpnid and vpninterface and vpnids.get(vpnid):
- if (vpninterface.get('vpn-instance-name') !=
- vpnids[vpnid]['vpn-instance-name']):
- flow_info['reason'] = 'Lport VpnId mismatch'
- return create_flow_dict(flow_info, flow)
- label = flow_info.get('label')
- fibentry = fibentries.get(label) if label else None
- if label and not fibentry:
- flow_info['reason'] = 'Fibentry for MplsLabel not found'
- return create_flow_dict(flow_info, flow)
- # Label check for group
- prefix = fibentry.get('destPrefix') if fibentry else None
- if prefix and flow_info.get('group-id'):
- gid = flow_info.get('group-id')
- if groups.get(gid) and (
- groups.get(gid).get('group-name', '') != prefix):
- flow_info['reason'] = 'DestPrefix mismatch for label and group'
- return create_flow_dict(flow_info, flow)
- return None
-
-
-def stale_elan_flow(flow, flow_info, ifaces, ifindexes, einsts, eifaces):
- # hex(int(mask, 16) & int(hexa, 16))
- get_flow_info_from_elan_table(flow_info, flow)
- lport = flow_info.get('lport')
- eltag = flow_info.get('elan-tag')
- iface = get_iface_for_lport(ifaces, ifindexes, lport)
- if lport and not iface:
- flow_info['reason'] = 'Interface for lport not found'
- return create_flow_dict(flow_info, flow)
- if iface:
- flow_info['ifname'] = iface['name']
- if not is_elantag_valid(eltag, eifaces, einsts, iface):
- flow_info['reason'] = 'Lport Elantag mismatch'
- return create_flow_dict(flow_info, flow)
- return None
-
-
-def stale_acl_flow(flow, flow_info, ifaces, ifindexes, einsts, eifaces):
- get_flow_info_from_acl_table(flow_info, flow)
- lport = flow_info.get('lport')
- eltag = flow_info.get('elan-tag')
- iface = get_iface_for_lport(ifaces, ifindexes, lport)
- if lport and not iface:
- flow_info['reason'] = 'Interface for lport not found'
- return create_flow_dict(flow_info, flow)
- if iface:
- flow_info['ifname'] = iface['name']
- if not is_elantag_valid(eltag, eifaces, einsts, iface):
- flow_info['reason'] = 'Lport Elantag mismatch'
- return create_flow_dict(flow_info, flow)
- #return create_flow_dict(flow_info, flow)
- return None
-
-
-def is_elantag_valid(eltag, eifaces, einsts, iface):
- if (iface and eltag
- and eltag != get_eltag_for_iface(eifaces, einsts, iface)):
- return False
- return True
-
-
-def is_correct_elan_flow(flow_info, mmac, einsts, flow_host):
- flow = flow_info.get('flow')
- flow_etag = flow_info.get('elan-tag')
- for k, v in mmac.iteritems():
- mac_host = v.get('compute')
- if einsts.get(k):
- einst_tag = einsts.get(k).get('elan-tag')
- #print einst_tag, flow_etag, mac_host
- if flow_etag and einst_tag and flow_etag == einst_tag:
- if mac_host.startswith(flow_host):
- act_resubmit = get_act_resubmit(flow)
- if (act_resubmit and act_resubmit.get('table') == 220):
- return 'Correct'
- else:
- act_tunnel = get_act_set_tunnel(flow)
- if act_tunnel:
- return 'Correct'
- return 'Wrong'
- return 'Wrong'
-
-
-def get_iface_for_lport(ifaces, ifindexes, lport):
- if lport:
- if ifindexes.get(lport):
- ifname = ifindexes.get(lport).get('interface-name')
- if ifname and ifaces.get(ifname):
- return ifaces.get(ifname)
- return None
+def parse_flow(flow):
+ #parse flow fields
+ #hex(int(mask, 16) & int(data, 16))
+ if flow['cookie']:
+ utils.to_hex(flow, 'cookie')
+ # parse instructions
+ for instruction in flow['instructions'].get('instruction', []):
+ if 'write-metadata' in instruction:
+ utils.to_hex(instruction['write-metadata'],'metadata')
+ utils.to_hex(instruction['write-metadata'],'metadata-mask')
+ if 'apply-actions' in instruction:
+ for action in instruction['apply-actions'].get('action', []):
+ if 'openflowplugin-extension-nicira-action:nx-reg-load' in action:
+ utils.to_hex(action['openflowplugin-extension-nicira-action:nx-reg-load'], 'value')
+ # parse matches
+ if 'metadata' in flow['match']:
+ metadata = flow['match']['metadata']
+ utils.to_hex(metadata,'metadata')
+ utils.to_hex(metadata,'metadata-mask')
+ for ofex in flow['match'].get('openflowplugin-extension-general:extension-list', []):
+ if ofex['extension-key'] == 'openflowplugin-extension-nicira-match:nxm-nx-reg6-key':
+ utils.to_hex(ofex['extension']['openflowplugin-extension-nicira-match:nxm-nx-reg'], 'value')
-def get_eltag_for_iface(eifaces, einsts, iface):
- ifname = iface.get('name') if iface else None
- eiface = eifaces.get(ifname) if ifname else None
- einst_name = eiface.get('elan-instance-name') if eiface else None
- einst = einsts.get(einst_name) if einst_name else None
- return einst.get('elan-tag') if einst else None
+ return flow
# Methods to extract flow fields
for instruction in flow['instructions'].get('instruction', []):
if 'apply-actions' in instruction:
for action in instruction['apply-actions'].get('action', []):
- if ('openflowplugin-extension-nicira-action:nx-reg-load'
- in action):
- return action[
- 'openflowplugin-extension-nicira-action:nx-reg-load']
+ if 'openflowplugin-extension-nicira-action:nx-reg-load' in action:
+ return action['openflowplugin-extension-nicira-action:nx-reg-load']
return None
for instruction in flow['instructions'].get('instruction', []):
if 'apply-actions' in instruction:
for action in instruction['apply-actions'].get('action', []):
- if ('openflowplugin-extension-nicira-action:nx-conntrack'
- in action):
- return action[
- 'openflowplugin-extension-nicira-action:nx-conntrack']
+ if 'openflowplugin-extension-nicira-action:nx-conntrack' in action:
+ return action['openflowplugin-extension-nicira-action:nx-conntrack']
def get_act_group(flow):
for instruction in flow['instructions'].get('instruction', []):
if 'apply-actions' in instruction:
for action in instruction['apply-actions'].get('action', []):
- if ('openflowplugin-extension-nicira-action:nx-resubmit'
- in action):
+ if 'openflowplugin-extension-nicira-action:nx-resubmit' in action:
return action[
'openflowplugin-extension-nicira-action:nx-resubmit']
if w_mdata:
metadata = w_mdata['metadata']
mask = w_mdata['metadata-mask']
- if (mask & LPORT_MASK):
+ if mask & LPORT_MASK:
lport = ('%x' % (metadata & LPORT_MASK))[:-LPORT_MASK_ZLEN]
if lport:
flow_info['lport'] = int(lport, 16)
if m_metadata:
metadata = m_metadata['metadata']
mask = m_metadata['metadata-mask']
- if (mask & ELAN_TAG_MASK):
+ if mask & ELAN_TAG_MASK:
elan = ('%x' % (metadata & ELAN_TAG_MASK))[:ELAN_HEX_LEN]
if elan:
flow_info['elan-tag'] = int(elan, 16)
# Table specific parsing
+
def get_ifname_from_flowid(flow_id, table):
splitter = ':' if table == 0 else '.'
# i = 2 if table == 0 else 1
if w_mdata:
metadata = w_mdata['metadata']
mask = w_mdata['metadata-mask']
- if (mask & LPORT_MASK):
+ if mask & LPORT_MASK:
lport = ('%x' % (metadata & LPORT_MASK))[:-LPORT_MASK_ZLEN]
flow_info['lport'] = int(lport, 16)
m_reg6 = get_match_reg6(flow)
if flow['table_id'] == 0:
m_inport = get_match_inport(flow)
if m_inport:
- flow_info['ofport'] = utils.get_ofport_from_ncid(m_inport)
+ flow_info['ofport'] = Model.get_ofport_from_ncid(m_inport)
m_vlan = get_match_vlanid(flow)
if m_vlan and m_vlan.get('vlan-id'):
flow_info['vlanid'] = m_vlan.get('vlan-id')
if m_metadata:
metadata = m_metadata['metadata']
mask = m_metadata['metadata-mask']
- if (mask & LPORT_MASK):
+ if mask & LPORT_MASK:
lport = ('%x' % (metadata & LPORT_MASK))[:-LPORT_MASK_ZLEN]
flow_info['lport'] = int(lport, 16)
- if (mask & VRFID_MASK):
+ if mask & VRFID_MASK:
flow_info['vpnid'] = (metadata & VRFID_MASK) / 2
return flow_info
if m_metadata:
metadata = m_metadata['metadata']
mask = m_metadata['metadata-mask']
- if (mask & ELAN_TAG_MASK):
+ if mask & ELAN_TAG_MASK:
elan = ('%x' % (metadata & ELAN_TAG_MASK))[:ELAN_HEX_LEN]
flow_info['elan-tag'] = int(elan, 16)
- if (mask & LPORT_MASK):
+ if mask & LPORT_MASK:
lport = ('%x' % (metadata & LPORT_MASK))[:-LPORT_MASK_ZLEN]
flow_info['lport'] = int(lport, 16)
m_ether_dest = get_match_ether_dest(flow)
if m_metadata:
metadata = m_metadata['metadata']
mask = m_metadata['metadata-mask']
- if (mask & LPORT_MASK):
+ if mask & LPORT_MASK:
lport = ('%x' % (metadata & LPORT_MASK))[:-LPORT_MASK_ZLEN]
flow_info['lport'] = int(lport, 16)
a_conntrk = get_act_conntrack(flow)
--- /dev/null
+import collections
+import logging
+from odltools.mdsal.models import ietf_interfaces
+from odltools.mdsal.models import odl_fib
+from odltools.mdsal.models import odl_interface_meta
+from odltools.mdsal.models import odl_l3vpn
+from odltools.mdsal.models import opendaylight_inventory
+from odltools.mdsal.models.model import Model
+from odltools.mdsal.models.models import Models
+from odltools.mdsal.models.opendaylight_inventory import Nodes
+from odltools.netvirt import utils
+import config
+import flow_parser
+
+
+logger = logging.getLogger("netvirt.flows")
+
+
+TABLE_MAP = {
+ 'ifm': [0, 17, 220],
+ 'l3vpn': [19, 20, 21, 22, 36, 81],
+ 'elan': [50, 51, 52, 55],
+ 'acl': [211, 212, 213, 214, 215, 241, 242, 243, 244, 245]
+}
+
+OPTIONALS = ['ifname', 'lport', 'elan-tag', 'mpls', 'vpnid', 'reason',
+ 'dst-mac', 'src-mac', 'ofport', 'vlanid']
+
+
+def filter_flow(flow_dict, filter_list):
+ if not filter_list:
+ return True
+ for flow_filter in filter_list:
+ if flow_dict.get(flow_filter):
+ return True
+ return False
+
+
+def get_all_flows(args, modules=None, filter_by=None):
+ modules = modules if modules else ['ifm']
+ filter_by = filter_by if filter_by else []
+ if not modules:
+ return 'No modules specified'
+ ifaces = {}
+ ifstates = {}
+ ifindexes = {}
+ bindings = {}
+ einsts = {}
+ eifaces = {}
+ fibentries = {}
+ vpnids = {}
+ vpninterfaces = {}
+ groups = {}
+ if 'all' in modules:
+ table_list = list(range(0, 255))
+ else:
+ table_list = list(set([table for mod in modules for table in TABLE_MAP[mod]]))
+ # models = Models(args)
+ # odl_inventory_nodes_config = opendaylight_inventory.nodes(Model.CONFIG, args)
+ of_nodes = config.gmodels.odl_inventory_nodes_config.get_nodes_by_key()
+ # ietf_interfaces_interfaces = ietf_interfaces.interfaces(Model.CONFIG, args)
+ # ietf_interfaces_interfaces_state = ietf_interfaces.interfaces_state(Model.OPERATIONAL, args)
+ # odl_interface_meta_if_index_interface_map = odl_interface_meta.if_indexes_interface_map(Model.OPERATIONAL, args)
+ # odl_fib_fib_entries = odl_fib.fib_entries(Model.CONFIG, args)
+ # odl_l3vpn_vpn_instance_to_vpn_id = odl_l3vpn.vpn_instance_to_vpn_id(Model.CONFIG, args)
+ if 'ifm' in modules:
+ ifaces = config.gmodels.ietf_interfaces_interfaces.get_interfaces_by_key()
+ ifstates = config.gmodels.ietf_interfaces_interfaces_state.get_interfaces_by_key()
+ if 'l3vpn' in modules:
+ ifaces = ifaces or config.gmodels.ietf_interfaces_interfaces.get_interfaces_by_key()
+ ifindexes = ifindexes or config.gmodels.odl_interface_meta_if_index_interface_map.get_if_index_interfaces_by_key()
+ fibentries = fibentries or config.gmodels.odl_fib_fib_entries.get_vrf_entries_by_key()
+ vpnids = vpnids or config.gmodels.odl_l3vpn_vpn_instance_to_vpn_id.get_vpn_ids_by_key()
+ vpninterfaces = vpninterfaces or config.gmodels.l3vpn_vpn_interfaces.get_vpn_ids_by_key()
+ groups = groups or config.gmodels.odl_inventory_nodes_config.get_groups(of_nodes)
+ if 'acl' in modules:
+ ifaces = ifaces or config.gmodels.ietf_interfaces_interfaces.get_interfaces_by_key()
+ ifindexes = ifindexes or config.gmodels.odl_interface_meta_if_index_interface_map.get_if_index_interfaces_by_key()
+ einsts = einsts or config.gmodels.elan_elan_instances.get_elan_instances_by_key()
+ eifaces = eifaces or config.gmodels.elan_elan_interfaces.get_elan_interfaces()
+ if 'elan' in modules:
+ ifaces = ifaces or config.gmodels.ietf_interfaces_interfaces.get_interfaces_by_key()
+ einsts = einsts or config.gmodels.elan_elan_instances.get_elan_instances_by_key()
+ eifaces = eifaces or config.gmodels.elan_elan_interfaces.get_elan_interfaces()
+ ifindexes = ifindexes or config.gmodels.odl_interface_meta_if_index_interface_map.get_if_index_interfaces_by_key()
+ if 'all' in modules:
+ groups = groups or config.gmodels.odl_inventory_nodes_config.get_groups(of_nodes)
+ ifaces = ifaces or config.gmodels.ietf_interfaces_interfaces.get_interfaces_by_key()
+ ifstates = ifstates or config.gmodels.ietf_interfaces_interfaces_state.get_interfaces_by_key()
+ ifindexes = ifindexes or config.gmodels.odl_interface_meta_if_index_interface_map.get_if_index_interfaces_by_key()
+ fibentries = fibentries or config.gmodels.odl_fib_fib_entries.get_vrf_entries_by_key()
+ vpnids = vpnids or config.gmodels.odl_l3vpn_vpn_instance_to_vpn_id.get_vpn_ids_by_key()
+ vpninterfaces = vpninterfaces or config.gmodels.l3vpn_vpn_interfaces.get_vpn_ids_by_key()
+ einsts = einsts or config.gmodels.elan_elan_instances.get_elan_instances_by_key()
+ eifaces = eifaces or config.gmodels.elan_elan_interfaces.get_elan_interfaces()
+ flows = []
+ for node in of_nodes.itervalues():
+ tables = [x for x in node[Nodes.NODE_TABLE] if x['id'] in table_list]
+ for table in tables:
+ for flow in table.get('flow', []):
+ flow_info = {'dpnid': Model.get_dpn_from_ofnodeid(node['id'])}
+ flow_dict = get_any_flow(flow, flow_info, groups,
+ ifaces, ifstates, ifindexes,
+ fibentries, vpnids, vpninterfaces,
+ einsts, eifaces)
+ if flow_dict is not None and filter_flow(flow_dict, filter_by):
+ flows.append(flow_dict)
+ return flows
+
+
+def create_flow_dict(flow_info, flow):
+ flow_dict = {'table': flow['table_id'], 'id': flow['id'],
+ 'name': flow.get('flow-name'), 'flow': flow,
+ 'dpnid': flow_info['dpnid']}
+ for opt in OPTIONALS:
+ if flow_info.get(opt):
+ flow_dict[opt] = flow_info.get(opt)
+ return flow_dict
+
+
+def get_any_flow(flow, flow_info, groups, ifaces, ifstates, ifindexes,
+ fibentries, vpnids, vpninterfaces, einsts, eifaces):
+ table = flow['table_id']
+ if table in TABLE_MAP['ifm']:
+ stale_ifm = stale_ifm_flow(flow, flow_info, ifaces, ifstates)
+ flow_info = stale_ifm if stale_ifm else flow_parser.get_flow_info_from_ifm_table(flow_info, flow)
+ elif table in TABLE_MAP['acl']:
+ stale_acl = stale_acl_flow(flow, flow_info, ifaces, ifindexes, einsts, eifaces)
+ flow_info = stale_acl if stale_acl else flow_parser.get_flow_info_from_acl_table(flow_info, flow)
+ elif table in TABLE_MAP['elan']:
+ stale_elan = stale_elan_flow(flow, flow_info, ifaces, ifindexes, einsts, eifaces)
+ flow_info = stale_elan if stale_elan else flow_parser.get_flow_info_from_elan_table(flow_info, flow)
+ elif table in TABLE_MAP['l3vpn']:
+ stale_l3vpn = stale_l3vpn_flow(flow, flow_info, groups, ifaces, ifindexes, vpnids, vpninterfaces, fibentries)
+ flow_info = stale_l3vpn if stale_l3vpn else flow_parser.get_flow_info_from_l3vpn_table(flow_info, flow)
+ else:
+ flow_info = flow_parser.get_flow_info_from_any(flow_info, flow)
+ iface = (get_iface_for_lport(ifaces, ifindexes, flow_info.get('lport'))
+ if flow_info.get('lport') else None)
+ if iface and iface.get('name'):
+ flow_info['ifname'] = iface['name']
+ return create_flow_dict(flow_info, flow)
+
+
+def stale_l3vpn_flow(flow, flow_info, groups, ifaces, ifindexes,
+ vpnids, vpninterfaces, fibentries):
+ flow_parser.get_flow_info_from_l3vpn_table(flow_info, flow)
+ lport = flow_info.get('lport')
+ iface = get_iface_for_lport(ifaces, ifindexes, lport)
+ if lport and not iface:
+ flow_info['reason'] = 'Interface for lport not found'
+ return create_flow_dict(flow_info, flow)
+ if iface:
+ flow_info['ifname'] = iface['name']
+ vpninterface = vpninterfaces.get(iface.get('name')) if iface else None
+ if not vpninterfaces:
+ flow_info['reason'] = 'VpnInterface for Lport not found'
+ return create_flow_dict(flow_info, flow)
+ vpnid = flow_info.get('vpnid')
+ if vpnid and not vpnids.get(vpnid):
+ flow_info['reason'] = 'VpnInstance for VpnId not found'
+ return create_flow_dict(flow_info, flow)
+ if vpnid and vpninterface and vpnids.get(vpnid):
+ if (vpninterface.get('vpn-instance-name') !=
+ vpnids[vpnid]['vpn-instance-name']):
+ flow_info['reason'] = 'Lport VpnId mismatch'
+ return create_flow_dict(flow_info, flow)
+ label = flow_info.get('label')
+ fibentry = fibentries.get(label) if label else None
+ if label and not fibentry:
+ flow_info['reason'] = 'Fibentry for MplsLabel not found'
+ return create_flow_dict(flow_info, flow)
+ # Label check for group
+ prefix = fibentry.get('destPrefix') if fibentry else None
+ if prefix and flow_info.get('group-id'):
+ gid = flow_info.get('group-id')
+ if groups.get(gid) and (
+ groups.get(gid).get('group-name', '') != prefix):
+ flow_info['reason'] = 'DestPrefix mismatch for label and group'
+ return create_flow_dict(flow_info, flow)
+ return None
+
+
+def stale_elan_flow(flow, flow_info, ifaces, ifindexes, einsts, eifaces):
+ # hex(int(mask, 16) & int(hexa, 16))
+ flow_parser.get_flow_info_from_elan_table(flow_info, flow)
+ lport = flow_info.get('lport')
+ eltag = flow_info.get('elan-tag')
+ iface = get_iface_for_lport(ifaces, ifindexes, lport)
+ if lport and not iface:
+ flow_info['reason'] = 'Interface for lport not found'
+ return create_flow_dict(flow_info, flow)
+ if iface:
+ flow_info['ifname'] = iface['name']
+ if not is_elantag_valid(eltag, eifaces, einsts, iface):
+ flow_info['reason'] = 'Lport Elantag mismatch'
+ return create_flow_dict(flow_info, flow)
+ return None
+
+
+def stale_acl_flow(flow, flow_info, ifaces, ifindexes, einsts, eifaces):
+ flow_parser.get_flow_info_from_acl_table(flow_info, flow)
+ lport = flow_info.get('lport')
+ eltag = flow_info.get('elan-tag')
+ iface = get_iface_for_lport(ifaces, ifindexes, lport)
+ if lport and not iface:
+ flow_info['reason'] = 'Interface for lport not found'
+ return create_flow_dict(flow_info, flow)
+ if iface:
+ flow_info['ifname'] = iface['name']
+ if not is_elantag_valid(eltag, eifaces, einsts, iface):
+ flow_info['reason'] = 'Lport Elantag mismatch'
+ return create_flow_dict(flow_info, flow)
+ #return create_flow_dict(flow_info, flow)
+ return None
+
+
+def is_elantag_valid(eltag, eifaces, einsts, iface):
+ if iface and eltag and eltag != get_eltag_for_iface(eifaces, einsts, iface):
+ return False
+ return True
+
+
+def is_correct_elan_flow(flow_info, mmac, einsts, flow_host):
+ flow = flow_info.get('flow')
+ flow_etag = flow_info.get('elan-tag')
+ for k, v in mmac.iteritems():
+ mac_host = v.get('compute')
+ if einsts.get(k):
+ einst_tag = einsts.get(k).get('elan-tag')
+ # print einst_tag, flow_etag, mac_host
+ if flow_etag and einst_tag and flow_etag == einst_tag:
+ if mac_host.startswith(flow_host):
+ act_resubmit = get_act_resubmit(flow)
+ if (act_resubmit and act_resubmit.get('table') == 220):
+ return 'Correct'
+ else:
+ act_tunnel = get_act_set_tunnel(flow)
+ if act_tunnel:
+ return 'Correct'
+ return 'Wrong'
+ return 'Wrong'
+
+
+def get_iface_for_lport(ifaces, ifindexes, lport):
+ if lport:
+ if ifindexes.get(lport):
+ ifname = ifindexes.get(lport).get('interface-name')
+ if ifname and ifaces.get(ifname):
+ return ifaces.get(ifname)
+ return None
+
+
+def get_eltag_for_iface(eifaces, einsts, iface):
+ ifname = iface.get('name') if iface else None
+ eiface = eifaces.get(ifname) if ifname else None
+ einst_name = eiface.get('elan-instance-name') if eiface else None
+ einst = einsts.get(einst_name) if einst_name else None
+ return einst.get('elan-tag') if einst else None
+
+
+def get_stale_flows(modules=['ifm']):
+ if not modules:
+ return 'No modules specified'
+ ifaces = {}
+ ifstates = {}
+ ifindexes = {}
+ bindings = {}
+ einsts = {}
+ eifaces = {}
+ fibentries = {}
+ vpnids = {}
+ vpninterfaces = {}
+ groups = {}
+ table_list = list(set([table for module in modules for table in TABLE_MAP[module]]))
+ ##table_list = [214, 244]
+
+ of_nodes = config.gmodels.odl_inventory_nodes_config.get_nodes_by_key()
+ if 'ifm' in modules:
+ ifaces = config.gmodels.ietf_interfaces_interfaces.get_interfaces_by_key()
+ ifstates = config.gmodels.ietf_interfaces_interfaces_state.get_interfaces_by_key()
+ if 'l3vpn' in modules:
+ ifaces = ifaces or config.gmodels.ietf_interfaces_interfaces.get_interfaces_by_key()
+ # ifindexes = ifindexes or config.gmodels.odl_interface_meta_if_index_interface_map.get_if_index_interfaces_by_key()
+ fibentries = fibentries or config.gmodels.odl_fib_fib_entries.get_vrf_entries_by_key()
+ vpnids = vpnids or config.gmodels.odl_l3vpn_vpn_instance_to_vpn_id.get_vpn_instances_by_key()
+ vpninterfaces = vpninterfaces or config.gmodels.l3vpn_vpn_interfaces.get_vpn_ids_by_key()
+ groups = groups or config.gmodels.odl_inventory_nodes_config.get_groups(of_nodes)
+ if 'acl' in modules:
+ ifaces = ifaces or config.gmodels.ietf_interfaces_interfaces.get_interfaces_by_key()
+ # ifindexes = ifindexes or config.gmodels.odl_interface_meta_if_index_interface_map.get_if_index_interfaces_by_key()
+ einsts = einsts or config.gmodels.elan_elan_instances.get_elan_instances_by_key()
+ eifaces = eifaces or config.gmodels.elan_elan_interfaces.get_elan_interfaces_by_key()
+ if 'elan' in modules:
+ ifaces = ifaces or config.gmodels.ietf_interfaces_interfaces.get_interfaces_by_key()
+ einsts = einsts or config.gmodels.elan_elan_instances.get_elan_instances_by_key()
+ eifaces = eifaces or config.gmodels.elan_elan_interfaces.get_elan_interfaces_by_key()
+ # ifindexes = ifindexes or config.gmodels.odl_interface_meta_if_index_interface_map.get_if_index_interfaces_by_key()
+ stale_flows = []
+ for node in of_nodes.itervalues():
+ tables = [x for x in node[Nodes.NODE_TABLE] if x['id'] in table_list]
+ for table in tables:
+ for flow in table.get('flow', []):
+ flow_dict = None
+ flow_info = {'dpnid': Model.get_dpn_from_ofnodeid(node['id'])}
+ if 'ifm' in modules and table['id'] in TABLE_MAP['ifm']:
+ flow_dict = stale_ifm_flow(flow, flow_info, ifaces, ifstates)
+ if 'l3vpn' in modules and table['id'] in TABLE_MAP['l3vpn']:
+ flow_dict = stale_l3vpn_flow(flow, flow_info, groups, ifaces, ifindexes, vpnids, vpninterfaces, fibentries)
+ if 'elan' in modules and table['id'] in TABLE_MAP['elan']:
+ flow_dict = stale_elan_flow(flow, flow_info, ifaces, ifindexes, einsts, eifaces)
+ if 'acl' in modules and table['id'] in TABLE_MAP['acl']:
+ flow_dict = stale_acl_flow(flow, flow_info, ifaces, ifindexes, einsts, eifaces)
+ if flow_dict is not None:
+ stale_flows.append(flow_dict)
+
+ return stale_flows
+
+
+def show_link_flow_binding(args):
+ stale_ids, bindings = get_stale_bindings(args)
+ flows = get_stale_flows()
+ print len(stale_ids), len(flows)
+ for flow in flows:
+ if flow['ifname'] in stale_ids and 'bound-services' in bindings[flow['ifname']]:
+ print 'Flow with binding: ', flow['ifname']
+ else:
+ print 'Flow without binding: ', flow['ifname']
+
+
+def show_stale_flows(args, sort_by='table'):
+ config.get_models(args, {
+ "elan_elan_instances",
+ "elan_elan_interfaces",
+ "ietf_interfaces_interfaces",
+ "ietf_interfaces_interfaces_state",
+ "interface_service_bindings_service_bindings",
+ "l3vpn_vpn_interfaces",
+ # "mip_mac",
+ "neutron_neutron",
+ "odl_fib_fib_entries",
+ # "odl_interface_meta_if_index_interface_map",
+ "odl_l3vpn_vpn_instance_to_vpn_id",
+ "odl_inventory_nodes_config"})
+ compute_map = config.gmodels.odl_inventory_nodes_config.get_dpn_host_mapping()
+ nports = config.gmodels.neutron_neutron.get_ports_by_key()
+
+ for flow in utils.sort(get_stale_flows(['ifm', 'acl', 'elan', 'l3vpn']), sort_by):
+ host = compute_map.get(flow.get('dpnid'), flow.get('dpnid'))
+ ip_list = get_ips_for_iface(nports, flow.get('ifname'))
+ if ip_list:
+ flow['iface-ips'] = ip_list
+ result = 'Table:{}, Host:{}, FlowId:{}{}'.format(
+ flow['table'], host, flow['id'],
+ utils.show_optionals(flow))
+ print result
+ ##path = get_data_path('flows', flow)
+ #print('http://192.168.2.32:8383/restconf/config/{}'.format(path))
+ #print 'Flow:', utils.format_json(args, flow_parser.parse_flow(flow['flow']))
+
+
+def show_elan_flows(args):
+ compute_map = config.gmodels.odl_inventory_nodes_config.get_dpn_host_mapping()
+ for flow in utils.sort(get_all_flows(['elan']), 'id'):
+ host = compute_map.get(flow.get('dpnid'), flow.get('dpnid'))
+ result = 'MacHost:{}{}, Table:{}, FlowId:{}, {}, Flow:{}'.format(
+ flow['id'][-17:], host, flow['table'], flow['id'], utils.show_optionals(flow),
+ utils.format_json(args, flow_parser.parse_flow(flow['flow'])))
+ print result
+ #print 'Flow:', utils.format_json(args, flow_parser.parse_flow(flow['flow']))
+
+
+def get_matchstr(args, flow):
+ if flow and flow.get('flow') and flow.get('flow').get('match'):
+ return utils.format_json(args, flow.get('flow').get('match', None))
+
+
+def get_key_for_dup_detect(args, flow):
+ result = '{}:{}:{}'.format(flow.get('dpnid'), flow.get('table'), get_matchstr(args, flow))
+ return result
+
+
+def show_dup_flows(args):
+ config.get_models(args, {
+ "elan_elan_instances",
+ "elan_elan_interfaces",
+ "ietf_interfaces_interfaces",
+ "ietf_interfaces_interfaces_state",
+ "interface_service_bindings_service_bindings",
+ "l3vpn_vpn_interfaces",
+ # "mip_mac",
+ "odl_fib_fib_entries",
+ # "odl_interface_meta_if_index_interface_map",
+ "odl_l3vpn_vpn_instance_to_vpn_id",
+ "odl_inventory_nodes_config"})
+ mmac = {} # config.gmodels.mip_mac.get_entries_by_key()
+ einsts = config.gmodels.elan_elan_instances.get_elan_instances_by_key()
+ compute_map = config.gmodels.odl_inventory_nodes_config.get_dpn_host_mapping()
+
+ flows = utils.sort(get_all_flows(['elan']), 'table')
+ matches = collections.defaultdict(list)
+ for flow in flows:
+ dup_key = get_key_for_dup_detect(args, flow)
+ if dup_key:
+ if matches and matches.get(dup_key):
+ matches[dup_key].append(flow)
+ else:
+ matches[dup_key].append(flow)
+ for k, v in matches.iteritems():
+ if len(v) > 1:
+ dpnid = k.split(':')[0]
+ host = compute_map.get(dpnid, dpnid)
+ result = 'Host:{}, FlowCount:{}, MatchKey:{}, ElanTag:{}'.format(host, len(v), k, v[0].get('elan-tag'))
+ print result
+ for idx, flow in enumerate(v):
+ result = "Duplicate"
+ mac_addr = flow.get('dst-mac')
+ if mac_addr and mmac.get(mac_addr):
+ result = is_correct_elan_flow(flow, mmac.get(mac_addr), einsts, host)
+ print ' {} Flow-{}:{}'.format(result, idx,
+ utils.format_json(args, flow_parser.parse_flow(flow.get('flow'))))
+
+
+def show_learned_mac_flows(args):
+ config.get_models(args, {
+ "elan_elan_instances",
+ "elan_elan_interfaces",
+ "ietf_interfaces_interfaces",
+ "ietf_interfaces_interfaces_state",
+ "interface_service_bindings_service_bindings",
+ "l3vpn_vpn_interfaces",
+ # "mip_mac",
+ "neutron_neutron",
+ "odl_fib_fib_entries",
+ # "odl_interface_meta_if_index_interface_map",
+ "odl_l3vpn_vpn_instance_to_vpn_id",
+ "odl_inventory_nodes_config"})
+ nports = config.gmodels.neutron_neutron.get_ports_by_key(key='mac-address')
+ compute_map = config.gmodels.odl_inventory_nodes_config.get_dpn_host_mapping()
+
+ flows = utils.sort(get_all_flows(['elan']), 'table')
+ for flow_info in flows:
+ flow = flow_info.get('flow')
+ dpnid = flow_info.get('dpnid')
+ host = compute_map.get(dpnid, dpnid)
+ if ((flow_info.get('table') == 50 and
+ flow.get('idle-timeout') == 300 and not
+ nports.get(flow_info.get('src-mac'))) or
+ (flow_info.get('table') == 51 and
+ not nports.get(flow_info.get('dst-mac')))):
+ result = 'Table:{}, Host:{}, FlowId:{}{}'.format(
+ flow_info.get('table'), host, flow.get('id'),
+ utils.show_optionals(flow_info))
+ print result
+ print 'Flow:{}'.format(utils.format_json(args, flow_parser.parse_flow(flow)))
+
+
+def get_stale_bindings(args):
+ # ietf_interfaces_interfaces = ietf_interfaces.interfaces(Model.CONFIG, args)
+ # interface_service_bindings_service_bindings = interface_service_bindings.service_bindings(Model.CONFIG, args)
+ ifaces = config.gmodels.ietf_interfaces_interfaces.get_interfaces_by_key()
+ bindings, orphans = config.gmodels.interface_service_bindings_service_bindings.get_service_bindings()
+ return set(bindings.keys()) - set(ifaces.keys()), bindings
+
+
+def dump_flows(args, modules=None, sort_by='table', filter_by=None):
+ modules = modules if modules else ['ifm']
+ filter_by = filter_by if filter_by else []
+ # odl_inventory_nodes_config = opendaylight_inventory.nodes(Model.CONFIG, args)
+ compute_map = config.gmodels.odl_inventory_nodes_config.get_dpn_host_mapping()
+ # neutron_neutron = neutron.neutron(Model.CONFIG, args)
+ nports = config.gmodels.neutron_neutron.get_ports_by_key()
+ logger.info("dump_flows: %s", args)
+ for flow in utils.sort(get_all_flows(modules, filter_by), sort_by):
+ host = compute_map.get(flow.get('dpnid'), flow.get('dpnid'))
+ ip_list = get_ips_for_iface(nports, flow.get('ifname'))
+ if ip_list:
+ flow['iface-ips'] = ip_list
+ result = 'Table:{}, Host:{}, FlowId:{}{}'.format(
+ flow['table'], host, flow['id'],
+ utils.show_optionals(flow))
+ print result
+ print 'Flow:', utils.format_json(args, flow_parser.parse_flow(flow['flow']))
+
+
+def show_all_flows(args):
+ config.get_models(args, {
+ "elan_elan_instances",
+ "elan_elan_interfaces",
+ "ietf_interfaces_interfaces",
+ "ietf_interfaces_interfaces_state",
+ "interface_service_bindings_service_bindings",
+ "l3vpn_vpn_interfaces",
+ "neutron_neutron",
+ "odl_fib_fib_entries",
+ # "odl_interface_meta_if_index_interface_map",
+ "odl_l3vpn_vpn_instance_to_vpn_id",
+ "odl_inventory_nodes_config"})
+ dump_flows(args, modules=['all'])
+
+
+def get_ips_for_iface(nports, ifname):
+ ips = []
+ port = nports.get(ifname) if ifname else None
+ fixed_ips = port.get('fixed-ips', []) if port else []
+ for fixed_ip in fixed_ips:
+ ips.append(fixed_ip['ip-address'])
+ return ips
+
+
+def stale_ifm_flow(flow, flow_info, ifaces, ifstates):
+ flow_parser.get_flow_info_from_ifm_table(flow_info, flow)
+ flow_ifname = flow_info['ifname']
+ iface = ifaces.get(flow_ifname)
+ if flow_ifname is not None and not iface:
+ flow_info['reason'] = 'Interface doesnt exist'
+ return create_flow_dict(flow_info, flow)
+ elif flow_ifname and ifstates.get(flow_ifname):
+ ifstate = ifstates.get(flow_ifname)
+ ncid_list = ifstate.get('lower-layer-if')
+ ncid = ncid_list[0] if ncid_list else None
+ dpn = Model.get_dpn_from_ofnodeid(ncid)
+ if dpn and dpn != flow_info['dpnid']:
+ flow_info['reason'] = 'DpnId mismatch for flow and Interface'
+ return create_flow_dict(flow_info, flow)
+ if (flow_info.get('lport') and ifstate.get('if-index')
+ and flow_info['lport'] != ifstate['if-index']):
+ flow_info['reason'] = 'Lport and IfIndex mismatch'
+ return create_flow_dict(flow_info, flow)
+ if (flow_info.get('ofport') and ifstate.get('lower-layer-if')
+ and flow_info['ofport'] != Model.get_ofport_from_ncid(ifstate.get('lower-layer-if')[0])):
+ flow_info['reason'] = 'OfPort mismatch'
+ if (flow_info.get('vlanid') and iface.get('odl-interface:vlan-id')
+ and flow_info['vlanid'] != iface.get('odl-interface:vlan-id')):
+ flow_info['reason'] = 'VlanId mismatch'
+ return None
+ # return create_flow_dict(flow_info, flow)
import json
+import logging
+
+import flows
import utils
-from odltools.mdsal.models.models import Model
from odltools.mdsal.models import elan
-from odltools.mdsal.models import ietf_interfaces
from odltools.mdsal.models import id_manager
-from odltools.mdsal.models import interface_service_bindings
+# from odltools.mdsal.models import ietf_interfaces
+# from odltools.mdsal.models import interface_service_bindings
from odltools.mdsal.models import neutron
from odltools.mdsal.models import opendaylight_inventory
+from odltools.mdsal.models.models import Model
+# from odltools.mdsal.models.models import Models
from odltools.mdsal.models.opendaylight_inventory import Nodes
+# from odltools.mdsal.models.models import Models
+import config
+
+
+logger = logging.getLogger("netvirt.show")
def show_elan_instances(args):
def get_data_path(res_type, data):
if res_type == 'bindings':
- return 'interface-service-bindings:service-bindings/services-info/{}/{}'.format(data['interface-name'],data['service-mode'])
+ return 'interface-service-bindings:service-bindings/services-info/{}/{}'.format(
+ data['interface-name'], data['service-mode'])
elif res_type == 'flows':
- return 'opendaylight-inventory:nodes/node/openflow:{}/flow-node-inventory:table/{}/flow/{}'.format(data['dpnid'],data['table'],data['id'])
-
-
-def get_stale_bindings(args):
- ietf_interfaces_interfaces = ietf_interfaces.interfaces(Model.CONFIG, args)
- interface_service_bindings_service_bindings = interface_service_bindings.service_bindings(Model.CONFIG, args)
- ifaces = ietf_interfaces_interfaces.get_interfaces_by_key()
- bindings, orphans = interface_service_bindings_service_bindings.get_service_bindings()
- return set(bindings.keys()) - set(ifaces.keys()), bindings
+ return 'opendaylight-inventory:nodes/node/openflow:{}/flow-node-inventory:table/{}/flow/{}'.format(
+ data['dpnid'], data['table'], data['id'])
def show_stale_bindings(args):
- stale_ids, bindings = get_stale_bindings(args)
+ config.get_models(args, {"ietf_interfaces_interfaces", "interface_service_bindings_service_bindings"})
+ stale_ids, bindings = flows.get_stale_bindings(args)
for iface_id in sorted(stale_ids):
for binding in bindings[iface_id].itervalues():
#if binding.get('bound-services'):
path = get_data_path('bindings', binding)
- print json.dumps(bindings[iface_id])
- print('http://192.168.2.32:8383/restconf/config/{}'.format(path))
+ print utils.format_json(bindings[iface_id])
+ print('http://{}:{}/restconf/config/{}'.format(args.ip, args.port, path))
def show_tables(args):
if table.get('flow'):
tables.add(table['id'])
print list(tables)
+
+
+def show_flows(args):
+ if args.flowtype == "all":
+ flows.show_all_flows(args)
+ if args.flowtype == "duplicate":
+ flows.show_dup_flows(args)
+ if args.flowtype == "learned":
+ flows.show_learned_mac_flows(args)
+ if args.flowtype == "stale":
+ flows.show_stale_flows(args)
def test_show_groups(self):
show.show_groups(self.args)
+ def test_show_flows_all(self):
+ self.args.flowtype = "all"
+ self.args.pretty_print = True
+ show.show_flows(self.args)
+
+ def test_show_stale_bindings(self):
+ show.show_stale_bindings(self.args)
+
def test_show_tables(self):
show.show_tables(self.args)
return json.dumps(data, indent=4, separators=(',', ': '))
else:
return json.dumps(data)
+
+
+def show_optionals(flow):
+ result = ''
+ lport = flow.get('lport')
+ elantag = flow.get('elan-tag')
+ label = flow.get('mpls')
+ vpnid = flow.get('vpnid')
+ ip = flow.get('iface-ips')
+ smac = flow.get('src-mac')
+ dmac = flow.get('dst-mac')
+ vlanid = flow.get('vlanid')
+ ofport = flow.get('ofport')
+ if lport:
+ result = '{},LportTag:{}/{}'.format(result, lport, to_hex(lport))
+ if ofport:
+ result = '{},OfPort:{}'.format(result, ofport)
+ if vlanid:
+ result = '{},VlanId:{}'.format(result, vlanid)
+ if vpnid:
+ result = '{},VpnId:{}/{}'.format(result, vpnid, to_hex(vpnid*2))
+ if label:
+ result = '{},MplsLabel:{}'.format(result, label)
+ if elantag:
+ result = '{},ElanTag:{}/{}'.format(result, elantag, to_hex(elantag))
+ if smac:
+ result = '{},SrcMac:{}'.format(result, smac)
+ if dmac:
+ result = '{},DstMac:{}'.format(result, dmac)
+ if ip:
+ result = '{},LportIp:{}'.format(result, json.dumps(ip))
+ result = '{},Reason:{}'.format(result, flow.get('reason'))
+ return result
+
+
+def sort(data, field):
+ return sorted(data, key=lambda x: x[field])
+
+
+def to_hex(data, ele=None):
+ if not ele:
+ data = ("0x%x" % data) if data else None
+ return data
+ elif data.get(ele):
+ data[ele] = "0x%x" % data[ele]
+ return data[ele]
+ else:
+ return data
+import os
import unittest
from odltools import logg
print "pretty_print:\n{}".format(self.flows.pretty_print(self.flows.fdata))
def test_write_file(self):
- self.flows.write_fdata("/tmp/flow_dumps.3.out.txt")
+ filename = "/tmp/flow_dumps.3.out.txt"
+ self.flows.write_fdata(filename)
+ self.assertTrue(os.path.exists(filename))
if __name__ == '__main__':
unittest.main()
--- /dev/null
+{
+ "elan-interfaces": {
+ "elan-interface": [
+ {
+ "elan-instance-name": "eacd76d1-259c-4f4f-a8ff-69c8a016d8b8",
+ "name": "234018835196237:br-physnet1-pa:1131"
+ },
+ {
+ "elan-instance-name": "a5fe7476-9aa1-4bfb-aec4-05d7a1376f45",
+ "name": "67eb9b7f-dba5-40d4-8383-56149a7d6af2",
+ "static-mac-entries": [
+ {
+ "ip-prefix": "33.0.0.2",
+ "mac-address": "fa:16:3e:bb:51:9c"
+ }
+ ]
+ },
+ {
+ "elan-instance-name": "893239d8-59ea-4614-ae0a-29ebb2800ece",
+ "name": "e802b5e7-0865-4da2-929f-84c0931e0040",
+ "static-mac-entries": [
+ {
+ "ip-prefix": "32.0.0.8",
+ "mac-address": "fa:16:3e:73:3e:1e"
+ }
+ ]
+ },
+ {
+ "elan-instance-name": "eacd76d1-259c-4f4f-a8ff-69c8a016d8b8",
+ "name": "0ee93a49-6122-4580-acb4-4c921f196d13",
+ "static-mac-entries": [
+ {
+ "ip-prefix": "31.0.0.11",
+ "mac-address": "fa:16:3e:db:a8:d1"
+ }
+ ]
+ },
+ {
+ "elan-instance-name": "a5fe7476-9aa1-4bfb-aec4-05d7a1376f45",
+ "name": "7a3db5a3-bf72-4ad6-be70-ec3bdec7d707",
+ "static-mac-entries": [
+ {
+ "ip-prefix": "33.0.0.1",
+ "mac-address": "fa:16:3e:9a:c2:36"
+ }
+ ]
+ },
+ {
+ "elan-instance-name": "a5fe7476-9aa1-4bfb-aec4-05d7a1376f45",
+ "name": "af8aaaa2-fc98-4da4-96f2-a9e9f23464e2",
+ "static-mac-entries": [
+ {
+ "ip-prefix": "33.0.0.9",
+ "mac-address": "fa:16:3e:f8:a8:c8"
+ }
+ ]
+ },
+ {
+ "elan-instance-name": "893239d8-59ea-4614-ae0a-29ebb2800ece",
+ "name": "42d43cbf-3a28-4b9d-8de7-21f6a0faf327",
+ "static-mac-entries": [
+ {
+ "ip-prefix": "32.0.0.1",
+ "mac-address": "fa:16:3e:3d:ad:ed"
+ }
+ ]
+ },
+ {
+ "elan-instance-name": "893239d8-59ea-4614-ae0a-29ebb2800ece",
+ "name": "38deef1c-db34-4f56-9014-8c38c818f019",
+ "static-mac-entries": [
+ {
+ "ip-prefix": "32.0.0.10",
+ "mac-address": "fa:16:3e:e3:fc:5b"
+ }
+ ]
+ },
+ {
+ "elan-instance-name": "eacd76d1-259c-4f4f-a8ff-69c8a016d8b8",
+ "name": "98c2e265-b4f2-40a5-8f31-2fb5d2b2baf6",
+ "static-mac-entries": [
+ {
+ "ip-prefix": "31.0.0.2",
+ "mac-address": "fa:16:3e:1e:55:49"
+ }
+ ]
+ },
+ {
+ "elan-instance-name": "eacd76d1-259c-4f4f-a8ff-69c8a016d8b8",
+ "name": "74851789353527:br-physnet1-pa:1131"
+ },
+ {
+ "elan-instance-name": "893239d8-59ea-4614-ae0a-29ebb2800ece",
+ "name": "bdc8e869-52e2-4899-a1fb-551b1c5501c2",
+ "static-mac-entries": [
+ {
+ "ip-prefix": "32.0.0.11",
+ "mac-address": "fa:16:3e:78:06:99"
+ }
+ ]
+ },
+ {
+ "elan-instance-name": "eacd76d1-259c-4f4f-a8ff-69c8a016d8b8",
+ "name": "132319289050514:br-physnet1-pa:1131"
+ },
+ {
+ "elan-instance-name": "a5fe7476-9aa1-4bfb-aec4-05d7a1376f45",
+ "name": "3a2d068a-ad59-453e-8cd3-57f765c921f8",
+ "static-mac-entries": [
+ {
+ "ip-prefix": "33.0.0.11",
+ "mac-address": "fa:16:3e:ff:a9:48"
+ }
+ ]
+ },
+ {
+ "elan-instance-name": "eacd76d1-259c-4f4f-a8ff-69c8a016d8b8",
+ "name": "7f083b4d-dc2c-47ad-a471-6d2d0cd110d5",
+ "static-mac-entries": [
+ {
+ "ip-prefix": "31.0.0.10",
+ "mac-address": "fa:16:3e:61:77:40"
+ }
+ ]
+ },
+ {
+ "elan-instance-name": "eacd76d1-259c-4f4f-a8ff-69c8a016d8b8",
+ "name": "71b48121-d77f-4947-a58d-35413da52bd8",
+ "static-mac-entries": [
+ {
+ "ip-prefix": "31.0.0.1",
+ "mac-address": "fa:16:3e:05:52:93"
+ }
+ ]
+ },
+ {
+ "elan-instance-name": "a5fe7476-9aa1-4bfb-aec4-05d7a1376f45",
+ "name": "8e3c262e-7b45-4222-ac4e-528db75e5516",
+ "static-mac-entries": [
+ {
+ "ip-prefix": "33.0.0.5",
+ "mac-address": "fa:16:3e:99:7d:91"
+ }
+ ]
+ },
+ {
+ "elan-instance-name": "893239d8-59ea-4614-ae0a-29ebb2800ece",
+ "name": "992c4556-828b-49d0-bad3-1e3ffe6bb76b",
+ "static-mac-entries": [
+ {
+ "ip-prefix": "32.0.0.2",
+ "mac-address": "fa:16:3e:1e:bb:87"
+ }
+ ]
+ },
+ {
+ "elan-instance-name": "eacd76d1-259c-4f4f-a8ff-69c8a016d8b8",
+ "name": "09f6bf9e-7aaf-4a9e-8f0e-b29b8097970d",
+ "static-mac-entries": [
+ {
+ "ip-prefix": "31.0.0.12",
+ "mac-address": "fa:16:3e:01:dc:d3"
+ }
+ ]
+ }
+ ]
+ }
+}
\ No newline at end of file
--- /dev/null
+{
+ "service-bindings": {
+ "services-info": [
+ {
+ "interface-name": "463b9a3f-8adc-4a8f-b3eb-0eafeefc3323",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "interface-name": "132319289050514:br-physnet1-pa:1121",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "interface-name": "132319289050514:br-physnet1-pa:1121",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 0,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "6"
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.98c2e265-b4f2-40a5-8f31-2fb5d2b2baf6",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "98c2e265-b4f2-40a5-8f31-2fb5d2b2baf6",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 0,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "1"
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.132319289050514:br-physnet1-pa:trunk",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "132319289050514:br-physnet1-pa:trunk",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "interface-name": "848ea2cf-c868-4194-ab8a-20adb8b7e088",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134479872,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "order": 1,
+ "write-metadata": {
+ "metadata": 83986743296,
+ "metadata-mask": 1099494850560
+ }
+ },
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 15,
+ "nx-reg": "nicira-match:nxm-nx-reg7",
+ "start": 0
+ },
+ "value": 5006
+ },
+ "order": 1
+ },
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 19,
+ "nx-reg": "nicira-match:nxm-nx-reg1",
+ "start": 0
+ },
+ "value": 24
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 2
+ },
+ {
+ "go-to-table": {
+ "table_id": 43
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "elan.a5fe7476-9aa1-4bfb-aec4-05d7a1376f45.67eb9b7f-dba5-40d4-8383-56149a7d6af2",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 134217729,
+ "flow-priority": 10,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 24,
+ "nx-reg": "nicira-match:nxm-nx-reg3",
+ "start": 0
+ },
+ "value": 100000
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 1
+ },
+ {
+ "order": 2,
+ "write-metadata": {
+ "metadata": 200000,
+ "metadata-mask": 16777214
+ }
+ },
+ {
+ "go-to-table": {
+ "table_id": 19
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "vpn.c7922261-90ab-4757-bc03-93ef3bbbaa19.67eb9b7f-dba5-40d4-8383-56149a7d6af2",
+ "service-priority": 8,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "67eb9b7f-dba5-40d4-8383-56149a7d6af2",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134479872,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "order": 1,
+ "write-metadata": {
+ "metadata": 83953188864,
+ "metadata-mask": 1099494850560
+ }
+ },
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 15,
+ "nx-reg": "nicira-match:nxm-nx-reg7",
+ "start": 0
+ },
+ "value": 5004
+ },
+ "order": 1
+ },
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 19,
+ "nx-reg": "nicira-match:nxm-nx-reg1",
+ "start": 0
+ },
+ "value": 22
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 2
+ },
+ {
+ "go-to-table": {
+ "table_id": 43
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "elan.eacd76d1-259c-4f4f-a8ff-69c8a016d8b8.132319289050514:br-physnet1-pa:1131",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "132319289050514:br-physnet1-pa:1131",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 0,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "7"
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.992c4556-828b-49d0-bad3-1e3ffe6bb76b",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "992c4556-828b-49d0-bad3-1e3ffe6bb76b",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 0,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "10"
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.8e3c262e-7b45-4222-ac4e-528db75e5516",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 110100480,
+ "flow-priority": 6,
+ "instruction": [
+ {
+ "go-to-table": {
+ "table_id": 239
+ },
+ "order": 1
+ }
+ ],
+ "service-name": "acl.egressacl.8e3c262e-7b45-4222-ac4e-528db75e5516",
+ "service-priority": 6,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "8e3c262e-7b45-4222-ac4e-528db75e5516",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 0,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "3"
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.tun999632b8289",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "tun999632b8289",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "interface-name": "7e20d348-cff6-4edd-97fc-f71e0fa77377",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 0,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "8"
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.67eb9b7f-dba5-40d4-8383-56149a7d6af2",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "67eb9b7f-dba5-40d4-8383-56149a7d6af2",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "interface-name": "463b9a3f-8adc-4a8f-b3eb-0eafeefc3323",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "interface-name": "848ea2cf-c868-4194-ab8a-20adb8b7e088",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134479872,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "order": 1,
+ "write-metadata": {
+ "metadata": 83953188864,
+ "metadata-mask": 1099494850560
+ }
+ },
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 15,
+ "nx-reg": "nicira-match:nxm-nx-reg7",
+ "start": 0
+ },
+ "value": 5004
+ },
+ "order": 1
+ },
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 19,
+ "nx-reg": "nicira-match:nxm-nx-reg1",
+ "start": 0
+ },
+ "value": 21
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 2
+ },
+ {
+ "go-to-table": {
+ "table_id": 43
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "elan.eacd76d1-259c-4f4f-a8ff-69c8a016d8b8.98c2e265-b4f2-40a5-8f31-2fb5d2b2baf6",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 134217729,
+ "flow-priority": 10,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 24,
+ "nx-reg": "nicira-match:nxm-nx-reg3",
+ "start": 0
+ },
+ "value": 100000
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 1
+ },
+ {
+ "order": 2,
+ "write-metadata": {
+ "metadata": 200000,
+ "metadata-mask": 16777214
+ }
+ },
+ {
+ "go-to-table": {
+ "table_id": 19
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "vpn.c7922261-90ab-4757-bc03-93ef3bbbaa19.98c2e265-b4f2-40a5-8f31-2fb5d2b2baf6",
+ "service-priority": 8,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "98c2e265-b4f2-40a5-8f31-2fb5d2b2baf6",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "interface-name": "a7cccf1a-32cd-4937-bf15-6ccaf135a766",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 2,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "1"
+ }
+ },
+ {
+ "order": 1,
+ "set-field": {
+ "vlan-match": {
+ "vlan-id": {
+ "vlan-id": 1131,
+ "vlan-id-present": true
+ }
+ }
+ }
+ },
+ {
+ "order": 0,
+ "push-vlan-action": {
+ "ethernet-type": 33024
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.234018835196237:br-physnet1-pa:1131",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "234018835196237:br-physnet1-pa:1131",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "interface-name": "a7cccf1a-32cd-4937-bf15-6ccaf135a766",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 0,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "3"
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.tun94ecbe1efd8",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "tun94ecbe1efd8",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 0,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "11"
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.af8aaaa2-fc98-4da4-96f2-a9e9f23464e2",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 110100480,
+ "flow-priority": 6,
+ "instruction": [
+ {
+ "go-to-table": {
+ "table_id": 239
+ },
+ "order": 1
+ }
+ ],
+ "service-name": "acl.egressacl.af8aaaa2-fc98-4da4-96f2-a9e9f23464e2",
+ "service-priority": 6,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "af8aaaa2-fc98-4da4-96f2-a9e9f23464e2",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134479872,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "order": 1,
+ "write-metadata": {
+ "metadata": 83986743296,
+ "metadata-mask": 1099494850560
+ }
+ },
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 15,
+ "nx-reg": "nicira-match:nxm-nx-reg7",
+ "start": 0
+ },
+ "value": 5006
+ },
+ "order": 1
+ },
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 19,
+ "nx-reg": "nicira-match:nxm-nx-reg1",
+ "start": 0
+ },
+ "value": 35
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 2
+ },
+ {
+ "go-to-table": {
+ "table_id": 43
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "elan.a5fe7476-9aa1-4bfb-aec4-05d7a1376f45.3a2d068a-ad59-453e-8cd3-57f765c921f8",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 134217729,
+ "flow-priority": 10,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 24,
+ "nx-reg": "nicira-match:nxm-nx-reg3",
+ "start": 0
+ },
+ "value": 100000
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 1
+ },
+ {
+ "order": 2,
+ "write-metadata": {
+ "metadata": 200000,
+ "metadata-mask": 16777214
+ }
+ },
+ {
+ "go-to-table": {
+ "table_id": 19
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "vpn.c7922261-90ab-4757-bc03-93ef3bbbaa19.3a2d068a-ad59-453e-8cd3-57f765c921f8",
+ "service-priority": 8,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 110100480,
+ "flow-priority": 2,
+ "instruction": [
+ {
+ "go-to-table": {
+ "table_id": 210
+ },
+ "order": 1
+ }
+ ],
+ "service-name": "acl.ingressacl.3a2d068a-ad59-453e-8cd3-57f765c921f8",
+ "service-priority": 2,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "3a2d068a-ad59-453e-8cd3-57f765c921f8",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 0,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "9"
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.e802b5e7-0865-4da2-929f-84c0931e0040",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 110100480,
+ "flow-priority": 6,
+ "instruction": [
+ {
+ "go-to-table": {
+ "table_id": 239
+ },
+ "order": 1
+ }
+ ],
+ "service-name": "acl.egressacl.e802b5e7-0865-4da2-929f-84c0931e0040",
+ "service-priority": 6,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "e802b5e7-0865-4da2-929f-84c0931e0040",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "interface-name": "7e20d348-cff6-4edd-97fc-f71e0fa77377",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 0,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "2"
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.tun03a2b920986",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "tun03a2b920986",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 0,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "9"
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.bdc8e869-52e2-4899-a1fb-551b1c5501c2",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 110100480,
+ "flow-priority": 6,
+ "instruction": [
+ {
+ "go-to-table": {
+ "table_id": 239
+ },
+ "order": 1
+ }
+ ],
+ "service-name": "acl.egressacl.bdc8e869-52e2-4899-a1fb-551b1c5501c2",
+ "service-priority": 6,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "bdc8e869-52e2-4899-a1fb-551b1c5501c2",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "interface-name": "d06404ca-fe67-4693-9807-8ff1bff95177",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 0,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "1"
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.234018835196237:br-physnet1-pa:trunk",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "234018835196237:br-physnet1-pa:trunk",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 0,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "7"
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.0ee93a49-6122-4580-acb4-4c921f196d13",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 110100480,
+ "flow-priority": 6,
+ "instruction": [
+ {
+ "go-to-table": {
+ "table_id": 239
+ },
+ "order": 1
+ }
+ ],
+ "service-name": "acl.egressacl.0ee93a49-6122-4580-acb4-4c921f196d13",
+ "service-priority": 6,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "0ee93a49-6122-4580-acb4-4c921f196d13",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "interface-name": "74851789353527:br-physnet1-pa:1121",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "interface-name": "4c52e519-3fd0-4553-8fbb-a2879a0e1828",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "interface-name": "4c52e519-3fd0-4553-8fbb-a2879a0e1828",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "interface-name": "234018835196237:br-physnet1-pa:1121",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "interface-name": "74851789353527:br-physnet1-pa:1121",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "interface-name": "234018835196237:br-physnet1-pa:1121",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 0,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "3"
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.tunf68aef23130",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "tunf68aef23130",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134479872,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "order": 1,
+ "write-metadata": {
+ "metadata": 83969966080,
+ "metadata-mask": 1099494850560
+ }
+ },
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 15,
+ "nx-reg": "nicira-match:nxm-nx-reg7",
+ "start": 0
+ },
+ "value": 5005
+ },
+ "order": 1
+ },
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 19,
+ "nx-reg": "nicira-match:nxm-nx-reg1",
+ "start": 0
+ },
+ "value": 32
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 2
+ },
+ {
+ "go-to-table": {
+ "table_id": 43
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "elan.893239d8-59ea-4614-ae0a-29ebb2800ece.bdc8e869-52e2-4899-a1fb-551b1c5501c2",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 134217729,
+ "flow-priority": 10,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 24,
+ "nx-reg": "nicira-match:nxm-nx-reg3",
+ "start": 0
+ },
+ "value": 100000
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 1
+ },
+ {
+ "order": 2,
+ "write-metadata": {
+ "metadata": 200000,
+ "metadata-mask": 16777214
+ }
+ },
+ {
+ "go-to-table": {
+ "table_id": 19
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "vpn.c7922261-90ab-4757-bc03-93ef3bbbaa19.bdc8e869-52e2-4899-a1fb-551b1c5501c2",
+ "service-priority": 8,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 110100480,
+ "flow-priority": 2,
+ "instruction": [
+ {
+ "go-to-table": {
+ "table_id": 210
+ },
+ "order": 1
+ }
+ ],
+ "service-name": "acl.ingressacl.bdc8e869-52e2-4899-a1fb-551b1c5501c2",
+ "service-priority": 2,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "bdc8e869-52e2-4899-a1fb-551b1c5501c2",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "interface-name": "e8ba1a85-a0cc-4b57-9733-b583af94c62a",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "interface-name": "e793e9f1-946a-41ae-aedb-a6ef6bd446c2",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 0,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "2"
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.tun95fee4d7132",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "tun95fee4d7132",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 0,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "8"
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.38deef1c-db34-4f56-9014-8c38c818f019",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 110100480,
+ "flow-priority": 6,
+ "instruction": [
+ {
+ "go-to-table": {
+ "table_id": 239
+ },
+ "order": 1
+ }
+ ],
+ "service-name": "acl.egressacl.38deef1c-db34-4f56-9014-8c38c818f019",
+ "service-priority": 6,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "38deef1c-db34-4f56-9014-8c38c818f019",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134479872,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "order": 1,
+ "write-metadata": {
+ "metadata": 83969966080,
+ "metadata-mask": 1099494850560
+ }
+ },
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 15,
+ "nx-reg": "nicira-match:nxm-nx-reg7",
+ "start": 0
+ },
+ "value": 5005
+ },
+ "order": 1
+ },
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 19,
+ "nx-reg": "nicira-match:nxm-nx-reg1",
+ "start": 0
+ },
+ "value": 31
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 2
+ },
+ {
+ "go-to-table": {
+ "table_id": 43
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "elan.893239d8-59ea-4614-ae0a-29ebb2800ece.38deef1c-db34-4f56-9014-8c38c818f019",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 134217729,
+ "flow-priority": 10,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 24,
+ "nx-reg": "nicira-match:nxm-nx-reg3",
+ "start": 0
+ },
+ "value": 100000
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 1
+ },
+ {
+ "order": 2,
+ "write-metadata": {
+ "metadata": 200000,
+ "metadata-mask": 16777214
+ }
+ },
+ {
+ "go-to-table": {
+ "table_id": 19
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "vpn.c7922261-90ab-4757-bc03-93ef3bbbaa19.38deef1c-db34-4f56-9014-8c38c818f019",
+ "service-priority": 8,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 110100480,
+ "flow-priority": 2,
+ "instruction": [
+ {
+ "go-to-table": {
+ "table_id": 210
+ },
+ "order": 1
+ }
+ ],
+ "service-name": "acl.ingressacl.38deef1c-db34-4f56-9014-8c38c818f019",
+ "service-priority": 2,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "38deef1c-db34-4f56-9014-8c38c818f019",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 0,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "8"
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.7f083b4d-dc2c-47ad-a471-6d2d0cd110d5",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 110100480,
+ "flow-priority": 6,
+ "instruction": [
+ {
+ "go-to-table": {
+ "table_id": 239
+ },
+ "order": 1
+ }
+ ],
+ "service-name": "acl.egressacl.7f083b4d-dc2c-47ad-a471-6d2d0cd110d5",
+ "service-priority": 6,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "7f083b4d-dc2c-47ad-a471-6d2d0cd110d5",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134479872,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "order": 1,
+ "write-metadata": {
+ "metadata": 83986743296,
+ "metadata-mask": 1099494850560
+ }
+ },
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 15,
+ "nx-reg": "nicira-match:nxm-nx-reg7",
+ "start": 0
+ },
+ "value": 5006
+ },
+ "order": 1
+ },
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 19,
+ "nx-reg": "nicira-match:nxm-nx-reg1",
+ "start": 0
+ },
+ "value": 34
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 2
+ },
+ {
+ "go-to-table": {
+ "table_id": 43
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "elan.a5fe7476-9aa1-4bfb-aec4-05d7a1376f45.af8aaaa2-fc98-4da4-96f2-a9e9f23464e2",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 134217729,
+ "flow-priority": 10,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 24,
+ "nx-reg": "nicira-match:nxm-nx-reg3",
+ "start": 0
+ },
+ "value": 100000
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 1
+ },
+ {
+ "order": 2,
+ "write-metadata": {
+ "metadata": 200000,
+ "metadata-mask": 16777214
+ }
+ },
+ {
+ "go-to-table": {
+ "table_id": 19
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "vpn.c7922261-90ab-4757-bc03-93ef3bbbaa19.af8aaaa2-fc98-4da4-96f2-a9e9f23464e2",
+ "service-priority": 8,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 110100480,
+ "flow-priority": 2,
+ "instruction": [
+ {
+ "go-to-table": {
+ "table_id": 210
+ },
+ "order": 1
+ }
+ ],
+ "service-name": "acl.ingressacl.af8aaaa2-fc98-4da4-96f2-a9e9f23464e2",
+ "service-priority": 2,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "af8aaaa2-fc98-4da4-96f2-a9e9f23464e2",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134479872,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "order": 1,
+ "write-metadata": {
+ "metadata": 83969966080,
+ "metadata-mask": 1099494850560
+ }
+ },
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 15,
+ "nx-reg": "nicira-match:nxm-nx-reg7",
+ "start": 0
+ },
+ "value": 5005
+ },
+ "order": 1
+ },
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 19,
+ "nx-reg": "nicira-match:nxm-nx-reg1",
+ "start": 0
+ },
+ "value": 30
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 2
+ },
+ {
+ "go-to-table": {
+ "table_id": 43
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "elan.893239d8-59ea-4614-ae0a-29ebb2800ece.e802b5e7-0865-4da2-929f-84c0931e0040",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 134217729,
+ "flow-priority": 10,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 24,
+ "nx-reg": "nicira-match:nxm-nx-reg3",
+ "start": 0
+ },
+ "value": 100000
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 1
+ },
+ {
+ "order": 2,
+ "write-metadata": {
+ "metadata": 200000,
+ "metadata-mask": 16777214
+ }
+ },
+ {
+ "go-to-table": {
+ "table_id": 19
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "vpn.c7922261-90ab-4757-bc03-93ef3bbbaa19.e802b5e7-0865-4da2-929f-84c0931e0040",
+ "service-priority": 8,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 110100480,
+ "flow-priority": 2,
+ "instruction": [
+ {
+ "go-to-table": {
+ "table_id": 210
+ },
+ "order": 1
+ }
+ ],
+ "service-name": "acl.ingressacl.e802b5e7-0865-4da2-929f-84c0931e0040",
+ "service-priority": 2,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "e802b5e7-0865-4da2-929f-84c0931e0040",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134479872,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "order": 1,
+ "write-metadata": {
+ "metadata": 83953188864,
+ "metadata-mask": 1099494850560
+ }
+ },
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 15,
+ "nx-reg": "nicira-match:nxm-nx-reg7",
+ "start": 0
+ },
+ "value": 5004
+ },
+ "order": 1
+ },
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 19,
+ "nx-reg": "nicira-match:nxm-nx-reg1",
+ "start": 0
+ },
+ "value": 27
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 2
+ },
+ {
+ "go-to-table": {
+ "table_id": 43
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "elan.eacd76d1-259c-4f4f-a8ff-69c8a016d8b8.7f083b4d-dc2c-47ad-a471-6d2d0cd110d5",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 134217729,
+ "flow-priority": 10,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 24,
+ "nx-reg": "nicira-match:nxm-nx-reg3",
+ "start": 0
+ },
+ "value": 100000
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 1
+ },
+ {
+ "order": 2,
+ "write-metadata": {
+ "metadata": 200000,
+ "metadata-mask": 16777214
+ }
+ },
+ {
+ "go-to-table": {
+ "table_id": 19
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "vpn.c7922261-90ab-4757-bc03-93ef3bbbaa19.7f083b4d-dc2c-47ad-a471-6d2d0cd110d5",
+ "service-priority": 8,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 110100480,
+ "flow-priority": 2,
+ "instruction": [
+ {
+ "go-to-table": {
+ "table_id": 210
+ },
+ "order": 1
+ }
+ ],
+ "service-name": "acl.ingressacl.7f083b4d-dc2c-47ad-a471-6d2d0cd110d5",
+ "service-priority": 2,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "7f083b4d-dc2c-47ad-a471-6d2d0cd110d5",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "interface-name": "e793e9f1-946a-41ae-aedb-a6ef6bd446c2",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 0,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "7"
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.09f6bf9e-7aaf-4a9e-8f0e-b29b8097970d",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 110100480,
+ "flow-priority": 6,
+ "instruction": [
+ {
+ "go-to-table": {
+ "table_id": 239
+ },
+ "order": 1
+ }
+ ],
+ "service-name": "acl.egressacl.09f6bf9e-7aaf-4a9e-8f0e-b29b8097970d",
+ "service-priority": 6,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "09f6bf9e-7aaf-4a9e-8f0e-b29b8097970d",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "interface-name": "e8ba1a85-a0cc-4b57-9733-b583af94c62a",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 2,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "1"
+ }
+ },
+ {
+ "order": 1,
+ "set-field": {
+ "vlan-match": {
+ "vlan-id": {
+ "vlan-id": 1131,
+ "vlan-id-present": true
+ }
+ }
+ }
+ },
+ {
+ "order": 0,
+ "push-vlan-action": {
+ "ethernet-type": 33024
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.74851789353527:br-physnet1-pa:1131",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "74851789353527:br-physnet1-pa:1131",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 0,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "1"
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.74851789353527:br-physnet1-pa:trunk",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "74851789353527:br-physnet1-pa:trunk",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134479872,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "order": 1,
+ "write-metadata": {
+ "metadata": 83953188864,
+ "metadata-mask": 1099494850560
+ }
+ },
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 15,
+ "nx-reg": "nicira-match:nxm-nx-reg7",
+ "start": 0
+ },
+ "value": 5004
+ },
+ "order": 1
+ },
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 19,
+ "nx-reg": "nicira-match:nxm-nx-reg1",
+ "start": 0
+ },
+ "value": 26
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 2
+ },
+ {
+ "go-to-table": {
+ "table_id": 43
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "elan.eacd76d1-259c-4f4f-a8ff-69c8a016d8b8.74851789353527:br-physnet1-pa:1131",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "74851789353527:br-physnet1-pa:1131",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134479872,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "order": 1,
+ "write-metadata": {
+ "metadata": 83953188864,
+ "metadata-mask": 1099494850560
+ }
+ },
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 15,
+ "nx-reg": "nicira-match:nxm-nx-reg7",
+ "start": 0
+ },
+ "value": 5004
+ },
+ "order": 1
+ },
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 19,
+ "nx-reg": "nicira-match:nxm-nx-reg1",
+ "start": 0
+ },
+ "value": 29
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 2
+ },
+ {
+ "go-to-table": {
+ "table_id": 43
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "elan.eacd76d1-259c-4f4f-a8ff-69c8a016d8b8.234018835196237:br-physnet1-pa:1131",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "234018835196237:br-physnet1-pa:1131",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134479872,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "order": 1,
+ "write-metadata": {
+ "metadata": 83953188864,
+ "metadata-mask": 1099494850560
+ }
+ },
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 15,
+ "nx-reg": "nicira-match:nxm-nx-reg7",
+ "start": 0
+ },
+ "value": 5004
+ },
+ "order": 1
+ },
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 19,
+ "nx-reg": "nicira-match:nxm-nx-reg1",
+ "start": 0
+ },
+ "value": 28
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 2
+ },
+ {
+ "go-to-table": {
+ "table_id": 43
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "elan.eacd76d1-259c-4f4f-a8ff-69c8a016d8b8.09f6bf9e-7aaf-4a9e-8f0e-b29b8097970d",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 134217729,
+ "flow-priority": 10,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 24,
+ "nx-reg": "nicira-match:nxm-nx-reg3",
+ "start": 0
+ },
+ "value": 100000
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 1
+ },
+ {
+ "order": 2,
+ "write-metadata": {
+ "metadata": 200000,
+ "metadata-mask": 16777214
+ }
+ },
+ {
+ "go-to-table": {
+ "table_id": 19
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "vpn.c7922261-90ab-4757-bc03-93ef3bbbaa19.09f6bf9e-7aaf-4a9e-8f0e-b29b8097970d",
+ "service-priority": 8,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 110100480,
+ "flow-priority": 2,
+ "instruction": [
+ {
+ "go-to-table": {
+ "table_id": 210
+ },
+ "order": 1
+ }
+ ],
+ "service-name": "acl.ingressacl.09f6bf9e-7aaf-4a9e-8f0e-b29b8097970d",
+ "service-priority": 2,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "09f6bf9e-7aaf-4a9e-8f0e-b29b8097970d",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134479872,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "order": 1,
+ "write-metadata": {
+ "metadata": 83986743296,
+ "metadata-mask": 1099494850560
+ }
+ },
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 15,
+ "nx-reg": "nicira-match:nxm-nx-reg7",
+ "start": 0
+ },
+ "value": 5006
+ },
+ "order": 1
+ },
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 19,
+ "nx-reg": "nicira-match:nxm-nx-reg1",
+ "start": 0
+ },
+ "value": 33
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 2
+ },
+ {
+ "go-to-table": {
+ "table_id": 43
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "elan.a5fe7476-9aa1-4bfb-aec4-05d7a1376f45.8e3c262e-7b45-4222-ac4e-528db75e5516",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 134217729,
+ "flow-priority": 10,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 24,
+ "nx-reg": "nicira-match:nxm-nx-reg3",
+ "start": 0
+ },
+ "value": 100000
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 1
+ },
+ {
+ "order": 2,
+ "write-metadata": {
+ "metadata": 200000,
+ "metadata-mask": 16777214
+ }
+ },
+ {
+ "go-to-table": {
+ "table_id": 19
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "vpn.c7922261-90ab-4757-bc03-93ef3bbbaa19.8e3c262e-7b45-4222-ac4e-528db75e5516",
+ "service-priority": 8,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 110100480,
+ "flow-priority": 2,
+ "instruction": [
+ {
+ "go-to-table": {
+ "table_id": 210
+ },
+ "order": 1
+ }
+ ],
+ "service-name": "acl.ingressacl.8e3c262e-7b45-4222-ac4e-528db75e5516",
+ "service-priority": 2,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "8e3c262e-7b45-4222-ac4e-528db75e5516",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "interface-name": "d06404ca-fe67-4693-9807-8ff1bff95177",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 0,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "2"
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.tundb1d8b295c1",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "tundb1d8b295c1",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134479872,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "order": 1,
+ "write-metadata": {
+ "metadata": 83953188864,
+ "metadata-mask": 1099494850560
+ }
+ },
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 15,
+ "nx-reg": "nicira-match:nxm-nx-reg7",
+ "start": 0
+ },
+ "value": 5004
+ },
+ "order": 1
+ },
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 19,
+ "nx-reg": "nicira-match:nxm-nx-reg1",
+ "start": 0
+ },
+ "value": 25
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 2
+ },
+ {
+ "go-to-table": {
+ "table_id": 43
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "elan.eacd76d1-259c-4f4f-a8ff-69c8a016d8b8.0ee93a49-6122-4580-acb4-4c921f196d13",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 134217729,
+ "flow-priority": 10,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 24,
+ "nx-reg": "nicira-match:nxm-nx-reg3",
+ "start": 0
+ },
+ "value": 100000
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 1
+ },
+ {
+ "order": 2,
+ "write-metadata": {
+ "metadata": 200000,
+ "metadata-mask": 16777214
+ }
+ },
+ {
+ "go-to-table": {
+ "table_id": 19
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "vpn.c7922261-90ab-4757-bc03-93ef3bbbaa19.0ee93a49-6122-4580-acb4-4c921f196d13",
+ "service-priority": 8,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 110100480,
+ "flow-priority": 2,
+ "instruction": [
+ {
+ "go-to-table": {
+ "table_id": 210
+ },
+ "order": 1
+ }
+ ],
+ "service-name": "acl.ingressacl.0ee93a49-6122-4580-acb4-4c921f196d13",
+ "service-priority": 2,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "0ee93a49-6122-4580-acb4-4c921f196d13",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 2,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "1"
+ }
+ },
+ {
+ "order": 1,
+ "set-field": {
+ "vlan-match": {
+ "vlan-id": {
+ "vlan-id": 1131,
+ "vlan-id-present": true
+ }
+ }
+ }
+ },
+ {
+ "order": 0,
+ "push-vlan-action": {
+ "ethernet-type": 33024
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.132319289050514:br-physnet1-pa:1131",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "132319289050514:br-physnet1-pa:1131",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134479872,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "order": 1,
+ "write-metadata": {
+ "metadata": 83969966080,
+ "metadata-mask": 1099494850560
+ }
+ },
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 15,
+ "nx-reg": "nicira-match:nxm-nx-reg7",
+ "start": 0
+ },
+ "value": 5005
+ },
+ "order": 1
+ },
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 19,
+ "nx-reg": "nicira-match:nxm-nx-reg1",
+ "start": 0
+ },
+ "value": 23
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 2
+ },
+ {
+ "go-to-table": {
+ "table_id": 43
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "elan.893239d8-59ea-4614-ae0a-29ebb2800ece.992c4556-828b-49d0-bad3-1e3ffe6bb76b",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 134217729,
+ "flow-priority": 10,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "nx-reg-load": {
+ "dst": {
+ "end": 24,
+ "nx-reg": "nicira-match:nxm-nx-reg3",
+ "start": 0
+ },
+ "value": 100000
+ },
+ "order": 0
+ }
+ ]
+ },
+ "order": 1
+ },
+ {
+ "order": 2,
+ "write-metadata": {
+ "metadata": 200000,
+ "metadata-mask": 16777214
+ }
+ },
+ {
+ "go-to-table": {
+ "table_id": 19
+ },
+ "order": 3
+ }
+ ],
+ "service-name": "vpn.c7922261-90ab-4757-bc03-93ef3bbbaa19.992c4556-828b-49d0-bad3-1e3ffe6bb76b",
+ "service-priority": 8,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "992c4556-828b-49d0-bad3-1e3ffe6bb76b",
+ "service-mode": "interface-service-bindings:service-mode-ingress"
+ },
+ {
+ "bound-services": [
+ {
+ "flow-cookie": 134217735,
+ "flow-priority": 9,
+ "instruction": [
+ {
+ "apply-actions": {
+ "action": [
+ {
+ "order": 0,
+ "output-action": {
+ "max-length": 0,
+ "output-node-connector": "10"
+ }
+ }
+ ]
+ },
+ "order": 0
+ }
+ ],
+ "service-name": "default.3a2d068a-ad59-453e-8cd3-57f765c921f8",
+ "service-priority": 9,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ },
+ {
+ "flow-cookie": 110100480,
+ "flow-priority": 6,
+ "instruction": [
+ {
+ "go-to-table": {
+ "table_id": 239
+ },
+ "order": 1
+ }
+ ],
+ "service-name": "acl.egressacl.3a2d068a-ad59-453e-8cd3-57f765c921f8",
+ "service-priority": 6,
+ "service-type": "interface-service-bindings:service-type-flow-based"
+ }
+ ],
+ "interface-name": "3a2d068a-ad59-453e-8cd3-57f765c921f8",
+ "service-mode": "interface-service-bindings:service-mode-egress"
+ }
+ ]
+ }
+}
\ No newline at end of file
--- /dev/null
+{
+ "fibEntries": {
+ "vrfTables": [
+ {
+ "routeDistinguisher": "c7922261-90ab-4757-bc03-93ef3bbbaa19",
+ "vrfEntry": [
+ {
+ "destPrefix": "33.0.0.1/32",
+ "ip-address": "33.0.0.1/32",
+ "mac-address": "fa:16:3e:9a:c2:36",
+ "origin": "l",
+ "route-paths": [
+ {
+ "label": 100011,
+ "nexthop-address": "0.0.0.0"
+ }
+ ],
+ "uuid": "c7922261-90ab-4757-bc03-93ef3bbbaa19"
+ },
+ {
+ "destPrefix": "33.0.0.2/32",
+ "encap-type": "mplsgre",
+ "gateway_mac_address": "fa:16:3e:9a:c2:36",
+ "origin": "l",
+ "route-paths": [
+ {
+ "label": 100012,
+ "nexthop-address": "10.30.170.17"
+ }
+ ]
+ },
+ {
+ "destPrefix": "31.0.0.10/32",
+ "encap-type": "mplsgre",
+ "gateway_mac_address": "fa:16:3e:05:52:93",
+ "origin": "l",
+ "route-paths": [
+ {
+ "label": 100005,
+ "nexthop-address": "10.30.170.90"
+ }
+ ]
+ },
+ {
+ "destPrefix": "32.0.0.10/32",
+ "encap-type": "mplsgre",
+ "gateway_mac_address": "fa:16:3e:3d:ad:ed",
+ "origin": "l",
+ "route-paths": [
+ {
+ "label": 100008,
+ "nexthop-address": "10.30.170.92"
+ }
+ ]
+ },
+ {
+ "destPrefix": "33.0.0.5/32",
+ "encap-type": "mplsgre",
+ "gateway_mac_address": "fa:16:3e:9a:c2:36",
+ "origin": "l",
+ "route-paths": [
+ {
+ "label": 100015,
+ "nexthop-address": "10.30.170.90"
+ }
+ ]
+ },
+ {
+ "destPrefix": "32.0.0.11/32",
+ "encap-type": "mplsgre",
+ "gateway_mac_address": "fa:16:3e:3d:ad:ed",
+ "origin": "l",
+ "route-paths": [
+ {
+ "label": 100009,
+ "nexthop-address": "10.30.170.92"
+ }
+ ]
+ },
+ {
+ "destPrefix": "33.0.0.11/32",
+ "encap-type": "mplsgre",
+ "gateway_mac_address": "fa:16:3e:9a:c2:36",
+ "origin": "l",
+ "route-paths": [
+ {
+ "label": 100013,
+ "nexthop-address": "10.30.170.92"
+ }
+ ]
+ },
+ {
+ "destPrefix": "31.0.0.2/32",
+ "encap-type": "mplsgre",
+ "gateway_mac_address": "fa:16:3e:05:52:93",
+ "origin": "l",
+ "route-paths": [
+ {
+ "label": 100004,
+ "nexthop-address": "10.30.170.17"
+ }
+ ]
+ },
+ {
+ "destPrefix": "31.0.0.1/32",
+ "ip-address": "31.0.0.1/32",
+ "mac-address": "fa:16:3e:05:52:93",
+ "origin": "l",
+ "route-paths": [
+ {
+ "label": 100001,
+ "nexthop-address": "0.0.0.0"
+ }
+ ],
+ "uuid": "c7922261-90ab-4757-bc03-93ef3bbbaa19"
+ },
+ {
+ "destPrefix": "33.0.0.9/32",
+ "encap-type": "mplsgre",
+ "gateway_mac_address": "fa:16:3e:9a:c2:36",
+ "origin": "l",
+ "route-paths": [
+ {
+ "label": 100014,
+ "nexthop-address": "10.30.170.90"
+ }
+ ]
+ },
+ {
+ "destPrefix": "32.0.0.1/32",
+ "ip-address": "32.0.0.1/32",
+ "mac-address": "fa:16:3e:3d:ad:ed",
+ "origin": "l",
+ "route-paths": [
+ {
+ "label": 100006,
+ "nexthop-address": "0.0.0.0"
+ }
+ ],
+ "uuid": "c7922261-90ab-4757-bc03-93ef3bbbaa19"
+ },
+ {
+ "destPrefix": "32.0.0.2/32",
+ "encap-type": "mplsgre",
+ "gateway_mac_address": "fa:16:3e:3d:ad:ed",
+ "origin": "l",
+ "route-paths": [
+ {
+ "label": 100010,
+ "nexthop-address": "10.30.170.17"
+ }
+ ]
+ },
+ {
+ "destPrefix": "31.0.0.11/32",
+ "encap-type": "mplsgre",
+ "gateway_mac_address": "fa:16:3e:05:52:93",
+ "origin": "l",
+ "route-paths": [
+ {
+ "label": 100003,
+ "nexthop-address": "10.30.170.90"
+ }
+ ]
+ },
+ {
+ "destPrefix": "31.0.0.12/32",
+ "encap-type": "mplsgre",
+ "gateway_mac_address": "fa:16:3e:05:52:93",
+ "origin": "l",
+ "route-paths": [
+ {
+ "label": 100002,
+ "nexthop-address": "10.30.170.92"
+ }
+ ]
+ },
+ {
+ "destPrefix": "32.0.0.8/32",
+ "encap-type": "mplsgre",
+ "gateway_mac_address": "fa:16:3e:3d:ad:ed",
+ "origin": "l",
+ "route-paths": [
+ {
+ "label": 100007,
+ "nexthop-address": "10.30.170.90"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+}
\ No newline at end of file
--- /dev/null
+{
+ "vpn-instance-to-vpn-id": {
+ "vpn-instance": [
+ {
+ "vpn-id": 100000,
+ "vpn-instance-name": "c7922261-90ab-4757-bc03-93ef3bbbaa19",
+ "vrf-id": "c7922261-90ab-4757-bc03-93ef3bbbaa19"
+ }
+ ]
+ }
+}
\ No newline at end of file