Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
controller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TFS
controller
Commits
6ebc4d54
Commit
6ebc4d54
authored
1 year ago
by
Lluis Gifre Renom
Browse files
Options
Downloads
Patches
Plain Diff
Device - OpenConfig SBI driver:
- Updated test for IPInfusion OcNOS
parent
89e73d9b
No related branches found
No related tags found
2 merge requests
!294
Release TeraFlowSDN 4.0
,
!196
Resolve "(CTTC) Incorrect endpoint lookup in NBI ETSI BWM plugin"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/device/tests/test_unitary_openconfig_ocnos.py
+53
-53
53 additions, 53 deletions
src/device/tests/test_unitary_openconfig_ocnos.py
with
53 additions
and
53 deletions
src/device/tests/test_unitary_openconfig_ocnos.py
+
53
−
53
View file @
6ebc4d54
...
@@ -143,49 +143,49 @@ def test_configure(drivers : Dict[str, OpenConfigDriver]):
...
@@ -143,49 +143,49 @@ def test_configure(drivers : Dict[str, OpenConfigDriver]):
#results_getconfig = driver.GetConfig(resources_to_get)
#results_getconfig = driver.GetConfig(resources_to_get)
#LOGGER.info('results_getconfig = {:s}'.format(str(results_getconfig)))
#LOGGER.info('results_getconfig = {:s}'.format(str(results_getconfig)))
#
csgw1_resources_to_set = [
csgw1_resources_to_set
=
[
#
network_instance('ecoc24', 'L3VRF', '192.168.150.1', '65001:1'),
network_instance
(
'
ecoc24
'
,
'
L3VRF
'
,
'
192.168.150.1
'
,
'
65001:1
'
),
#
network_instance_add_protocol_direct('ecoc24', 'L3VRF'),
network_instance_add_protocol_direct
(
'
ecoc24
'
,
'
L3VRF
'
),
#
network_instance_add_protocol_static('ecoc24', 'L3VRF'),
network_instance_add_protocol_static
(
'
ecoc24
'
,
'
L3VRF
'
),
#
network_instance_add_protocol_bgp('ecoc24', 'L3VRF', '192.168.150.1', '65001', neighbors=[
network_instance_add_protocol_bgp
(
'
ecoc24
'
,
'
L3VRF
'
,
'
192.168.150.1
'
,
'
65001
'
,
neighbors
=
[
#
('192.168.150.2', '65001')
(
'
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
'
,
'
DIRECTLY_CONNECTED
'
,
'
BGP
'
,
'
IPV4
'
,
'
ACCEPT_ROUTE
'
,
bgp_as
=
'
65001
'
),
#
network_instance_add_table_connection('ecoc24', 'STATIC', '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),
interface
(
'
ce1
'
,
0
,
if_type
=
'
ethernetCsmacd
'
,
mtu
=
1500
),
#
network_instance_interface('ecoc24', 'L3VRF', 'ce1', 0),
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
(
'
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),
interface
(
'
xe5
'
,
0
,
if_type
=
'
ethernetCsmacd
'
,
mtu
=
1500
),
#
network_instance_interface('ecoc24', 'L3VRF', 'xe5', 0),
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),
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)))
LOGGER
.
info
(
'
CSGW1 resources_to_set = {:s}
'
.
format
(
str
(
csgw1_resources_to_set
)))
#
results_setconfig = drivers['CSGW1'].SetConfig(csgw1_resources_to_set)
results_setconfig
=
drivers
[
'
CSGW1
'
].
SetConfig
(
csgw1_resources_to_set
)
#
LOGGER.info('CSGW1 results_setconfig = {:s}'.format(str(results_setconfig)))
LOGGER
.
info
(
'
CSGW1 results_setconfig = {:s}
'
.
format
(
str
(
results_setconfig
)))
#
csgw2_resources_to_set = [
csgw2_resources_to_set
=
[
#
network_instance('ecoc24', 'L3VRF', '192.168.150.2', '65001:1'),
network_instance
(
'
ecoc24
'
,
'
L3VRF
'
,
'
192.168.150.2
'
,
'
65001:1
'
),
#
network_instance_add_protocol_direct('ecoc24', 'L3VRF'),
network_instance_add_protocol_direct
(
'
ecoc24
'
,
'
L3VRF
'
),
#
network_instance_add_protocol_static('ecoc24', 'L3VRF'),
network_instance_add_protocol_static
(
'
ecoc24
'
,
'
L3VRF
'
),
#
network_instance_add_protocol_bgp('ecoc24', 'L3VRF', '192.168.150.2', '65001', neighbors=[
network_instance_add_protocol_bgp
(
'
ecoc24
'
,
'
L3VRF
'
,
'
192.168.150.2
'
,
'
65001
'
,
neighbors
=
[
#
('192.168.150.1', '65001')
(
'
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
'
,
'
DIRECTLY_CONNECTED
'
,
'
BGP
'
,
'
IPV4
'
,
'
ACCEPT_ROUTE
'
,
bgp_as
=
'
65001
'
),
#
network_instance_add_table_connection('ecoc24', 'STATIC', '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),
interface
(
'
ce1
'
,
0
,
if_type
=
'
ethernetCsmacd
'
,
mtu
=
1500
),
#
network_instance_interface('ecoc24', 'L3VRF', 'ce1', 0),
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
(
'
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),
interface
(
'
xe5
'
,
0
,
if_type
=
'
ethernetCsmacd
'
,
mtu
=
1500
),
#
network_instance_interface('ecoc24', 'L3VRF', 'xe5', 0),
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),
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)))
LOGGER
.
info
(
'
CSGW2 resources_to_set = {:s}
'
.
format
(
str
(
csgw2_resources_to_set
)))
#
results_setconfig = drivers['CSGW2'].SetConfig(csgw2_resources_to_set)
results_setconfig
=
drivers
[
'
CSGW2
'
].
SetConfig
(
csgw2_resources_to_set
)
#
LOGGER.info('CSGW2 results_setconfig = {:s}'.format(str(results_setconfig)))
LOGGER
.
info
(
'
CSGW2 results_setconfig = {:s}
'
.
format
(
str
(
results_setconfig
)))
csgw1_resources_to_delete
=
[
csgw1_resources_to_delete
=
[
network_instance_interface
(
'
ecoc24
'
,
'
L3VRF
'
,
'
ce1
'
,
0
),
network_instance_interface
(
'
ecoc24
'
,
'
L3VRF
'
,
'
ce1
'
,
0
),
...
@@ -198,13 +198,13 @@ def test_configure(drivers : Dict[str, OpenConfigDriver]):
...
@@ -198,13 +198,13 @@ def test_configure(drivers : Dict[str, OpenConfigDriver]):
results_deleteconfig
=
drivers
[
'
CSGW1
'
].
DeleteConfig
(
csgw1_resources_to_delete
)
results_deleteconfig
=
drivers
[
'
CSGW1
'
].
DeleteConfig
(
csgw1_resources_to_delete
)
LOGGER
.
info
(
'
CSGW1 results_deleteconfig = {:s}
'
.
format
(
str
(
results_deleteconfig
)))
LOGGER
.
info
(
'
CSGW1 results_deleteconfig = {:s}
'
.
format
(
str
(
results_deleteconfig
)))
#
csgw2_resources_to_delete = [
csgw2_resources_to_delete
=
[
#
network_instance_interface('ecoc24', 'L3VRF', 'ce1', 0),
network_instance_interface
(
'
ecoc24
'
,
'
L3VRF
'
,
'
ce1
'
,
0
),
#
network_instance_interface('ecoc24', 'L3VRF', 'xe5', 0),
network_instance_interface
(
'
ecoc24
'
,
'
L3VRF
'
,
'
xe5
'
,
0
),
#
#interface('ce1', 0),
#interface('ce1', 0),
#
#interface('xe5', 0),
#interface('xe5', 0),
#
network_instance('ecoc24', 'L3VRF'),
network_instance
(
'
ecoc24
'
,
'
L3VRF
'
),
#
]
]
#
LOGGER.info('CSGW2 resources_to_delete = {:s}'.format(str(csgw2_resources_to_delete)))
LOGGER
.
info
(
'
CSGW2 resources_to_delete = {:s}
'
.
format
(
str
(
csgw2_resources_to_delete
)))
#
results_deleteconfig = drivers['CSGW2'].DeleteConfig(csgw2_resources_to_delete)
results_deleteconfig
=
drivers
[
'
CSGW2
'
].
DeleteConfig
(
csgw2_resources_to_delete
)
#
LOGGER.info('CSGW2 results_deleteconfig = {:s}'.format(str(results_deleteconfig)))
LOGGER
.
info
(
'
CSGW2 results_deleteconfig = {:s}
'
.
format
(
str
(
results_deleteconfig
)))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment