diff --git a/CHANGELOG b/CHANGELOG index 07aa448..576f319 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.4.1] - 2024-04-17 + +### Changed + +- Fix core v3 endpoint. + ## [1.4.0] - 2024-03-22 ### Added diff --git a/router_registration.py b/router_registration.py index 71eca54..31061b9 100755 --- a/router_registration.py +++ b/router_registration.py @@ -76,7 +76,7 @@ def check_registration_key(registration_key): :return NetFoundry MOP endpoint """ if len(registration_key) == 10: - return 'https://gateway.production.netfoundry.io/core/v2/edge-routers' + return 'https://gateway.production.netfoundry.io/core/v2/edge-routers/register' if len(registration_key) == 11: return 'https://gateway.production.netfoundry.io/core/v3/edge-router-registrations' if registration_key.startswith("SA"): @@ -87,8 +87,8 @@ def check_registration_key(registration_key): key_environment = 'development' if len(registration_key) == 12: if key_environment == 'development': - return 'http://localhost:9300/core/v2/edge-routers' - return 'https://gateway.' + str(key_environment) + '.netfoundry.io/core/v2/edge-routers' + return 'http://localhost:9300/core/v2/edge-routers/register' + return 'https://gateway.' + str(key_environment) + '.netfoundry.io/core/v2/edge-routers/register' if len(registration_key) == 13: if key_environment == 'development': return 'http://localhost:9300/core/v3/edge-router-registrations' @@ -285,7 +285,7 @@ def create_parser(): :return: A Namespace containing arguments """ - __version__ = '1.4.0' + __version__ = '1.4.1' parser = argparse.ArgumentParser() mgroup = parser.add_mutually_exclusive_group(required=True) @@ -468,7 +468,7 @@ def get_mop_router_information(endpoint_url, registration_key): """ try: headers = {'content-type': 'application/json'} - endpoint_url = f"{endpoint_url}/register/{registration_key}" + endpoint_url = f"{endpoint_url}/{registration_key}" logging.debug("Connecting to: %s", endpoint_url) response = requests.post(endpoint_url, headers=headers,