Skip to content
Snippets Groups Projects
Commit 8ac81569 authored by Sam Roberts's avatar Sam Roberts
Browse files

Merge branch 'feature/REPORTING-306-add-config' into 'develop'

Feature/reporting 306 add config

See merge request live-projects/dashboardv3/inventory-provider!12
parents c4f7bef4 7071a350
No related branches found
No related tags found
No related merge requests found
...@@ -183,6 +183,13 @@ CONFIG_SCHEMA = { ...@@ -183,6 +183,13 @@ CONFIG_SCHEMA = {
'type': 'array', 'type': 'array',
'items': {'$ref': '#/definitions/gws-direct-nren-isp'} 'items': {'$ref': '#/definitions/gws-direct-nren-isp'}
}, },
'nren-asn-map': {
'type': 'object',
'patternProperties': {
r'^\d+$': {'type': 'string'}
},
'additionalProperties': False
}
}, },
'type': 'object', 'type': 'object',
...@@ -207,7 +214,8 @@ CONFIG_SCHEMA = { ...@@ -207,7 +214,8 @@ CONFIG_SCHEMA = {
'type': 'array', 'type': 'array',
'items': {'$ref': '#/definitions/interface-address'} 'items': {'$ref': '#/definitions/interface-address'}
}, },
'gws-direct': {'$ref': '#/definitions/gws-direct'} 'gws-direct': {'$ref': '#/definitions/gws-direct'},
'nren-asn-map': {'$ref': '#/definitions/nren-asn-map'}
}, },
'oneOf': [ 'oneOf': [
...@@ -219,7 +227,8 @@ CONFIG_SCHEMA = { ...@@ -219,7 +227,8 @@ CONFIG_SCHEMA = {
'redis-databases', 'redis-databases',
'ims', 'ims',
'managed-routers', 'managed-routers',
'gws-direct'] 'gws-direct',
'nren-asn-map']
}, },
{ {
'required': [ 'required': [
...@@ -229,7 +238,8 @@ CONFIG_SCHEMA = { ...@@ -229,7 +238,8 @@ CONFIG_SCHEMA = {
'redis-databases', 'redis-databases',
'ims', 'ims',
'managed-routers', 'managed-routers',
'gws-direct'] 'gws-direct',
'nren-asn-map']
} }
], ],
'additionalProperties': False 'additionalProperties': False
......
...@@ -65,7 +65,12 @@ def data_config_filename(): ...@@ -65,7 +65,12 @@ def data_config_filename():
"router": "another.bogus.host.name" "router": "another.bogus.host.name"
} }
], ],
'gws-direct': {} 'gws-direct': {},
'nren-asn-map': {
"100": "BogusNREN",
"200": "FoobarNREN",
"300": "AlsoNET"
}
} }
with open(os.path.join(TEST_DATA_DIRNAME, 'gws-direct.json')) as gws: with open(os.path.join(TEST_DATA_DIRNAME, 'gws-direct.json')) as gws:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment