diff --git a/inventory_provider/routes/classifier.py b/inventory_provider/routes/classifier.py index 2c9f7f415224944f5df175290a8d941275de0540..c971ae49f8cf104d02250371c06bed0a9bb46b16 100644 --- a/inventory_provider/routes/classifier.py +++ b/inventory_provider/routes/classifier.py @@ -50,10 +50,10 @@ def related_interfaces(hostname, interface): yield k[len(prefix):] -@routes.route("/trap-metadata/<source_equipment>/<path:interface>", +@routes.route("/juniper-link-info/<source_equipment>/<path:interface>", methods=['GET', 'POST']) @common.require_accepts_json -def get_trap_metadata(source_equipment, interface): +def get_juniper_link_info(source_equipment, interface): r = common.get_redis() cache_key = 'classifier:cache:%s:%s' % (source_equipment, interface) diff --git a/test/test_classifier_routes.py b/test/test_classifier_routes.py index 50e434244edf62d023fbd46ce8777ab89857eb5e..2d8603417c7f93a220156064a88c5b7f98fa8ebe 100644 --- a/test/test_classifier_routes.py +++ b/test/test_classifier_routes.py @@ -117,9 +117,9 @@ JUNIPER_LINK_METADATA = { } -def test_trap_metadata(client_with_mocked_data): +def test_juniper_link_info(client_with_mocked_data): rv = client_with_mocked_data.get( - '/classifier/trap-metadata/mx1.ams.nl.geant.net/ae15.1500', + '/classifier/juniper-link-info/mx1.ams.nl.geant.net/ae15.1500', headers=DEFAULT_REQUEST_HEADERS) assert rv.status_code == 200 assert rv.is_json