Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 1048-service-config-backfilling
  • NAT-1154-import-edge-port-update
  • develop
  • feature/10GGBS-NAT-980
  • feature/NAT-1150-model-commecial-peers
  • feature/NAT-1182-rename-geant-plus-descriptions
  • feature/NAT-732-ias-to-re-interconnect
  • feature/add-moodi-wf-to-router
  • feature/mass-base-config-redeploy
  • feature/nat-1211-edgeport-lacp-xmit
  • feature/rename-geant-plus-descriptions
  • fix/NAT-1009/fix-redeploy-base-config-if-there-is-a-vprn
  • fix/l3-imports
  • fix/nat-1120-sdp-validation
  • master
  • update_change_log
  • 0.1
  • 0.2
  • 0.3
  • 0.4
  • 0.5
  • 0.6
  • 0.7
  • 0.8
  • 0.9
  • 1.0
  • 1.1
  • 1.4
  • 1.5
  • 2.0
  • 2.1
  • 2.10
  • 2.11
  • 2.12
  • 2.13
  • 2.14
  • 2.15
  • 2.16
  • 2.17
  • 2.18
  • 2.19
  • 2.2
  • 2.20
  • 2.21
  • 2.22
  • 2.23
  • 2.24
  • 2.25
  • 2.26
  • 2.27
  • 2.28
  • 2.29
  • 2.3
  • 2.31
  • 2.32
  • 2.33
  • 2.34
  • 2.35
  • 2.36
  • 2.37
  • 2.38
  • 2.39
  • 2.4
  • 2.40
  • 2.41
  • 2.42
  • 2.43
  • 2.44
  • 2.45
  • 2.46
  • 2.47
  • 2.48
  • 2.5
  • 2.6
  • 2.7
  • 2.8
  • 2.9
  • 3.0
  • 3.1
  • 3.2
  • 3.3
  • 3.4
  • 3.5
  • 3.6
  • 3.7
  • 3.8
  • Lime-Seal
87 results

Target

Select target project
  • goat/gap/geant-service-orchestrator
1 result
Select Git revision
  • 1048-service-config-backfilling
  • NAT-1154-import-edge-port-update
  • develop
  • feature/10GGBS-NAT-980
  • feature/NAT-1150-model-commecial-peers
  • feature/NAT-1182-rename-geant-plus-descriptions
  • feature/NAT-732-ias-to-re-interconnect
  • feature/add-moodi-wf-to-router
  • feature/mass-base-config-redeploy
  • feature/nat-1211-edgeport-lacp-xmit
  • feature/rename-geant-plus-descriptions
  • fix/NAT-1009/fix-redeploy-base-config-if-there-is-a-vprn
  • fix/l3-imports
  • fix/nat-1120-sdp-validation
  • master
  • update_change_log
  • 0.1
  • 0.2
  • 0.3
  • 0.4
  • 0.5
  • 0.6
  • 0.7
  • 0.8
  • 0.9
  • 1.0
  • 1.1
  • 1.4
  • 1.5
  • 2.0
  • 2.1
  • 2.10
  • 2.11
  • 2.12
  • 2.13
  • 2.14
  • 2.15
  • 2.16
  • 2.17
  • 2.18
  • 2.19
  • 2.2
  • 2.20
  • 2.21
  • 2.22
  • 2.23
  • 2.24
  • 2.25
  • 2.26
  • 2.27
  • 2.28
  • 2.29
  • 2.3
  • 2.31
  • 2.32
  • 2.33
  • 2.34
  • 2.35
  • 2.36
  • 2.37
  • 2.38
  • 2.39
  • 2.4
  • 2.40
  • 2.41
  • 2.42
  • 2.43
  • 2.44
  • 2.45
  • 2.46
  • 2.47
  • 2.48
  • 2.5
  • 2.6
  • 2.7
  • 2.8
  • 2.9
  • 3.0
  • 3.1
  • 3.2
  • 3.3
  • 3.4
  • 3.5
  • 3.6
  • 3.7
  • 3.8
  • Lime-Seal
87 results
Show changes
Commits on Source (6)
......@@ -2,10 +2,17 @@
All notable changes to this project will be documented in this file.
## [2.7] - 2024-07-18
- Nothing new. Jenkins pipeline was broken.
## [2.8] - 2024-08-01
- Reworked authentication components
- Add a task for sending email notifications in case validation workflows have failed
- Fix Netbox device type for tier 2 sites
- Add a Kentik client
- Add tasks for updating partners
- Fix a bug in IP trunk validation workflow
- Update router termination workflow
- Update `orchestrator-core` from 2.2.1 to 2.6.1
## [2.6] - 2024-07-17
## [2.7] - 2024-07-18
- Added verification workflows.
## [2.5] - 2024-07-16
......
......@@ -110,12 +110,7 @@
"api_key": "kentik_api_key",
"device_type": "router",
"minimize_snmp": false,
"billing_plans": {
"1": "XL license",
"2": "L license",
"3": "M license",
"4": "S license"
},
"placeholder_license_key": "placeholder license",
"sample_rate": 100,
"bgp_type": "device",
"bgp_lookup_strategy": "lu_global_fallback",
......
......@@ -114,7 +114,7 @@ class KentikClient:
def create_device(self, device: NewKentikDevice) -> dict[str, Any]:
"""Add a new device to Kentik."""
plan_id = self.get_plan_by_name(self.config.billing_plans[device.site_tier])["id"]
plan_id = self.get_plan_by_name(self.config.placeholder_license_key)["id"]
request_body = {
"device": {
**device.model_dump(exclude=set("device_name" "site_tier")),
......
......@@ -16,7 +16,6 @@ from pydantic_forms.types import UUIDstr, strEnum
from pydantic_settings import BaseSettings
from typing_extensions import Doc
from gso.products.product_blocks.site import SiteTier
from gso.utils.shared_enums import PortNumber
logger = logging.getLogger(__name__)
......@@ -184,7 +183,7 @@ class KentikParams(BaseSettings):
api_key: str
device_type: str
minimize_snmp: bool
billing_plans: dict[SiteTier, str]
placeholder_license_key: str
sample_rate: int
bgp_type: str
bgp_lookup_strategy: str
......
......@@ -18,7 +18,6 @@ from gso.products.product_blocks.router import RouterRole
from gso.products.product_types.router import RouterInactive, RouterProvisioning
from gso.products.product_types.site import Site
from gso.services import infoblox, subscriptions
from gso.services.kentik_client import KentikClient, NewKentikDevice
from gso.services.lso_client import lso_interaction
from gso.services.netbox_client import NetboxClient
from gso.services.partners import get_partner_by_name
......@@ -144,46 +143,6 @@ def create_netbox_device(subscription: RouterInactive) -> State:
return {"subscription": subscription}
@step("Create Kentik device")
def create_kentik_device(subscription: RouterInactive) -> State:
"""Create a new device in Kentik."""
if not (
subscription.router.router_site
and subscription.router.router_site.site_name
and subscription.router.router_site.site_tier
and subscription.router.router_fqdn
):
msg = "Router object is missing required properties."
raise ProcessFailureError(msg)
kentik_client = KentikClient()
kentik_site = kentik_client.get_site_by_name(subscription.router.router_site.site_name)
if not kentik_site:
msg = f"Site could not be found in Kentik: {subscription.router.router_site.site_name}"
raise ProcessFailureError(msg)
site_tier = subscription.router.router_site.site_tier
new_device = NewKentikDevice(
device_name=subscription.router.router_fqdn,
device_description=str(subscription.subscription_id),
sending_ips=[str(subscription.router.router_lo_ipv4_address)],
site_tier=site_tier,
site_id=kentik_site["id"],
device_snmp_ip=str(subscription.router.router_lo_ipv4_address),
device_bgp_flowspec=False,
device_bgp_neighbor_ip=str(subscription.router.router_lo_ipv4_address),
device_bgp_neighbor_ip6=str(subscription.router.router_lo_ipv6_address),
)
kentik_device = kentik_client.create_device(new_device)
if "error" in kentik_device or "kentik_error" in kentik_device:
raise ProcessFailureError(str(kentik_device))
kentik_device.pop("custom_column_data", None)
return {"kentik_device": kentik_device}
@step("Verify IPAM resources for loopback interface")
def verify_ipam_loopback(subscription: RouterInactive) -> None:
"""Validate the :term:`IPAM` resources for the loopback interface.
......@@ -313,7 +272,6 @@ def create_router() -> StepList:
>> prompt_insert_in_ims
>> prompt_insert_in_radius
>> router_is_nokia(create_netbox_device)
>> create_kentik_device
>> lso_interaction(run_checks_after_base_config)
>> set_status(SubscriptionLifecycle.PROVISIONING)
>> create_new_sharepoint_checklist
......
......@@ -21,7 +21,6 @@ from orchestrator.workflows.utils import wrap_modify_initial_input_form
from gso.products.product_blocks.router import RouterRole
from gso.products.product_types.router import Router
from gso.services import infoblox, lso_client
from gso.services.kentik_client import KentikClient
from gso.services.librenms_client import LibreNMSClient
from gso.services.lso_client import execute_playbook, lso_interaction
from gso.services.netbox_client import NetboxClient
......@@ -238,12 +237,6 @@ def remove_device_from_librenms(subscription: Router) -> dict[str, Router]:
return {"subscription": subscription}
@step("Archive device in Kentik")
def remove_device_from_kentik(subscription: Router) -> None:
"""Archive the device in Kentik."""
KentikClient().remove_device(subscription.router.router_fqdn, archive=True)
@workflow(
"Terminate router",
initial_input_form=wrap_modify_initial_input_form(initial_input_form_generator),
......@@ -278,7 +271,6 @@ def terminate_router() -> StepList:
>> run_config_steps(lso_interaction(remove_config_from_router_real))
>> router_is_nokia(remove_device_from_netbox)
>> remove_device_from_librenms
>> remove_device_from_kentik
>> set_status(SubscriptionLifecycle.TERMINATED)
>> resync
>> done
......
......@@ -4,7 +4,7 @@ from setuptools import find_packages, setup
setup(
name="geant-service-orchestrator",
version="2.8",
version="2.9",
author="GÉANT Orchestration and Automation Team",
author_email="goat@geant.org",
description="GÉANT Service Orchestrator",
......
......@@ -42,9 +42,7 @@ def router_creation_input_form_data(site_subscription_factory, faker):
@patch("gso.workflows.router.create_router.infoblox.find_host_by_fqdn")
@patch("gso.workflows.router.create_router.infoblox.allocate_host")
@patch("gso.workflows.router.create_router.SharePointClient")
@patch("gso.workflows.router.create_router.KentikClient")
def test_create_nokia_router_success(
mock_kentik_client,
mock_sharepoint_client,
mock_allocate_host,
mock_find_host_by_fqdn,
......@@ -115,7 +113,6 @@ def test_create_nokia_router_success(
assert mock_netbox_create_device.call_count == 1
assert mock_find_host_by_fqdn.call_count == 1
assert mock_sharepoint_client.call_count == 1
assert mock_kentik_client.call_count == 1
assert "ipam_warning" not in state
......
......@@ -14,9 +14,7 @@ from test.workflows import assert_complete, assert_lso_interaction_success, extr
@patch("gso.workflows.router.terminate_router.NetboxClient.delete_device")
@patch("gso.workflows.router.terminate_router.infoblox.delete_host_by_ip")
@patch("gso.workflows.router.terminate_router.LibreNMSClient.remove_device")
@patch("gso.workflows.router.terminate_router.KentikClient")
def test_terminate_pe_router_full_success(
mock_kentik_client,
mock_librenms_remove_device,
mock_delete_host_by_ip,
mock_delete_device,
......@@ -56,7 +54,6 @@ def test_terminate_pe_router_full_success(
assert mock_delete_device.call_count == 1
assert mock_delete_host_by_ip.call_count == 1
assert mock_librenms_remove_device.call_count == 1
assert mock_kentik_client.call_count == 1
assert mock_execute_playbook.call_count == lso_interaction_count
......@@ -64,7 +61,6 @@ def test_terminate_pe_router_full_success(
@pytest.mark.parametrize("remove_configuration", [True, False])
@pytest.mark.parametrize("update_ibgp_mesh", [True, False])
@patch("gso.services.lso_client._send_request")
@patch("gso.workflows.router.terminate_router.KentikClient")
@patch("gso.workflows.router.terminate_router.NetboxClient.delete_device")
@patch("gso.workflows.router.terminate_router.infoblox.delete_host_by_ip")
@patch("gso.workflows.router.terminate_router.LibreNMSClient.remove_device")
......@@ -72,7 +68,6 @@ def test_terminate_p_router_full_success(
mock_librenms_remove_device,
mock_delete_host_by_ip,
mock_delete_device,
mock_kentik_client,
mock_execute_playbook,
remove_configuration,
update_ibgp_mesh,
......@@ -109,5 +104,4 @@ def test_terminate_p_router_full_success(
assert mock_delete_device.call_count == 1
assert mock_delete_host_by_ip.call_count == 1
assert mock_librenms_remove_device.call_count == 1
assert mock_kentik_client.call_count == 1
assert mock_execute_playbook.call_count == lso_interaction_count