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-1225-R
  • feature/NAT-732-ias-to-re-interconnect
  • feature/add-moodi-wf-to-router
  • 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
  • 3.9
  • Lime-Seal
88 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-1225-R
  • feature/NAT-732-ias-to-re-interconnect
  • feature/add-moodi-wf-to-router
  • 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
  • 3.9
  • Lime-Seal
88 results
Show changes
Commits on Source (13)
......@@ -20,3 +20,4 @@ docs/vale/styles/*
.idea
.venv
.env
\ No newline at end of file
# Changelog
## [2.14] - 2024-09-19
- Fixes to Infoblox client.
## [2.13] - 2024-09-18
- Run cleanup at 1 AM only, not every minute between 1 and 2 AM.
- Add checklist to trunk migration and include ACTIVITY_TYPE column as discussed with SM.
- Fix SDP update logic in the promotion from P to PE.
- Update core lib to 2.7.4
- Refactor validators into a separate types module.
- Add Tier3 model for Netbox.
- Fix: Increase initial connection timeout for LibreNMS client.
- Fix: Change type from LAGMember to dict for workflow step in trunk modification
- Make celery concurrency level to 1
## [2.12] - 2024-08-22
- Add promote P to PE workflow.
......
......@@ -203,9 +203,9 @@ def allocate_host(
network_view=network_view,
)
created_v6 = ipaddress.IPv6Address(new_host.ipv6addr)
except InfobloxCannotCreateObject:
except InfobloxCannotCreateObject as e:
msg = f"Cannot find 1 available IP address in network {ipv6_range}."
logger.warning(msg)
logger.warning(msg, exc_info=e)
if created_v6 is None:
msg = f"Cannot find 1 available IP address in networks {allocation_networks_v6}."
......@@ -221,9 +221,9 @@ def allocate_host(
new_host.update()
new_host = objects.HostRecord.search(conn, name=hostname)
created_v4 = ipaddress.IPv4Address(new_host.ipv4addr)
except InfobloxCannotUpdateObject:
except InfobloxCannotUpdateObject as e:
msg = f"Cannot find 1 available IP address in network {ipv4_range}."
logger.warning(msg)
logger.warning(msg, exc_info=e)
if created_v4 is None:
msg = f"Cannot find 1 available IP address in networks {allocation_networks_v4}."
......
......@@ -109,7 +109,42 @@ class KentikClient:
return {}
def get_plans(self) -> list[dict[str, Any]]:
"""Get all Kentik plans available."""
"""Get all Kentik plans available.
Returns a list of ``plans`` that each have the following shape:
.. vale off
.. code-block:: json
"plan": {
"active": true,
"bgp_enabled": true,
"cdate" "1970-01-01T01:01:01.000Z",
"company_id": 111111,
"description": "A description of this plan",
"deviceTypes": [
{"device_type": "router"},
{"device_type": "host-nprobe-dns-www"}
],
"devices": [
{
"id": "111111",
"device_name": "rt0.city.tld.internal",
"device_type": "router"
},
],
"edate": "2999-01-01T09:09:09.000Z",
"fast_retention": 10,
"full_retention": 5,
"id": 11111,
"max_bigdata_fps": 100,
"max_devices": 9001,
"max_fps": 200,
"name": "KENTIK-PLAN-01",
"metadata": {},
}
.. vale on
"""
return self._send_request("GET", "v5/plans")["plans"]
def get_plan(self, plan_id: int) -> dict[str, Any]:
......
......@@ -40,7 +40,7 @@ class LibreNMSClient:
) -> Response:
url = self.base_url + endpoint
logger.debug("LibreNMS - Sending request", extra={"method": method, "endpoint": url, "form_data": data})
result = self.session.request(method, url, json=data, timeout=(0.5, 75))
result = self.session.request(method, url, json=data, timeout=(10, 75))
logger.debug("LibreNMS - Received response", extra=result.__dict__)
return result
......
......@@ -60,6 +60,7 @@ def execute_playbook(
For example, an inventory consisting of two hosts, which each a unique host variable assigned to them looks as
follows:
.. vale off
.. code-block:: json
"inventory": {
......@@ -74,6 +75,7 @@ def execute_playbook(
}
}
}
.. vale on
.. warning::
Note the fact that the collection of all hosts is a dictionary, and not a list of strings. Ansible expects each
......
......@@ -155,7 +155,7 @@ def initial_input_form_generator(subscription_id: UUIDstr) -> FormGenerator:
@step("Determine whether we should be running interface checks")
def determine_change_in_capacity(
subscription: Iptrunk, iptrunk_speed: str, side_a_ae_members: list[LAGMember], side_b_ae_members: list[LAGMember]
subscription: Iptrunk, iptrunk_speed: str, side_a_ae_members: list[dict], side_b_ae_members: list[dict]
) -> State:
"""Determine whether we should run pre- and post-checks on the IP trunk.
......@@ -169,13 +169,13 @@ def determine_change_in_capacity(
iptrunk_speed != subscription.iptrunk.iptrunk_speed
or len(side_a_ae_members) != len(subscription.iptrunk.iptrunk_sides[0].iptrunk_side_ae_members)
or any(
old_interface.interface_name != new_interface.interface_name
old_interface.interface_name != new_interface["interface_name"]
for old_interface, new_interface in zip(
subscription.iptrunk.iptrunk_sides[0].iptrunk_side_ae_members, side_a_ae_members, strict=False
)
)
or any(
old_interface.interface_name != new_interface.interface_name
old_interface.interface_name != new_interface["interface_name"]
for old_interface, new_interface in zip(
subscription.iptrunk.iptrunk_sides[1].iptrunk_side_ae_members, side_b_ae_members, strict=False
)
......
......@@ -22,7 +22,11 @@ logger = logging.getLogger()
def _initial_input_form(subscription_id: UUIDstr) -> FormGenerator:
router = Router.from_subscription(subscription_id)
active_kentik_plans = {str(plan["id"]): plan["name"] for plan in KentikClient().get_plans() if plan["active"]}
active_kentik_plans = {
str(plan["id"]): f"{plan["name"]} - ({len(plan["devices"])}/{plan["max_devices"]})"
for plan in KentikClient().get_plans()
if plan["active"]
}
available_kentik_plans = Choice(
"Select a Kentik license",
zip(active_kentik_plans.keys(), active_kentik_plans.items(), strict=True), # type: ignore[arg-type]
......
......@@ -4,7 +4,7 @@ from setuptools import find_packages, setup
setup(
name="geant-service-orchestrator",
version="2.13",
version="2.15",
author="GÉANT Orchestration and Automation Team",
author_email="goat@geant.org",
description="GÉANT Service Orchestrator",
......
......@@ -4,4 +4,4 @@ set -o errexit
set -o nounset
cd /app
python -m celery -A gso.worker worker --loglevel=info
python -m celery -A gso.worker worker --loglevel=info --concurrency=1