Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inventory-provider
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
geant-swd
dashboardv3
inventory-provider
Commits
2c99649a
Commit
2c99649a
authored
4 years ago
by
Erik Reid
Browse files
Options
Downloads
Patches
Plain Diff
updated expected schema
parent
c380c634
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/per_router/test_data_routes.py
+41
-31
41 additions, 31 deletions
test/per_router/test_data_routes.py
with
41 additions
and
31 deletions
test/per_router/test_data_routes.py
+
41
−
31
View file @
2c99649a
...
...
@@ -75,45 +75,55 @@ def test_snmp_ids(router, client):
def
test_router_bgp_routes
(
router
,
client
):
ROUTERS_WITH_BGP_CONFIG
=
[
"
mx1.bud.hu.geant.net
"
,
"
mx1.pra.cz.geant.net
"
,
"
mx1.lon.uk.geant.net
"
,
"
mx1.vie.at.geant.net
"
,
"
mx1.ams.nl.geant.net
"
,
"
mx1.fra.de.geant.net
"
,
"
mx1.gen.ch.geant.net
"
,
"
mx1.mil2.it.geant.net
"
,
"
mx1.mad.es.geant.net
"
,
"
mx1.dub.ie.geant.net
"
,
"
mx1.mar.fr.geant.net
"
ROUTERS_WITHOUT_PEERING_DATA
=
[
'
mx2.bru.be.geant.net
'
]
if
router
not
in
ROUTERS_WITH_BGP_CONFIG
:
if
router
in
ROUTERS_WITHOUT_PEERING_DATA
:
pytest
.
skip
(
'
%s is not expected to have bgp peers
'
%
router
)
return
bgp_list_schema
=
{
"
$schema
"
:
"
http://json-schema.org/draft-07/schema#
"
,
"
type
"
:
"
array
"
,
"
items
"
:
{
"
type
"
:
"
object
"
,
"
properties
"
:
{
"
name
"
:
{
"
type
"
:
"
string
"
},
"
description
"
:
{
"
type
"
:
"
string
"
},
"
as
"
:
{
"
type
"
:
"
object
"
,
"
properties
"
:
{
"
peer
"
:
{
"
type
"
:
"
integer
"
},
"
local
"
:
{
"
type
"
:
"
integer
"
}
},
"
required
"
:
[
"
peer
"
,
"
local
"
],
"
additionalProperties
"
:
False
"
definitions
"
:
{
"
instance-peering
"
:
{
"
type
"
:
"
object
"
,
"
properties
"
:
{
"
instance
"
:
{
"
type
"
:
"
string
"
},
"
group
"
:
{
"
type
"
:
"
string
"
},
"
description
"
:
{
"
type
"
:
"
string
"
},
"
address
"
:
{
"
type
"
:
"
string
"
},
"
remote-asn
"
:
{
"
type
"
:
"
integer
"
},
"
local-asn
"
:
{
"
type
"
:
"
integer
"
}
},
# description and-or local-asn is not always present,
# just based on empirical tests - not a problem
"
required
"
:
[
"
instance
"
,
"
group
"
,
"
address
"
,
"
remote-asn
"
],
"
additionalProperties
"
:
False
},
"
required
"
:
[
"
description
"
,
"
as
"
,
"
name
"
],
"
additionalProperties
"
:
False
}
"
logical-system-peering
"
:
{
"
type
"
:
"
object
"
,
"
properties
"
:
{
"
logical-system
"
:
{
"
type
"
:
"
string
"
},
"
group
"
:
{
"
type
"
:
"
string
"
},
"
description
"
:
{
"
type
"
:
"
string
"
},
"
address
"
:
{
"
type
"
:
"
string
"
},
"
remote-asn
"
:
{
"
type
"
:
"
integer
"
},
"
local-asn
"
:
{
"
type
"
:
"
integer
"
}
},
# local/remote-asn and/or description are not always present,
# just based on empirical tests - not a problem
"
required
"
:
[
"
logical-system
"
,
"
group
"
,
"
address
"
],
"
additionalProperties
"
:
False
},
"
peering
"
:
{
"
oneOf
"
:
[
{
"
$ref
"
:
"
#/definitions/instance-peering
"
},
{
"
$ref
"
:
"
#/definitions/logical-system-peering
"
}
]
}
},
"
type
"
:
"
array
"
,
"
items
"
:
{
"
$ref
"
:
"
#/definitions/peering
"
}
}
rv
=
client
.
post
(
...
...
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