Skip to content
Snippets Groups Projects
Commit 6ebc4d54 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Device - OpenConfig SBI driver:

- Updated test for IPInfusion OcNOS
parent 89e73d9b
No related branches found
No related tags found
2 merge requests!294Release TeraFlowSDN 4.0,!196Resolve "(CTTC) Incorrect endpoint lookup in NBI ETSI BWM plugin"
......@@ -143,49 +143,49 @@ def test_configure(drivers : Dict[str, OpenConfigDriver]):
#results_getconfig = driver.GetConfig(resources_to_get)
#LOGGER.info('results_getconfig = {:s}'.format(str(results_getconfig)))
#csgw1_resources_to_set = [
# network_instance('ecoc24', 'L3VRF', '192.168.150.1', '65001:1'),
# network_instance_add_protocol_direct('ecoc24', 'L3VRF'),
# network_instance_add_protocol_static('ecoc24', 'L3VRF'),
# network_instance_add_protocol_bgp('ecoc24', 'L3VRF', '192.168.150.1', '65001', neighbors=[
# ('192.168.150.2', '65001')
# ]),
# network_instance_add_table_connection('ecoc24', 'DIRECTLY_CONNECTED', 'BGP', 'IPV4', 'ACCEPT_ROUTE', bgp_as='65001'),
# network_instance_add_table_connection('ecoc24', 'STATIC', 'BGP', 'IPV4', 'ACCEPT_ROUTE', bgp_as='65001'),
#
# interface('ce1', 0, if_type='ethernetCsmacd', mtu=1500),
# network_instance_interface('ecoc24', 'L3VRF', 'ce1', 0),
# interface('ce1', 0, if_type='ethernetCsmacd', mtu=1500, ipv4_address_prefix=('192.168.10.1', 24), enabled=True),
#
# interface('xe5', 0, if_type='ethernetCsmacd', mtu=1500),
# network_instance_interface('ecoc24', 'L3VRF', 'xe5', 0),
# interface('xe5', 0, if_type='ethernetCsmacd', mtu=1500, ipv4_address_prefix=('192.168.150.1', 24), enabled=True),
#]
#LOGGER.info('CSGW1 resources_to_set = {:s}'.format(str(csgw1_resources_to_set)))
#results_setconfig = drivers['CSGW1'].SetConfig(csgw1_resources_to_set)
#LOGGER.info('CSGW1 results_setconfig = {:s}'.format(str(results_setconfig)))
#csgw2_resources_to_set = [
# network_instance('ecoc24', 'L3VRF', '192.168.150.2', '65001:1'),
# network_instance_add_protocol_direct('ecoc24', 'L3VRF'),
# network_instance_add_protocol_static('ecoc24', 'L3VRF'),
# network_instance_add_protocol_bgp('ecoc24', 'L3VRF', '192.168.150.2', '65001', neighbors=[
# ('192.168.150.1', '65001')
# ]),
# network_instance_add_table_connection('ecoc24', 'DIRECTLY_CONNECTED', 'BGP', 'IPV4', 'ACCEPT_ROUTE', bgp_as='65001'),
# network_instance_add_table_connection('ecoc24', 'STATIC', 'BGP', 'IPV4', 'ACCEPT_ROUTE', bgp_as='65001'),
#
# interface('ce1', 0, if_type='ethernetCsmacd', mtu=1500),
# network_instance_interface('ecoc24', 'L3VRF', 'ce1', 0),
# interface('ce1', 0, if_type='ethernetCsmacd', mtu=1500, ipv4_address_prefix=('192.168.20.1', 24), enabled=True),
#
# interface('xe5', 0, if_type='ethernetCsmacd', mtu=1500),
# network_instance_interface('ecoc24', 'L3VRF', 'xe5', 0),
# interface('xe5', 0, if_type='ethernetCsmacd', mtu=1500, ipv4_address_prefix=('192.168.150.2', 24), enabled=True),
#]
#LOGGER.info('CSGW2 resources_to_set = {:s}'.format(str(csgw2_resources_to_set)))
#results_setconfig = drivers['CSGW2'].SetConfig(csgw2_resources_to_set)
#LOGGER.info('CSGW2 results_setconfig = {:s}'.format(str(results_setconfig)))
csgw1_resources_to_set = [
network_instance('ecoc24', 'L3VRF', '192.168.150.1', '65001:1'),
network_instance_add_protocol_direct('ecoc24', 'L3VRF'),
network_instance_add_protocol_static('ecoc24', 'L3VRF'),
network_instance_add_protocol_bgp('ecoc24', 'L3VRF', '192.168.150.1', '65001', neighbors=[
('192.168.150.2', '65001')
]),
network_instance_add_table_connection('ecoc24', 'DIRECTLY_CONNECTED', 'BGP', 'IPV4', 'ACCEPT_ROUTE', bgp_as='65001'),
network_instance_add_table_connection('ecoc24', 'STATIC', 'BGP', 'IPV4', 'ACCEPT_ROUTE', bgp_as='65001'),
interface('ce1', 0, if_type='ethernetCsmacd', mtu=1500),
network_instance_interface('ecoc24', 'L3VRF', 'ce1', 0),
interface('ce1', 0, if_type='ethernetCsmacd', mtu=1500, ipv4_address_prefix=('192.168.10.1', 24), enabled=True),
interface('xe5', 0, if_type='ethernetCsmacd', mtu=1500),
network_instance_interface('ecoc24', 'L3VRF', 'xe5', 0),
interface('xe5', 0, if_type='ethernetCsmacd', mtu=1500, ipv4_address_prefix=('192.168.150.1', 24), enabled=True),
]
LOGGER.info('CSGW1 resources_to_set = {:s}'.format(str(csgw1_resources_to_set)))
results_setconfig = drivers['CSGW1'].SetConfig(csgw1_resources_to_set)
LOGGER.info('CSGW1 results_setconfig = {:s}'.format(str(results_setconfig)))
csgw2_resources_to_set = [
network_instance('ecoc24', 'L3VRF', '192.168.150.2', '65001:1'),
network_instance_add_protocol_direct('ecoc24', 'L3VRF'),
network_instance_add_protocol_static('ecoc24', 'L3VRF'),
network_instance_add_protocol_bgp('ecoc24', 'L3VRF', '192.168.150.2', '65001', neighbors=[
('192.168.150.1', '65001')
]),
network_instance_add_table_connection('ecoc24', 'DIRECTLY_CONNECTED', 'BGP', 'IPV4', 'ACCEPT_ROUTE', bgp_as='65001'),
network_instance_add_table_connection('ecoc24', 'STATIC', 'BGP', 'IPV4', 'ACCEPT_ROUTE', bgp_as='65001'),
interface('ce1', 0, if_type='ethernetCsmacd', mtu=1500),
network_instance_interface('ecoc24', 'L3VRF', 'ce1', 0),
interface('ce1', 0, if_type='ethernetCsmacd', mtu=1500, ipv4_address_prefix=('192.168.20.1', 24), enabled=True),
interface('xe5', 0, if_type='ethernetCsmacd', mtu=1500),
network_instance_interface('ecoc24', 'L3VRF', 'xe5', 0),
interface('xe5', 0, if_type='ethernetCsmacd', mtu=1500, ipv4_address_prefix=('192.168.150.2', 24), enabled=True),
]
LOGGER.info('CSGW2 resources_to_set = {:s}'.format(str(csgw2_resources_to_set)))
results_setconfig = drivers['CSGW2'].SetConfig(csgw2_resources_to_set)
LOGGER.info('CSGW2 results_setconfig = {:s}'.format(str(results_setconfig)))
csgw1_resources_to_delete = [
network_instance_interface('ecoc24', 'L3VRF', 'ce1', 0),
......@@ -198,13 +198,13 @@ def test_configure(drivers : Dict[str, OpenConfigDriver]):
results_deleteconfig = drivers['CSGW1'].DeleteConfig(csgw1_resources_to_delete)
LOGGER.info('CSGW1 results_deleteconfig = {:s}'.format(str(results_deleteconfig)))
#csgw2_resources_to_delete = [
# network_instance_interface('ecoc24', 'L3VRF', 'ce1', 0),
# network_instance_interface('ecoc24', 'L3VRF', 'xe5', 0),
# #interface('ce1', 0),
# #interface('xe5', 0),
# network_instance('ecoc24', 'L3VRF'),
#]
#LOGGER.info('CSGW2 resources_to_delete = {:s}'.format(str(csgw2_resources_to_delete)))
#results_deleteconfig = drivers['CSGW2'].DeleteConfig(csgw2_resources_to_delete)
#LOGGER.info('CSGW2 results_deleteconfig = {:s}'.format(str(results_deleteconfig)))
csgw2_resources_to_delete = [
network_instance_interface('ecoc24', 'L3VRF', 'ce1', 0),
network_instance_interface('ecoc24', 'L3VRF', 'xe5', 0),
#interface('ce1', 0),
#interface('xe5', 0),
network_instance('ecoc24', 'L3VRF'),
]
LOGGER.info('CSGW2 resources_to_delete = {:s}'.format(str(csgw2_resources_to_delete)))
results_deleteconfig = drivers['CSGW2'].DeleteConfig(csgw2_resources_to_delete)
LOGGER.info('CSGW2 results_deleteconfig = {:s}'.format(str(results_deleteconfig)))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment