}
}
-remote_vrf_adjacency = {
- "adjacency": {
+prepare_vrf_adjacency = {
+ "virtual-network-identifier": 7,
+ "vrf-subtable": {
+ "table-id": 3,
+ "local-mappings": {
+ "local-mapping": [{
+ "id": "local_map_vrf",
+ "eid": {
+ "virtual-network-id": 7,
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "192.168.1.1"
+ },
+ "locator-set": locator_set
+ }]
+ },
+ "remote-mappings": {
+ "remote-mapping": [{
+ "id": "remote_map_vrf",
+ "eid": {
+ "virtual-network-id": 7,
+ "address-type": "ietf-lisp-address-types:ipv4-afi",
+ "ipv4": "192.168.0.2"
+ },
+ "rlocs": {
+ "locator": [{
+ "address": "192.168.0.3",
+ "priority": 1,
+ "weight": 1
+ }]
+ },
+
+ }]
+ },
+ }
+}
+
+vrf_adjacency = {
+ "adjacency": [{
"id": "adj01",
"local-eid": {
- "virtual-network-id": 4,
+ "virtual-network-id": 7,
"address-type": "ietf-lisp-address-types:ipv4-afi",
"ipv4": "192.168.1.1"
},
"remote-eid": {
- "virtual-network-id": 4,
+ "virtual-network-id": 7,
"address-type": "ietf-lisp-address-types:ipv4-afi",
"ipv4": "192.168.0.2"
},
- }
+ }]
}
-remote_adj_subtable = deepcopy(remote_vrf_subtable)
-remote_adj_subtable["vrf-subtable"]["remote-mappings"]\
- ["remote-mapping"][0]["adjacencies"] = {}.update(remote_vrf_adjacency)
+adj_subtable = deepcopy(prepare_vrf_adjacency)
+adj_subtable["vrf-subtable"]["remote-mappings"]\
+ ["remote-mapping"][0]["adjacencies"] = deepcopy(vrf_adjacency)
def create_settings_dict(subtable):
lisp_settings_remote_vrf = create_settings_dict(remote_vrf_subtable)
lisp_settings_local_bd = create_settings_dict(local_bd_subtable)
lisp_settings_local_vrf = create_settings_dict(local_vrf_subtable)
+lisp_settings_both_vrf = create_settings_dict(prepare_vrf_adjacency)
vat_remote_bd = {
"is_local": 0,