Skip to content
Snippets Groups Projects
Commit cb13011f authored by Erik Reid's avatar Erik Reid
Browse files

removed dna & tnms addresses from config

parent 55e75995
No related branches found
No related tags found
No related merge requests found
......@@ -58,30 +58,6 @@ CONFIG_SCHEMA = {
"api": {"type": "string"},
"username": {"type": "string"},
"password": {"type": "string"}
},
"infinera-dna": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {"type": "string"},
"address": {"type": "string"}
},
"required": ["name", "address"],
"additionalProperties": False
}
},
"coriant-tnms": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {"type": "string"},
"address": {"type": "string"}
},
"required": ["name", "address"],
"additionalProperties": False
}
}
},
"oneOf": [
......@@ -91,9 +67,7 @@ CONFIG_SCHEMA = {
"oid_list.conf",
"ssh",
"redis",
"junosspace",
"infinera-dna",
"coriant-tnms"]
"junosspace"]
},
{
"required": [
......@@ -101,9 +75,7 @@ CONFIG_SCHEMA = {
"oid_list.conf",
"ssh",
"sentinel",
"junosspace",
"infinera-dna",
"coriant-tnms"]
"junosspace"]
}
],
"additionalProperties": False
......
......@@ -42,22 +42,6 @@ def update_interface_statuses():
return Response('OK')
@routes.route("infinera-dna-addresses", methods=['GET', 'POST'])
@common.require_accepts_json
def infinera_addresses():
infinera_config = current_app.config[
"INVENTORY_PROVIDER_CONFIG"]["infinera-dna"]
return jsonify([dna['address'] for dna in infinera_config])
@routes.route("coriant-tnms-addresses", methods=['GET', 'POST'])
@common.require_accepts_json
def coriant_addresses():
coriant_config = current_app.config[
"INVENTORY_PROVIDER_CONFIG"]["coriant-tnms"]
return jsonify([tnms['address'] for tnms in coriant_config])
@routes.route("juniper-server-addresses", methods=['GET', 'POST'])
@common.require_accepts_json
def juniper_addresses():
......
......@@ -44,17 +44,7 @@ def data_config_filename(tmp_dir_name):
"api": "bogus-url",
"username": "bogus-username",
"password": "bogus-password"
},
"infinera-dna": [
{"name": "name1", "address": "123.456.789.0"},
{"name": "name2", "address": "012.345.678.9"},
{"name": "name3", "address": "111.222.333.000"}
],
"coriant-tnms": [
{"name": "name1", "address": "123.456.789.0"},
{"name": "name2", "address": "012.345.678.9"},
{"name": "name3", "address": "111.222.333.000"}
]
}
}
shutil.copyfile(
......
......@@ -18,26 +18,6 @@ def test_flushdb(client):
assert rv.status_code == 200
def test_infinera_addresses(client):
rv = client.post(
"/testing/infinera-dna-addresses",
headers=DEFAULT_REQUEST_HEADERS)
assert rv.status_code == 200
jsonschema.validate(
json.loads(rv.data.decode("utf-8")),
ROUTER_LIST_SCHEMA)
def test_coriant_addresses(client):
rv = client.post(
"/testing/coriant-tnms-addresses",
headers=DEFAULT_REQUEST_HEADERS)
assert rv.status_code == 200
jsonschema.validate(
json.loads(rv.data.decode("utf-8")),
ROUTER_LIST_SCHEMA)
def test_juniper_addresses(client):
rv = client.post(
"/testing/juniper-server-addresses",
......
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