From 0a868ce6eef1373749f83a24c4fdff726c007c72 Mon Sep 17 00:00:00 2001 From: michelredondo Date: Wed, 7 May 2025 03:45:03 -0800 Subject: [PATCH] update for EDA v25.4.1 --- cached_specs.json | 60 +- pydantic_eda/__init__.py | 43 +- pydantic_eda/com/__init__.py | 4 +- pydantic_eda/com/nokia/__init__.py | 4 +- pydantic_eda/com/nokia/eda/__init__.py | 4 +- pydantic_eda/com/nokia/eda/aaa/__init__.py | 4 +- pydantic_eda/com/nokia/eda/aaa/v1alpha1.py | 38 +- .../com/nokia/eda/aifabrics/__init__.py | 3 + .../com/nokia/eda/aifabrics/v1alpha1.py | 341 +++++ .../com/nokia/eda/appstore/__init__.py | 4 +- pydantic_eda/com/nokia/eda/appstore/v1.py | 161 ++- .../com/nokia/eda/bootstrap/__init__.py | 4 +- .../com/nokia/eda/bootstrap/v1alpha1.py | 101 +- .../com/nokia/eda/components/__init__.py | 4 +- pydantic_eda/com/nokia/eda/components/v1.py | 1213 ++++++++++++++++ pydantic_eda/com/nokia/eda/config/__init__.py | 4 +- pydantic_eda/com/nokia/eda/config/v1alpha1.py | 38 +- pydantic_eda/com/nokia/eda/core/__init__.py | 4 +- pydantic_eda/com/nokia/eda/core/v1.py | 1259 ++++++++++++----- .../com/nokia/eda/fabrics/__init__.py | 4 +- .../com/nokia/eda/fabrics/v1alpha1.py | 174 ++- .../com/nokia/eda/filters/__init__.py | 4 +- .../com/nokia/eda/filters/v1alpha1.py | 183 ++- .../com/nokia/eda/interfaces/__init__.py | 4 +- .../com/nokia/eda/interfaces/v1alpha1.py | 191 ++- pydantic_eda/com/nokia/eda/oam/__init__.py | 4 +- pydantic_eda/com/nokia/eda/oam/v1alpha1.py | 383 ++++- pydantic_eda/com/nokia/eda/os/__init__.py | 3 + pydantic_eda/com/nokia/eda/os/v1alpha1.py | 122 ++ .../com/nokia/eda/protocols/__init__.py | 4 +- .../com/nokia/eda/protocols/v1alpha1.py | 1034 +++++++++----- pydantic_eda/com/nokia/eda/qos/__init__.py | 4 +- pydantic_eda/com/nokia/eda/qos/v1alpha1.py | 552 ++++++-- .../com/nokia/eda/routing/__init__.py | 4 +- .../com/nokia/eda/routing/v1alpha1.py | 285 +++- .../com/nokia/eda/routingpolicies/__init__.py | 4 +- .../com/nokia/eda/routingpolicies/v1alpha1.py | 183 ++- .../com/nokia/eda/security/__init__.py | 4 +- .../com/nokia/eda/security/v1alpha1.py | 93 +- .../com/nokia/eda/services/__init__.py | 4 +- .../com/nokia/eda/services/v1alpha1.py | 847 ++++++++--- .../com/nokia/eda/siteinfo/__init__.py | 4 +- .../com/nokia/eda/siteinfo/v1alpha1.py | 38 +- pydantic_eda/com/nokia/eda/system/__init__.py | 4 +- pydantic_eda/com/nokia/eda/system/v1alpha1.py | 182 ++- pydantic_eda/com/nokia/eda/timing/__init__.py | 4 +- pydantic_eda/com/nokia/eda/timing/v1alpha1.py | 38 +- .../com/nokia/eda/topologies/__init__.py | 4 +- .../com/nokia/eda/topologies/v1alpha1.py | 493 +++++-- pydantic_eda/core.py | 486 +++++-- 50 files changed, 6954 insertions(+), 1682 deletions(-) create mode 100644 pydantic_eda/com/nokia/eda/aifabrics/__init__.py create mode 100644 pydantic_eda/com/nokia/eda/aifabrics/v1alpha1.py create mode 100644 pydantic_eda/com/nokia/eda/components/v1.py create mode 100644 pydantic_eda/com/nokia/eda/os/__init__.py create mode 100644 pydantic_eda/com/nokia/eda/os/v1alpha1.py diff --git a/cached_specs.json b/cached_specs.json index 0b8b64e..2365b82 100644 --- a/cached_specs.json +++ b/cached_specs.json @@ -1,88 +1,104 @@ { - "v24.12.1": [ + "v25.4.1": [ { "name": "core", - "url": "https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/core/core.json" + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/core/core.json" }, { "name": "aaa", - "url": "https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/aaa.eda.nokia.com/v1alpha1/aaa.json" + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/aaa.eda.nokia.com/v1alpha1/aaa.json" + }, + { + "name": "aifabrics", + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/aifabrics.eda.nokia.com/v1alpha1/aifabrics.json" }, { "name": "appstore", - "url": "https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/appstore.eda.nokia.com/v1/appstore.json" + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/appstore.eda.nokia.com/v1/appstore.json" }, { "name": "bootstrap", - "url": "https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/bootstrap.eda.nokia.com/v1alpha1/bootstrap.json" + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/bootstrap.eda.nokia.com/v1alpha1/bootstrap.json" + }, + { + "name": "certcheck", + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/certcheck.eda.nokia.com/v1alpha1/certcheck.json" }, { "name": "components", - "url": "https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/components.eda.nokia.com/v1alpha1/components.json" + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/components.eda.nokia.com/v1/components.json" }, { "name": "config", - "url": "https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/config.eda.nokia.com/v1alpha1/config.json" + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/config.eda.nokia.com/v1alpha1/config.json" }, { "name": "core", - "url": "https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/core.eda.nokia.com/v1/core.json" + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/core.eda.nokia.com/v1/core.json" + }, + { + "name": "environment", + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/environment.eda.nokia.com/v1alpha1/environment.json" }, { "name": "fabrics", - "url": "https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/fabrics.eda.nokia.com/v1alpha1/fabrics.json" + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/fabrics.eda.nokia.com/v1alpha1/fabrics.json" }, { "name": "filters", - "url": "https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/filters.eda.nokia.com/v1alpha1/filters.json" + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/filters.eda.nokia.com/v1alpha1/filters.json" }, { "name": "interfaces", - "url": "https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/interfaces.eda.nokia.com/v1alpha1/interfaces.json" + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/interfaces.eda.nokia.com/v1alpha1/interfaces.json" }, { "name": "oam", - "url": "https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/oam.eda.nokia.com/v1alpha1/oam.json" + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/oam.eda.nokia.com/v1alpha1/oam.json" + }, + { + "name": "os", + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/os.eda.nokia.com/v1alpha1/os.json" }, { "name": "protocols", - "url": "https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/protocols.eda.nokia.com/v1alpha1/protocols.json" + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/protocols.eda.nokia.com/v1alpha1/protocols.json" }, { "name": "qos", - "url": "https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/qos.eda.nokia.com/v1alpha1/qos.json" + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/qos.eda.nokia.com/v1alpha1/qos.json" }, { "name": "routing", - "url": "https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/routing.eda.nokia.com/v1alpha1/routing.json" + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/routing.eda.nokia.com/v1alpha1/routing.json" }, { "name": "routingpolicies", - "url": "https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/routingpolicies.eda.nokia.com/v1alpha1/routingpolicies.json" + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/routingpolicies.eda.nokia.com/v1alpha1/routingpolicies.json" }, { "name": "security", - "url": "https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/security.eda.nokia.com/v1alpha1/security.json" + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/security.eda.nokia.com/v1alpha1/security.json" }, { "name": "services", - "url": "https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/services.eda.nokia.com/v1alpha1/services.json" + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/services.eda.nokia.com/v1alpha1/services.json" }, { "name": "siteinfo", - "url": "https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/siteinfo.eda.nokia.com/v1alpha1/siteinfo.json" + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/siteinfo.eda.nokia.com/v1alpha1/siteinfo.json" }, { "name": "system", - "url": "https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/system.eda.nokia.com/v1alpha1/system.json" + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/system.eda.nokia.com/v1alpha1/system.json" }, { "name": "timing", - "url": "https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/timing.eda.nokia.com/v1alpha1/timing.json" + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/timing.eda.nokia.com/v1alpha1/timing.json" }, { "name": "topologies", - "url": "https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/topologies.eda.nokia.com/v1alpha1/topologies.json" + "url": "https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/topologies.eda.nokia.com/v1alpha1/topologies.json" } ] } \ No newline at end of file diff --git a/pydantic_eda/__init__.py b/pydantic_eda/__init__.py index 1df2e40..bf9322a 100644 --- a/pydantic_eda/__init__.py +++ b/pydantic_eda/__init__.py @@ -1,13 +1,12 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/topologies.eda.nokia.com/v1alpha1/topologies.json -# timestamp: 2025-01-29T15:18:56+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/topologies.eda.nokia.com/v1alpha1/topologies.json +# timestamp: 2025-05-07T11:44:28+00:00 from __future__ import annotations -from typing import Any, Dict, List, Optional +from typing import Annotated, Any, Dict, List, Optional from pydantic import BaseModel, Field, RootModel -from typing_extensions import Annotated class AppGroupVersion(BaseModel): @@ -15,18 +14,6 @@ class AppGroupVersion(BaseModel): version: Optional[str] = None -class DeletedResourceEntry(BaseModel): - commitTime: Optional[str] = None - hash: Optional[str] = None - name: Optional[str] = None - namespace: Optional[str] = None - transactionId: Optional[int] = None - - -class DeletedResources(RootModel[List[DeletedResourceEntry]]): - root: List[DeletedResourceEntry] - - class ErrorIndex(BaseModel): index: Optional[int] = None @@ -44,7 +31,7 @@ class ErrorResponse(BaseModel): Optional[str], Field(description='The optional details of the error response.') ] = None dictionary: Annotated[ - Optional[Dict[str, Dict[str, Any]]], + Optional[Dict[str, Any]], Field( description='Dictionary/map of associated data/information relevant to the error.\nThe error "message" may contain {{name}} escapes that should be substituted\nwith information from this dictionary.' ), @@ -79,22 +66,22 @@ class ErrorResponse(BaseModel): ] = None -class Metadata(BaseModel): - annotations: Optional[Dict[str, str]] = None - labels: Optional[Dict[str, str]] = None - name: Annotated[ - str, - Field( - max_length=253, - pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', - ), - ] - namespace: Optional[str] = None +class K8SPatchOp(BaseModel): + from_: Annotated[Optional[str], Field(alias='from')] = None + op: str + path: str + value: Optional[Dict[str, Any]] = None + x_permissive: Annotated[Optional[bool], Field(alias='x-permissive')] = None + + +class Patch(RootModel[List[K8SPatchOp]]): + root: List[K8SPatchOp] class Resource(BaseModel): kind: Optional[str] = None name: Optional[str] = None + namespaced: Optional[bool] = None readOnly: Optional[bool] = None singularName: Optional[str] = None uiCategory: Optional[str] = None diff --git a/pydantic_eda/com/__init__.py b/pydantic_eda/com/__init__.py index 9302ce7..f4ab115 100644 --- a/pydantic_eda/com/__init__.py +++ b/pydantic_eda/com/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/topologies.eda.nokia.com/v1alpha1/topologies.json -# timestamp: 2025-01-29T15:18:56+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/topologies.eda.nokia.com/v1alpha1/topologies.json +# timestamp: 2025-05-07T11:44:28+00:00 diff --git a/pydantic_eda/com/nokia/__init__.py b/pydantic_eda/com/nokia/__init__.py index 9302ce7..f4ab115 100644 --- a/pydantic_eda/com/nokia/__init__.py +++ b/pydantic_eda/com/nokia/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/topologies.eda.nokia.com/v1alpha1/topologies.json -# timestamp: 2025-01-29T15:18:56+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/topologies.eda.nokia.com/v1alpha1/topologies.json +# timestamp: 2025-05-07T11:44:28+00:00 diff --git a/pydantic_eda/com/nokia/eda/__init__.py b/pydantic_eda/com/nokia/eda/__init__.py index 9302ce7..f4ab115 100644 --- a/pydantic_eda/com/nokia/eda/__init__.py +++ b/pydantic_eda/com/nokia/eda/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/topologies.eda.nokia.com/v1alpha1/topologies.json -# timestamp: 2025-01-29T15:18:56+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/topologies.eda.nokia.com/v1alpha1/topologies.json +# timestamp: 2025-05-07T11:44:28+00:00 diff --git a/pydantic_eda/com/nokia/eda/aaa/__init__.py b/pydantic_eda/com/nokia/eda/aaa/__init__.py index 10d8370..326a232 100644 --- a/pydantic_eda/com/nokia/eda/aaa/__init__.py +++ b/pydantic_eda/com/nokia/eda/aaa/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/aaa.eda.nokia.com/v1alpha1/aaa.json -# timestamp: 2025-01-29T15:18:32+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/aaa.eda.nokia.com/v1alpha1/aaa.json +# timestamp: 2025-05-07T11:43:10+00:00 diff --git a/pydantic_eda/com/nokia/eda/aaa/v1alpha1.py b/pydantic_eda/com/nokia/eda/aaa/v1alpha1.py index 70c8e0f..2d845bf 100644 --- a/pydantic_eda/com/nokia/eda/aaa/v1alpha1.py +++ b/pydantic_eda/com/nokia/eda/aaa/v1alpha1.py @@ -1,15 +1,12 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/aaa.eda.nokia.com/v1alpha1/aaa.json -# timestamp: 2025-01-29T15:18:32+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/aaa.eda.nokia.com/v1alpha1/aaa.json +# timestamp: 2025-05-07T11:43:10+00:00 from __future__ import annotations -from typing import List, Literal, Optional +from typing import Annotated, Dict, List, Literal, Optional -from pydantic import BaseModel, Field -from typing_extensions import Annotated - -from ..... import Metadata +from pydantic import BaseModel, Field, RootModel class Rule(BaseModel): @@ -90,10 +87,35 @@ class Status(BaseModel): ] = None +class NodeGroupDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class NodeGroupDeletedResources(RootModel[List[NodeGroupDeletedResourceEntry]]): + root: List[NodeGroupDeletedResourceEntry] + + +class NodeGroupMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + class NodeGroup(BaseModel): apiVersion: str kind: str - metadata: Metadata + metadata: NodeGroupMetadata spec: Annotated[ Spec, Field( diff --git a/pydantic_eda/com/nokia/eda/aifabrics/__init__.py b/pydantic_eda/com/nokia/eda/aifabrics/__init__.py new file mode 100644 index 0000000..91fde3e --- /dev/null +++ b/pydantic_eda/com/nokia/eda/aifabrics/__init__.py @@ -0,0 +1,3 @@ +# generated by datamodel-codegen: +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/aifabrics.eda.nokia.com/v1alpha1/aifabrics.json +# timestamp: 2025-05-07T11:43:13+00:00 diff --git a/pydantic_eda/com/nokia/eda/aifabrics/v1alpha1.py b/pydantic_eda/com/nokia/eda/aifabrics/v1alpha1.py new file mode 100644 index 0000000..b4920bb --- /dev/null +++ b/pydantic_eda/com/nokia/eda/aifabrics/v1alpha1.py @@ -0,0 +1,341 @@ +# generated by datamodel-codegen: +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/aifabrics.eda.nokia.com/v1alpha1/aifabrics.json +# timestamp: 2025-05-07T11:43:13+00:00 + +from __future__ import annotations + +from datetime import date +from typing import Annotated, Dict, List, Optional + +from pydantic import BaseModel, Field, RootModel + + +class GpuIsolationGroup(BaseModel): + interfaceSelector: Annotated[List[str], Field(title='Interface Selector')] + name: Annotated[ + str, Field(description='Name of the IsolationGroup.', title='Isolation Group') + ] + + +class Rocev2QoS(BaseModel): + ecnMaxDropProbabilityPercent: Annotated[ + int, + Field( + description='If the queue depth is between min and max threshold then this the probability with which packets are dropped or marked.', + title='ECN Max Drop Probability Percent', + ), + ] + ecnSlopeMaxThresholdPercent: Annotated[ + int, + Field( + description='The maximum threshold parameter for a RED-managed queue in percent. When the average queue length exceeds the max value, all packets are dropped (or marked if ECN is enabled). Mutually exclusive with min-threshold and max-threshold.', + title='ECN Max Threshold Percent', + ), + ] + ecnSlopeMinThresholdPercent: Annotated[ + int, + Field( + description='The mininum threshold parameter for a RED-managed queue in percent. When the average queue length is less than min, all packets are admitted to the queue. Mutually exclusive with min-threshold and max-threshold.', + title='ECN Min Threshold Percent', + ), + ] + pfcDeadlockDetectionTimer: Annotated[ + int, + Field( + description='Number of milliseconds during which outgoing interface is receiving pfc-pause-frames before triggering recovery-timer.', + title='PFC Deadlock Detection Timer', + ), + ] + pfcDeadlockRecoveryTimer: Annotated[ + int, + Field( + description='Number of milliseconds during which the pfc-pause-frames will be ignored.', + title='PFC Deadlock Recovery Timer', + ), + ] + queueMaximumBurstSize: Annotated[ + int, + Field( + description='Maximum amount of shared buffer memory available to the queue in bytes.', + ge=0, + le=4294967295, + title='Maximum Burst Size', + ), + ] + + +class StripeConnector(BaseModel): + asnPool: Annotated[ + Optional[str], + Field( + description='Reference to an IndexAllocationPool pool to use for Autonomous System Number allocations.', + title='Autonomous System Pool', + ), + ] = None + linkSelector: Annotated[ + List[str], + Field( + description='Selects TopoLinks to include in this AI Fabric, the selected TopoLinks will be used to create ISLs between the stripe connector devices and the leaf devices.', + title='Link Selector', + ), + ] + name: Annotated[ + str, + Field( + description='The name of the Stripe Connector.', + title='Stripe Connector Name', + ), + ] + nodeSelector: Annotated[ + List[str], + Field( + description='Node selector to select the nodes to be used for this stripe connector.', + title='Node Selector', + ), + ] + systemPoolIPV4: Annotated[ + Optional[str], + Field( + description='Reference to an IPAllocationPool used to dynamically allocate an IPv4 address to system/lo0 interfaces for the stripe connector devices. If not specified, the system will use the default IPAllocationPool.', + title='IPv4 Pool - System IP', + ), + ] = None + + +class Stripe(BaseModel): + asnPool: Annotated[ + Optional[str], + Field( + description='Optional reference to an IndexAllocationPool pool to use for Autonomous System Number allocations. If left blank, ASN allocation will be done from the ASNAllocationRange.', + title='Autonomous System Pool', + ), + ] = None + gpuVlan: Annotated[ + int, + Field( + description='The VLAN used on interfaces facing the GPU servers.', + title='GPU VLAN', + ), + ] + name: Annotated[ + str, Field(description='The name of the Stripe.', title='Stripe Name') + ] + nodeSelector: Annotated[ + List[str], + Field( + description='Node selector to select the nodes to be used for this stripe.', + title='Node Selector', + ), + ] + stripeID: Annotated[ + int, Field(description='Unique ID for a stripe', title='Stripe ID') + ] + systemPoolIPV4: Annotated[ + Optional[str], + Field( + description='Optional reference to an IPAllocationPool used to dynamically allocate an IPv4 address to system/lo0 interfaces. If left blank, system IP allocation will be done from the SystemIPV4Subnet.', + title='IPv4 Pool - System IP', + ), + ] = None + + +class Spec(BaseModel): + asnPool: Annotated[ + Optional[str], + Field( + description='Reference to an IndexAllocationPool pool to use for Autonomous System Number allocations. Used when eBGP is configured as an underlay protocol.', + title='Autonomous System Pool', + ), + ] = None + gpuIsolationGroups: Annotated[ + List[GpuIsolationGroup], + Field( + description='GPU Isolation Groups are used to isolate GPU traffic over the network, GPUs in different GPU isolation groups will not be able to communicate with each other. If all GPUs across all stripes need to be able to communicate with each other, create a single GPUIsolationGroup selecting all GPU facing interfaces.', + title='GPU Isolation Groups', + ), + ] + rocev2QoS: Annotated[ + Rocev2QoS, + Field( + description='Set of properties to configure the RoCEv2 QoS.', + title='RoCEv2 QoS', + ), + ] + stripeConnector: Annotated[ + Optional[StripeConnector], + Field( + description='StripeConnector is the spine layer interconnecting multiple stripes.', + title='Stripe Connector', + ), + ] = None + stripes: Annotated[ + List[Stripe], + Field( + description='A list of stripes, stripes contain a set of nodes (rails).', + title='Stripes', + ), + ] + systemPoolIPV4: Annotated[ + Optional[str], + Field( + description='Reference to an IPAllocationPool used to dynamically allocate an IPv4 address to system/lo0 interfaces. If specified under the Leaf/Spine/Superspine/Borderleaf those will take precedence.', + title='IPv4 Pool - System IP', + ), + ] = None + + +class StripeConnectorNode(BaseModel): + node: Annotated[ + Optional[str], Field(description='Name of the TopoNode.', title='Node') + ] = None + operatingSystem: Annotated[ + Optional[str], + Field( + description='Operating system running on the node.', + title='Operating System', + ), + ] = None + operatingSystemVersion: Annotated[ + Optional[str], + Field( + description='Operating system version running on the node.', + title='Operating System Version', + ), + ] = None + + +class StripeConnectorModel(BaseModel): + name: Annotated[ + Optional[str], + Field( + description='The name of the Stripe Connector.', + title='Stripe Connector Name', + ), + ] = None + stripeConnectorNodes: Annotated[ + Optional[List[StripeConnectorNode]], + Field( + description='List of stripe connector nodes in the Stripe.', + title='Leaf Nodes', + ), + ] = None + + +class LeafNode(BaseModel): + node: Annotated[ + Optional[str], Field(description='Name of the TopoNode.', title='Node') + ] = None + operatingSystem: Annotated[ + Optional[str], + Field( + description='Operating system running on the node.', + title='Operating System', + ), + ] = None + operatingSystemVersion: Annotated[ + Optional[str], + Field( + description='Operating system version running on the node.', + title='Operating System Version', + ), + ] = None + + +class StripeModel(BaseModel): + leafNodes: Annotated[ + Optional[List[LeafNode]], + Field(description='List of leaf nodes in the Stripe.', title='Leaf Nodes'), + ] = None + name: Annotated[ + Optional[str], Field(description='The name of the Stripe.', title='Stripe Name') + ] = None + + +class Status(BaseModel): + health: Annotated[ + Optional[int], + Field( + description='Indicates the health score of the Fabric. The health score of the Fabric is determined by the aggregate health score of the resources emited by the Fabric such as ISL, DefaultRouteReflectors etc.', + title='Health', + ), + ] = None + healthScoreReason: Annotated[ + Optional[str], + Field( + description='Indicates the reason for the health score.', + title='Health Score Reason', + ), + ] = None + lastChange: Annotated[ + Optional[date], + Field( + description='The time when the state of the resource last changed.', + title='Last Change', + ), + ] = None + operationalState: Annotated[ + Optional[str], + Field( + description='Operational state of the Fabric. The operational state of the fabric is determined by monitoring the operational state of the following resources (if applicable): DefaultRouters, ISLs.', + title='Operational State', + ), + ] = None + stripeConnector: Annotated[ + Optional[StripeConnectorModel], + Field(description='Stripe connector in the Backend.', title='Stripe Connector'), + ] = None + stripes: Annotated[ + Optional[List[StripeModel]], + Field(description='List of stripes in the Backend.', title='Stripes'), + ] = None + + +class BackendDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class BackendDeletedResources(RootModel[List[BackendDeletedResourceEntry]]): + root: List[BackendDeletedResourceEntry] + + +class BackendMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class Backend(BaseModel): + apiVersion: str + kind: str + metadata: BackendMetadata + spec: Annotated[ + Spec, + Field( + description='BackendSpec defines the desired state of Backend', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status], + Field( + description='BackendStatus defines the observed state of Backend', + title='Status', + ), + ] = None + + +class BackendList(BaseModel): + apiVersion: str + items: Optional[List[Backend]] = None + kind: str diff --git a/pydantic_eda/com/nokia/eda/appstore/__init__.py b/pydantic_eda/com/nokia/eda/appstore/__init__.py index 6c7270d..79ff041 100644 --- a/pydantic_eda/com/nokia/eda/appstore/__init__.py +++ b/pydantic_eda/com/nokia/eda/appstore/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/appstore.eda.nokia.com/v1/appstore.json -# timestamp: 2025-01-29T15:18:33+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/appstore.eda.nokia.com/v1/appstore.json +# timestamp: 2025-05-07T11:43:16+00:00 diff --git a/pydantic_eda/com/nokia/eda/appstore/v1.py b/pydantic_eda/com/nokia/eda/appstore/v1.py index 1b980fc..0d3a971 100644 --- a/pydantic_eda/com/nokia/eda/appstore/v1.py +++ b/pydantic_eda/com/nokia/eda/appstore/v1.py @@ -1,52 +1,63 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/appstore.eda.nokia.com/v1/appstore.json -# timestamp: 2025-01-29T15:18:33+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/appstore.eda.nokia.com/v1/appstore.json +# timestamp: 2025-05-07T11:43:16+00:00 from __future__ import annotations -from typing import List, Literal, Optional +from datetime import datetime +from typing import Annotated, Dict, List, Literal, Optional -from pydantic import BaseModel, Field -from typing_extensions import Annotated - -from ..... import Metadata +from pydantic import BaseModel, Field, RootModel class Spec(BaseModel): authSecretRef: Annotated[ Optional[str], Field( - description='AuthSecretRef defines how to authenticate with the remote catalog', + description='AuthSecretRef is the authentication secret reference, used for authentication.\nMust be in the same namespace as the catalog.', title='Authentication Secret Reference', ), ] = None description: Annotated[ Optional[str], Field( - description='Description (small) about this catalog need to check max length', + description='Description is an optional short description of the catalog.', max_length=70, title='Description', ), ] = None + refreshInterval: Annotated[ + Optional[int], + Field( + description='RefreshInterval tells the controller how often it should check the remote catalog for new updates, in seconds.\nDefault is 180 seconds. Minimum is 30 seconds for production environments; 10 seconds for test environments.', + title='Refresh Interval', + ), + ] = 180 remoteType: Annotated[ Optional[Literal['git']], Field( - description='RemoteType type of the remote at the moment we only support git', + description="RemoteType type of the catalog, only 'git' is supported at the moment.", title='Remote Type', ), ] = 'git' remoteURL: Annotated[ Optional[str], Field( - description='RemoteURL is the url where we can find the catalog (ex git repo URL)', + description="RemoteURL is the HTTP(S) remote URL of the catalog. Supported URI schemes: 'https://' and 'http://'.\nDefault is HTTPS if no scheme is given.", title='Remote URL', ), ] = None - skipTLSVerify: Annotated[Optional[bool], Field(title='Skip TLS Verify')] = False + skipTLSVerify: Annotated[ + Optional[bool], + Field( + description="SkipTLSVerify skips the validity check for the server's certificate. This will make HTTPS connections insecure.", + title='Skip TLS Verify', + ), + ] = False title: Annotated[ Optional[str], Field( - description='Title is the UI visible name of this catalog', + description='Title is an UI-friendly name for the catalog.', max_length=50, title='Title', ), @@ -57,61 +68,68 @@ class Status(BaseModel): error: Annotated[ Optional[str], Field( - description='conditions []\nError last encountered for this catalog.', + description='Error denotes the last error that was encountered by the controller.', title='Error', ), ] = None + lastRefreshTime: Annotated[ + Optional[datetime], + Field( + description='LastRefreshTime is the last attempt to refresh the catalog cache by the controller.', + title='Last Refresh Time', + ), + ] = None operational: Annotated[ Optional[bool], Field( - description='Indicates if the catalog remote is operational.', + description='Operational reports whether the catalog remote is operational.', title='Operational', ), ] = False -class Catalog(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - Spec, +class CatalogDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + transactionId: Optional[int] = None + + +class CatalogDeletedResources(RootModel[List[CatalogDeletedResourceEntry]]): + root: List[CatalogDeletedResourceEntry] + + +class CatalogMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='CatalogSpec defines the desired state of Catalog', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Status], - Field( - description='CatalogStatus defines the observed state of Catalog', - title='Status', - ), - ] = None - - -class CatalogList(BaseModel): - apiVersion: str - items: Optional[List[Catalog]] = None - kind: str class SpecModel(BaseModel): authSecretRef: Annotated[ Optional[str], Field( - description='AuthSecretRef defines how to authenticate with the remote registry', + description='AuthSecretRef is the authentication secret reference, used for authentication.\nMust be in the same namespace as the catalog.', title='Authentication Secret Reference', ), ] = None mirror: Annotated[ Optional[str], - Field(description='Mirror is the mirror URL for the registry', title='Mirror'), + Field( + description='Mirror registry of the original remote registry.\nApp store will use the mirror instead of the original registry that is referenced by a catalog.', + title='Mirror', + ), ] = None remoteURL: Annotated[ str, Field( - description='RemoteURL is the url where we can find the registry', + description="RemoteURL is the remote URL of the registry. Supported URI schemes: 'https://' and 'http://'.\n\tDefault is HTTPS if no scheme is given.", title='Remote URL', ), ] @@ -124,7 +142,7 @@ class SpecModel(BaseModel): title: Annotated[ Optional[str], Field( - description='Title is the UI visible name of this registry', + description='Title is an UI-friendly name for the catalog.', max_length=50, title='Title', ), @@ -134,22 +152,77 @@ class SpecModel(BaseModel): class Status1Model(BaseModel): error: Annotated[ str, - Field(description='Error last encountered for this registry.', title='Error'), + Field( + description='Error denotes the last error that was encountered by the controller.', + title='Error', + ), ] reachable: Annotated[ Optional[bool], - Field(description='Indicates if the registry is reachable.', title='Reachable'), + Field( + description='Reachable indicates if the registry is reachable.', + title='Reachable', + ), ] = False +class RegistryDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + transactionId: Optional[int] = None + + +class RegistryDeletedResources(RootModel[List[RegistryDeletedResourceEntry]]): + root: List[RegistryDeletedResourceEntry] + + +class RegistryMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + + +class Catalog(BaseModel): + apiVersion: str + kind: str + metadata: CatalogMetadata + spec: Annotated[ + Spec, + Field( + description='CatalogSpec defines the desired state of a Catalog.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status], + Field( + description='CatalogStatus defines the observed state of a Catalog.', + title='Status', + ), + ] = None + + +class CatalogList(BaseModel): + apiVersion: str + items: Optional[List[Catalog]] = None + kind: str + + class Registry(BaseModel): apiVersion: str kind: str - metadata: Metadata + metadata: RegistryMetadata spec: Annotated[ SpecModel, Field( - description='RegistrySpec defines the desired state of Registry', + description='RegistrySpec defines the desired state of a Registry', title='Specification', ), ] diff --git a/pydantic_eda/com/nokia/eda/bootstrap/__init__.py b/pydantic_eda/com/nokia/eda/bootstrap/__init__.py index f064075..ef36cb5 100644 --- a/pydantic_eda/com/nokia/eda/bootstrap/__init__.py +++ b/pydantic_eda/com/nokia/eda/bootstrap/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/bootstrap.eda.nokia.com/v1alpha1/bootstrap.json -# timestamp: 2025-01-29T15:18:34+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/bootstrap.eda.nokia.com/v1alpha1/bootstrap.json +# timestamp: 2025-05-07T11:43:19+00:00 diff --git a/pydantic_eda/com/nokia/eda/bootstrap/v1alpha1.py b/pydantic_eda/com/nokia/eda/bootstrap/v1alpha1.py index 6529b02..a0a5166 100644 --- a/pydantic_eda/com/nokia/eda/bootstrap/v1alpha1.py +++ b/pydantic_eda/com/nokia/eda/bootstrap/v1alpha1.py @@ -1,15 +1,12 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/bootstrap.eda.nokia.com/v1alpha1/bootstrap.json -# timestamp: 2025-01-29T15:18:34+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/bootstrap.eda.nokia.com/v1alpha1/bootstrap.json +# timestamp: 2025-05-07T11:43:19+00:00 from __future__ import annotations -from typing import Any, Dict, List, Optional +from typing import Annotated, Any, Dict, List, Optional -from pydantic import BaseModel, Field -from typing_extensions import Annotated - -from ..... import Metadata +from pydantic import BaseModel, Field, RootModel class StaticRoute(BaseModel): @@ -67,10 +64,79 @@ class Spec(BaseModel): ] = None +class InitDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class InitDeletedResources(RootModel[List[InitDeletedResourceEntry]]): + root: List[InitDeletedResourceEntry] + + +class InitMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class SpecModel(BaseModel): + nodeSelector: Annotated[ + Optional[List[str]], + Field( + description='Selects TopoNodes on which to configure the management VRF. When left empty, all TopoNodes are selected.', + title='Node Selector', + ), + ] = None + nodes: Annotated[ + Optional[List[str]], + Field( + description='List of TopoNodes on which to configure the management VRF. When left empty, all TopoNodes are selected.', + title='Nodes', + ), + ] = None + + +class ManagementRouterDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class ManagementRouterDeletedResources( + RootModel[List[ManagementRouterDeletedResourceEntry]] +): + root: List[ManagementRouterDeletedResourceEntry] + + +class ManagementRouterMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + class Init(BaseModel): apiVersion: str kind: str - metadata: Metadata + metadata: InitMetadata spec: Annotated[ Spec, Field( @@ -92,27 +158,10 @@ class InitList(BaseModel): kind: str -class SpecModel(BaseModel): - nodeSelector: Annotated[ - Optional[List[str]], - Field( - description='Selects TopoNodes on which to configure the management VRF. When left empty, all TopoNodes are selected.', - title='Node Selector', - ), - ] = None - nodes: Annotated[ - Optional[List[str]], - Field( - description='List of TopoNodes on which to configure the management VRF. When left empty, all TopoNodes are selected.', - title='Nodes', - ), - ] = None - - class ManagementRouter(BaseModel): apiVersion: str kind: str - metadata: Metadata + metadata: ManagementRouterMetadata spec: Annotated[ SpecModel, Field( diff --git a/pydantic_eda/com/nokia/eda/components/__init__.py b/pydantic_eda/com/nokia/eda/components/__init__.py index 2de1d84..23d8f34 100644 --- a/pydantic_eda/com/nokia/eda/components/__init__.py +++ b/pydantic_eda/com/nokia/eda/components/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/components.eda.nokia.com/v1alpha1/components.json -# timestamp: 2025-01-29T15:18:35+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/components.eda.nokia.com/v1/components.json +# timestamp: 2025-05-07T11:43:26+00:00 diff --git a/pydantic_eda/com/nokia/eda/components/v1.py b/pydantic_eda/com/nokia/eda/components/v1.py new file mode 100644 index 0000000..d76bd2a --- /dev/null +++ b/pydantic_eda/com/nokia/eda/components/v1.py @@ -0,0 +1,1213 @@ +# generated by datamodel-codegen: +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/components.eda.nokia.com/v1/components.json +# timestamp: 2025-05-07T11:43:26+00:00 + +from __future__ import annotations + +from datetime import date +from typing import Annotated, Any, Dict, List, Literal, Optional + +from pydantic import BaseModel, Field, RootModel + + +class Child(BaseModel): + name: Annotated[ + Optional[str], Field(description='Reference to a child component', title='Name') + ] = None + type: Annotated[ + Optional[ + Literal[ + 'Fan', + 'FanTray', + 'PowerSupply', + 'PowerModule', + 'PowerShelf', + 'InterfaceModule', + 'ControlModule', + 'FabricModule', + 'Chassis', + 'Transceiver', + ] + ], + Field(description='Type of the child component', title='Type'), + ] = None + + +class Status(BaseModel): + chassisMacAddress: Annotated[ + Optional[str], + Field(description='MAC Address of the Chassis', title='Chassis MAC Address'), + ] = None + children: Annotated[ + Optional[List[Child]], + Field(description='References to children components', title='Children'), + ] = None + commonLanguageEquipmentIdentifier: Annotated[ + Optional[str], + Field(description='The CLEI code of this component', title='CLEI Code'), + ] = None + lastBooted: Annotated[ + Optional[date], + Field( + description='The date and time this component last booted', + title='Last Booted', + ), + ] = None + lastChange: Annotated[ + Optional[date], + Field( + description='The date and time this component last changed operational state', + title='Last Change', + ), + ] = None + manufacturedDate: Annotated[ + Optional[date], + Field( + description='The date this component was manufactured', + title='Manufactured Date', + ), + ] = None + operationalState: Annotated[ + Optional[Literal['Up', 'Down', 'Rebooting', 'Unknown', 'Starting', 'Empty']], + Field( + description='Indicates the current operational state of this component.', + title='Operational State', + ), + ] = None + partNumber: Annotated[ + Optional[str], + Field( + description='The discovered part number of this component', + title='Part Number', + ), + ] = None + removable: Annotated[ + Optional[bool], + Field( + description='Indicates if this component is removable', title='Removable' + ), + ] = None + serialNumber: Annotated[ + Optional[str], + Field( + description='The discovered serial number of this component', + title='Serial Number', + ), + ] = None + target: Annotated[ + Optional[str], + Field(description='Target this component resides on.', title='Target'), + ] = None + type: Annotated[ + Optional[str], + Field(description='Component type, as provided by the target', title='Type'), + ] = None + + +class ChassisMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class Spec(BaseModel): + node: Annotated[ + str, + Field( + description='TopologyNode this Component resides on.\nIndicates the operation in which to apply the configuration', + title='Node', + ), + ] + slot: Annotated[ + Optional[str], + Field( + description='Slot this Component resides in, unset for Components that do not have a slot or ID.', + title='Slot', + ), + ] = None + type: Annotated[ + Literal[ + 'Fan', + 'FanTray', + 'PowerSupply', + 'PowerModule', + 'PowerShelf', + 'InterfaceModule', + 'ControlModule', + 'FabricModule', + 'Chassis', + 'Transceiver', + ], + Field(description='Type of Component.', title='Type'), + ] + + +class Status1Model(BaseModel): + enabled: Annotated[ + Optional[bool], + Field( + description='The administrative status of this Component.', title='Enabled' + ), + ] = None + lastChange: Annotated[ + Optional[date], + Field( + description='The date and time this Component last changed operational state', + title='Last Change', + ), + ] = None + manufacturedDate: Annotated[ + Optional[date], + Field( + description='The date this Component was manufactured', + title='Manufactured Date', + ), + ] = None + operationalState: Annotated[ + Optional[Literal['Up', 'Down', 'Rebooting', 'Unknown', 'Starting', 'Empty']], + Field( + description='Indicates the current operational state of this Component.', + title='Operational State', + ), + ] = None + partNumber: Annotated[ + Optional[str], + Field( + description='The discovered part number of this Component', + title='Part Number', + ), + ] = None + serialNumber: Annotated[ + Optional[str], + Field( + description='The discovered serial number of this Component', + title='Serial Number', + ), + ] = None + type: Annotated[ + Optional[str], + Field(description='Component type, as provided by the node.', title='Type'), + ] = None + + +class ComponentMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class Temperature(BaseModel): + alarmState: Annotated[ + Optional[bool], + Field( + description='The temperature alarm state, as reported by the component', + title='Alarm State', + ), + ] = None + instant: Annotated[ + Optional[int], + Field(description='The current temperature of this component', title='Instant'), + ] = None + margin: Annotated[ + Optional[int], + Field(description='The margin temperature of this component', title='Margin'), + ] = None + maximum: Annotated[ + Optional[int], + Field(description='The maximum temperature of this component', title='Maximum'), + ] = None + threshold: Annotated[ + Optional[int], + Field( + description='The threshold temperature of this component', title='Threshold' + ), + ] = None + + +class Status1Model1(BaseModel): + commonLanguageEquipmentIdentifier: Annotated[ + Optional[str], + Field(description='The CLEI code of this component', title='CLEI Code'), + ] = None + lastBooted: Annotated[ + Optional[date], + Field( + description='The date and time this component last booted', + title='Last Booted', + ), + ] = None + lastChange: Annotated[ + Optional[date], + Field( + description='The date and time this component last changed operational state', + title='Last Change', + ), + ] = None + locatorEnabled: Annotated[ + Optional[bool], + Field( + description='Indicates if the locator LED for the component is active', + title='Locator Enabled', + ), + ] = None + manufacturedDate: Annotated[ + Optional[date], + Field( + description='The date this component was manufactured', + title='Manufactured Date', + ), + ] = None + operationalState: Annotated[ + Optional[Literal['Up', 'Down', 'Rebooting', 'Unknown', 'Starting', 'Empty']], + Field( + description='Indicates the current operational state of this component.', + title='Operational State', + ), + ] = None + parent: Annotated[ + Optional[str], + Field(description='Reference to a parent component', title='Parent'), + ] = None + parentType: Annotated[ + Optional[ + Literal[ + 'Fan', + 'FanTray', + 'PowerSupply', + 'PowerModule', + 'PowerShelf', + 'InterfaceModule', + 'ControlModule', + 'FabricModule', + 'Chassis', + 'Transceiver', + ] + ], + Field(description='Type of the parent component', title='Parent Type'), + ] = None + partNumber: Annotated[ + Optional[str], + Field( + description='The discovered part number of this component', + title='Part Number', + ), + ] = None + removable: Annotated[ + Optional[bool], + Field( + description='Indicates if this component is removable', title='Removable' + ), + ] = None + role: Annotated[ + Optional[Literal['Active', 'Standby']], + Field(description='Role of the control module', title='Role'), + ] = None + serialNumber: Annotated[ + Optional[str], + Field( + description='The discovered serial number of this component', + title='Serial Number', + ), + ] = None + slot: Annotated[ + Optional[str], + Field( + description='Slot this component resides in, unset for components that do not have a slot or ID', + title='Slot', + ), + ] = None + softwareVersion: Annotated[ + Optional[str], + Field( + description='Version string of the software running on this component', + title='Software Version', + ), + ] = None + target: Annotated[ + Optional[str], + Field(description='Target this component resides on.', title='Target'), + ] = None + temperature: Annotated[ + Optional[Temperature], + Field( + description='Temperature information for this component', + title='Temperature', + ), + ] = None + type: Annotated[ + Optional[str], + Field(description='Component type, as provided by the target', title='Type'), + ] = None + + +class ControlModuleMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class Status1Model2(BaseModel): + commonLanguageEquipmentIdentifier: Annotated[ + Optional[str], + Field(description='The CLEI code of this component', title='CLEI Code'), + ] = None + lastBooted: Annotated[ + Optional[date], + Field( + description='The date and time this component last booted', + title='Last Booted', + ), + ] = None + lastChange: Annotated[ + Optional[date], + Field( + description='The date and time this component last changed operational state', + title='Last Change', + ), + ] = None + locatorEnabled: Annotated[ + Optional[bool], + Field( + description='Indicates if the locator LED for the component is active', + title='Locator Enabled', + ), + ] = None + manufacturedDate: Annotated[ + Optional[date], + Field( + description='The date this component was manufactured', + title='Manufactured Date', + ), + ] = None + operationalState: Annotated[ + Optional[Literal['Up', 'Down', 'Rebooting', 'Unknown', 'Starting', 'Empty']], + Field( + description='Indicates the current operational state of this component.', + title='Operational State', + ), + ] = None + parent: Annotated[ + Optional[str], + Field(description='Reference to a parent component', title='Parent'), + ] = None + parentType: Annotated[ + Optional[ + Literal[ + 'Fan', + 'FanTray', + 'PowerSupply', + 'PowerModule', + 'PowerShelf', + 'InterfaceModule', + 'ControlModule', + 'FabricModule', + 'Chassis', + 'Transceiver', + ] + ], + Field(description='Type of the parent component', title='Parent Type'), + ] = None + partNumber: Annotated[ + Optional[str], + Field( + description='The discovered part number of this component', + title='Part Number', + ), + ] = None + removable: Annotated[ + Optional[bool], + Field( + description='Indicates if this component is removable', title='Removable' + ), + ] = None + serialNumber: Annotated[ + Optional[str], + Field( + description='The discovered serial number of this component', + title='Serial Number', + ), + ] = None + slot: Annotated[ + Optional[str], + Field( + description='Slot this component resides in, unset for components that do not have a slot or ID', + title='Slot', + ), + ] = None + softwareVersion: Annotated[ + Optional[str], + Field( + description='Version string of the software running on this component', + title='Software Version', + ), + ] = None + target: Annotated[ + Optional[str], + Field(description='Target this component resides on.', title='Target'), + ] = None + temperature: Annotated[ + Optional[Temperature], + Field( + description='Temperature information for this component', + title='Temperature', + ), + ] = None + type: Annotated[ + Optional[str], + Field(description='Component type, as provided by the target', title='Type'), + ] = None + + +class FabricModuleMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class Status1Model3(BaseModel): + commonLanguageEquipmentIdentifier: Annotated[ + Optional[str], + Field(description='The CLEI code of this component', title='CLEI Code'), + ] = None + lastBooted: Annotated[ + Optional[date], + Field( + description='The date and time this component last booted', + title='Last Booted', + ), + ] = None + lastChange: Annotated[ + Optional[date], + Field( + description='The date and time this component last changed operational state', + title='Last Change', + ), + ] = None + locatorEnabled: Annotated[ + Optional[bool], + Field( + description='Indicates if the locator LED for the component is active', + title='Locator Enabled', + ), + ] = None + manufacturedDate: Annotated[ + Optional[date], + Field( + description='The date this component was manufactured', + title='Manufactured Date', + ), + ] = None + operationalState: Annotated[ + Optional[Literal['Up', 'Down', 'Rebooting', 'Unknown', 'Starting', 'Empty']], + Field( + description='Indicates the current operational state of this component.', + title='Operational State', + ), + ] = None + parent: Annotated[ + Optional[str], + Field(description='Reference to a parent component', title='Parent'), + ] = None + parentType: Annotated[ + Optional[ + Literal[ + 'Fan', + 'FanTray', + 'PowerSupply', + 'PowerModule', + 'PowerShelf', + 'InterfaceModule', + 'ControlModule', + 'FabricModule', + 'Chassis', + 'Transceiver', + ] + ], + Field(description='Type of the parent component', title='Parent Type'), + ] = None + partNumber: Annotated[ + Optional[str], + Field( + description='The discovered part number of this component', + title='Part Number', + ), + ] = None + removable: Annotated[ + Optional[bool], + Field( + description='Indicates if this component is removable', title='Removable' + ), + ] = None + serialNumber: Annotated[ + Optional[str], + Field( + description='The discovered serial number of this component', + title='Serial Number', + ), + ] = None + slot: Annotated[ + Optional[str], + Field( + description='Slot this component resides in, unset for components that do not have a slot or ID', + title='Slot', + ), + ] = None + target: Annotated[ + Optional[str], + Field(description='Target this component resides on.', title='Target'), + ] = None + type: Annotated[ + Optional[str], + Field(description='Component type, as provided by the target', title='Type'), + ] = None + + +class FanMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class Status1Model4(BaseModel): + commonLanguageEquipmentIdentifier: Annotated[ + Optional[str], + Field(description='The CLEI code of this component', title='CLEI Code'), + ] = None + lastBooted: Annotated[ + Optional[date], + Field( + description='The date and time this component last booted', + title='Last Booted', + ), + ] = None + lastChange: Annotated[ + Optional[date], + Field( + description='The date and time this component last changed operational state', + title='Last Change', + ), + ] = None + locatorEnabled: Annotated[ + Optional[bool], + Field( + description='Indicates if the locator LED for the component is active', + title='Locator Enabled', + ), + ] = None + manufacturedDate: Annotated[ + Optional[date], + Field( + description='The date this component was manufactured', + title='Manufactured Date', + ), + ] = None + operationalState: Annotated[ + Optional[Literal['Up', 'Down', 'Rebooting', 'Unknown', 'Starting', 'Empty']], + Field( + description='Indicates the current operational state of this component.', + title='Operational State', + ), + ] = None + parent: Annotated[ + Optional[str], + Field(description='Reference to a parent component', title='Parent'), + ] = None + parentType: Annotated[ + Optional[ + Literal[ + 'Fan', + 'FanTray', + 'PowerSupply', + 'PowerModule', + 'PowerShelf', + 'InterfaceModule', + 'ControlModule', + 'FabricModule', + 'Chassis', + 'Transceiver', + ] + ], + Field(description='Type of the parent component', title='Parent Type'), + ] = None + partNumber: Annotated[ + Optional[str], + Field( + description='The discovered part number of this component', + title='Part Number', + ), + ] = None + removable: Annotated[ + Optional[bool], + Field( + description='Indicates if this component is removable', title='Removable' + ), + ] = None + serialNumber: Annotated[ + Optional[str], + Field( + description='The discovered serial number of this component', + title='Serial Number', + ), + ] = None + slot: Annotated[ + Optional[str], + Field( + description='Slot this component resides in, unset for components that do not have a slot or ID', + title='Slot', + ), + ] = None + softwareVersion: Annotated[ + Optional[str], + Field( + description='Version string of the software running on this component', + title='Software Version', + ), + ] = None + target: Annotated[ + Optional[str], + Field(description='Target this component resides on.', title='Target'), + ] = None + temperature: Annotated[ + Optional[Temperature], + Field( + description='Temperature information for this component', + title='Temperature', + ), + ] = None + type: Annotated[ + Optional[str], + Field(description='Component type, as provided by the target', title='Type'), + ] = None + + +class InterfaceModuleMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class Utilization(BaseModel): + criticalThreshold: Annotated[ + Optional[int], + Field( + description='The minimum average utilization over the last 1 minute to trigger a critical alarm.\nThis value must be greater than the majorThreshold.', + ge=1, + le=100, + title='Critical Threshold', + ), + ] = 95 + fallingDelta: Annotated[ + Optional[int], + Field( + description='The delta in which a triggered threshold must drop below to clear an alarm.\nFor example, with a criticalThreshold of 90 and a fallingDelta of 5, the critical alarm will clear when the utilization drops below 85.', + ge=1, + le=25, + title='Falling Delta', + ), + ] = 5 + majorThreshold: Annotated[ + Optional[int], + Field( + description='The minimum average utilization over the last 1 minute to trigger a major alarm.\nThis value must be greater than the minorThreshold.', + ge=1, + le=100, + title='Major Threshold', + ), + ] = 90 + minorThreshold: Annotated[ + Optional[int], + Field( + description='The minimum average utilization over the last 1 minute to trigger a minor alarm.', + ge=1, + le=100, + title='Minor Threshold', + ), + ] = 80 + + +class Cpu(BaseModel): + enabled: Annotated[ + bool, Field(description='Enable or disable CPU monitoring.', title='Enabled') + ] + utilization: Annotated[ + Optional[Utilization], + Field( + description='Parameters relating to CPU utilization monitoring.', + title='Thresholds', + ), + ] = None + + +class Memory(BaseModel): + enabled: Annotated[ + bool, Field(description='Enable or disable memory monitoring.', title='Enabled') + ] + utilization: Annotated[ + Optional[Utilization], + Field( + description='Parameters relating to memory utilization monitoring.', + title='Thresholds', + ), + ] = None + + +class Volume(BaseModel): + enabled: Annotated[ + bool, Field(description='Enable or disable volume monitoring.', title='Enabled') + ] + utilization: Annotated[ + Optional[Utilization], + Field( + description='Parameters relating to volume utilization monitoring.', + title='Thresholds', + ), + ] = None + + +class SpecModel(BaseModel): + cpu: Annotated[ + Optional[Cpu], + Field( + description='CPU monitoring for targets matching this Monitor.', title='CPU' + ), + ] = None + memory: Annotated[ + Optional[Memory], + Field( + description='Memory monitoring for targets matching this Monitor.', + title='Memory', + ), + ] = None + targetSelector: Annotated[ + Optional[List[str]], + Field( + description='Selector to use when including targets to monitor.', + title='Target Selector', + ), + ] = None + targets: Annotated[ + Optional[List[str]], + Field(description='References to targets to monitor.', title='Targets'), + ] = None + volume: Annotated[ + Optional[Volume], + Field( + description='Volume monitoring for targets matching this Monitor.', + title='Volume', + ), + ] = None + + +class Status1Model5(BaseModel): + targets: Annotated[ + Optional[List[str]], + Field(description='Targets being monitored.', title='Targets'), + ] = None + + +class MonitorDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class MonitorDeletedResources(RootModel[List[MonitorDeletedResourceEntry]]): + root: List[MonitorDeletedResourceEntry] + + +class MonitorMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class SpecModel1(BaseModel): + foo: Annotated[ + str, + Field( + description='INSERT ADDITIONAL SPEC FIELDS - define desired state of cluster\nImportant: Run "edabuilder generate" to regenerate code after modifying this file' + ), + ] + + +class Status1Model6(BaseModel): + commonLanguageEquipmentIdentifier: Annotated[ + Optional[str], + Field(description='The CLEI code of this component', title='CLEI Code'), + ] = None + lastBooted: Annotated[ + Optional[date], + Field( + description='The date and time this component last booted', + title='Last Booted', + ), + ] = None + lastChange: Annotated[ + Optional[date], + Field( + description='The date and time this component last changed operational state', + title='Last Change', + ), + ] = None + locatorEnabled: Annotated[ + Optional[bool], + Field( + description='Indicates if the locator LED for the component is active', + title='Locator Enabled', + ), + ] = None + manufacturedDate: Annotated[ + Optional[date], + Field( + description='The date this component was manufactured', + title='Manufactured Date', + ), + ] = None + operationalState: Annotated[ + Optional[Literal['Up', 'Down', 'Rebooting', 'Unknown', 'Starting', 'Empty']], + Field( + description='Indicates the current operational state of this component.', + title='Operational State', + ), + ] = None + parent: Annotated[ + Optional[str], + Field(description='Reference to a parent component', title='Parent'), + ] = None + parentType: Annotated[ + Optional[ + Literal[ + 'Fan', + 'FanTray', + 'PowerSupply', + 'PowerModule', + 'PowerShelf', + 'InterfaceModule', + 'ControlModule', + 'FabricModule', + 'Chassis', + 'Transceiver', + ] + ], + Field(description='Type of the parent component', title='Parent Type'), + ] = None + partNumber: Annotated[ + Optional[str], + Field( + description='The discovered part number of this component', + title='Part Number', + ), + ] = None + removable: Annotated[ + Optional[bool], + Field( + description='Indicates if this component is removable', title='Removable' + ), + ] = None + serialNumber: Annotated[ + Optional[str], + Field( + description='The discovered serial number of this component', + title='Serial Number', + ), + ] = None + slot: Annotated[ + Optional[str], + Field( + description='Slot this component resides in, unset for components that do not have a slot or ID', + title='Slot', + ), + ] = None + softwareVersion: Annotated[ + Optional[str], + Field( + description='Version string of the software running on this component', + title='Software Version', + ), + ] = None + target: Annotated[ + Optional[str], + Field(description='Target this component resides on.', title='Target'), + ] = None + temperature: Annotated[ + Optional[Temperature], + Field( + description='Temperature information for this component', + title='Temperature', + ), + ] = None + type: Annotated[ + Optional[str], + Field(description='Component type, as provided by the target', title='Type'), + ] = None + + +class PowerSupplyMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class Chassis(BaseModel): + apiVersion: str + kind: str + metadata: ChassisMetadata + spec: Annotated[ + Dict[str, Any], + Field( + description='ChassisSpec defines the desired state of Chassis', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status], + Field( + description='ChassisStatus defines the observed state of Chassis', + title='Status', + ), + ] = None + + +class ChassisList(BaseModel): + apiVersion: str + items: Optional[List[Chassis]] = None + kind: str + + +class Component(BaseModel): + apiVersion: str + kind: str + metadata: ComponentMetadata + spec: Annotated[ + Spec, + Field( + description='ComponentSpec defines the desired state of Component', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model], + Field( + description='ComponentStatus defines the observed state of Component', + title='Status', + ), + ] = None + + +class ComponentList(BaseModel): + apiVersion: str + items: Optional[List[Component]] = None + kind: str + + +class ControlModule(BaseModel): + apiVersion: str + kind: str + metadata: ControlModuleMetadata + spec: Annotated[ + Dict[str, Any], + Field( + description='ControlModuleSpec defines the desired state of ControlModule', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model1], + Field( + description='ControlModuleStatus defines the observed state of ControlModule', + title='Status', + ), + ] = None + + +class ControlModuleList(BaseModel): + apiVersion: str + items: Optional[List[ControlModule]] = None + kind: str + + +class FabricModule(BaseModel): + apiVersion: str + kind: str + metadata: FabricModuleMetadata + spec: Annotated[ + Dict[str, Any], + Field( + description='FabricModuleSpec defines the desired state of FabricModule', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model2], + Field( + description='FabricModuleStatus defines the observed state of FabricModule', + title='Status', + ), + ] = None + + +class FabricModuleList(BaseModel): + apiVersion: str + items: Optional[List[FabricModule]] = None + kind: str + + +class Fan(BaseModel): + apiVersion: str + kind: str + metadata: FanMetadata + spec: Annotated[ + Dict[str, Any], + Field( + description='FanSpec defines the desired state of Fan', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model3], + Field( + description='FanStatus defines the observed state of Fan', title='Status' + ), + ] = None + + +class FanList(BaseModel): + apiVersion: str + items: Optional[List[Fan]] = None + kind: str + + +class InterfaceModule(BaseModel): + apiVersion: str + kind: str + metadata: InterfaceModuleMetadata + spec: Annotated[ + Dict[str, Any], + Field( + description='InterfaceModuleSpec defines the desired state of InterfaceModule', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model4], + Field( + description='InterfaceModuleStatus defines the observed state of InterfaceModule', + title='Status', + ), + ] = None + + +class InterfaceModuleList(BaseModel): + apiVersion: str + items: Optional[List[InterfaceModule]] = None + kind: str + + +class Monitor(BaseModel): + apiVersion: str + kind: str + metadata: MonitorMetadata + spec: Annotated[ + SpecModel, + Field( + description='MonitorSpec defines the desired state of Monitor', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model5], + Field( + description='MonitorStatus defines the observed state of Monitor', + title='Status', + ), + ] = None + + +class MonitorList(BaseModel): + apiVersion: str + items: Optional[List[Monitor]] = None + kind: str + + +class PowerSupply(BaseModel): + apiVersion: str + kind: str + metadata: PowerSupplyMetadata + spec: Annotated[ + SpecModel1, + Field( + description='PowerSupplySpec defines the desired state of PowerSupply', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model6], + Field( + description='PowerSupplyStatus defines the observed state of PowerSupply', + title='Status', + ), + ] = None + + +class PowerSupplyList(BaseModel): + apiVersion: str + items: Optional[List[PowerSupply]] = None + kind: str diff --git a/pydantic_eda/com/nokia/eda/config/__init__.py b/pydantic_eda/com/nokia/eda/config/__init__.py index 17e4442..f67e2ad 100644 --- a/pydantic_eda/com/nokia/eda/config/__init__.py +++ b/pydantic_eda/com/nokia/eda/config/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/config.eda.nokia.com/v1alpha1/config.json -# timestamp: 2025-01-29T15:18:36+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/config.eda.nokia.com/v1alpha1/config.json +# timestamp: 2025-05-07T11:43:29+00:00 diff --git a/pydantic_eda/com/nokia/eda/config/v1alpha1.py b/pydantic_eda/com/nokia/eda/config/v1alpha1.py index 736252b..d45a39b 100644 --- a/pydantic_eda/com/nokia/eda/config/v1alpha1.py +++ b/pydantic_eda/com/nokia/eda/config/v1alpha1.py @@ -1,15 +1,12 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/config.eda.nokia.com/v1alpha1/config.json -# timestamp: 2025-01-29T15:18:36+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/config.eda.nokia.com/v1alpha1/config.json +# timestamp: 2025-05-07T11:43:29+00:00 from __future__ import annotations -from typing import List, Literal, Optional +from typing import Annotated, Dict, List, Literal, Optional -from pydantic import BaseModel, Field -from typing_extensions import Annotated - -from ..... import Metadata +from pydantic import BaseModel, Field, RootModel class Config(BaseModel): @@ -92,10 +89,35 @@ class Status(BaseModel): ] = None +class ConfigletDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class ConfigletDeletedResources(RootModel[List[ConfigletDeletedResourceEntry]]): + root: List[ConfigletDeletedResourceEntry] + + +class ConfigletMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + class Configlet(BaseModel): apiVersion: str kind: str - metadata: Metadata + metadata: ConfigletMetadata spec: Annotated[ Spec, Field( diff --git a/pydantic_eda/com/nokia/eda/core/__init__.py b/pydantic_eda/com/nokia/eda/core/__init__.py index f8be3fc..98c2e47 100644 --- a/pydantic_eda/com/nokia/eda/core/__init__.py +++ b/pydantic_eda/com/nokia/eda/core/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/core.eda.nokia.com/v1/core.json -# timestamp: 2025-01-29T15:18:38+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/core.eda.nokia.com/v1/core.json +# timestamp: 2025-05-07T11:43:34+00:00 diff --git a/pydantic_eda/com/nokia/eda/core/v1.py b/pydantic_eda/com/nokia/eda/core/v1.py index 56b8b6e..8e78d14 100644 --- a/pydantic_eda/com/nokia/eda/core/v1.py +++ b/pydantic_eda/com/nokia/eda/core/v1.py @@ -1,16 +1,13 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/core.eda.nokia.com/v1/core.json -# timestamp: 2025-01-29T15:18:38+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/core.eda.nokia.com/v1/core.json +# timestamp: 2025-05-07T11:43:34+00:00 from __future__ import annotations from datetime import date -from typing import Any, Dict, List, Literal, Optional +from typing import Annotated, Any, Dict, List, Literal, Optional from pydantic import BaseModel, Field, RootModel, SecretStr -from typing_extensions import Annotated - -from ..... import Metadata class ApiGroup(RootModel[str]): @@ -107,29 +104,27 @@ class Spec(BaseModel): ] = None -class ClusterRole(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - Spec, +class ClusterRoleDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + transactionId: Optional[int] = None + + +class ClusterRoleDeletedResources(RootModel[List[ClusterRoleDeletedResourceEntry]]): + root: List[ClusterRoleDeletedResourceEntry] + + +class ClusterRoleMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='ClusterRole defines a set of permissions to access EDA resources.\nClusterRoles and users are bound via groups, selecting a set of users and a set of ClusterRoles to bind.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='RoleStatus defines the observed state of Role', title='Status' - ), - ] = None - - -class ClusterRoleList(BaseModel): - apiVersion: str - items: Optional[List[ClusterRole]] = None - kind: str class AssociatedCr(BaseModel): @@ -191,26 +186,6 @@ class SpecModel(BaseModel): ] = None -class Deviation(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel, - Field( - description='Deviations are used to represent differences between the intended and actual state of a target.\nThey indicate the intended state - or the computed configuration EDA expects, and compare this to the actual or running state, or the configuration retrieved from the target.\nDeviations are most often generated by out-of-band changes to a target by an external system or user, and\ncan be accepted or rejected. Rejecting a Deviation will result in the intended configuration being re-applied, undoing the out-of-band change.\nDeviations are raised per table, meaning a single change on a target may result in more than one Deviation.', - title='Specification', - ), - ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='DeviationStatus defines the observed state of Deviation', - title='Status', - ), - ] = None - - class Action(BaseModel): action: Annotated[ Literal['setAccept', 'clearAccept', 'reject'], @@ -262,36 +237,44 @@ class Status(BaseModel): ] = None -class DeviationAction(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel1, +class DeviationActionDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class DeviationActionDeletedResources( + RootModel[List[DeviationActionDeletedResourceEntry]] +): + root: List[DeviationActionDeletedResourceEntry] + + +class DeviationActionMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='DeviationAction allows manual and API-driven actions to be performed on Deviation resources.\nThey are the only means to which and end user can accept or reject deviations, as Deviation resources themselves are read only.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Status], - Field( - description='DeviationActionStatus defines the observed state of DeviationAction', - title='Status', - ), - ] = None - + namespace: str -class DeviationActionList(BaseModel): - apiVersion: str - items: Optional[List[DeviationAction]] = None - kind: str - -class DeviationList(BaseModel): - apiVersion: str - items: Optional[List[Deviation]] = None - kind: str +class DeviationMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str class GatewayIPV4Address(BaseModel): @@ -363,30 +346,29 @@ class SpecModel2(BaseModel): ] = None -class EdgeInterface(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel2, +class EdgeInterfaceDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class EdgeInterfaceDeletedResources(RootModel[List[EdgeInterfaceDeletedResourceEntry]]): + root: List[EdgeInterfaceDeletedResourceEntry] + + +class EdgeInterfaceMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='EdgeInterfaceSpec defines the desired state of EdgeInterface', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='EdgeInterfaceStatus defines the observed state of EdgeInterface', - title='Status', - ), - ] = None - - -class EdgeInterfaceList(BaseModel): - apiVersion: str - items: Optional[List[EdgeInterface]] = None - kind: str + namespace: str class SpecModel3(BaseModel): @@ -405,30 +387,27 @@ class SpecModel3(BaseModel): ] -class HttpProxy(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel3, +class HttpProxyDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + transactionId: Optional[int] = None + + +class HttpProxyDeletedResources(RootModel[List[HttpProxyDeletedResourceEntry]]): + root: List[HttpProxyDeletedResourceEntry] + + +class HttpProxyMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='HttpProxySpec defines the desired state of HttpProxy', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='HttpProxyStatus defines the observed state of HttpProxy', - title='Status', - ), - ] = None - - -class HttpProxyList(BaseModel): - apiVersion: str - items: Optional[List[HttpProxy]] = None - kind: str class Allocation(BaseModel): @@ -462,66 +441,75 @@ class Segment(BaseModel): class SpecModel4(BaseModel): + publishAllocations: Annotated[ + Optional[bool], + Field( + description='If true, allocations in segments will be published to EDB, available to query via EQL and trigger state applications off of.', + title='Publish Allocations', + ), + ] = None segments: Annotated[ - Optional[List[Segment]], + List[Segment], Field( description='List of segments containing IPv4 or IPv6 addresses to allocate.', min_length=1, title='Segments', ), - ] = None + ] -class IPAllocationPool(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel4, +class IPAllocationPoolDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class IPAllocationPoolDeletedResources( + RootModel[List[IPAllocationPoolDeletedResourceEntry]] +): + root: List[IPAllocationPoolDeletedResourceEntry] + + +class IPAllocationPoolMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='IPAllocationPool is a generic IP allocation pool supporting allocation of IPv4 and/or IPv6 addresses from a set of segments.\nIt is different from IPInSubnetAllocationPool in that it returns a single unzoned IP address, i.e. an IP address without a subnet. For example a 10.1.1.0/24 segment could return 10.1.1.1.\nConsult application documentation to know which pool type to use for a given use case.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='IPAllocationPoolStatus defines the observed state of IPAllocationPool', - title='Status', - ), - ] = None + namespace: str -class IPAllocationPoolList(BaseModel): - apiVersion: str - items: Optional[List[IPAllocationPool]] = None - kind: str +class IPInSubnetAllocationPoolDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None -class IPInSubnetAllocationPool(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel4, +class IPInSubnetAllocationPoolDeletedResources( + RootModel[List[IPInSubnetAllocationPoolDeletedResourceEntry]] +): + root: List[IPInSubnetAllocationPoolDeletedResourceEntry] + + +class IPInSubnetAllocationPoolMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='IPInSubnetAllocationPool is a generic IP allocation pool supporting allocation of IPv4 and/or IPv6 addresses from a set of segments.\nIt is different from IPAllocationPool in that it returns a single zoned IP address, i.e. an IP address with a subnet. For example a 10.1.1.0/24 segment could return 10.1.1.1/24.\nConsult application documentation to know which pool type to use for a given use case.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='IPInSubnetAllocationPoolStatus defines the observed state of IPInSubnetAllocationPool', - title='Status', - ), - ] = None - - -class IPInSubnetAllocationPoolList(BaseModel): - apiVersion: str - items: Optional[List[IPInSubnetAllocationPool]] = None - kind: str + namespace: str class AllocationModel(BaseModel): @@ -558,6 +546,13 @@ class SegmentModel(BaseModel): class SpecModel5(BaseModel): + publishAllocations: Annotated[ + Optional[bool], + Field( + description='If true, allocations in segments will be published to EDB, available to query via EQL and trigger state applications off of.', + title='Publish Allocations', + ), + ] = None segments: Annotated[ List[SegmentModel], Field( @@ -568,30 +563,31 @@ class SpecModel5(BaseModel): ] -class IndexAllocationPool(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel5, +class IndexAllocationPoolDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class IndexAllocationPoolDeletedResources( + RootModel[List[IndexAllocationPoolDeletedResourceEntry]] +): + root: List[IndexAllocationPoolDeletedResourceEntry] + + +class IndexAllocationPoolMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='IndexAllocationPool is a generic allocation pool supporting allocation of indexes from a set of segments.\nIt supports allocating things like VLANs, subinterface indexes, autonomous system numbers, or any other integer-based index.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='IndexAllocationPoolStatus defines the observed state of IndexAllocationPool', - title='Status', - ), - ] = None - - -class IndexAllocationPoolList(BaseModel): - apiVersion: str - items: Optional[List[IndexAllocationPool]] = None - kind: str + namespace: str class SpecModel6(BaseModel): @@ -638,27 +634,16 @@ class Status1Model(BaseModel): ] -class License(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel6, +class LicenseMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='A License represents an application license providing functionality within EDA. A license providing the "base" feature must be provided/valid for transactions to be processed.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Status1Model], - Field(description='Status information for this license.', title='Status'), - ] = None - - -class LicenseList(BaseModel): - apiVersion: str - items: Optional[List[License]] = None - kind: str class SpecModel7(BaseModel): @@ -671,30 +656,27 @@ class SpecModel7(BaseModel): ] = None -class Namespace(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel7, +class NamespaceDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + transactionId: Optional[int] = None + + +class NamespaceDeletedResources(RootModel[List[NamespaceDeletedResourceEntry]]): + root: List[NamespaceDeletedResourceEntry] + + +class NamespaceMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='A Namespace is a logical partition within the cluster that provides a mechanism for isolating resources.\nNamespaces allow for resource segmentation, enabling multiple teams or applications to share the same cluster without conflict.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='NamespaceStatus defines the observed state of Namespace', - title='Status', - ), - ] = None - - -class NamespaceList(BaseModel): - apiVersion: str - items: Optional[List[Namespace]] = None - kind: str class Dhcp4Option(BaseModel): @@ -1004,6 +986,13 @@ class SpecModel8(BaseModel): title='License', ), ] = None + llmDb: Annotated[ + Optional[str], + Field( + description='URL containing LLDB to use when interacting with LLM-DB and OpenAI for query autocompletion, e.g. http://eda-asvr/llmdb/ce-llm-db-srlinux-24.7.1.tar.gz.', + title='LLMDB', + ), + ] = None nodeUser: Annotated[ str, Field( @@ -1026,7 +1015,7 @@ class SpecModel8(BaseModel): ), ] = None operatingSystem: Annotated[ - Literal['srl', 'sros'], + Literal['srl', 'sros', 'nxos'], Field( description='Sets the operating system of this NodeProfile, e.g. srl.', title='Operating System', @@ -1085,24 +1074,29 @@ class SpecModel8(BaseModel): ] -class NodeProfile(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel8, +class NodeProfileDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class NodeProfileDeletedResources(RootModel[List[NodeProfileDeletedResourceEntry]]): + root: List[NodeProfileDeletedResourceEntry] + + +class NodeProfileMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='NodeProfileSpec defines the desired state of NodeProfile', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[Optional[Dict[str, Any]], Field(title='Status')] = None - - -class NodeProfileList(BaseModel): - apiVersion: str - items: Optional[List[NodeProfile]] = None - kind: str + namespace: str class GroupBinding(BaseModel): @@ -1172,27 +1166,29 @@ class Status1Model1(BaseModel): ] = None -class NodeUser(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel9, +class NodeUserDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class NodeUserDeletedResources(RootModel[List[NodeUserDeletedResourceEntry]]): + root: List[NodeUserDeletedResourceEntry] + + +class NodeUserMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description="The NodeUser resource represents a user that can be deployed to a set of TopoNodes. It supports managing the user's password, SSH keys, and group bindings.\nAdditionally a NodeUser is referenced by a NodeProfile to indicate how NPP should connect to TopoNodes.", - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Status1Model1], - Field(description='Deployment status of this NodeUser.', title='Status'), - ] = None - - -class NodeUserList(BaseModel): - apiVersion: str - items: Optional[List[NodeUser]] = None - kind: str + namespace: str class SpecModel10(BaseModel): @@ -1223,29 +1219,29 @@ class SpecModel10(BaseModel): ] = None -class Role(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel10, +class RoleDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class RoleDeletedResources(RootModel[List[RoleDeletedResourceEntry]]): + root: List[RoleDeletedResourceEntry] + + +class RoleMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='RoleSpec defines the desired state of Role', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='RoleStatus defines the observed state of Role', title='Status' - ), - ] = None - - -class RoleList(BaseModel): - apiVersion: str - items: Optional[List[Role]] = None - kind: str + namespace: str class AllocationModel1(BaseModel): @@ -1290,40 +1286,48 @@ class SegmentModel1(BaseModel): class SpecModel11(BaseModel): + publishAllocations: Annotated[ + Optional[bool], + Field( + description='If true, allocations in segments will be published to EDB, available to query via EQL and trigger state applications off of.', + title='Publish Allocations', + ), + ] = None segments: Annotated[ - Optional[List[SegmentModel1]], + List[SegmentModel1], Field( description='List of segments containing subnets to allocate.', min_length=1, title='Segments', ), - ] = None + ] -class SubnetAllocationPool(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel11, +class SubnetAllocationPoolDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class SubnetAllocationPoolDeletedResources( + RootModel[List[SubnetAllocationPoolDeletedResourceEntry]] +): + root: List[SubnetAllocationPoolDeletedResourceEntry] + + +class SubnetAllocationPoolMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='SubnetAllocationPool is a generic subnet allocation pool supporting allocation of IPv4 and/or IPv6 child subnets from a list of parent subnet segments.\nIt allocates a subnet of the configured length from the provided parent subnet.\nFor example a pool could return 10.1.0.8/29 when a segment is defined as subnet 10.1.0.0/16 with subnet length 29.\nConsult application documentation to know which pool type to use for a given use case.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='SubnetAllocationPoolStatus defines the observed state of SubnetAllocationPool', - title='Status', - ), - ] = None - - -class SubnetAllocationPoolList(BaseModel): - apiVersion: str - items: Optional[List[SubnetAllocationPool]] = None - kind: str + namespace: str class SpecModel12(BaseModel): @@ -1340,7 +1344,7 @@ class SpecModel12(BaseModel): Optional[List[str]], Field( description='A list of normalized parent interface/port', - title='Nomalized Parent Interface', + title='Normalized Parent Interface', ), ] = None node: Annotated[ @@ -1356,30 +1360,29 @@ class SpecModel12(BaseModel): ] -class TopoBreakout(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel12, +class TopoBreakoutDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class TopoBreakoutDeletedResources(RootModel[List[TopoBreakoutDeletedResourceEntry]]): + root: List[TopoBreakoutDeletedResourceEntry] + + +class TopoBreakoutMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='TopoBreakoutSpec defines the desired state of TopoBreakout', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='TopoBreakoutStatus defines the observed state of TopoBreakout', - title='Status', - ), - ] = None - - -class TopoBreakoutList(BaseModel): - apiVersion: str - items: Optional[List[TopoBreakout]] = None - kind: str + namespace: str class Local(BaseModel): @@ -1484,35 +1487,42 @@ class Status1Model2(BaseModel): ] -class TopoLink(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel13, +class TopoLinkDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class TopoLinkDeletedResources(RootModel[List[TopoLinkDeletedResourceEntry]]): + root: List[TopoLinkDeletedResourceEntry] + + +class TopoLinkMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='TopoLink represents a logical link between two TopoNodes. It may include more than one physical link, being used to represent a LAG or multihomed link.\nTo create a point to point link with a single interface on both sides use a single link property.\nTo create a point to point link with a LAG configured on both side, use two links with matching nodes.\nA multihomed LAG is created by using two or more links where the A side and/or B side can be different.\nCreating a link with only A specified will create an edge interface.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Status1Model2], - Field( - description='TopoLinkStatus defines the observed state of TopoLink', - title='Status', - ), - ] = None - - -class TopoLinkList(BaseModel): - apiVersion: str - items: Optional[List[TopoLink]] = None - kind: str + namespace: str class ComponentItem(BaseModel): kind: Annotated[ - Literal['lineCard', 'fabric', 'mda', 'connector'], + Literal[ + 'lineCard', + 'fabric', + 'mda', + 'connector', + 'xiom', + 'powerShelf', + 'powerModule', + ], Field(description='The kind of Component, e.g. lineCard.', title='Kind'), ] slot: Annotated[ @@ -1594,7 +1604,7 @@ class SpecModel14(BaseModel): ), ] = False operatingSystem: Annotated[ - Literal['srl', 'sros'], + Literal['srl', 'sros', 'nxos'], Field( description='Operating system running on this TopoNode, e.g. srl.', title='Operating System', @@ -1650,7 +1660,7 @@ class Status1Model3(BaseModel): Optional[str], Field( alias='node-state', - description='The current state of the connection between NPP and the node.', + description='The current state of the connection between NPP and the node.\n"TryingToConnect"\n NPP is attempting to connect and establish connectivity to the node\n"WaitingForInitialCfg"\n NPP is connected to the node but waiting for intial config to push\n"Committing"\n\t NPP is in progress of commiting\n"RetryingCommit"\n NPP lost sync to node and is re-pushing current config\n"Synced"\n NPP is in fully synced state\n"Standby"\n NPP is running in standby mode. This state is only used on standby clusters with georedundancy.\n"NoIpAddress"\n NPP is running but there is no IP address for node. This only happen in sim setups when\n CX has not created the simulated node, or the simulated pod failed to launch due to image error.', title='Node', ), ] = None @@ -1662,6 +1672,10 @@ class Status1Model3(BaseModel): title='NPP Address', ), ] = None + npp_pod: Annotated[ + Optional[str], + Field(alias='npp-pod', description='NPP pod name', title='NPP Pod'), + ] = None npp_state: Annotated[ Optional[str], Field( @@ -1700,30 +1714,29 @@ class Status1Model3(BaseModel): ] = None -class TopoNode(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel14, +class TopoNodeDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class TopoNodeDeletedResources(RootModel[List[TopoNodeDeletedResourceEntry]]): + root: List[TopoNodeDeletedResourceEntry] + + +class TopoNodeMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='A managed network element is represented via a TopoNode resource, describing characteristics of a specific element in the topology.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Status1Model3], - Field( - description='TopoNodeStatus defines the observed state of TopoNode', - title='Status', - ), - ] = None - - -class TopoNodeList(BaseModel): - apiVersion: str - items: Optional[List[TopoNode]] = None - kind: str + namespace: str class SpecModel15(BaseModel): @@ -1771,30 +1784,33 @@ class SpecModel15(BaseModel): ] -class UdpProxy(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel15, +class UdpProxyDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + transactionId: Optional[int] = None + + +class UdpProxyDeletedResources(RootModel[List[UdpProxyDeletedResourceEntry]]): + root: List[UdpProxyDeletedResourceEntry] + + +class UdpProxyMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='UdpProxySpec defines the desired state of UdpProxy', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='UdpProxyStatus defines the observed state of UdpProxy', - title='Status', - ), - ] = None -class UdpProxyList(BaseModel): - apiVersion: str - items: Optional[List[UdpProxy]] = None - kind: str +class FlowDefinitionResource(BaseModel): + group: Annotated[Optional[str], Field(title='Group')] = None + kind: Annotated[str, Field(title='Kind')] + version: Annotated[str, Field(title='Version')] class FlowDefinitionSchema(BaseModel): @@ -1815,6 +1831,12 @@ class FlowDefinitionSchema(BaseModel): class SpecModel16(BaseModel): + flowDefinitionResource: Annotated[ + Optional[FlowDefinitionResource], + Field( + description='the resource type to be used for this flow, can only be set if Schema is not set' + ), + ] = None flowDefinitionSchema: Annotated[ Optional[FlowDefinitionSchema], Field( @@ -1837,10 +1859,489 @@ class SpecModel16(BaseModel): ] = None +class WorkflowDefinitionDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + transactionId: Optional[int] = None + + +class WorkflowDefinitionDeletedResources( + RootModel[List[WorkflowDefinitionDeletedResourceEntry]] +): + root: List[WorkflowDefinitionDeletedResourceEntry] + + +class WorkflowDefinitionMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + + +class ClusterRole(BaseModel): + apiVersion: str + kind: str + metadata: ClusterRoleMetadata + spec: Annotated[ + Spec, + Field( + description='ClusterRole defines a set of permissions to access EDA resources.\nClusterRoles and users are bound via groups, selecting a set of users and a set of ClusterRoles to bind.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='RoleStatus defines the observed state of Role', title='Status' + ), + ] = None + + +class ClusterRoleList(BaseModel): + apiVersion: str + items: Optional[List[ClusterRole]] = None + kind: str + + +class Deviation(BaseModel): + apiVersion: str + kind: str + metadata: DeviationMetadata + spec: Annotated[ + SpecModel, + Field( + description='Deviations are used to represent differences between the intended and actual state of a target.\nThey indicate the intended state - or the computed configuration EDA expects, and compare this to the actual or running state, or the configuration retrieved from the target.\nDeviations are most often generated by out-of-band changes to a target by an external system or user, and\ncan be accepted or rejected. Rejecting a Deviation will result in the intended configuration being re-applied, undoing the out-of-band change.\nDeviations are raised per table, meaning a single change on a target may result in more than one Deviation.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='DeviationStatus defines the observed state of Deviation', + title='Status', + ), + ] = None + + +class DeviationAction(BaseModel): + apiVersion: str + kind: str + metadata: DeviationActionMetadata + spec: Annotated[ + SpecModel1, + Field( + description='DeviationAction allows manual and API-driven actions to be performed on Deviation resources.\nThey are the only means to which and end user can accept or reject deviations, as Deviation resources themselves are read only.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status], + Field( + description='DeviationActionStatus defines the observed state of DeviationAction', + title='Status', + ), + ] = None + + +class DeviationActionList(BaseModel): + apiVersion: str + items: Optional[List[DeviationAction]] = None + kind: str + + +class DeviationList(BaseModel): + apiVersion: str + items: Optional[List[Deviation]] = None + kind: str + + +class EdgeInterface(BaseModel): + apiVersion: str + kind: str + metadata: EdgeInterfaceMetadata + spec: Annotated[ + SpecModel2, + Field( + description='EdgeInterfaceSpec defines the desired state of EdgeInterface', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='EdgeInterfaceStatus defines the observed state of EdgeInterface', + title='Status', + ), + ] = None + + +class EdgeInterfaceList(BaseModel): + apiVersion: str + items: Optional[List[EdgeInterface]] = None + kind: str + + +class HttpProxy(BaseModel): + apiVersion: str + kind: str + metadata: HttpProxyMetadata + spec: Annotated[ + SpecModel3, + Field( + description='HttpProxySpec defines the desired state of HttpProxy', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='HttpProxyStatus defines the observed state of HttpProxy', + title='Status', + ), + ] = None + + +class HttpProxyList(BaseModel): + apiVersion: str + items: Optional[List[HttpProxy]] = None + kind: str + + +class IPAllocationPool(BaseModel): + apiVersion: str + kind: str + metadata: IPAllocationPoolMetadata + spec: Annotated[ + SpecModel4, + Field( + description='IPAllocationPool is a generic IP allocation pool supporting allocation of IPv4 and/or IPv6 addresses from a set of segments.\nIt is different from IPInSubnetAllocationPool in that it returns a single unzoned IP address, i.e. an IP address without a subnet. For example a 10.1.1.0/24 segment could return 10.1.1.1.\nConsult application documentation to know which pool type to use for a given use case.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='IPAllocationPoolStatus defines the observed state of IPAllocationPool', + title='Status', + ), + ] = None + + +class IPAllocationPoolList(BaseModel): + apiVersion: str + items: Optional[List[IPAllocationPool]] = None + kind: str + + +class IPInSubnetAllocationPool(BaseModel): + apiVersion: str + kind: str + metadata: IPInSubnetAllocationPoolMetadata + spec: Annotated[ + SpecModel4, + Field( + description='IPInSubnetAllocationPool is a generic IP allocation pool supporting allocation of IPv4 and/or IPv6 addresses from a set of segments.\nIt is different from IPAllocationPool in that it returns a single zoned IP address, i.e. an IP address with a subnet. For example a 10.1.1.0/24 segment could return 10.1.1.1/24.\nConsult application documentation to know which pool type to use for a given use case.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='IPInSubnetAllocationPoolStatus defines the observed state of IPInSubnetAllocationPool', + title='Status', + ), + ] = None + + +class IPInSubnetAllocationPoolList(BaseModel): + apiVersion: str + items: Optional[List[IPInSubnetAllocationPool]] = None + kind: str + + +class IndexAllocationPool(BaseModel): + apiVersion: str + kind: str + metadata: IndexAllocationPoolMetadata + spec: Annotated[ + SpecModel5, + Field( + description='IndexAllocationPool is a generic allocation pool supporting allocation of indexes from a set of segments.\nIt supports allocating things like VLANs, subinterface indexes, autonomous system numbers, or any other integer-based index.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='IndexAllocationPoolStatus defines the observed state of IndexAllocationPool', + title='Status', + ), + ] = None + + +class IndexAllocationPoolList(BaseModel): + apiVersion: str + items: Optional[List[IndexAllocationPool]] = None + kind: str + + +class License(BaseModel): + apiVersion: str + kind: str + metadata: LicenseMetadata + spec: Annotated[ + SpecModel6, + Field( + description='A License represents an application license providing functionality within EDA. A license providing the "base" feature must be provided/valid for transactions to be processed.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model], + Field(description='Status information for this license.', title='Status'), + ] = None + + +class LicenseList(BaseModel): + apiVersion: str + items: Optional[List[License]] = None + kind: str + + +class Namespace(BaseModel): + apiVersion: str + kind: str + metadata: NamespaceMetadata + spec: Annotated[ + SpecModel7, + Field( + description='A Namespace is a logical partition within the cluster that provides a mechanism for isolating resources.\nNamespaces allow for resource segmentation, enabling multiple teams or applications to share the same cluster without conflict.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='NamespaceStatus defines the observed state of Namespace', + title='Status', + ), + ] = None + + +class NamespaceList(BaseModel): + apiVersion: str + items: Optional[List[Namespace]] = None + kind: str + + +class NodeProfile(BaseModel): + apiVersion: str + kind: str + metadata: NodeProfileMetadata + spec: Annotated[ + SpecModel8, + Field( + description='NodeProfileSpec defines the desired state of NodeProfile', + title='Specification', + ), + ] + status: Annotated[Optional[Dict[str, Any]], Field(title='Status')] = None + + +class NodeProfileList(BaseModel): + apiVersion: str + items: Optional[List[NodeProfile]] = None + kind: str + + +class NodeUser(BaseModel): + apiVersion: str + kind: str + metadata: NodeUserMetadata + spec: Annotated[ + SpecModel9, + Field( + description="The NodeUser resource represents a user that can be deployed to a set of TopoNodes. It supports managing the user's password, SSH keys, and group bindings.\nAdditionally a NodeUser is referenced by a NodeProfile to indicate how NPP should connect to TopoNodes.", + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model1], + Field(description='Deployment status of this NodeUser.', title='Status'), + ] = None + + +class NodeUserList(BaseModel): + apiVersion: str + items: Optional[List[NodeUser]] = None + kind: str + + +class Role(BaseModel): + apiVersion: str + kind: str + metadata: RoleMetadata + spec: Annotated[ + SpecModel10, + Field( + description='RoleSpec defines the desired state of Role', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='RoleStatus defines the observed state of Role', title='Status' + ), + ] = None + + +class RoleList(BaseModel): + apiVersion: str + items: Optional[List[Role]] = None + kind: str + + +class SubnetAllocationPool(BaseModel): + apiVersion: str + kind: str + metadata: SubnetAllocationPoolMetadata + spec: Annotated[ + SpecModel11, + Field( + description='SubnetAllocationPool is a generic subnet allocation pool supporting allocation of IPv4 and/or IPv6 child subnets from a list of parent subnet segments.\nIt allocates a subnet of the configured length from the provided parent subnet.\nFor example a pool could return 10.1.0.8/29 when a segment is defined as subnet 10.1.0.0/16 with subnet length 29.\nConsult application documentation to know which pool type to use for a given use case.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='SubnetAllocationPoolStatus defines the observed state of SubnetAllocationPool', + title='Status', + ), + ] = None + + +class SubnetAllocationPoolList(BaseModel): + apiVersion: str + items: Optional[List[SubnetAllocationPool]] = None + kind: str + + +class TopoBreakout(BaseModel): + apiVersion: str + kind: str + metadata: TopoBreakoutMetadata + spec: Annotated[ + SpecModel12, + Field( + description='TopoBreakoutSpec defines the desired state of TopoBreakout', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='TopoBreakoutStatus defines the observed state of TopoBreakout', + title='Status', + ), + ] = None + + +class TopoBreakoutList(BaseModel): + apiVersion: str + items: Optional[List[TopoBreakout]] = None + kind: str + + +class TopoLink(BaseModel): + apiVersion: str + kind: str + metadata: TopoLinkMetadata + spec: Annotated[ + SpecModel13, + Field( + description='TopoLink represents a logical link between two TopoNodes. It may include more than one physical link, being used to represent a LAG or multihomed link.\nTo create a point to point link with a single interface on both sides use a single link property.\nTo create a point to point link with a LAG configured on both side, use two links with matching nodes.\nA multihomed LAG is created by using two or more links where the A side and/or B side can be different.\nCreating a link with only A specified will create an edge interface.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model2], + Field( + description='TopoLinkStatus defines the observed state of TopoLink', + title='Status', + ), + ] = None + + +class TopoLinkList(BaseModel): + apiVersion: str + items: Optional[List[TopoLink]] = None + kind: str + + +class TopoNode(BaseModel): + apiVersion: str + kind: str + metadata: TopoNodeMetadata + spec: Annotated[ + SpecModel14, + Field( + description='A managed network element is represented via a TopoNode resource, describing characteristics of a specific element in the topology.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model3], + Field( + description='TopoNodeStatus defines the observed state of TopoNode', + title='Status', + ), + ] = None + + +class TopoNodeList(BaseModel): + apiVersion: str + items: Optional[List[TopoNode]] = None + kind: str + + +class UdpProxy(BaseModel): + apiVersion: str + kind: str + metadata: UdpProxyMetadata + spec: Annotated[ + SpecModel15, + Field( + description='UdpProxySpec defines the desired state of UdpProxy', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='UdpProxyStatus defines the observed state of UdpProxy', + title='Status', + ), + ] = None + + +class UdpProxyList(BaseModel): + apiVersion: str + items: Optional[List[UdpProxy]] = None + kind: str + + class WorkflowDefinition(BaseModel): apiVersion: str kind: str - metadata: Metadata + metadata: WorkflowDefinitionMetadata spec: Annotated[ SpecModel16, Field( diff --git a/pydantic_eda/com/nokia/eda/fabrics/__init__.py b/pydantic_eda/com/nokia/eda/fabrics/__init__.py index 31743fa..b9430f4 100644 --- a/pydantic_eda/com/nokia/eda/fabrics/__init__.py +++ b/pydantic_eda/com/nokia/eda/fabrics/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/fabrics.eda.nokia.com/v1alpha1/fabrics.json -# timestamp: 2025-01-29T15:18:39+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/fabrics.eda.nokia.com/v1alpha1/fabrics.json +# timestamp: 2025-05-07T11:43:39+00:00 diff --git a/pydantic_eda/com/nokia/eda/fabrics/v1alpha1.py b/pydantic_eda/com/nokia/eda/fabrics/v1alpha1.py index 3338a8e..bb84460 100644 --- a/pydantic_eda/com/nokia/eda/fabrics/v1alpha1.py +++ b/pydantic_eda/com/nokia/eda/fabrics/v1alpha1.py @@ -1,16 +1,30 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/fabrics.eda.nokia.com/v1alpha1/fabrics.json -# timestamp: 2025-01-29T15:18:39+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/fabrics.eda.nokia.com/v1alpha1/fabrics.json +# timestamp: 2025-05-07T11:43:39+00:00 from __future__ import annotations from datetime import date -from typing import List, Literal, Optional +from typing import Annotated, Dict, List, Literal, Optional -from pydantic import BaseModel, Field -from typing_extensions import Annotated +from pydantic import BaseModel, Field, RootModel -from ..... import Metadata + +class RouteLeaking(BaseModel): + exportPolicy: Annotated[ + str, + Field( + description='Reference to a Policy resource to use when evaluating route exports from the DefaultRouter.', + title='Export Policy', + ), + ] + importPolicy: Annotated[ + str, + Field( + description='Reference to a Policy resource to use when evaluating route imports into the DefaultRouter.', + title='Import Policy', + ), + ] class BorderLeafs(BaseModel): @@ -28,6 +42,13 @@ class BorderLeafs(BaseModel): title='Borderleaf Node Selector', ), ] = None + routeLeaking: Annotated[ + Optional[RouteLeaking], + Field( + description='Route leaking controlled by routing policies in and out of the DefaultRouters on each node. If specifided under the Leafs, Spines, SuperSpines, or BorderLeafs those will take precedence.', + title='Route Leaking', + ), + ] = None systemPoolIPV4: Annotated[ Optional[str], Field( @@ -44,6 +65,11 @@ class BorderLeafs(BaseModel): ] = None +class Qos(BaseModel): + egressPolicy: Annotated[Optional[str], Field(title='Egress Policy')] = None + ingressPolicy: Annotated[Optional[str], Field(title='Ingress Policy')] = None + + class InterSwitchLinks(BaseModel): linkSelector: Annotated[ Optional[List[str]], @@ -66,6 +92,7 @@ class InterSwitchLinks(BaseModel): title='IPv6 Pool - InterSwitch Link IP', ), ] = None + qos: Annotated[Optional[Qos], Field(title='QoS')] = None unnumbered: Annotated[ Optional[Literal['IPV6']], Field( @@ -99,6 +126,13 @@ class Leafs(BaseModel): title='Leaf Node Selector', ), ] = None + routeLeaking: Annotated[ + Optional[RouteLeaking], + Field( + description='Route leaking controlled by routing policies in and out of the DefaultRouters on each node. If specifided under the Leafs, Spines, SuperSpines, or BorderLeafs those will take precedence.', + title='Route Leaking', + ), + ] = None systemPoolIPV4: Annotated[ Optional[str], Field( @@ -141,8 +175,8 @@ class Bfd(BaseModel): minEchoReceiveInterval: Annotated[ Optional[int], Field( - description='The number of packets that must be missed to declare this session as down.', - ge=250000, + description='The minimum interval between echo packets the local node can receive in microseconds.', + ge=0, le=100000000, title='Minimum Echo Receive Interval', ), @@ -271,12 +305,12 @@ class OverlayProtocol(BaseModel): Field(description='Overlay specific BGP properties.', title='BGP'), ] = None protocol: Annotated[ - Optional[Literal['IBGP', 'EBGP']], + Literal['IBGP', 'EBGP'], Field( description='List of routing protocols to used to advertise EVPN routes for overlay services. When EBGP is used, the BGP properties configured under the spec.underlayProtocol will be used.', title='Protocol', ), - ] = None + ] class Spines(BaseModel): @@ -287,6 +321,13 @@ class Spines(BaseModel): title='Autonomous System Pool', ), ] = None + routeLeaking: Annotated[ + Optional[RouteLeaking], + Field( + description='Route leaking controlled by routing policies in and out of the DefaultRouters on each node. If specifided under the Leafs, Spines, SuperSpines, or BorderLeafs those will take precedence.', + title='Route Leaking', + ), + ] = None spineNodeSelector: Annotated[ Optional[List[str]], Field( @@ -318,6 +359,13 @@ class SuperSpines(BaseModel): title='Autonomous System Pool', ), ] = None + routeLeaking: Annotated[ + Optional[RouteLeaking], + Field( + description='Route leaking controlled by routing policies in and out of the DefaultRouters on each node. If specifided under the Leafs, Spines, SuperSpines, or BorderLeafs those will take precedence.', + title='Route Leaking', + ), + ] = None superSpineNodeSelector: Annotated[ Optional[List[str]], Field( @@ -408,6 +456,13 @@ class Spec(BaseModel): Optional[OverlayProtocol], Field(description='Set the overlay protocol used', title='Overlay Protocol'), ] = None + routeLeaking: Annotated[ + Optional[RouteLeaking], + Field( + description='Route leaking controlled by routing policies in and out of the DefaulRouters on each node. If specifided under the Leafs, Spines, SuperSpines, or BorderLeafs those will take precedence.', + title='Route Leaking', + ), + ] = None spines: Annotated[Optional[Spines], Field(title='Spines')] = None superSpines: Annotated[Optional[SuperSpines], Field(title='Superspines')] = None systemPoolIPV4: Annotated[ @@ -425,9 +480,9 @@ class Spec(BaseModel): ), ] = None underlayProtocol: Annotated[ - UnderlayProtocol, + Optional[UnderlayProtocol], Field(description='Set the underlay protocol used', title='Underlay Protocol'), - ] + ] = None class BorderLeafNode(BaseModel): @@ -591,30 +646,29 @@ class Status(BaseModel): ] = None -class Fabric(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - Spec, +class FabricDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class FabricDeletedResources(RootModel[List[FabricDeletedResourceEntry]]): + root: List[FabricDeletedResourceEntry] + + +class FabricMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='The Fabric defines the desired state of a Fabric resource, enabling the automation and management of data center network fabrics. It includes configurations for IP address allocation pools, network topology roles (Leafs, Spines, SuperSpines, BorderLeafs), inter-switch links, and network protocols (underlay and overlay). The specification allows for detailed control over routing strategies, including ASN allocations for BGP-based protocols, and supports advanced features like BFD.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Status], - Field( - description='FabricStatus defines the observed state of Fabric', - title='Status', - ), - ] = None - - -class FabricList(BaseModel): - apiVersion: str - items: Optional[List[Fabric]] = None - kind: str + namespace: str class BgpModel1(BaseModel): @@ -706,6 +760,7 @@ class SpecModel(BaseModel): title='IPv6 Allocation Pool', ), ] = None + qos: Annotated[Optional[Qos], Field(title='QoS')] = None remoteDefaultRouter: Annotated[ str, Field( @@ -817,10 +872,61 @@ class Status1Model(BaseModel): ] = None +class ISLDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class ISLDeletedResources(RootModel[List[ISLDeletedResourceEntry]]): + root: List[ISLDeletedResourceEntry] + + +class ISLMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class Fabric(BaseModel): + apiVersion: str + kind: str + metadata: FabricMetadata + spec: Annotated[ + Spec, + Field( + description='The Fabric defines the desired state of a Fabric resource, enabling the automation and management of data center network fabrics. It includes configurations for IP address allocation pools, network topology roles (Leafs, Spines, SuperSpines, BorderLeafs), inter-switch links, and network protocols (underlay and overlay). The specification allows for detailed control over routing strategies, including ASN allocations for BGP-based protocols, and supports advanced features like BFD.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status], + Field( + description='FabricStatus defines the observed state of Fabric', + title='Status', + ), + ] = None + + +class FabricList(BaseModel): + apiVersion: str + items: Optional[List[Fabric]] = None + kind: str + + class ISL(BaseModel): apiVersion: str kind: str - metadata: Metadata + metadata: ISLMetadata spec: Annotated[ SpecModel, Field( diff --git a/pydantic_eda/com/nokia/eda/filters/__init__.py b/pydantic_eda/com/nokia/eda/filters/__init__.py index a803b64..5645986 100644 --- a/pydantic_eda/com/nokia/eda/filters/__init__.py +++ b/pydantic_eda/com/nokia/eda/filters/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/filters.eda.nokia.com/v1alpha1/filters.json -# timestamp: 2025-01-29T15:18:40+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/filters.eda.nokia.com/v1alpha1/filters.json +# timestamp: 2025-05-07T11:43:43+00:00 diff --git a/pydantic_eda/com/nokia/eda/filters/v1alpha1.py b/pydantic_eda/com/nokia/eda/filters/v1alpha1.py index 0bd3a2a..8150a9e 100644 --- a/pydantic_eda/com/nokia/eda/filters/v1alpha1.py +++ b/pydantic_eda/com/nokia/eda/filters/v1alpha1.py @@ -1,15 +1,12 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/filters.eda.nokia.com/v1alpha1/filters.json -# timestamp: 2025-01-29T15:18:40+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/filters.eda.nokia.com/v1alpha1/filters.json +# timestamp: 2025-05-07T11:43:43+00:00 from __future__ import annotations -from typing import Any, Dict, List, Literal, Optional +from typing import Annotated, Any, Dict, List, Literal, Optional -from pydantic import BaseModel, Field -from typing_extensions import Annotated - -from ..... import Metadata +from pydantic import BaseModel, Field, RootModel class RateLimit(BaseModel): @@ -41,7 +38,8 @@ class IpEntry(BaseModel): action: Annotated[ Optional[Literal['Drop', 'Accept', 'RateLimit']], Field( - description="An action to take, either 'accept', or 'drop'.", title='Action' + description="An action to take, either 'Accept','Drop', or 'RateLimit'.", + title='Action', ), ] = None destinationPortName: Annotated[ @@ -171,6 +169,49 @@ class IpEntry(BaseModel): 'QMTP', 'QOTD', 'RADIUS', + 'RADIUS-ACCT', + 'REMOTE-MAIL', + 'REMOTEFS', + 'REMOTECMD', + 'RIP', + 'RJE', + 'RLP', + 'RLZDB', + 'RMC', + 'RMONITOR', + 'RPC2PORTMAP', + 'RSYNC', + 'RTELNET', + 'RTSP', + 'SGMP', + 'SILC', + 'SMUX', + 'SNA-GW', + 'SNMP', + 'SNMP-TRAP', + 'SNPP', + 'SMTP', + 'SQL-SVCS', + 'SQL', + 'SSH', + 'SUBMISSION', + 'SUNRPC', + 'SVCLOC', + 'SYSLOG', + 'SYSTAT', + 'TACACS', + 'TALK', + 'TCPMUX', + 'TCPNETHASPSRV', + 'TFTP', + 'TIME', + 'TIMED', + 'UPS', + 'XDMCP', + 'XNS-CH', + 'XNS-MAIL', + 'XNS-TIME', + 'Z3950', ] ], Field( @@ -182,7 +223,7 @@ class IpEntry(BaseModel): Optional[int], Field( description='Destination port to match by numerical value.', - ge=1, + ge=0, le=65535, title='Destination Port Number', ), @@ -445,6 +486,49 @@ class IpEntry(BaseModel): 'QMTP', 'QOTD', 'RADIUS', + 'RADIUS-ACCT', + 'REMOTE-MAIL', + 'REMOTEFS', + 'REMOTECMD', + 'RIP', + 'RJE', + 'RLP', + 'RLZDB', + 'RMC', + 'RMONITOR', + 'RPC2PORTMAP', + 'RSYNC', + 'RTELNET', + 'RTSP', + 'SGMP', + 'SILC', + 'SMUX', + 'SNA-GW', + 'SNMP', + 'SNMP-TRAP', + 'SNPP', + 'SMTP', + 'SQL-SVCS', + 'SQL', + 'SSH', + 'SUBMISSION', + 'SUNRPC', + 'SVCLOC', + 'SYSLOG', + 'SYSTAT', + 'TACACS', + 'TALK', + 'TCPMUX', + 'TCPNETHASPSRV', + 'TFTP', + 'TIME', + 'TIMED', + 'UPS', + 'XDMCP', + 'XNS-CH', + 'XNS-MAIL', + 'XNS-TIME', + 'Z3950', ] ], Field(description='Source port to match by name.', title='Source Port Name'), @@ -453,7 +537,7 @@ class IpEntry(BaseModel): Optional[int], Field( description='Source port to match by numerical value.', - ge=1, + ge=0, le=65535, title='Source Port Number', ), @@ -489,7 +573,8 @@ class MacEntry(BaseModel): action: Annotated[ Optional[Literal['Drop', 'Accept', 'RateLimit']], Field( - description="An action to take, either 'accept', or 'drop'.", title='Action' + description="An action to take, either 'Accept','Drop', or 'RateLimit'.", + title='Action', ), ] = None destinationMAC: Annotated[ @@ -608,10 +693,72 @@ class Spec(BaseModel): ] = None +class ControlPlaneFilterDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class ControlPlaneFilterDeletedResources( + RootModel[List[ControlPlaneFilterDeletedResourceEntry]] +): + root: List[ControlPlaneFilterDeletedResourceEntry] + + +class ControlPlaneFilterMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class SpecModel(BaseModel): + entries: Annotated[ + List[Entry], + Field( + description='Specifies the list of filter entries, in order.', + title='Entries', + ), + ] + + +class FilterDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class FilterDeletedResources(RootModel[List[FilterDeletedResourceEntry]]): + root: List[FilterDeletedResourceEntry] + + +class FilterMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + class ControlPlaneFilter(BaseModel): apiVersion: str kind: str - metadata: Metadata + metadata: ControlPlaneFilterMetadata spec: Annotated[ Spec, Field( @@ -634,20 +781,10 @@ class ControlPlaneFilterList(BaseModel): kind: str -class SpecModel(BaseModel): - entries: Annotated[ - List[Entry], - Field( - description='Specifies the list of filter entries, in order.', - title='Entries', - ), - ] - - class Filter(BaseModel): apiVersion: str kind: str - metadata: Metadata + metadata: FilterMetadata spec: Annotated[ SpecModel, Field( diff --git a/pydantic_eda/com/nokia/eda/interfaces/__init__.py b/pydantic_eda/com/nokia/eda/interfaces/__init__.py index c9a30c2..15b0704 100644 --- a/pydantic_eda/com/nokia/eda/interfaces/__init__.py +++ b/pydantic_eda/com/nokia/eda/interfaces/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/interfaces.eda.nokia.com/v1alpha1/interfaces.json -# timestamp: 2025-01-29T15:18:42+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/interfaces.eda.nokia.com/v1alpha1/interfaces.json +# timestamp: 2025-05-07T11:43:46+00:00 diff --git a/pydantic_eda/com/nokia/eda/interfaces/v1alpha1.py b/pydantic_eda/com/nokia/eda/interfaces/v1alpha1.py index 2164b21..bade249 100644 --- a/pydantic_eda/com/nokia/eda/interfaces/v1alpha1.py +++ b/pydantic_eda/com/nokia/eda/interfaces/v1alpha1.py @@ -1,16 +1,13 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/interfaces.eda.nokia.com/v1alpha1/interfaces.json -# timestamp: 2025-01-29T15:18:42+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/interfaces.eda.nokia.com/v1alpha1/interfaces.json +# timestamp: 2025-05-07T11:43:46+00:00 from __future__ import annotations from datetime import date -from typing import Any, Dict, List, Literal, Optional +from typing import Annotated, Any, Dict, List, Literal, Optional -from pydantic import BaseModel, Field -from typing_extensions import Annotated - -from ..... import Metadata +from pydantic import BaseModel, Field, RootModel class Spec(BaseModel): @@ -37,36 +34,42 @@ class Spec(BaseModel): title='Nodes', ), ] + nodeSelector: Annotated[ + Optional[List[str]], + Field( + description='TopoNode where the parent interfaces are to be broken out.', + title='TopoNode', + ), + ] = None speed: Annotated[ Literal['800G', '400G', '200G', '100G', '50G', '40G', '25G', '10G'], Field(description='The speed of each breakout channel.', title='Speed'), ] -class Breakout(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - Spec, +class BreakoutDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class BreakoutDeletedResources(RootModel[List[BreakoutDeletedResourceEntry]]): + root: List[BreakoutDeletedResourceEntry] + + +class BreakoutMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='Breakout allowes for the configuration of interface breakouts on specified Nodes. This resource specifies the Nodes, parent Interfaces, the number of breakout channels, and the speed of each channel.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='BreakoutStatus defines the observed state of Breakout', - title='Status', - ), - ] = None - - -class BreakoutList(BaseModel): - apiVersion: str - items: Optional[List[Breakout]] = None - kind: str + namespace: str class StormControl(BaseModel): @@ -110,7 +113,7 @@ class Ethernet(BaseModel): fec: Annotated[ Optional[Literal['disabled', 'rs528', 'rs544', 'baser', 'rs108']], Field( - description='Sets the Fordward Error Correction (FEC) on the members of the interface.', + description='Sets the Forward Error Correction (FEC) on the members of the interface.', title='Forward Error Correction', ), ] = None @@ -188,7 +191,7 @@ class Lacp(BaseModel): adminKey: Annotated[ Optional[int], Field( - description='\tConfigure the LACP admin-key to be advertised by the local system.', + description='Configure the LACP admin-key to be advertised by the local system.', ge=1, le=65535, title='Admin Key', @@ -211,14 +214,14 @@ class Lacp(BaseModel): mode: Annotated[ Optional[Literal['active', 'passive']], Field( - description='\tActive is to initiate the transmission of LACP PDUs. Passive is to wait for peer to initiate the transmission of LACP PDUs.[default="active"]', + description='Active is to initiate the transmission of LACP PDUs. Passive is to wait for peer to initiate the transmission of LACP PDUs.[default="active"]', title='Mode', ), ] = 'active' systemIdMac: Annotated[ Optional[str], Field( - description="\tThe MAC address portion of the Node's System ID. This is combined with the system priority to construct the 8-octet system-id.", + description="The MAC address portion of the Node's System ID. This is combined with the system priority to construct the 8-octet system-id.", title='System ID MAC', ), ] = None @@ -333,6 +336,10 @@ class Member(BaseModel): class SpecModel(BaseModel): + ddm: Annotated[ + Optional[bool], + Field(description='Enables reporting of DDM events.', title='DDM'), + ] = None description: Annotated[ Optional[str], Field(description='Description of the interface.', title='Description'), @@ -498,26 +505,6 @@ class Status(BaseModel): ] = None -class Interface(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel, - Field( - description='Interface allows for the configuration of various interface properties such as enabling/disabling the interface, setting descriptions, specifying interface types (e.g., LAG, interface, loopback), configuring VLAN encapsulation, and setting Ethernet or LAG-specific options.', - title='Specification', - ), - ] - status: Annotated[Optional[Status], Field(title='Status')] = None - - -class InterfaceList(BaseModel): - apiVersion: str - items: Optional[List[Interface]] = None - kind: str - - class MemberModel1(BaseModel): aggregateId: Annotated[ Optional[str], @@ -567,10 +554,108 @@ class SpecModel1(BaseModel): ] = 'edge' +class InterfaceStateDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class InterfaceStateDeletedResources( + RootModel[List[InterfaceStateDeletedResourceEntry]] +): + root: List[InterfaceStateDeletedResourceEntry] + + +class InterfaceStateMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class InterfaceDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class InterfaceDeletedResources(RootModel[List[InterfaceDeletedResourceEntry]]): + root: List[InterfaceDeletedResourceEntry] + + +class InterfaceMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class Breakout(BaseModel): + apiVersion: str + kind: str + metadata: BreakoutMetadata + spec: Annotated[ + Spec, + Field( + description='Breakout allows for the configuration of interface breakouts on specified Nodes. This resource specifies the Nodes, parent Interfaces, the number of breakout channels, and the speed of each channel.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='BreakoutStatus defines the observed state of Breakout', + title='Status', + ), + ] = None + + +class BreakoutList(BaseModel): + apiVersion: str + items: Optional[List[Breakout]] = None + kind: str + + +class Interface(BaseModel): + apiVersion: str + kind: str + metadata: InterfaceMetadata + spec: Annotated[ + SpecModel, + Field( + description='Interface allows for the configuration of various interface properties such as enabling/disabling the interface, setting descriptions, specifying interface types (e.g., LAG, interface, loopback), configuring VLAN encapsulation, and setting Ethernet or LAG-specific options.', + title='Specification', + ), + ] + status: Annotated[Optional[Status], Field(title='Status')] = None + + +class InterfaceList(BaseModel): + apiVersion: str + items: Optional[List[Interface]] = None + kind: str + + class InterfaceState(BaseModel): apiVersion: str kind: str - metadata: Metadata + metadata: InterfaceStateMetadata spec: Annotated[SpecModel1, Field(title='Specification')] status: Annotated[ Optional[Dict[str, Any]], diff --git a/pydantic_eda/com/nokia/eda/oam/__init__.py b/pydantic_eda/com/nokia/eda/oam/__init__.py index 83bf361..61d2388 100644 --- a/pydantic_eda/com/nokia/eda/oam/__init__.py +++ b/pydantic_eda/com/nokia/eda/oam/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/oam.eda.nokia.com/v1alpha1/oam.json -# timestamp: 2025-01-29T15:18:43+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/oam.eda.nokia.com/v1alpha1/oam.json +# timestamp: 2025-05-07T11:43:49+00:00 diff --git a/pydantic_eda/com/nokia/eda/oam/v1alpha1.py b/pydantic_eda/com/nokia/eda/oam/v1alpha1.py index 6ea0e01..8128b08 100644 --- a/pydantic_eda/com/nokia/eda/oam/v1alpha1.py +++ b/pydantic_eda/com/nokia/eda/oam/v1alpha1.py @@ -1,16 +1,13 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/oam.eda.nokia.com/v1alpha1/oam.json -# timestamp: 2025-01-29T15:18:43+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/oam.eda.nokia.com/v1alpha1/oam.json +# timestamp: 2025-05-07T11:43:49+00:00 from __future__ import annotations from datetime import date -from typing import List, Literal, Optional +from typing import Annotated, Any, Dict, List, Literal, Optional -from pydantic import BaseModel, Field -from typing_extensions import Annotated - -from ..... import Metadata +from pydantic import BaseModel, Field, RootModel class LocalDestination(BaseModel): @@ -93,7 +90,8 @@ class IpEntry(BaseModel): action: Annotated[ Optional[Literal['Drop', 'Accept', 'RateLimit']], Field( - description="An action to take, either 'accept', or 'drop'.", title='Action' + description="An action to take, either 'Accept','Drop', or 'RateLimit'.", + title='Action', ), ] = None destinationPortName: Annotated[ @@ -223,6 +221,49 @@ class IpEntry(BaseModel): 'QMTP', 'QOTD', 'RADIUS', + 'RADIUS-ACCT', + 'REMOTE-MAIL', + 'REMOTEFS', + 'REMOTECMD', + 'RIP', + 'RJE', + 'RLP', + 'RLZDB', + 'RMC', + 'RMONITOR', + 'RPC2PORTMAP', + 'RSYNC', + 'RTELNET', + 'RTSP', + 'SGMP', + 'SILC', + 'SMUX', + 'SNA-GW', + 'SNMP', + 'SNMP-TRAP', + 'SNPP', + 'SMTP', + 'SQL-SVCS', + 'SQL', + 'SSH', + 'SUBMISSION', + 'SUNRPC', + 'SVCLOC', + 'SYSLOG', + 'SYSTAT', + 'TACACS', + 'TALK', + 'TCPMUX', + 'TCPNETHASPSRV', + 'TFTP', + 'TIME', + 'TIMED', + 'UPS', + 'XDMCP', + 'XNS-CH', + 'XNS-MAIL', + 'XNS-TIME', + 'Z3950', ] ], Field( @@ -234,7 +275,7 @@ class IpEntry(BaseModel): Optional[int], Field( description='Destination port to match by numerical value.', - ge=1, + ge=0, le=65535, title='Destination Port Number', ), @@ -497,6 +538,49 @@ class IpEntry(BaseModel): 'QMTP', 'QOTD', 'RADIUS', + 'RADIUS-ACCT', + 'REMOTE-MAIL', + 'REMOTEFS', + 'REMOTECMD', + 'RIP', + 'RJE', + 'RLP', + 'RLZDB', + 'RMC', + 'RMONITOR', + 'RPC2PORTMAP', + 'RSYNC', + 'RTELNET', + 'RTSP', + 'SGMP', + 'SILC', + 'SMUX', + 'SNA-GW', + 'SNMP', + 'SNMP-TRAP', + 'SNPP', + 'SMTP', + 'SQL-SVCS', + 'SQL', + 'SSH', + 'SUBMISSION', + 'SUNRPC', + 'SVCLOC', + 'SYSLOG', + 'SYSTAT', + 'TACACS', + 'TALK', + 'TCPMUX', + 'TCPNETHASPSRV', + 'TFTP', + 'TIME', + 'TIMED', + 'UPS', + 'XDMCP', + 'XNS-CH', + 'XNS-MAIL', + 'XNS-TIME', + 'Z3950', ] ], Field(description='Source port to match by name.', title='Source Port Name'), @@ -505,7 +589,7 @@ class IpEntry(BaseModel): Optional[int], Field( description='Source port to match by numerical value.', - ge=1, + ge=0, le=65535, title='Source Port Number', ), @@ -779,10 +863,236 @@ class Status(BaseModel): ] = None +class MirrorDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class MirrorDeletedResources(RootModel[List[MirrorDeletedResourceEntry]]): + root: List[MirrorDeletedResourceEntry] + + +class MirrorMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class SpecModel(BaseModel): + address: Annotated[Optional[str], Field(title='address')] = None + networkInstance: Annotated[Optional[str], Field(title='NetworkInstance')] = None + node: Annotated[Optional[str], Field(title='node')] = None + pingType: Annotated[Literal['isl', 'node', 'system'], Field(title='pingtype')] + pods: Annotated[Optional[List[str]], Field(title='Pods')] = None + roles: Annotated[Optional[List[str]], Field(title='roles')] = None + + +class Status1Model(BaseModel): + id: Annotated[Optional[int], Field(description='Id', title='ID')] = None + result: Annotated[ + Literal[ + 'OK', + 'Failed', + 'Terminated', + 'WaitingForInput', + 'Running', + 'WaitingToStart', + 'SubflowWaitingForInput', + ], + Field(description='Aggregate result of the Flow', title='Result'), + ] + + +class PingDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class PingDeletedResources(RootModel[List[PingDeletedResourceEntry]]): + root: List[PingDeletedResourceEntry] + + +class PingMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class Alarm(BaseModel): + description: Annotated[ + Optional[str], + Field(description='The description of the alarm.', title='Description'), + ] = None + probableCause: Annotated[ + Optional[str], + Field(description='The probable cause of the alarm.', title='Probable Cause'), + ] = None + remedialAction: Annotated[ + Optional[str], + Field( + description='The remedial action for the alarm.', title='Remedial Action' + ), + ] = None + + +class Resource(BaseModel): + group: Annotated[ + str, Field(description='The group of the resource to monitor.', title='Group') + ] + kind: Annotated[ + str, Field(description='The kind of resource to monitor.', title='Kind') + ] + name: Annotated[ + str, Field(description='The name of the resource to monitor.', title='Name') + ] + + +class Thresholds(BaseModel): + criticalThreshold: Annotated[ + Optional[int], + Field( + description='The minimum average utilization over the last 1 minute to trigger a critical alarm.\nThis value must be greater than the majorThreshold.', + title='Critical Threshold', + ), + ] = None + delta: Annotated[ + Optional[int], + Field( + description='The delta value for clearing a threshold.\nFor example, with a critical threshold of 90, direction of Rising and a delta of 5, the critical alarm will clear when the utilization drops below 85.', + title='Delta', + ), + ] = 5 + direction: Annotated[ + Literal['Rising', 'Falling'], + Field( + description='Direction of the threshold: "Rising" or "Falling".', + title='Threshold Direction', + ), + ] + majorThreshold: Annotated[ + Optional[int], + Field( + description='The minimum average utilization over the last 1 minute to trigger a major alarm.\nThis value must be greater than the minorThreshold.', + title='Major Threshold', + ), + ] = None + minorThreshold: Annotated[ + Optional[int], + Field( + description='The minimum average utilization over the last 1 minute to trigger a minor alarm.', + title='Minor Threshold', + ), + ] = None + warningThreshold: Annotated[ + Optional[int], + Field( + description='The minimum average utilization over the last 1 minute to trigger a warning alarm.', + title='Warning Threshold', + ), + ] = None + + +class SpecModel1(BaseModel): + alarm: Annotated[ + Optional[Alarm], + Field(description='Alarm details for this threshold.', title='Thresholds'), + ] = None + enabled: Annotated[ + Optional[bool], + Field(description='Enable or disable this threshold.', title='Enabled'), + ] = True + field: Annotated[ + str, + Field( + description='Field to monitor for this threshold, for example `utilization`.', + title='Field', + ), + ] + generateOverlay: Annotated[ + Optional[bool], + Field( + description='Enable or disable generation of a topology overlay for this threshold.', + title='Generate Overlay', + ), + ] = False + name: Annotated[ + str, + Field( + description='The name of this threshold. This name will be used to generate the alarm name, so should follow CamelCase conventions, e.g. VolumeUtilization.', + title='Threshold Name', + ), + ] + path: Annotated[ + str, + Field( + description='Path to monitor for this threshold. This should be the full EDB path to the table containing the field you wish to trigger a threshold on.\nFor example, to monitor the utilization field of the component volume table, you would use `.namespace.node.normal.components_eda_nokia_com.v1.controlmodule.volume`, and set field to `utilization`.', + title='Path', + ), + ] + resource: Annotated[ + Optional[Resource], + Field( + description='Which resource to associate with this threshold. This overrides the destination resource in alarms raised as a result of threshold breaches.\nBy default a resource will attempt to be derived based on the monitored path.', + title='Associated Resource', + ), + ] = None + thresholds: Annotated[ + Thresholds, + Field( + description='Severities and their associated values.', title='Thresholds' + ), + ] + + +class ThresholdDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class ThresholdDeletedResources(RootModel[List[ThresholdDeletedResourceEntry]]): + root: List[ThresholdDeletedResourceEntry] + + +class ThresholdMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + class Mirror(BaseModel): apiVersion: str kind: str - metadata: Metadata + metadata: MirrorMetadata spec: Annotated[ Spec, Field( @@ -803,3 +1113,54 @@ class MirrorList(BaseModel): apiVersion: str items: Optional[List[Mirror]] = None kind: str + + +class Ping(BaseModel): + apiVersion: str + kind: str + metadata: PingMetadata + spec: Annotated[ + SpecModel, + Field( + description='PingSpec defines the desired state of Ping', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model], + Field( + description='PingStatus defines the observed state of Ping', title='Status' + ), + ] = None + + +class PingList(BaseModel): + apiVersion: str + items: Optional[List[Ping]] = None + kind: str + + +class Threshold(BaseModel): + apiVersion: str + kind: str + metadata: ThresholdMetadata + spec: Annotated[ + SpecModel1, + Field( + description='A Threshold allows you to monitor a field in EDB and trigger severity-correct alarms based on the value of that field.\nBy using EDB as a source you are able to trigger thresholds on any published field from a TopoNode, or any other EDB source.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='ThresholdStatus defines the observed state of Threshold', + title='Status', + ), + ] = None + + +class ThresholdList(BaseModel): + apiVersion: str + items: Optional[List[Threshold]] = None + kind: str diff --git a/pydantic_eda/com/nokia/eda/os/__init__.py b/pydantic_eda/com/nokia/eda/os/__init__.py new file mode 100644 index 0000000..12096b6 --- /dev/null +++ b/pydantic_eda/com/nokia/eda/os/__init__.py @@ -0,0 +1,3 @@ +# generated by datamodel-codegen: +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/os.eda.nokia.com/v1alpha1/os.json +# timestamp: 2025-05-07T11:43:52+00:00 diff --git a/pydantic_eda/com/nokia/eda/os/v1alpha1.py b/pydantic_eda/com/nokia/eda/os/v1alpha1.py new file mode 100644 index 0000000..952af63 --- /dev/null +++ b/pydantic_eda/com/nokia/eda/os/v1alpha1.py @@ -0,0 +1,122 @@ +# generated by datamodel-codegen: +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/os.eda.nokia.com/v1alpha1/os.json +# timestamp: 2025-05-07T11:43:52+00:00 + +from __future__ import annotations + +from enum import Enum +from typing import Annotated, Dict, List, Literal, Optional, Union + +from pydantic import BaseModel, Field, RootModel + + +class Checks(Enum): + Interface = 'Interface' + DefaultBGP = 'DefaultBGP' + PingISL = 'PingISL' + PingSystem = 'PingSystem' + + +class ChecksModel(BaseModel): + checks: Annotated[ + Union[List[str], Checks], + Field( + description='Checks to run before (pre) and after (post) any image changes', + title='checks', + ), + ] + force: Annotated[ + bool, Field(description='Do not prompt for user input, even if checks fail') + ] + skip: Annotated[bool, Field(description='Do not run any checks')] + + +class Drains(BaseModel): + interfaceDisableSelectors: Annotated[ + Optional[List[str]], Field(title='InterfaceDisableSelectors') + ] = None + minimumWaitTime: Annotated[Optional[int], Field(title='minimumWaitTime')] = None + skip: Annotated[ + Optional[bool], Field(description='Do not run any drains', title='skip') + ] = None + + +class Prompt(Enum): + AfterPreChecks = 'AfterPreChecks' + AfterPostChecks = 'AfterPostChecks' + + +class Tranche(BaseModel): + name: Annotated[Optional[str], Field(title='name')] = None + nodeSelector: Annotated[Optional[List[str]], Field(title='nodeSelector')] = None + + +class Spec(BaseModel): + canaries: Annotated[Optional[List[str]], Field(title='canaries')] = None + checks: Annotated[Optional[ChecksModel], Field(title='checks')] = None + drains: Annotated[Optional[Drains], Field(title='drains')] = None + nodeProfile: Annotated[Optional[str], Field(title='nodeProfile')] = None + nodeSelector: Annotated[Optional[List[str]], Field(title='nodeSelector')] = None + nodes: Annotated[Optional[List[str]], Field(title='nodes')] = None + prompt: Annotated[Optional[Union[List[str], Prompt]], Field(title='prompt')] = None + tranches: Annotated[Optional[List[Tranche]], Field(title='tranches')] = None + type: Annotated[Literal['node', 'nodeselector', 'tranche'], Field(title='type')] + version: Annotated[Optional[str], Field(title='version')] = None + + +class Status(BaseModel): + id: Annotated[Optional[int], Field(description='Id', title='ID')] = None + result: Annotated[ + Optional[str], Field(description='Aggregate result of the Flow', title='Result') + ] = None + + +class DeployImageDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class DeployImageDeletedResources(RootModel[List[DeployImageDeletedResourceEntry]]): + root: List[DeployImageDeletedResourceEntry] + + +class DeployImageMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class DeployImage(BaseModel): + apiVersion: str + kind: str + metadata: DeployImageMetadata + spec: Annotated[ + Spec, + Field( + description='DeployImageSpec defines the desired state of DeployImage', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status], + Field( + description='DeployImageStatus defines the observed state of DeployImage', + title='Status', + ), + ] = None + + +class DeployImageList(BaseModel): + apiVersion: str + items: Optional[List[DeployImage]] = None + kind: str diff --git a/pydantic_eda/com/nokia/eda/protocols/__init__.py b/pydantic_eda/com/nokia/eda/protocols/__init__.py index ee40c6f..9895532 100644 --- a/pydantic_eda/com/nokia/eda/protocols/__init__.py +++ b/pydantic_eda/com/nokia/eda/protocols/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/protocols.eda.nokia.com/v1alpha1/protocols.json -# timestamp: 2025-01-29T15:18:45+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/protocols.eda.nokia.com/v1alpha1/protocols.json +# timestamp: 2025-05-07T11:43:57+00:00 diff --git a/pydantic_eda/com/nokia/eda/protocols/v1alpha1.py b/pydantic_eda/com/nokia/eda/protocols/v1alpha1.py index aab7e13..765dd12 100644 --- a/pydantic_eda/com/nokia/eda/protocols/v1alpha1.py +++ b/pydantic_eda/com/nokia/eda/protocols/v1alpha1.py @@ -1,16 +1,13 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/protocols.eda.nokia.com/v1alpha1/protocols.json -# timestamp: 2025-01-29T15:18:45+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/protocols.eda.nokia.com/v1alpha1/protocols.json +# timestamp: 2025-05-07T11:43:57+00:00 from __future__ import annotations from datetime import date -from typing import Any, Dict, List, Literal, Optional +from typing import Annotated, Any, Dict, List, Literal, Optional -from pydantic import BaseModel, Field -from typing_extensions import Annotated - -from ..... import Metadata +from pydantic import BaseModel, Field, RootModel class Spec(BaseModel): @@ -19,11 +16,11 @@ class Spec(BaseModel): Field(description="Specifies the aggregator's ASN.", title='Aggregator ASN'), ] = None aggregatorIP: Annotated[ - str, + Optional[str], Field( description="Specifies the aggregator's IP address.", title='Aggregator IP' ), - ] + ] = None generateICMP: Annotated[ Optional[bool], Field( @@ -61,30 +58,31 @@ class Spec(BaseModel): ] = None -class AggregateRoute(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - Spec, +class AggregateRouteDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class AggregateRouteDeletedResources( + RootModel[List[AggregateRouteDeletedResourceEntry]] +): + root: List[AggregateRouteDeletedResourceEntry] + + +class AggregateRouteMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='The AggregateRoute enables the configuration of aggregated routes on a specified Router. This resource allows for the definition of destination prefixes, the selection of a router, and optionally, specific nodes where the aggregate routes should be configured. Advanced options include the ability to generate ICMP unreachable messages for packets matching the aggregate route, and the ability to block the advertisement of all contributing routes in dynamic protocols like BGP.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='AggregateRouteStatus defines the observed state of AggregateRoute', - title='Status', - ), - ] = None - - -class AggregateRouteList(BaseModel): - apiVersion: str - items: Optional[List[AggregateRoute]] = None - kind: str + namespace: str class RemovePrivateAS(BaseModel): @@ -461,30 +459,29 @@ class Status(BaseModel): ] = None -class BGPGroup(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel, +class BGPGroupDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class BGPGroupDeletedResources(RootModel[List[BGPGroupDeletedResourceEntry]]): + root: List[BGPGroupDeletedResourceEntry] + + +class BGPGroupMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='The BGPGroup enables centralized management of BGP peer configurations. This resource allows setting a description, common BGP settings, and peer-specific configurations, simplifying the consistent application of policies across multiple peers. It also includes transport settings, such as local TCP address configuration, passive mode, and TCP MSS.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Status], - Field( - description='BGPGroupStatus defines the observed state of BGPGroup', - title='Status', - ), - ] = None - - -class BGPGroupList(BaseModel): - apiVersion: str - items: Optional[List[BGPGroup]] = None - kind: str + namespace: str class SpecModel1(BaseModel): @@ -747,32 +744,6 @@ class Status1Model(BaseModel): ] = None -class BGPPeer(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel1, - Field( - description='BGPPeer enables the configuration of BGP sessions. It allows specifying a description, an interface reference (either RoutedInterface or IrbInterface), and the peer IP address. The resource also supports dynamic neighbors, common BGP settings, and peer-specific configurations.', - title='Specification', - ), - ] - status: Annotated[ - Optional[Status1Model], - Field( - description='BGPPeerStatus defines the observed state of BGPPeer', - title='Status', - ), - ] = None - - -class BGPPeerList(BaseModel): - apiVersion: str - items: Optional[List[BGPPeer]] = None - kind: str - - class SpecModel2(BaseModel): afiSAFI: Annotated[ Optional[List[str]], @@ -819,30 +790,54 @@ class SpecModel2(BaseModel): ] = None -class BGPPeerState(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel2, +class BGPPeerStateDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class BGPPeerStateDeletedResources(RootModel[List[BGPPeerStateDeletedResourceEntry]]): + root: List[BGPPeerStateDeletedResourceEntry] + + +class BGPPeerStateMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='BGPPeerStateSpec defines the desired state of BGPPeerState', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='BGPPeerStateStatus defines the observed state of BGPPeerState', - title='Status', - ), - ] = None + namespace: str -class BGPPeerStateList(BaseModel): - apiVersion: str - items: Optional[List[BGPPeerState]] = None - kind: str +class BGPPeerDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class BGPPeerDeletedResources(RootModel[List[BGPPeerDeletedResourceEntry]]): + root: List[BGPPeerDeletedResourceEntry] + + +class BGPPeerMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str class SpecModel3(BaseModel): @@ -851,11 +846,11 @@ class SpecModel3(BaseModel): Field(description="Specifies the aggregator's ASN.", title='Aggregator ASN'), ] = None aggregatorIP: Annotated[ - str, + Optional[str], Field( description="Specifies the aggregator's IP address.", title='Aggregator IP' ), - ] + ] = None defaultRouter: Annotated[ str, Field( @@ -886,30 +881,31 @@ class SpecModel3(BaseModel): ] = None -class DefaultAggregateRoute(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel3, +class DefaultAggregateRouteDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class DefaultAggregateRouteDeletedResources( + RootModel[List[DefaultAggregateRouteDeletedResourceEntry]] +): + root: List[DefaultAggregateRouteDeletedResourceEntry] + + +class DefaultAggregateRouteMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='DefaultAggregateRoute allows the configuration of aggregate routes on a DefaultRouter. It includes specifying destination prefixes, the DefaultRouter, and settings for generating ICMP unreachable messages or blocking route advertisement. Additionally, it configures the aggregator’s IP address and ASN for efficient route management.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='DefaultAggregateRouteStatus defines the observed state of DefaultAggregateRoute', - title='Status', - ), - ] = None - - -class DefaultAggregateRouteList(BaseModel): - apiVersion: str - items: Optional[List[DefaultAggregateRoute]] = None - kind: str + namespace: str class L2VPNEVPN(BaseModel): @@ -1133,30 +1129,31 @@ class Status1Model1(BaseModel): ] = None -class DefaultBGPGroup(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel4, +class DefaultBGPGroupDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class DefaultBGPGroupDeletedResources( + RootModel[List[DefaultBGPGroupDeletedResourceEntry]] +): + root: List[DefaultBGPGroupDeletedResourceEntry] + + +class DefaultBGPGroupMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='The DefaultBGPGroup enables centralized management of BGP peer configurations within a DefaultRouter. This resource allows setting a description, common BGP settings, and peer-specific configurations, simplifying the consistent application of policies across multiple peers. It also includes transport settings, such as local TCP address configuration, passive mode, and TCP MSS. type DefaultBGPGroupSpec struct {', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Status1Model1], - Field( - description='DefaultBGPGroupStatus defines the observed state of DefaultBGPGroup.', - title='Status', - ), - ] = None - - -class DefaultBGPGroupList(BaseModel): - apiVersion: str - items: Optional[List[DefaultBGPGroup]] = None - kind: str + namespace: str class SpecModel5(BaseModel): @@ -1428,30 +1425,31 @@ class Status1Model2(BaseModel): ] = None -class DefaultBGPPeer(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel5, +class DefaultBGPPeerDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class DefaultBGPPeerDeletedResources( + RootModel[List[DefaultBGPPeerDeletedResourceEntry]] +): + root: List[DefaultBGPPeerDeletedResourceEntry] + + +class DefaultBGPPeerMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='DefaultBGPPeer enables the configuration of BGP sessions within a DefaultRouter. It allows specifying a description, a DefaultInterface reference, and the peer IP address. The resource also supports dynamic neighbors, common BGP settings, and peer-specific configurations.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Status1Model2], - Field( - description='DefaultBGPPeerStatus defines the observed state of DefaultBGPPeer', - title='Status', - ), - ] = None - - -class DefaultBGPPeerList(BaseModel): - apiVersion: str - items: Optional[List[DefaultBGPPeer]] = None - kind: str + namespace: str class SpecModel6(BaseModel): @@ -1648,26 +1646,6 @@ class Status1Model3(BaseModel): ] = None -class DefaultRouteReflector(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel6, - Field( - description='DefaultRouteReflector enables the configuration of iBGP sessions to RouteReflectorClients. It includes settings for the DefaultInterface, BGP group, client selectors, and the Cluster ID. Additionally, it allows for the configuration of L2VPN EVPN settings and applies common BGP configuration settings to manage routing efficiently within the network.', - title='Specification', - ), - ] - status: Annotated[ - Optional[Status1Model3], - Field( - description='DefaultRouteReflectorStatus defines the observed state of DefaultRouteReflector', - title='Status', - ), - ] = None - - class SpecModel7(BaseModel): asPathOptions: Annotated[ Optional[AsPathOptions], @@ -1857,36 +1835,58 @@ class Status1Model4(BaseModel): ] = None -class DefaultRouteReflectorClient(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel7, +class DefaultRouteReflectorClientDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class DefaultRouteReflectorClientDeletedResources( + RootModel[List[DefaultRouteReflectorClientDeletedResourceEntry]] +): + root: List[DefaultRouteReflectorClientDeletedResourceEntry] + + +class DefaultRouteReflectorClientMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='DefaultRouteReflectorClient enables the configuration of iBGP sessions from a client to RouteReflectors. It includes settings for the DefaultInterface, BGP group, client selectors, and a list of Route Reflector IPs. Additionally, it allows for the configuration of L2VPN EVPN settings and applies common BGP configuration settings to manage routing efficiently within the network.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Status1Model4], - Field( - description='DefaultRouteReflectorClientStatus defines the observed state of DefaultRouteReflectorClient', - title='Status', - ), - ] = None + namespace: str -class DefaultRouteReflectorClientList(BaseModel): - apiVersion: str - items: Optional[List[DefaultRouteReflectorClient]] = None - kind: str +class DefaultRouteReflectorDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None -class DefaultRouteReflectorList(BaseModel): - apiVersion: str - items: Optional[List[DefaultRouteReflector]] = None - kind: str +class DefaultRouteReflectorDeletedResources( + RootModel[List[DefaultRouteReflectorDeletedResourceEntry]] +): + root: List[DefaultRouteReflectorDeletedResourceEntry] + + +class DefaultRouteReflectorMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str class Bfd(BaseModel): @@ -1940,7 +1940,10 @@ class Nexthop(BaseModel): class NexthopGroup(BaseModel): bfd: Annotated[ Optional[Bfd], - Field(description='Enables BFD to the next-hops in the group.', title='BFD'), + Field( + description='Enables BFD to the next-hops in the group. Local and Remote discriminator parameters have been deprecated at this level. Use Nexthop to set these parameters.', + title='BFD', + ), ] = None blackhole: Annotated[ Optional[bool], @@ -1950,8 +1953,9 @@ class NexthopGroup(BaseModel): ), ] = False nexthops: Annotated[ - List[Nexthop], Field(description='Ordered list of nexthops.', title='Nexthops') - ] + Optional[List[Nexthop]], + Field(description='Ordered list of nexthops.', title='Nexthops'), + ] = None resolve: Annotated[ Optional[bool], Field( @@ -2020,30 +2024,31 @@ class Status1Model5(BaseModel): ] = None -class DefaultStaticRoute(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel8, - Field( - description='DefaultStaticRoute enables the configuration of static routes within a DefaultRouter. It allows specifying destination prefixes, route preference, and a nexthop group. This resource facilitates precise control over routing behavior, including options for BFD, route resolution, and blackholing traffic.', - title='Specification', - ), - ] - status: Annotated[ - Optional[Status1Model5], - Field( - description='DefaultStaticRouteStatus defines the observed state of default static route', - title='Status', - ), - ] = None +class DefaultStaticRouteDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None -class DefaultStaticRouteList(BaseModel): - apiVersion: str - items: Optional[List[DefaultStaticRoute]] = None - kind: str +class DefaultStaticRouteDeletedResources( + RootModel[List[DefaultStaticRouteDeletedResourceEntry]] +): + root: List[DefaultStaticRouteDeletedResourceEntry] + + +class DefaultStaticRouteMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str class SpecModel9(BaseModel): @@ -2238,26 +2243,6 @@ class Status1Model6(BaseModel): ] = None -class RouteReflector(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel9, - Field( - description='RouteReflector enables the configuration of iBGP sessions with RouteReflectorClients. It includes settings for selecting Interfaces, client selectors for IPv4 and IPv6, and the option to specify a BGP group and cluster ID.', - title='Specification', - ), - ] - status: Annotated[ - Optional[Status1Model6], - Field( - description='RouteReflectorStatus defines the observed state of RouteReflector', - title='Status', - ), - ] = None - - class SpecModel10(BaseModel): asPathOptions: Annotated[ Optional[AsPathOptions], @@ -2444,32 +2429,6 @@ class Status1Model7(BaseModel): ] = None -class RouteReflectorClient(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel10, - Field( - description='RouteReflectorClient manages the configuration of iBGP sessions between a client and RouteReflectors. This resource allows you to specify the Interface for BGP sessions, set selectors for RouteReflectors, and configure common BGP settings.', - title='Specification', - ), - ] - status: Annotated[ - Optional[Status1Model7], - Field( - description='RouteReflectorClientStatus defines the observed state of RouteReflectorClient', - title='Status', - ), - ] = None - - -class RouteReflectorClientList(BaseModel): - apiVersion: str - items: Optional[List[RouteReflectorClient]] = None - kind: str - - class SpecModel11(BaseModel): defaultRouteReflectorClient: Annotated[ Optional[bool], @@ -2485,36 +2444,58 @@ class SpecModel11(BaseModel): ] = None -class RouteReflectorClientState(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel11, +class RouteReflectorClientStateDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class RouteReflectorClientStateDeletedResources( + RootModel[List[RouteReflectorClientStateDeletedResourceEntry]] +): + root: List[RouteReflectorClientStateDeletedResourceEntry] + + +class RouteReflectorClientStateMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='RouteReflectorClientStateSpec defines the desired state of RouteReflectorClientState', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='RouteReflectorClientStateStatus defines the observed state of RouteReflectorClientState', - title='Status', - ), - ] = None + namespace: str -class RouteReflectorClientStateList(BaseModel): - apiVersion: str - items: Optional[List[RouteReflectorClientState]] = None - kind: str +class RouteReflectorClientDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None -class RouteReflectorList(BaseModel): - apiVersion: str - items: Optional[List[RouteReflector]] = None - kind: str +class RouteReflectorClientDeletedResources( + RootModel[List[RouteReflectorClientDeletedResourceEntry]] +): + root: List[RouteReflectorClientDeletedResourceEntry] + + +class RouteReflectorClientMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str class SpecModel12(BaseModel): @@ -2532,30 +2513,58 @@ class SpecModel12(BaseModel): ] = None -class RouteReflectorState(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel12, +class RouteReflectorStateDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class RouteReflectorStateDeletedResources( + RootModel[List[RouteReflectorStateDeletedResourceEntry]] +): + root: List[RouteReflectorStateDeletedResourceEntry] + + +class RouteReflectorStateMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='RouteReflectorStateSpec defines the desired state of RouteReflectorState', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='RouteReflectorStateStatus defines the observed state of RouteReflectorState', - title='Status', - ), - ] = None + namespace: str -class RouteReflectorStateList(BaseModel): - apiVersion: str - items: Optional[List[RouteReflectorState]] = None - kind: str +class RouteReflectorDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class RouteReflectorDeletedResources( + RootModel[List[RouteReflectorDeletedResourceEntry]] +): + root: List[RouteReflectorDeletedResourceEntry] + + +class RouteReflectorMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str class SpecModel13(BaseModel): @@ -2631,10 +2640,399 @@ class Status1Model8(BaseModel): ] = None +class StaticRouteDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class StaticRouteDeletedResources(RootModel[List[StaticRouteDeletedResourceEntry]]): + root: List[StaticRouteDeletedResourceEntry] + + +class StaticRouteMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class AggregateRoute(BaseModel): + apiVersion: str + kind: str + metadata: AggregateRouteMetadata + spec: Annotated[ + Spec, + Field( + description='The AggregateRoute enables the configuration of aggregated routes on a specified Router. This resource allows for the definition of destination prefixes, the selection of a router, and optionally, specific nodes where the aggregate routes should be configured. Advanced options include the ability to generate ICMP unreachable messages for packets matching the aggregate route, and the ability to block the advertisement of all contributing routes in dynamic protocols like BGP.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='AggregateRouteStatus defines the observed state of AggregateRoute', + title='Status', + ), + ] = None + + +class AggregateRouteList(BaseModel): + apiVersion: str + items: Optional[List[AggregateRoute]] = None + kind: str + + +class BGPGroup(BaseModel): + apiVersion: str + kind: str + metadata: BGPGroupMetadata + spec: Annotated[ + SpecModel, + Field( + description='The BGPGroup enables centralized management of BGP peer configurations. This resource allows setting a description, common BGP settings, and peer-specific configurations, simplifying the consistent application of policies across multiple peers. It also includes transport settings, such as local TCP address configuration, passive mode, and TCP MSS.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status], + Field( + description='BGPGroupStatus defines the observed state of BGPGroup', + title='Status', + ), + ] = None + + +class BGPGroupList(BaseModel): + apiVersion: str + items: Optional[List[BGPGroup]] = None + kind: str + + +class BGPPeer(BaseModel): + apiVersion: str + kind: str + metadata: BGPPeerMetadata + spec: Annotated[ + SpecModel1, + Field( + description='BGPPeer enables the configuration of BGP sessions. It allows specifying a description, an interface reference (either RoutedInterface or IrbInterface), and the peer IP address. The resource also supports dynamic neighbors, common BGP settings, and peer-specific configurations.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model], + Field( + description='BGPPeerStatus defines the observed state of BGPPeer', + title='Status', + ), + ] = None + + +class BGPPeerList(BaseModel): + apiVersion: str + items: Optional[List[BGPPeer]] = None + kind: str + + +class BGPPeerState(BaseModel): + apiVersion: str + kind: str + metadata: BGPPeerStateMetadata + spec: Annotated[ + SpecModel2, + Field( + description='BGPPeerStateSpec defines the desired state of BGPPeerState', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='BGPPeerStateStatus defines the observed state of BGPPeerState', + title='Status', + ), + ] = None + + +class BGPPeerStateList(BaseModel): + apiVersion: str + items: Optional[List[BGPPeerState]] = None + kind: str + + +class DefaultAggregateRoute(BaseModel): + apiVersion: str + kind: str + metadata: DefaultAggregateRouteMetadata + spec: Annotated[ + SpecModel3, + Field( + description='DefaultAggregateRoute allows the configuration of aggregate routes on a DefaultRouter. It includes specifying destination prefixes, the DefaultRouter, and settings for generating ICMP unreachable messages or blocking route advertisement. Additionally, it configures the aggregator’s IP address and ASN for efficient route management.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='DefaultAggregateRouteStatus defines the observed state of DefaultAggregateRoute', + title='Status', + ), + ] = None + + +class DefaultAggregateRouteList(BaseModel): + apiVersion: str + items: Optional[List[DefaultAggregateRoute]] = None + kind: str + + +class DefaultBGPGroup(BaseModel): + apiVersion: str + kind: str + metadata: DefaultBGPGroupMetadata + spec: Annotated[ + SpecModel4, + Field( + description='The DefaultBGPGroup enables centralized management of BGP peer configurations within a DefaultRouter. This resource allows setting a description, common BGP settings, and peer-specific configurations, simplifying the consistent application of policies across multiple peers. It also includes transport settings, such as local TCP address configuration, passive mode, and TCP MSS. type DefaultBGPGroupSpec struct {', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model1], + Field( + description='DefaultBGPGroupStatus defines the observed state of DefaultBGPGroup.', + title='Status', + ), + ] = None + + +class DefaultBGPGroupList(BaseModel): + apiVersion: str + items: Optional[List[DefaultBGPGroup]] = None + kind: str + + +class DefaultBGPPeer(BaseModel): + apiVersion: str + kind: str + metadata: DefaultBGPPeerMetadata + spec: Annotated[ + SpecModel5, + Field( + description='DefaultBGPPeer enables the configuration of BGP sessions within a DefaultRouter. It allows specifying a description, a DefaultInterface reference, and the peer IP address. The resource also supports dynamic neighbors, common BGP settings, and peer-specific configurations.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model2], + Field( + description='DefaultBGPPeerStatus defines the observed state of DefaultBGPPeer', + title='Status', + ), + ] = None + + +class DefaultBGPPeerList(BaseModel): + apiVersion: str + items: Optional[List[DefaultBGPPeer]] = None + kind: str + + +class DefaultRouteReflector(BaseModel): + apiVersion: str + kind: str + metadata: DefaultRouteReflectorMetadata + spec: Annotated[ + SpecModel6, + Field( + description='DefaultRouteReflector enables the configuration of iBGP sessions to RouteReflectorClients. It includes settings for the DefaultInterface, BGP group, client selectors, and the Cluster ID. Additionally, it allows for the configuration of L2VPN EVPN settings and applies common BGP configuration settings to manage routing efficiently within the network.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model3], + Field( + description='DefaultRouteReflectorStatus defines the observed state of DefaultRouteReflector', + title='Status', + ), + ] = None + + +class DefaultRouteReflectorClient(BaseModel): + apiVersion: str + kind: str + metadata: DefaultRouteReflectorClientMetadata + spec: Annotated[ + SpecModel7, + Field( + description='DefaultRouteReflectorClient enables the configuration of iBGP sessions from a client to RouteReflectors. It includes settings for the DefaultInterface, BGP group, client selectors, and a list of Route Reflector IPs. Additionally, it allows for the configuration of L2VPN EVPN settings and applies common BGP configuration settings to manage routing efficiently within the network.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model4], + Field( + description='DefaultRouteReflectorClientStatus defines the observed state of DefaultRouteReflectorClient', + title='Status', + ), + ] = None + + +class DefaultRouteReflectorClientList(BaseModel): + apiVersion: str + items: Optional[List[DefaultRouteReflectorClient]] = None + kind: str + + +class DefaultRouteReflectorList(BaseModel): + apiVersion: str + items: Optional[List[DefaultRouteReflector]] = None + kind: str + + +class DefaultStaticRoute(BaseModel): + apiVersion: str + kind: str + metadata: DefaultStaticRouteMetadata + spec: Annotated[ + SpecModel8, + Field( + description='DefaultStaticRoute enables the configuration of static routes within a DefaultRouter. It allows specifying destination prefixes, route preference, and a nexthop group. This resource facilitates precise control over routing behavior, including options for BFD, route resolution, and blackholing traffic.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model5], + Field( + description='DefaultStaticRouteStatus defines the observed state of default static route', + title='Status', + ), + ] = None + + +class DefaultStaticRouteList(BaseModel): + apiVersion: str + items: Optional[List[DefaultStaticRoute]] = None + kind: str + + +class RouteReflector(BaseModel): + apiVersion: str + kind: str + metadata: RouteReflectorMetadata + spec: Annotated[ + SpecModel9, + Field( + description='RouteReflector enables the configuration of iBGP sessions with RouteReflectorClients. It includes settings for selecting Interfaces, client selectors for IPv4 and IPv6, and the option to specify a BGP group and cluster ID.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model6], + Field( + description='RouteReflectorStatus defines the observed state of RouteReflector', + title='Status', + ), + ] = None + + +class RouteReflectorClient(BaseModel): + apiVersion: str + kind: str + metadata: RouteReflectorClientMetadata + spec: Annotated[ + SpecModel10, + Field( + description='RouteReflectorClient manages the configuration of iBGP sessions between a client and RouteReflectors. This resource allows you to specify the Interface for BGP sessions, set selectors for RouteReflectors, and configure common BGP settings.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model7], + Field( + description='RouteReflectorClientStatus defines the observed state of RouteReflectorClient', + title='Status', + ), + ] = None + + +class RouteReflectorClientList(BaseModel): + apiVersion: str + items: Optional[List[RouteReflectorClient]] = None + kind: str + + +class RouteReflectorClientState(BaseModel): + apiVersion: str + kind: str + metadata: RouteReflectorClientStateMetadata + spec: Annotated[ + SpecModel11, + Field( + description='RouteReflectorClientStateSpec defines the desired state of RouteReflectorClientState', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='RouteReflectorClientStateStatus defines the observed state of RouteReflectorClientState', + title='Status', + ), + ] = None + + +class RouteReflectorClientStateList(BaseModel): + apiVersion: str + items: Optional[List[RouteReflectorClientState]] = None + kind: str + + +class RouteReflectorList(BaseModel): + apiVersion: str + items: Optional[List[RouteReflector]] = None + kind: str + + +class RouteReflectorState(BaseModel): + apiVersion: str + kind: str + metadata: RouteReflectorStateMetadata + spec: Annotated[ + SpecModel12, + Field( + description='RouteReflectorStateSpec defines the desired state of RouteReflectorState', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='RouteReflectorStateStatus defines the observed state of RouteReflectorState', + title='Status', + ), + ] = None + + +class RouteReflectorStateList(BaseModel): + apiVersion: str + items: Optional[List[RouteReflectorState]] = None + kind: str + + class StaticRoute(BaseModel): apiVersion: str kind: str - metadata: Metadata + metadata: StaticRouteMetadata spec: Annotated[ SpecModel13, Field( diff --git a/pydantic_eda/com/nokia/eda/qos/__init__.py b/pydantic_eda/com/nokia/eda/qos/__init__.py index 7c7ae24..e4bab5a 100644 --- a/pydantic_eda/com/nokia/eda/qos/__init__.py +++ b/pydantic_eda/com/nokia/eda/qos/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/qos.eda.nokia.com/v1alpha1/qos.json -# timestamp: 2025-01-29T15:18:46+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/qos.eda.nokia.com/v1alpha1/qos.json +# timestamp: 2025-05-07T11:44:01+00:00 diff --git a/pydantic_eda/com/nokia/eda/qos/v1alpha1.py b/pydantic_eda/com/nokia/eda/qos/v1alpha1.py index 1cf545f..9144db7 100644 --- a/pydantic_eda/com/nokia/eda/qos/v1alpha1.py +++ b/pydantic_eda/com/nokia/eda/qos/v1alpha1.py @@ -1,15 +1,12 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/qos.eda.nokia.com/v1alpha1/qos.json -# timestamp: 2025-01-29T15:18:46+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/qos.eda.nokia.com/v1alpha1/qos.json +# timestamp: 2025-05-07T11:44:01+00:00 from __future__ import annotations -from typing import Any, Dict, List, Literal, Optional +from typing import Annotated, Any, Dict, List, Literal, Optional -from pydantic import BaseModel, Field -from typing_extensions import Annotated - -from ..... import Metadata +from pydantic import BaseModel, Field, RootModel class DropProbabilityItem(BaseModel): @@ -132,6 +129,13 @@ class ForwardingClassToQueueMappingItem(BaseModel): title='Queue', ), ] + queueGroup: Annotated[ + Optional[str], + Field( + description='The queue-group name for queue to forwarding class mapping.', + title='Queue Group', + ), + ] = None class PfcDeadlockAvoidance(BaseModel): @@ -173,11 +177,9 @@ class Queue(BaseModel): ), ] pfcPauseFramePriority: Annotated[ - Optional[List[int]], + Optional[int], Field( description='The pfc-priority received in pfc-pause-frame.', - max_length=8, - min_length=1, title='PFC Priority', ), ] = None @@ -188,16 +190,25 @@ class Queue(BaseModel): Optional[int], Field( description='The peak rate percent used by the scheduler for the queue.', - ge=0, + ge=1, le=100, title='Scheduler Peak Rate Percent', ), ] = None + schedulerPriorityLevel: Annotated[ + Optional[int], + Field( + description='The priority level at this Port Scheduler Policy.', + ge=1, + le=8, + title='Scheduler Priority Level', + ), + ] = None schedulerWeight: Annotated[ Optional[int], Field( description='The weight factor used for the WRR scheduler. If any of the queues have a configured weight the set of queues will use a WRR scheduler and thus all queues must have a weight configured. If no weights are set then the queues are scheduled in strict priority from lowest to higher queue ID.', - ge=1, + ge=0, le=255, title='Scheduler Weight', ), @@ -324,56 +335,56 @@ class Spec(BaseModel): ] = None -class EgressPolicy(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - Spec, +class EgressPolicyDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class EgressPolicyDeletedResources(RootModel[List[EgressPolicyDeletedResourceEntry]]): + root: List[EgressPolicyDeletedResourceEntry] + + +class EgressPolicyMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='EgressPolicySpec defines the desired state of EgressPolicy', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='EgressPolicyStatus defines the observed state of EgressPolicy', - title='Status', - ), - ] = None + namespace: str -class EgressPolicyList(BaseModel): - apiVersion: str - items: Optional[List[EgressPolicy]] = None - kind: str +class ForwardingClassDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None -class ForwardingClass(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - Dict[str, Any], +class ForwardingClassDeletedResources( + RootModel[List[ForwardingClassDeletedResourceEntry]] +): + root: List[ForwardingClassDeletedResourceEntry] + + +class ForwardingClassMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='The ForwaringClass is used as a placeholder for to allow multiple other resources to reference the same forwarding class.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='ForwardingClassStatus defines the observed state of ForwardingClass', - title='Status', - ), - ] = None - - -class ForwardingClassList(BaseModel): - apiVersion: str - items: Optional[List[ForwardingClass]] = None - kind: str + namespace: str class PcpValue(BaseModel): @@ -633,6 +644,49 @@ class IpEntry(BaseModel): 'QMTP', 'QOTD', 'RADIUS', + 'RADIUS-ACCT', + 'REMOTE-MAIL', + 'REMOTEFS', + 'REMOTECMD', + 'RIP', + 'RJE', + 'RLP', + 'RLZDB', + 'RMC', + 'RMONITOR', + 'RPC2PORTMAP', + 'RSYNC', + 'RTELNET', + 'RTSP', + 'SGMP', + 'SILC', + 'SMUX', + 'SNA-GW', + 'SNMP', + 'SNMP-TRAP', + 'SNPP', + 'SMTP', + 'SQL-SVCS', + 'SQL', + 'SSH', + 'SUBMISSION', + 'SUNRPC', + 'SVCLOC', + 'SYSLOG', + 'SYSTAT', + 'TACACS', + 'TALK', + 'TCPMUX', + 'TCPNETHASPSRV', + 'TFTP', + 'TIME', + 'TIMED', + 'UPS', + 'XDMCP', + 'XNS-CH', + 'XNS-MAIL', + 'XNS-TIME', + 'Z3950', ] ], Field( @@ -644,7 +698,7 @@ class IpEntry(BaseModel): Optional[int], Field( description='Destination port to match by numerical value.', - ge=1, + ge=0, le=65535, title='Destination Port Number', ), @@ -900,6 +954,49 @@ class IpEntry(BaseModel): 'QMTP', 'QOTD', 'RADIUS', + 'RADIUS-ACCT', + 'REMOTE-MAIL', + 'REMOTEFS', + 'REMOTECMD', + 'RIP', + 'RJE', + 'RLP', + 'RLZDB', + 'RMC', + 'RMONITOR', + 'RPC2PORTMAP', + 'RSYNC', + 'RTELNET', + 'RTSP', + 'SGMP', + 'SILC', + 'SMUX', + 'SNA-GW', + 'SNMP', + 'SNMP-TRAP', + 'SNPP', + 'SMTP', + 'SQL-SVCS', + 'SQL', + 'SSH', + 'SUBMISSION', + 'SUNRPC', + 'SVCLOC', + 'SYSLOG', + 'SYSTAT', + 'TACACS', + 'TALK', + 'TCPMUX', + 'TCPNETHASPSRV', + 'TFTP', + 'TIME', + 'TIMED', + 'UPS', + 'XDMCP', + 'XNS-CH', + 'XNS-MAIL', + 'XNS-TIME', + 'Z3950', ] ], Field(description='Source port to match by name.', title='Source Port Name'), @@ -908,7 +1005,7 @@ class IpEntry(BaseModel): Optional[int], Field( description='Source port to match by numerical value.', - ge=1, + ge=0, le=65535, title='Source Port Number', ), @@ -980,6 +1077,24 @@ class Classifier(BaseModel): ] +class ForwardingClassToQueueMappingItemModel(BaseModel): + forwardingClasses: Annotated[ + List[str], + Field( + description='The forwarding classes to which the mapping applies, these are references to ForwardingClass resources.', + min_length=1, + title='Forwarding Classes', + ), + ] + queue: Annotated[ + str, + Field( + description='The queue to which the forwarding classes are mapped, this is a reference to a Queue resource.', + title='Queue', + ), + ] + + class ExceedAction(BaseModel): dropProbabilityLevel: Annotated[ Optional[Literal['High', 'Medium', 'Low']], @@ -987,7 +1102,7 @@ class ExceedAction(BaseModel): ] = 'Medium' -class ForwardingClassModel(BaseModel): +class ForwardingClass(BaseModel): forwardingClasses: Annotated[ Optional[List[str]], Field( @@ -1051,7 +1166,7 @@ class Policer(BaseModel): ), ] = None forwardingClasses: Annotated[ - Optional[List[ForwardingClassModel]], + Optional[List[ForwardingClass]], Field( description='The list of forwarding classes with traffic to be sent to the policer. Unless specified all traffic is matched for this policer.', title='Forwarding Class', @@ -1123,11 +1238,9 @@ class QueueModel(BaseModel): Field(description='PFC on threshold.', ge=0, le=100, title='PFC On Threshold'), ] = None pfcPauseFramePriority: Annotated[ - Optional[List[int]], + Optional[int], Field( description='PFC priorities indicated in generated pfc-pause-frame if congestion occurs in a given pfc-queue.', - max_length=8, - min_length=1, title='PFC Priority', ), ] = None @@ -1152,16 +1265,7 @@ class QueueManagementItemModel(BaseModel): description='Percentage of the linecard buffer reserved for accomodating incoming traffic while upstream node reacts to generated PFC-pause frames. Note: this percentage must be common across all EgressPolicies and QueuesSets used on the same linecard.', ge=0, le=100, - title='PFC Reserved Licecard Buffer Percent', - ), - ] = None - pfcReservedBufferSize: Annotated[ - Optional[int], - Field( - description='PFC-reserved-buffer-size.', - ge=0, - le=4294967295, - title='PFC Reserved Buffer Size', + title='PFC Reserved Linecard Buffer Percent', ), ] = None queues: Annotated[ @@ -1178,7 +1282,7 @@ class SpecModel(BaseModel): ), ] = None forwardingClassToQueueMapping: Annotated[ - Optional[List[ForwardingClassToQueueMappingItem]], + Optional[List[ForwardingClassToQueueMappingItemModel]], Field( description='Forwarding class to queue mapping policy.', title='Forwarding Class to Queue Mapping', @@ -1200,33 +1304,107 @@ class SpecModel(BaseModel): ] = None -class IngressPolicy(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel, +class IngressPolicyDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class IngressPolicyDeletedResources(RootModel[List[IngressPolicyDeletedResourceEntry]]): + root: List[IngressPolicyDeletedResourceEntry] + + +class IngressPolicyMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='IngressPolicySpec defines the desired state of IngressPolicy', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], + namespace: str + + +class Attachment(BaseModel): + interface: Annotated[ + Optional[str], Field( - description='IngressPolicyStatus defines the observed state of IngressPolicy', - title='Status', + description='Specifies the Interface on which to deploy the policies.', + title='Interface', + ), + ] = None + interfaceType: Annotated[ + Optional[Literal['ACCESS', 'NETWORK']], + Field( + description='Used for platforms that differentiate between access/service interfaces and network interface. These platforms may require different classifiers depending on whether they are applied on access/service interfaces or network interfaces. Specifies whether the classifier should be configured as a service Egress classifier or network Egress classifier', + title='Interface Type', + ), + ] = None + subInterfaceIndex: Annotated[ + Optional[int], + Field( + description='Specifies the SubInterfaceIndex on which to deploy the policies.', + title='SubInterface Index', ), ] = None -class IngressPolicyList(BaseModel): - apiVersion: str - items: Optional[List[IngressPolicy]] = None - kind: str +class SpecModel1(BaseModel): + attachments: Annotated[ + List[Attachment], + Field( + description='Specifies a list of Interfaces and subinterfaces on which to deploy the policies.', + title='Interfaces', + ), + ] + egressPolicy: Annotated[ + Optional[str], + Field( + description='Specifies an EgressPolicy to deploy on the specified Node.', + title='Egress Policy', + ), + ] = None + ingressPolicy: Annotated[ + Optional[str], + Field( + description='Specifies the IngressPolicy to deploy on the specified Node.', + title='Ingress Policy', + ), + ] = None -class SpecModel1(BaseModel): +class PolicyAttachmentDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class PolicyAttachmentDeletedResources( + RootModel[List[PolicyAttachmentDeletedResourceEntry]] +): + root: List[PolicyAttachmentDeletedResourceEntry] + + +class PolicyAttachmentMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class SpecModel2(BaseModel): egressPolicy: Annotated[ Optional[str], Field( @@ -1275,62 +1453,218 @@ class SpecModel1(BaseModel): ] = None -class PolicyDeployment(BaseModel): +class PolicyDeploymentDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class PolicyDeploymentDeletedResources( + RootModel[List[PolicyDeploymentDeletedResourceEntry]] +): + root: List[PolicyDeploymentDeletedResourceEntry] + + +class PolicyDeploymentMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class SpecModel3(BaseModel): + queueID: Annotated[ + Optional[int], + Field( + description='The ID of the queue on which to apply the properties. This is mandatory for usage of queus on SROS and is ignored on other operating systems.', + title='Queue ID', + ), + ] = None + queueType: Annotated[ + Literal['Normal', 'Pfc'], + Field( + description='QueueType specifies whether this is a normal queue or a PFC queue', + title='Queue Type', + ), + ] + trafficType: Annotated[ + Literal['Unicast', 'Multicast'], + Field( + description='The traffic type of the queue, either unicast or multicast.', + title='Traffic Type', + ), + ] + + +class QueueDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class QueueDeletedResources(RootModel[List[QueueDeletedResourceEntry]]): + root: List[QueueDeletedResourceEntry] + + +class QueueMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class EgressPolicy(BaseModel): apiVersion: str kind: str - metadata: Metadata + metadata: EgressPolicyMetadata spec: Annotated[ - SpecModel1, + Spec, Field( - description='PolicyDeploymentSpec defines the desired state of PolicyDeployment', + description='EgressPolicySpec defines the desired state of EgressPolicy', title='Specification', ), ] status: Annotated[ Optional[Dict[str, Any]], Field( - description='PolicyDeploymentStatus defines the observed state of PolicyDeployment', + description='EgressPolicyStatus defines the observed state of EgressPolicy', title='Status', ), ] = None -class PolicyDeploymentList(BaseModel): +class EgressPolicyList(BaseModel): apiVersion: str - items: Optional[List[PolicyDeployment]] = None + items: Optional[List[EgressPolicy]] = None kind: str -class SpecModel2(BaseModel): - queueID: Annotated[ - Optional[int], +class ForwardingClassModel(BaseModel): + apiVersion: str + kind: str + metadata: ForwardingClassMetadata + spec: Annotated[ + Dict[str, Any], Field( - description='The ID of the queue on which to apply the properties. This is mandatory for usage of queus on SROS and is ignored on other operating systems.', - title='Queue ID', + description='The ForwaringClass is used as a placeholder for to allow multiple other resources to reference the same forwarding class.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='ForwardingClassStatus defines the observed state of ForwardingClass', + title='Status', ), ] = None - queueType: Annotated[ - Literal['Normal', 'Pfc'], + + +class ForwardingClassList(BaseModel): + apiVersion: str + items: Optional[List[ForwardingClassModel]] = None + kind: str + + +class IngressPolicy(BaseModel): + apiVersion: str + kind: str + metadata: IngressPolicyMetadata + spec: Annotated[ + SpecModel, Field( - description='QueueType specifies whether this is a normal queue or a PFC queue', - title='Queue Type', + description='IngressPolicySpec defines the desired state of IngressPolicy', + title='Specification', ), ] - trafficType: Annotated[ - Literal['Unicast', 'Multicast'], + status: Annotated[ + Optional[Dict[str, Any]], Field( - description='The traffic type of the queue, either unicast or multicast.', - title='Traffic Type', + description='IngressPolicyStatus defines the observed state of IngressPolicy', + title='Status', + ), + ] = None + + +class IngressPolicyList(BaseModel): + apiVersion: str + items: Optional[List[IngressPolicy]] = None + kind: str + + +class PolicyAttachment(BaseModel): + apiVersion: str + kind: str + metadata: PolicyAttachmentMetadata + spec: Annotated[ + SpecModel1, + Field( + description='PolicyAttachmentSpec defines the desired state of PolicyAttachment', + title='Specification', ), ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='PolicyAttachmentStatus defines the observed state of PolicyAttachment', + title='Status', + ), + ] = None -class QueueModel1(BaseModel): +class PolicyAttachmentList(BaseModel): apiVersion: str + items: Optional[List[PolicyAttachment]] = None kind: str - metadata: Metadata + + +class PolicyDeployment(BaseModel): + apiVersion: str + kind: str + metadata: PolicyDeploymentMetadata spec: Annotated[ SpecModel2, + Field( + description='PolicyDeploymentSpec defines the desired state of PolicyDeployment', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='PolicyDeploymentStatus defines the observed state of PolicyDeployment', + title='Status', + ), + ] = None + + +class PolicyDeploymentList(BaseModel): + apiVersion: str + items: Optional[List[PolicyDeployment]] = None + kind: str + + +class QueueModel1(BaseModel): + apiVersion: str + kind: str + metadata: QueueMetadata + spec: Annotated[ + SpecModel3, Field( description='The Queue resource is used to define the properties of a queue, which can then be referenced by other resources.', title='Specification', diff --git a/pydantic_eda/com/nokia/eda/routing/__init__.py b/pydantic_eda/com/nokia/eda/routing/__init__.py index b88d169..a40c01c 100644 --- a/pydantic_eda/com/nokia/eda/routing/__init__.py +++ b/pydantic_eda/com/nokia/eda/routing/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/routing.eda.nokia.com/v1alpha1/routing.json -# timestamp: 2025-01-29T15:18:47+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/routing.eda.nokia.com/v1alpha1/routing.json +# timestamp: 2025-05-07T11:44:04+00:00 diff --git a/pydantic_eda/com/nokia/eda/routing/v1alpha1.py b/pydantic_eda/com/nokia/eda/routing/v1alpha1.py index 081180c..db8a57f 100644 --- a/pydantic_eda/com/nokia/eda/routing/v1alpha1.py +++ b/pydantic_eda/com/nokia/eda/routing/v1alpha1.py @@ -1,16 +1,13 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/routing.eda.nokia.com/v1alpha1/routing.json -# timestamp: 2025-01-29T15:18:47+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/routing.eda.nokia.com/v1alpha1/routing.json +# timestamp: 2025-05-07T11:44:04+00:00 from __future__ import annotations from datetime import date -from typing import List, Literal, Optional +from typing import Annotated, Dict, List, Literal, Optional -from pydantic import BaseModel, Field -from typing_extensions import Annotated - -from ..... import Metadata +from pydantic import BaseModel, Field, RootModel class Bfd(BaseModel): @@ -41,8 +38,8 @@ class Bfd(BaseModel): minEchoReceiveInterval: Annotated[ int, Field( - description='The number of packets that must be missed to declare this session as down.', - ge=250000, + description='The minimum interval between echo packets the local node can receive in microseconds', + ge=0, le=100000000, title='Minimum Echo Receive Interval', ), @@ -174,30 +171,31 @@ class Status(BaseModel): ] = None -class DefaultInterface(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - Spec, +class DefaultInterfaceDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class DefaultInterfaceDeletedResources( + RootModel[List[DefaultInterfaceDeletedResourceEntry]] +): + root: List[DefaultInterfaceDeletedResourceEntry] + + +class DefaultInterfaceMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='DefaultInterface enables the configuration of default interfaces, including Interface references, DefaultRouter, VLAN IDs, IP MTU settings, and options for IPv4 and IPv6 addresses. It also supports unnumbered interfaces and BFD (Bidirectional Forwarding Detection) configuration.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Status], - Field( - description='DefaultInterfaceStatus defines the observed state of DefaultInterface', - title='Status', - ), - ] = None - - -class DefaultInterfaceList(BaseModel): - apiVersion: str - items: Optional[List[DefaultInterface]] = None - kind: str + namespace: str class Multipath(BaseModel): @@ -355,6 +353,20 @@ class Bgp(BaseModel): title='Enable Rapid Withdrawal', ), ] = False + sendCommunityLarge: Annotated[ + Optional[bool], + Field( + description='When false, all large (12 byte) BGP communities from all outbound routes advertised to the peer are stripped.', + title='Send Community Large', + ), + ] = None + sendCommunityStandard: Annotated[ + Optional[bool], + Field( + description='When false, all standard (4 byte) communities from all outbound routes advertised to the peer are stripped.', + title='Send Community Standard', + ), + ] = None waitForFibInstall: Annotated[ Optional[bool], Field( @@ -364,6 +376,23 @@ class Bgp(BaseModel): ] = False +class RouteLeaking(BaseModel): + exportPolicy: Annotated[ + str, + Field( + description='Reference to a Policy resource to use when evaluating route exports from the DefaultRouter.', + title='Export Policy', + ), + ] + importPolicy: Annotated[ + str, + Field( + description='Reference to a Policy resource to use when evaluating route imports into the DefaultRouter.', + title='Import Policy', + ), + ] + + class SpecModel(BaseModel): bgp: Annotated[ Optional[Bgp], @@ -397,6 +426,13 @@ class SpecModel(BaseModel): title='Node', ), ] + routeLeaking: Annotated[ + Optional[RouteLeaking], + Field( + description='Route leaking controlled by routing policies in and out of the DefaultRouter.', + title='Route Leaking', + ), + ] = None routerID: Annotated[ str, Field(description='Router ID in dotted quad notation.', title='Router ID') ] @@ -429,30 +465,29 @@ class Status1Model(BaseModel): ] = None -class DefaultRouter(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel, +class DefaultRouterDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class DefaultRouterDeletedResources(RootModel[List[DefaultRouterDeletedResourceEntry]]): + root: List[DefaultRouterDeletedResourceEntry] + + +class DefaultRouterMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='DefaultRouter enables the configuration of default routing instances on a specified Node, including options for BGP configuration, import and export policies, and router IDs.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Status1Model], - Field( - description='DefaultRouterStatus defines the observed state of DefaultRouter', - title='Status', - ), - ] = None - - -class DefaultRouterList(BaseModel): - apiVersion: str - items: Optional[List[DefaultRouter]] = None - kind: str + namespace: str class SpecModel1(BaseModel): @@ -484,30 +519,29 @@ class Status1Model1(BaseModel): ] = None -class Drain(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel1, +class DrainDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class DrainDeletedResources(RootModel[List[DrainDeletedResourceEntry]]): + root: List[DrainDeletedResourceEntry] + + +class DrainMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='Drain allows for the controlled disabling or draining of specific DefaultRouters, either by selecting them through labels or directly referencing them, ensuring traffic is safely rerouted or dropped before the routers are decommissioned.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Status1Model1], - Field( - description='DrainStatus defines the observed state of Drain.', - title='Status', - ), - ] = None - - -class DrainList(BaseModel): - apiVersion: str - items: Optional[List[Drain]] = None - kind: str + namespace: str class SpecModel2(BaseModel): @@ -568,10 +602,115 @@ class Status1Model2(BaseModel): ] = None +class SystemInterfaceDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class SystemInterfaceDeletedResources( + RootModel[List[SystemInterfaceDeletedResourceEntry]] +): + root: List[SystemInterfaceDeletedResourceEntry] + + +class SystemInterfaceMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class DefaultInterface(BaseModel): + apiVersion: str + kind: str + metadata: DefaultInterfaceMetadata + spec: Annotated[ + Spec, + Field( + description='DefaultInterface enables the configuration of default interfaces, including Interface references, DefaultRouter, VLAN IDs, IP MTU settings, and options for IPv4 and IPv6 addresses. It also supports unnumbered interfaces and BFD (Bidirectional Forwarding Detection) configuration.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status], + Field( + description='DefaultInterfaceStatus defines the observed state of DefaultInterface', + title='Status', + ), + ] = None + + +class DefaultInterfaceList(BaseModel): + apiVersion: str + items: Optional[List[DefaultInterface]] = None + kind: str + + +class DefaultRouter(BaseModel): + apiVersion: str + kind: str + metadata: DefaultRouterMetadata + spec: Annotated[ + SpecModel, + Field( + description='DefaultRouter enables the configuration of default routing instances on a specified Node, including options for BGP configuration, import and export policies, and router IDs.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model], + Field( + description='DefaultRouterStatus defines the observed state of DefaultRouter', + title='Status', + ), + ] = None + + +class DefaultRouterList(BaseModel): + apiVersion: str + items: Optional[List[DefaultRouter]] = None + kind: str + + +class Drain(BaseModel): + apiVersion: str + kind: str + metadata: DrainMetadata + spec: Annotated[ + SpecModel1, + Field( + description='Drain allows for the controlled disabling or draining of specific DefaultRouters, either by selecting them through labels or directly referencing them, ensuring traffic is safely rerouted or dropped before the routers are decommissioned.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model1], + Field( + description='DrainStatus defines the observed state of Drain.', + title='Status', + ), + ] = None + + +class DrainList(BaseModel): + apiVersion: str + items: Optional[List[Drain]] = None + kind: str + + class SystemInterface(BaseModel): apiVersion: str kind: str - metadata: Metadata + metadata: SystemInterfaceMetadata spec: Annotated[ SpecModel2, Field( diff --git a/pydantic_eda/com/nokia/eda/routingpolicies/__init__.py b/pydantic_eda/com/nokia/eda/routingpolicies/__init__.py index 12b074d..40c9673 100644 --- a/pydantic_eda/com/nokia/eda/routingpolicies/__init__.py +++ b/pydantic_eda/com/nokia/eda/routingpolicies/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/routingpolicies.eda.nokia.com/v1alpha1/routingpolicies.json -# timestamp: 2025-01-29T15:18:48+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/routingpolicies.eda.nokia.com/v1alpha1/routingpolicies.json +# timestamp: 2025-05-07T11:44:07+00:00 diff --git a/pydantic_eda/com/nokia/eda/routingpolicies/v1alpha1.py b/pydantic_eda/com/nokia/eda/routingpolicies/v1alpha1.py index 0608274..2d3e29b 100644 --- a/pydantic_eda/com/nokia/eda/routingpolicies/v1alpha1.py +++ b/pydantic_eda/com/nokia/eda/routingpolicies/v1alpha1.py @@ -1,15 +1,54 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/routingpolicies.eda.nokia.com/v1alpha1/routingpolicies.json -# timestamp: 2025-01-29T15:18:48+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/routingpolicies.eda.nokia.com/v1alpha1/routingpolicies.json +# timestamp: 2025-05-07T11:44:07+00:00 from __future__ import annotations -from typing import Any, Dict, List, Literal, Optional +from typing import Annotated, Any, Dict, List, Literal, Optional -from pydantic import BaseModel, Field -from typing_extensions import Annotated +from pydantic import BaseModel, Field, RootModel -from ..... import Metadata + +class Spec(BaseModel): + expressionMatch: Annotated[ + Optional[str], + Field( + description='Options that determine the matching criteria that applies to the list of community members.', + title='Expression Match', + ), + ] = None + members: Annotated[ + Optional[List[str]], + Field( + description='A standard BGP community value, regular expression or well-known name or else a large BGP community value or regular expression.', + title='Community Set Members', + ), + ] = None + + +class CommunitySetDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class CommunitySetDeletedResources(RootModel[List[CommunitySetDeletedResourceEntry]]): + root: List[CommunitySetDeletedResourceEntry] + + +class CommunitySetMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str class Bgp(BaseModel): @@ -76,6 +115,12 @@ class Action(BaseModel): class BgpModel(BaseModel): + communitySet: Annotated[ + Optional[str], + Field( + description='Match conditions for BGP communities.', title='BGP Community' + ), + ] = None evpnRouteType: Annotated[ Optional[List[int]], Field( @@ -144,7 +189,7 @@ class StatementItem(BaseModel): ] -class Spec(BaseModel): +class SpecModel(BaseModel): defaultAction: Annotated[ Optional[DefaultAction], Field( @@ -158,30 +203,29 @@ class Spec(BaseModel): ] = None -class Policy(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - Spec, +class PolicyDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class PolicyDeletedResources(RootModel[List[PolicyDeletedResourceEntry]]): + root: List[PolicyDeletedResourceEntry] + + +class PolicyMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='Policy defines a set of rules and actions to manage network traffic or routing behavior, with statements that include matching conditions and actions, such as accepting or rejecting routes, or modifying route attributes like BGP parameters.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='PolicyStatus defines the observed state of Policy.', - title='Status', - ), - ] = None - - -class PolicyList(BaseModel): - apiVersion: str - items: Optional[List[Policy]] = None - kind: str + namespace: str class PrefixItem(BaseModel): @@ -219,7 +263,7 @@ class PrefixItem(BaseModel): ] = None -class SpecModel(BaseModel): +class SpecModel1(BaseModel): prefix: Annotated[ List[PrefixItem], Field( @@ -229,12 +273,89 @@ class SpecModel(BaseModel): ] -class PrefixSet(BaseModel): +class PrefixSetDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class PrefixSetDeletedResources(RootModel[List[PrefixSetDeletedResourceEntry]]): + root: List[PrefixSetDeletedResourceEntry] + + +class PrefixSetMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class CommunitySet(BaseModel): apiVersion: str kind: str - metadata: Metadata + metadata: CommunitySetMetadata + spec: Annotated[ + Spec, + Field( + description='CommunitySetSpec defines the desired state of CommunitySet', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='CommunitySetStatus defines the observed state of CommunitySet', + title='Status', + ), + ] = None + + +class CommunitySetList(BaseModel): + apiVersion: str + items: Optional[List[CommunitySet]] = None + kind: str + + +class Policy(BaseModel): + apiVersion: str + kind: str + metadata: PolicyMetadata spec: Annotated[ SpecModel, + Field( + description='Policy defines a set of rules and actions to manage network traffic or routing behavior, with statements that include matching conditions and actions, such as accepting or rejecting routes, or modifying route attributes like BGP parameters.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='PolicyStatus defines the observed state of Policy.', + title='Status', + ), + ] = None + + +class PolicyList(BaseModel): + apiVersion: str + items: Optional[List[Policy]] = None + kind: str + + +class PrefixSet(BaseModel): + apiVersion: str + kind: str + metadata: PrefixSetMetadata + spec: Annotated[ + SpecModel1, Field( description='PrefixSet defines a collection of IP prefixes, which may include specific CIDR blocks or a range of prefixes. This set is typically used for matching routes or implementing routing policies.', title='Specification', diff --git a/pydantic_eda/com/nokia/eda/security/__init__.py b/pydantic_eda/com/nokia/eda/security/__init__.py index f3b423f..72f729e 100644 --- a/pydantic_eda/com/nokia/eda/security/__init__.py +++ b/pydantic_eda/com/nokia/eda/security/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/security.eda.nokia.com/v1alpha1/security.json -# timestamp: 2025-01-29T15:18:50+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/security.eda.nokia.com/v1alpha1/security.json +# timestamp: 2025-05-07T11:44:10+00:00 diff --git a/pydantic_eda/com/nokia/eda/security/v1alpha1.py b/pydantic_eda/com/nokia/eda/security/v1alpha1.py index fd9eecb..5528a2a 100644 --- a/pydantic_eda/com/nokia/eda/security/v1alpha1.py +++ b/pydantic_eda/com/nokia/eda/security/v1alpha1.py @@ -1,15 +1,12 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/security.eda.nokia.com/v1alpha1/security.json -# timestamp: 2025-01-29T15:18:50+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/security.eda.nokia.com/v1alpha1/security.json +# timestamp: 2025-05-07T11:44:10+00:00 from __future__ import annotations -from typing import Any, Dict, List, Literal, Optional +from typing import Annotated, Any, Dict, List, Literal, Optional -from pydantic import BaseModel, Field -from typing_extensions import Annotated - -from ..... import Metadata +from pydantic import BaseModel, Field, RootModel class Key(BaseModel): @@ -21,10 +18,75 @@ class Spec(BaseModel): key: Annotated[Key, Field(title='Key')] +class SpecModel(BaseModel): + keychain: Annotated[ + str, Field(description='Reference to a Keychain', title='Keychain') + ] + node: Annotated[ + str, + Field( + description='Reference to a Node on which to push the BgpGroup', + title='Node', + ), + ] + + +class KeychainDeploymentDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class KeychainDeploymentDeletedResources( + RootModel[List[KeychainDeploymentDeletedResourceEntry]] +): + root: List[KeychainDeploymentDeletedResourceEntry] + + +class KeychainDeploymentMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class KeychainDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class KeychainDeletedResources(RootModel[List[KeychainDeletedResourceEntry]]): + root: List[KeychainDeletedResourceEntry] + + +class KeychainMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + class Keychain(BaseModel): apiVersion: str kind: str - metadata: Metadata + metadata: KeychainMetadata spec: Annotated[ Spec, Field( @@ -41,23 +103,10 @@ class Keychain(BaseModel): ] = None -class SpecModel(BaseModel): - keychain: Annotated[ - str, Field(description='Reference to a Keychain', title='Keychain') - ] - node: Annotated[ - str, - Field( - description='Reference to a Node on which to push the BgpGroup', - title='Node', - ), - ] - - class KeychainDeployment(BaseModel): apiVersion: str kind: str - metadata: Metadata + metadata: KeychainDeploymentMetadata spec: Annotated[ SpecModel, Field( diff --git a/pydantic_eda/com/nokia/eda/services/__init__.py b/pydantic_eda/com/nokia/eda/services/__init__.py index bdce510..4158756 100644 --- a/pydantic_eda/com/nokia/eda/services/__init__.py +++ b/pydantic_eda/com/nokia/eda/services/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/services.eda.nokia.com/v1alpha1/services.json -# timestamp: 2025-01-29T15:18:52+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/services.eda.nokia.com/v1alpha1/services.json +# timestamp: 2025-05-07T11:44:15+00:00 diff --git a/pydantic_eda/com/nokia/eda/services/v1alpha1.py b/pydantic_eda/com/nokia/eda/services/v1alpha1.py index b574562..573ce59 100644 --- a/pydantic_eda/com/nokia/eda/services/v1alpha1.py +++ b/pydantic_eda/com/nokia/eda/services/v1alpha1.py @@ -1,16 +1,13 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/services.eda.nokia.com/v1alpha1/services.json -# timestamp: 2025-01-29T15:18:52+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/services.eda.nokia.com/v1alpha1/services.json +# timestamp: 2025-05-07T11:44:15+00:00 from __future__ import annotations from datetime import date -from typing import Any, Dict, List, Literal, Optional +from typing import Annotated, Any, Dict, List, Literal, Optional -from pydantic import BaseModel, Field -from typing_extensions import Annotated - -from ..... import Metadata +from pydantic import BaseModel, Field, RootModel class DynamicLearning(BaseModel): @@ -140,6 +137,10 @@ class MacDuplicationDetection(BaseModel): class Spec(BaseModel): + description: Annotated[ + Optional[str], + Field(description='The description of the BridgeDomain.', title='Description'), + ] = None evi: Annotated[ Optional[int], Field( @@ -315,30 +316,29 @@ class Status(BaseModel): ] = None -class BridgeDomain(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - Spec, +class BridgeDomainDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class BridgeDomainDeletedResources(RootModel[List[BridgeDomainDeletedResourceEntry]]): + root: List[BridgeDomainDeletedResourceEntry] + + +class BridgeDomainMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='The BridgeDomain enables the configuration and management of Layer 2 virtual networks. It includes settings for VNI, EVI, route targets for import and export, and tunnel index allocation. Additionally, the specification allows for advanced features such as MAC address table limits, aging, Proxy ARP and detection of MAC and IP duplication.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Status], - Field( - description='BridgeDomainStatus defines the observed state of BridgeDomain', - title='Status', - ), - ] = None - - -class BridgeDomainList(BaseModel): - apiVersion: str - items: Optional[List[BridgeDomain]] = None - kind: str + namespace: str class Egress(BaseModel): @@ -419,6 +419,12 @@ class SpecModel(BaseModel): title='Bridge Domain', ), ] + description: Annotated[ + Optional[str], + Field( + description='The description of the BridgeInterface.', title='Description' + ), + ] = None egress: Annotated[ Optional[Egress], Field( @@ -567,24 +573,31 @@ class Status1Model(BaseModel): ] = None -class BridgeInterface(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel, +class BridgeInterfaceDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class BridgeInterfaceDeletedResources( + RootModel[List[BridgeInterfaceDeletedResourceEntry]] +): + root: List[BridgeInterfaceDeletedResourceEntry] + + +class BridgeInterfaceMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='The BridgeInterface enables the attachment of network interfaces to a Bridge Domain. It includes settings for VLAN ID allocation, interface attachment, and actions on ingress and egress traffic. The specification supports integration with other network resources, such as Bridge Domains and Interfaces, and provides advanced features like MAC Duplication Detection with configurable actions.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[Optional[Status1Model], Field(title='Status')] = None - - -class BridgeInterfaceList(BaseModel): - apiVersion: str - items: Optional[List[BridgeInterface]] = None - kind: str + namespace: str class SpecModel1(BaseModel): @@ -633,30 +646,29 @@ class SpecModel1(BaseModel): ] = None -class DHCPRelay(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel1, +class DHCPRelayDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class DHCPRelayDeletedResources(RootModel[List[DHCPRelayDeletedResourceEntry]]): + root: List[DHCPRelayDeletedResourceEntry] + + +class DHCPRelayMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='The DHCPRelay enables the forwarding of DHCP requests and responses between clients and servers across different networks. This resource allows for the configuration of various DHCP relay sub-options, such as CircuitID, RemoteID, and ClientLinkLayerAddress, to provide detailed client information. It also includes settings for specifying the router to reach the DHCP server, the list of DHCP servers to forward requests to, and selectors for Routed and IRB interfaces where the relay will be configured. Additionally, the GI Address option can be set to derive the Gateway IP address from the selected interface, ensuring correct routing of DHCP messages.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='DHCPRelayStatus defines the observed state of DHCPRelay', - title='Status', - ), - ] = None - - -class DHCPRelayList(BaseModel): - apiVersion: str - items: Optional[List[DHCPRelay]] = None - kind: str + namespace: str class Bfd(BaseModel): @@ -800,6 +812,141 @@ class IpAddress(BaseModel): ] = None +class Prefix(BaseModel): + autonomousFlag: Annotated[ + Optional[bool], + Field( + description='When this is set in the prefix information option hosts can use the prefix for stateless address autoconfiguration (SLAAC).', + title='Autonomous Flag', + ), + ] = True + onLinkFlag: Annotated[ + Optional[bool], + Field( + description='When this is set in the prefix information option hosts can use the prefix for on-link determination.', + title='On-Link Flag', + ), + ] = True + preferredLifetime: Annotated[ + Optional[int], + Field( + description='The length of time in seconds (relative to the time the packet is sent) that addresses generated from the prefix via stateless address autoconfiguration remain preferred.', + ge=0, + le=4294967295, + title='Preferred Lifetime', + ), + ] = 604800 + prefix: Annotated[ + str, + Field( + description='An IPv6 global unicast address prefix.', title='IPv6 Prefix' + ), + ] + validLifetime: Annotated[ + Optional[int], + Field( + description='The length of time in seconds (relative to the time the packet is sent) that the prefix is valid for the purpose of on-link determination.', + ge=0, + le=4294967295, + title='Valid Lifetime', + ), + ] = 2592000 + + +class Ipv6RouterAdvertisement(BaseModel): + currentHopLimit: Annotated[ + int, + Field( + description='The current hop limit to advertise in the router advertisement messages.', + ge=0, + le=255, + title='Current Hop Limit', + ), + ] + enabled: Annotated[ + bool, + Field( + description='Enable or disable IPv6 router advertisements.', + title='Enable Router Advertisements', + ), + ] + ipMTU: Annotated[ + Optional[int], + Field( + description='The IP MTU to advertise in the router advertisement messages.', + ge=1280, + le=9486, + title='IP MTU', + ), + ] = None + managedConfigurationFlag: Annotated[ + bool, + Field( + description='Enable DHCPv6 for address configuration (M-bit).', + title='Managed Configuration Flag', + ), + ] + maxAdvertisementInterval: Annotated[ + int, + Field( + description='Maximum time between router advertisements (in seconds).', + ge=4, + le=1800, + title='Maximum Advertisement Interval', + ), + ] + minAdvertisementInterval: Annotated[ + int, + Field( + description='Minimum time between router advertisements (in seconds).', + ge=3, + le=1350, + title='Minimum Advertisement Interval', + ), + ] + otherConfigurationFlag: Annotated[ + bool, + Field( + description='Enable DHCPv6 for other configuration (O-bit).', + title='Other Configuration Flag', + ), + ] + prefixes: Annotated[ + Optional[List[Prefix]], + Field( + description='IPv6 prefixes to advertise in router advertisements.', + title='Prefixes', + ), + ] = None + reachableTime: Annotated[ + Optional[int], + Field( + description='Time in milliseconds for Neighbor Unreachability Detection.', + ge=0, + le=3600000, + title='Reachable Time', + ), + ] = 0 + retransmitTime: Annotated[ + int, + Field( + description='Time in milliseconds between retransmitted NS messages.', + ge=0, + le=1800000, + title='Retransmit Time', + ), + ] + routerLifetime: Annotated[ + int, + Field( + description='Router lifetime in seconds for default gateway.', + ge=0, + le=9000, + title='Router Lifetime', + ), + ] + + class L3ProxyARPND(BaseModel): proxyARP: Annotated[ Optional[bool], @@ -873,6 +1020,10 @@ class SpecModel2(BaseModel): bridgeDomain: Annotated[ str, Field(description='Reference to a BridgeDomain.', title='Bridge Domain') ] + description: Annotated[ + Optional[str], + Field(description='The description of the IRBInterface.', title='Description'), + ] = None egress: Annotated[ Optional[Egress], Field( @@ -912,6 +1063,9 @@ class SpecModel2(BaseModel): title='IP MTU', ), ] = 1500 + ipv6RouterAdvertisement: Annotated[ + Optional[Ipv6RouterAdvertisement], Field(title='IPv6 Router Advertisement') + ] = None l3ProxyARPND: Annotated[ Optional[L3ProxyARPND], Field( @@ -929,7 +1083,7 @@ class SpecModel2(BaseModel): unnumbered: Annotated[ Optional[Literal['IPV6']], Field( - description='Enables the use of unnumbered interfaces on the IRBInterface. If IPv6 is specified, no IP address are configured on the sub-interface and only the link local address will be used. If any IP addresses are specified for either IPv4 or IPv6 that will take precedence and IPs will be assigned to the interfaces.', + description='Enables the use of unnumbered interfaces on the IRBInterface. If IPv6 is specified, no IP address are configured on the sub-interface and only the link local address will be used. If any IP addresses are specified for either IPv4 or IPv6 that will take precedence and IPs will be assigned to the interfaces.(Deprecated, Use IPv6RouterAdvertisement)', title='Unnumbered', ), ] = None @@ -1012,30 +1166,29 @@ class Status1Model1(BaseModel): ] = None -class IRBInterface(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel2, +class IRBInterfaceDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class IRBInterfaceDeletedResources(RootModel[List[IRBInterfaceDeletedResourceEntry]]): + root: List[IRBInterfaceDeletedResourceEntry] + + +class IRBInterfaceMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='The IRBInterface enables the configuration and management of Layer 3 interfaces associated with a BridgeDomain. This resource allows for the specification of various parameters, including IP MTU, learning of unsolicited ARPs, IPv4 and IPv6 addresses, and unnumbered interface settings. It also supports advanced features such as BFD configuration, Virtual IP discovery, and ARP/ND-related settings like Proxy ARP/ND and EVPN route advertisement.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Status1Model1], - Field( - description='IRBInterfaceStatus defines the observed state of IRBInterface', - title='Status', - ), - ] = None - - -class IRBInterfaceList(BaseModel): - apiVersion: str - items: Optional[List[IRBInterface]] = None - kind: str + namespace: str class SpecModel3(BaseModel): @@ -1052,6 +1205,12 @@ class SpecModel3(BaseModel): description='Enables BFD on the RoutedInterface.', title='BFD Configuration' ), ] = None + description: Annotated[ + Optional[str], + Field( + description='The description of the RoutedInterface.', title='Description' + ), + ] = None egress: Annotated[ Optional[Egress], Field( @@ -1095,6 +1254,9 @@ class SpecModel3(BaseModel): title='IPv6 Addresses', ), ] = None + ipv6RouterAdvertisement: Annotated[ + Optional[Ipv6RouterAdvertisement], Field(title='IPv6 Router Advertisement') + ] = None l3ProxyARPND: Annotated[ Optional[L3ProxyARPND], Field( @@ -1112,7 +1274,7 @@ class SpecModel3(BaseModel): unnumbered: Annotated[ Optional[Literal['IPV6']], Field( - description='Enables the use of unnumbered interfaces on the RoutedInterface. If IPv6 is specified, no IP address are configured on the sub-interface and only the link local address will be used. If any IP addresses are specified for either IPv4 or IPv6 that will take precedence and IPs will be assigned to the interfaces.', + description='Enables the use of unnumbered interfaces on the IRBInterface. If IPv6 is specified, no IP address are configured on the sub-interface and only the link local address will be used. If any IP addresses are specified for either IPv4 or IPv6 that will take precedence and IPs will be assigned to the interfaces. (Deprecated, Use IPv6RouterAdvertisement)', title='Unnumbered', ), ] = None @@ -1219,30 +1381,31 @@ class Status1Model2(BaseModel): ] = None -class RoutedInterface(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel3, +class RoutedInterfaceDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class RoutedInterfaceDeletedResources( + RootModel[List[RoutedInterfaceDeletedResourceEntry]] +): + root: List[RoutedInterfaceDeletedResourceEntry] + + +class RoutedInterfaceMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='The RoutedInterface enables the configuration and management of Layer 3 interfaces for routing traffic between different networks. This resource allows for specifying an underlying Interface and Router, configuring VLAN IDs, and setting the IP MTU. It also supports the learning of unsolicited ARPs, defining both IPv4 and IPv6 addresses, and enabling unnumbered interfaces. Advanced features such as BFD configuration, Proxy ARP/ND, and ARP timeout settings are included to ensure robust and efficient routing.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Status1Model2], - Field( - description='RoutedInterfaceStatus defines the observed state of RoutedInterface', - title='Status', - ), - ] = None - - -class RoutedInterfaceList(BaseModel): - apiVersion: str - items: Optional[List[RoutedInterface]] = None - kind: str + namespace: str class IpAliasNexthop(BaseModel): @@ -1398,11 +1561,70 @@ class Bgp(BaseModel): ] = False +class PrefixItem(BaseModel): + hashBucketsPerPath: Annotated[ + int, + Field( + description='The number of times each next-hop is repeated in the fill pattern if there are max-paths ECMP next-hops.', + ge=1, + le=32, + title='Max Paths', + ), + ] + maxECMP: Annotated[ + int, + Field( + description='The maximum number of ECMP next-hops per route associated with the resilient-hash prefix.', + ge=1, + le=64, + title='Max ECMP', + ), + ] + prefix: Annotated[ + str, + Field( + description='IPv4 or IPv6 prefix. Active routes in the FIB that exactly match this prefix or that are longer matches of this prefix are provided with resilient-hash programming.', + title='Prefix', + ), + ] + + +class IpLoadBalancing(BaseModel): + prefix: Annotated[ + Optional[List[PrefixItem]], + Field( + description='IPv4 or IPv6 prefix. Active routes in the FIB that exactly match this prefix or that are longer matches of this prefix are provided with resilient-hash programming.', + title='Prefix', + ), + ] = None + + +class RouteLeaking(BaseModel): + exportPolicy: Annotated[ + Optional[str], + Field( + description='Reference to a Policy resource to use when evaluating route exports from the DefaultRouter.', + title='Export Policy', + ), + ] = None + importPolicy: Annotated[ + Optional[str], + Field( + description='Reference to a Policy resource to use when evaluating route imports into the DefaultRouter.', + title='Import Policy', + ), + ] = None + + class SpecModel4(BaseModel): bgp: Annotated[ Optional[Bgp], Field(description='BGP configuration.', title='BGP Configuration'), ] = None + description: Annotated[ + Optional[str], + Field(description='The description of the Router.', title='Description'), + ] = None evi: Annotated[ Optional[int], Field( @@ -1435,6 +1657,13 @@ class SpecModel4(BaseModel): title='Import Target', ), ] = None + ipLoadBalancing: Annotated[ + Optional[IpLoadBalancing], + Field( + description='IPv4 or IPv6 prefix. Active routes in the FIB that exactly match this prefix or that are longer matches of this prefix are provided with resilient-hash programming.', + title='Prefix', + ), + ] = None nodeSelector: Annotated[ Optional[List[str]], Field( @@ -1442,6 +1671,13 @@ class SpecModel4(BaseModel): title='Node Selector', ), ] = None + routeLeaking: Annotated[ + Optional[RouteLeaking], + Field( + description='Route leaking controlled by routing policies in and out of the DefaultRouter.', + title='Route Leaking', + ), + ] = None routerID: Annotated[ Optional[str], Field(description='Router ID.', title='Router ID') ] = None @@ -1559,30 +1795,29 @@ class Status1Model3(BaseModel): ] = None -class Router(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel4, +class RouterDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class RouterDeletedResources(RootModel[List[RouterDeletedResourceEntry]]): + root: List[RouterDeletedResourceEntry] + + +class RouterMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='The Router enables the configuration and management of routing functions within a network. This resource allows for setting a unique Router ID, configuring VNIs and EVIs with options for automatic allocation, and defining import and export route targets. It also includes advanced configuration options such as BGP settings, including autonomous system numbers, AFI/SAFI options, and route advertisement preferences. Node selectors can be used to constrain the deployment of the router to specific nodes within the network.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Status1Model3], - Field( - description='RouterStatus defines the observed state of Router', - title='Status', - ), - ] = None - - -class RouterList(BaseModel): - apiVersion: str - items: Optional[List[Router]] = None - kind: str + namespace: str class SpecModel5(BaseModel): @@ -1593,6 +1828,10 @@ class SpecModel5(BaseModel): title='Bridge Domain', ), ] + description: Annotated[ + Optional[str], + Field(description='The description of the VLAN.', title='Description'), + ] = None egress: Annotated[ Optional[Egress], Field(description='Manages actions on traffic at Egress.', title='Egress'), @@ -1699,27 +1938,36 @@ class Status1Model4(BaseModel): ] = None -class VLAN(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel5, +class VLANDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class VLANDeletedResources(RootModel[List[VLANDeletedResourceEntry]]): + root: List[VLANDeletedResourceEntry] + + +class VLANMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='The VLAN enables the configuration and management of VLAN and their association with BridgeDomains. This resource allows for specifying the associated BridgeDomain, selecting interfaces based on label selectors, and configuring VLAN IDs with options for auto-allocation from a VLAN pool. It also supports advanced configurations such as ingress and egress traffic management, and overrides for MAC Duplication Detection actions when enabled in the associated BridgeDomain.', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[Optional[Status1Model4], Field(title='Status')] = None - - -class VLANList(BaseModel): - apiVersion: str - items: Optional[List[VLAN]] = None - kind: str + namespace: str class SpecModel6(BaseModel): + description: Annotated[ + Optional[str], + Field(description='The description of the BridgeDomain.', title='Description'), + ] = None evi: Annotated[ Optional[int], Field( @@ -1814,7 +2062,7 @@ class SpecModel6(BaseModel): ] = 'vni-pool' -class BridgeDomainModel(BaseModel): +class BridgeDomain(BaseModel): name: Annotated[ str, Field(description='The name of the BridgeDomain.', title='Bridge Domain Name'), @@ -1835,6 +2083,12 @@ class SpecModel7(BaseModel): title='Bridge Domain', ), ] + description: Annotated[ + Optional[str], + Field( + description='The description of the BridgeInterface.', title='Description' + ), + ] = None egress: Annotated[ Optional[Egress], Field( @@ -1896,7 +2150,7 @@ class SpecModel7(BaseModel): ] -class BridgeInterfaceModel(BaseModel): +class BridgeInterface(BaseModel): name: Annotated[ str, Field( @@ -1935,6 +2189,10 @@ class SpecModel8(BaseModel): bridgeDomain: Annotated[ str, Field(description='Reference to a BridgeDomain.', title='Bridge Domain') ] + description: Annotated[ + Optional[str], + Field(description='The description of the IRBInterface.', title='Description'), + ] = None egress: Annotated[ Optional[Egress], Field( @@ -1974,6 +2232,9 @@ class SpecModel8(BaseModel): title='IP MTU', ), ] = 1500 + ipv6RouterAdvertisement: Annotated[ + Optional[Ipv6RouterAdvertisement], Field(title='IPv6 Router Advertisement') + ] = None l3ProxyARPND: Annotated[ Optional[L3ProxyARPND], Field( @@ -1991,7 +2252,7 @@ class SpecModel8(BaseModel): unnumbered: Annotated[ Optional[Literal['IPV6']], Field( - description='Enables the use of unnumbered interfaces on the IRBInterface. If IPv6 is specified, no IP address are configured on the sub-interface and only the link local address will be used. If any IP addresses are specified for either IPv4 or IPv6 that will take precedence and IPs will be assigned to the interfaces.', + description='Enables the use of unnumbered interfaces on the IRBInterface. If IPv6 is specified, no IP address are configured on the sub-interface and only the link local address will be used. If any IP addresses are specified for either IPv4 or IPv6 that will take precedence and IPs will be assigned to the interfaces.(Deprecated, Use IPv6RouterAdvertisement)', title='Unnumbered', ), ] = None @@ -2624,6 +2885,12 @@ class Action(BaseModel): class BgpModel2(BaseModel): + communitySet: Annotated[ + Optional[str], + Field( + description='Match conditions for BGP communities.', title='BGP Community' + ), + ] = None evpnRouteType: Annotated[ Optional[List[int]], Field( @@ -2713,7 +2980,7 @@ class Policy(BaseModel): ] = None -class PrefixItem(BaseModel): +class PrefixItemModel(BaseModel): endRange: Annotated[ Optional[int], Field( @@ -2750,7 +3017,7 @@ class PrefixItem(BaseModel): class SpecModel12(BaseModel): prefix: Annotated[ - List[PrefixItem], + List[PrefixItemModel], Field( description='List of IPv4 or IPv6 prefixes in CIDR notation.', title='Prefixes', @@ -2830,7 +3097,10 @@ class Nexthop(BaseModel): class NexthopGroup(BaseModel): bfd: Annotated[ Optional[BfdModel], - Field(description='Enables BFD to the next-hops in the group.', title='BFD'), + Field( + description='Enables BFD to the next-hops in the group. Local and Remote discriminator parameters have been deprecated at this level. Use Nexthop to set these parameters.', + title='BFD', + ), ] = None blackhole: Annotated[ Optional[bool], @@ -2840,8 +3110,9 @@ class NexthopGroup(BaseModel): ), ] = False nexthops: Annotated[ - List[Nexthop], Field(description='Ordered list of nexthops.', title='Nexthops') - ] + Optional[List[Nexthop]], + Field(description='Ordered list of nexthops.', title='Nexthops'), + ] = None resolve: Annotated[ Optional[bool], Field( @@ -2969,6 +3240,12 @@ class SpecModel14(BaseModel): description='Enables BFD on the RoutedInterface.', title='BFD Configuration' ), ] = None + description: Annotated[ + Optional[str], + Field( + description='The description of the RoutedInterface.', title='Description' + ), + ] = None egress: Annotated[ Optional[Egress], Field( @@ -3012,6 +3289,9 @@ class SpecModel14(BaseModel): title='IPv6 Addresses', ), ] = None + ipv6RouterAdvertisement: Annotated[ + Optional[Ipv6RouterAdvertisement], Field(title='IPv6 Router Advertisement') + ] = None l3ProxyARPND: Annotated[ Optional[L3ProxyARPND], Field( @@ -3029,7 +3309,7 @@ class SpecModel14(BaseModel): unnumbered: Annotated[ Optional[Literal['IPV6']], Field( - description='Enables the use of unnumbered interfaces on the RoutedInterface. If IPv6 is specified, no IP address are configured on the sub-interface and only the link local address will be used. If any IP addresses are specified for either IPv4 or IPv6 that will take precedence and IPs will be assigned to the interfaces.', + description='Enables the use of unnumbered interfaces on the IRBInterface. If IPv6 is specified, no IP address are configured on the sub-interface and only the link local address will be used. If any IP addresses are specified for either IPv4 or IPv6 that will take precedence and IPs will be assigned to the interfaces. (Deprecated, Use IPv6RouterAdvertisement)', title='Unnumbered', ), ] = None @@ -3049,7 +3329,7 @@ class SpecModel14(BaseModel): ] = 'vlan-pool' -class RoutedInterfaceModel(BaseModel): +class RoutedInterface(BaseModel): name: Annotated[ str, Field( @@ -3176,11 +3456,43 @@ class BgpModel3(BaseModel): ] = False +class PrefixItemModel1(BaseModel): + hashBucketsPerPath: Annotated[ + int, + Field( + description='The number of times each next-hop is repeated in the fill pattern if there are max-paths ECMP next-hops.', + ge=1, + le=32, + title='Max Paths', + ), + ] + maxECMP: Annotated[ + int, + Field( + description='The maximum number of ECMP next-hops per route associated with the resilient-hash prefix.', + ge=1, + le=64, + title='Max ECMP', + ), + ] + prefix: Annotated[ + str, + Field( + description='IPv4 or IPv6 prefix. Active routes in the FIB that exactly match this prefix or that are longer matches of this prefix are provided with resilient-hash programming.', + title='Prefix', + ), + ] + + class SpecModel15(BaseModel): bgp: Annotated[ Optional[BgpModel3], Field(description='BGP configuration.', title='BGP Configuration'), ] = None + description: Annotated[ + Optional[str], + Field(description='The description of the Router.', title='Description'), + ] = None evi: Annotated[ Optional[int], Field( @@ -3213,6 +3525,13 @@ class SpecModel15(BaseModel): title='Import Target', ), ] = None + ipLoadBalancing: Annotated[ + Optional[IpLoadBalancing], + Field( + description='IPv4 or IPv6 prefix. Active routes in the FIB that exactly match this prefix or that are longer matches of this prefix are provided with resilient-hash programming.', + title='Prefix', + ), + ] = None nodeSelector: Annotated[ Optional[List[str]], Field( @@ -3220,6 +3539,13 @@ class SpecModel15(BaseModel): title='Node Selector', ), ] = None + routeLeaking: Annotated[ + Optional[RouteLeaking], + Field( + description='Route leaking controlled by routing policies in and out of the DefaultRouter.', + title='Route Leaking', + ), + ] = None routerID: Annotated[ Optional[str], Field(description='Router ID.', title='Router ID') ] = None @@ -3255,7 +3581,7 @@ class SpecModel15(BaseModel): ] = 'vni-pool' -class RouterModel(BaseModel): +class Router(BaseModel): name: Annotated[ str, Field(description='The name of the Router.', title='Router Name') ] @@ -3273,6 +3599,10 @@ class SpecModel16(BaseModel): title='Bridge Domain', ), ] + description: Annotated[ + Optional[str], + Field(description='The description of the VLAN.', title='Description'), + ] = None egress: Annotated[ Optional[Egress], Field(description='Manages actions on traffic at Egress.', title='Egress'), @@ -3345,13 +3675,13 @@ class Vlan(BaseModel): class SpecModel17(BaseModel): bridgeDomains: Annotated[ - Optional[List[BridgeDomainModel]], + Optional[List[BridgeDomain]], Field( description='List of Subnets. [emits=BridgeDomain]', title='Bridge Domains' ), ] = None bridgeInterfaces: Annotated[ - Optional[List[BridgeInterfaceModel]], + Optional[List[BridgeInterface]], Field( description='List of BridgeInterfaces. [emits=BridgeInterface]', title='Bridge Interfaces', @@ -3369,14 +3699,14 @@ class SpecModel17(BaseModel): Field(description='Protocols to configure.', title='Protocols'), ] = None routedInterfaces: Annotated[ - Optional[List[RoutedInterfaceModel]], + Optional[List[RoutedInterface]], Field( description='List of RoutedInterface. [emits=RoutedInterface]', title='Routed Interfaces', ), ] = None routers: Annotated[ - Optional[List[RouterModel]], + Optional[List[Router]], Field(description='List of Routers.[emits=Router]', title='Routers'), ] = None vlans: Annotated[ @@ -3479,10 +3809,207 @@ class Status1Model5(BaseModel): ] = None +class VirtualNetworkDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class VirtualNetworkDeletedResources( + RootModel[List[VirtualNetworkDeletedResourceEntry]] +): + root: List[VirtualNetworkDeletedResourceEntry] + + +class VirtualNetworkMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class BridgeDomainModel(BaseModel): + apiVersion: str + kind: str + metadata: BridgeDomainMetadata + spec: Annotated[ + Spec, + Field( + description='The BridgeDomain enables the configuration and management of Layer 2 virtual networks. It includes settings for VNI, EVI, route targets for import and export, and tunnel index allocation. Additionally, the specification allows for advanced features such as MAC address table limits, aging, Proxy ARP and detection of MAC and IP duplication.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status], + Field( + description='BridgeDomainStatus defines the observed state of BridgeDomain', + title='Status', + ), + ] = None + + +class BridgeDomainList(BaseModel): + apiVersion: str + items: Optional[List[BridgeDomainModel]] = None + kind: str + + +class BridgeInterfaceModel(BaseModel): + apiVersion: str + kind: str + metadata: BridgeInterfaceMetadata + spec: Annotated[ + SpecModel, + Field( + description='The BridgeInterface enables the attachment of network interfaces to a Bridge Domain. It includes settings for VLAN ID allocation, interface attachment, and actions on ingress and egress traffic. The specification supports integration with other network resources, such as Bridge Domains and Interfaces, and provides advanced features like MAC Duplication Detection with configurable actions.', + title='Specification', + ), + ] + status: Annotated[Optional[Status1Model], Field(title='Status')] = None + + +class BridgeInterfaceList(BaseModel): + apiVersion: str + items: Optional[List[BridgeInterfaceModel]] = None + kind: str + + +class DHCPRelay(BaseModel): + apiVersion: str + kind: str + metadata: DHCPRelayMetadata + spec: Annotated[ + SpecModel1, + Field( + description='The DHCPRelay enables the forwarding of DHCP requests and responses between clients and servers across different networks. This resource allows for the configuration of various DHCP relay sub-options, such as CircuitID, RemoteID, and ClientLinkLayerAddress, to provide detailed client information. It also includes settings for specifying the router to reach the DHCP server, the list of DHCP servers to forward requests to, and selectors for Routed and IRB interfaces where the relay will be configured. Additionally, the GI Address option can be set to derive the Gateway IP address from the selected interface, ensuring correct routing of DHCP messages.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='DHCPRelayStatus defines the observed state of DHCPRelay', + title='Status', + ), + ] = None + + +class DHCPRelayList(BaseModel): + apiVersion: str + items: Optional[List[DHCPRelay]] = None + kind: str + + +class IRBInterface(BaseModel): + apiVersion: str + kind: str + metadata: IRBInterfaceMetadata + spec: Annotated[ + SpecModel2, + Field( + description='The IRBInterface enables the configuration and management of Layer 3 interfaces associated with a BridgeDomain. This resource allows for the specification of various parameters, including IP MTU, learning of unsolicited ARPs, IPv4 and IPv6 addresses, and unnumbered interface settings. It also supports advanced features such as BFD configuration, Virtual IP discovery, and ARP/ND-related settings like Proxy ARP/ND and EVPN route advertisement.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model1], + Field( + description='IRBInterfaceStatus defines the observed state of IRBInterface', + title='Status', + ), + ] = None + + +class IRBInterfaceList(BaseModel): + apiVersion: str + items: Optional[List[IRBInterface]] = None + kind: str + + +class RoutedInterfaceModel(BaseModel): + apiVersion: str + kind: str + metadata: RoutedInterfaceMetadata + spec: Annotated[ + SpecModel3, + Field( + description='The RoutedInterface enables the configuration and management of Layer 3 interfaces for routing traffic between different networks. This resource allows for specifying an underlying Interface and Router, configuring VLAN IDs, and setting the IP MTU. It also supports the learning of unsolicited ARPs, defining both IPv4 and IPv6 addresses, and enabling unnumbered interfaces. Advanced features such as BFD configuration, Proxy ARP/ND, and ARP timeout settings are included to ensure robust and efficient routing.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model2], + Field( + description='RoutedInterfaceStatus defines the observed state of RoutedInterface', + title='Status', + ), + ] = None + + +class RoutedInterfaceList(BaseModel): + apiVersion: str + items: Optional[List[RoutedInterfaceModel]] = None + kind: str + + +class RouterModel(BaseModel): + apiVersion: str + kind: str + metadata: RouterMetadata + spec: Annotated[ + SpecModel4, + Field( + description='The Router enables the configuration and management of routing functions within a network. This resource allows for setting a unique Router ID, configuring VNIs and EVIs with options for automatic allocation, and defining import and export route targets. It also includes advanced configuration options such as BGP settings, including autonomous system numbers, AFI/SAFI options, and route advertisement preferences. Node selectors can be used to constrain the deployment of the router to specific nodes within the network.', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status1Model3], + Field( + description='RouterStatus defines the observed state of Router', + title='Status', + ), + ] = None + + +class RouterList(BaseModel): + apiVersion: str + items: Optional[List[RouterModel]] = None + kind: str + + +class VLAN(BaseModel): + apiVersion: str + kind: str + metadata: VLANMetadata + spec: Annotated[ + SpecModel5, + Field( + description='The VLAN enables the configuration and management of VLAN and their association with BridgeDomains. This resource allows for specifying the associated BridgeDomain, selecting interfaces based on label selectors, and configuring VLAN IDs with options for auto-allocation from a VLAN pool. It also supports advanced configurations such as ingress and egress traffic management, and overrides for MAC Duplication Detection actions when enabled in the associated BridgeDomain.', + title='Specification', + ), + ] + status: Annotated[Optional[Status1Model4], Field(title='Status')] = None + + +class VLANList(BaseModel): + apiVersion: str + items: Optional[List[VLAN]] = None + kind: str + + class VirtualNetwork(BaseModel): apiVersion: str kind: str - metadata: Metadata + metadata: VirtualNetworkMetadata spec: Annotated[ SpecModel17, Field( diff --git a/pydantic_eda/com/nokia/eda/siteinfo/__init__.py b/pydantic_eda/com/nokia/eda/siteinfo/__init__.py index ffe29e2..9924993 100644 --- a/pydantic_eda/com/nokia/eda/siteinfo/__init__.py +++ b/pydantic_eda/com/nokia/eda/siteinfo/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/siteinfo.eda.nokia.com/v1alpha1/siteinfo.json -# timestamp: 2025-01-29T15:18:53+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/siteinfo.eda.nokia.com/v1alpha1/siteinfo.json +# timestamp: 2025-05-07T11:44:18+00:00 diff --git a/pydantic_eda/com/nokia/eda/siteinfo/v1alpha1.py b/pydantic_eda/com/nokia/eda/siteinfo/v1alpha1.py index 6a0f42b..dac8531 100644 --- a/pydantic_eda/com/nokia/eda/siteinfo/v1alpha1.py +++ b/pydantic_eda/com/nokia/eda/siteinfo/v1alpha1.py @@ -1,15 +1,12 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/siteinfo.eda.nokia.com/v1alpha1/siteinfo.json -# timestamp: 2025-01-29T15:18:53+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/siteinfo.eda.nokia.com/v1alpha1/siteinfo.json +# timestamp: 2025-05-07T11:44:18+00:00 from __future__ import annotations -from typing import List, Optional +from typing import Annotated, Dict, List, Optional -from pydantic import BaseModel, Field -from typing_extensions import Annotated - -from ..... import Metadata +from pydantic import BaseModel, Field, RootModel class Spec(BaseModel): @@ -52,10 +49,35 @@ class Status(BaseModel): ] = None +class BannerDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class BannerDeletedResources(RootModel[List[BannerDeletedResourceEntry]]): + root: List[BannerDeletedResourceEntry] + + +class BannerMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + class Banner(BaseModel): apiVersion: str kind: str - metadata: Metadata + metadata: BannerMetadata spec: Annotated[ Spec, Field( diff --git a/pydantic_eda/com/nokia/eda/system/__init__.py b/pydantic_eda/com/nokia/eda/system/__init__.py index 2fb5c83..142b419 100644 --- a/pydantic_eda/com/nokia/eda/system/__init__.py +++ b/pydantic_eda/com/nokia/eda/system/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/system.eda.nokia.com/v1alpha1/system.json -# timestamp: 2025-01-29T15:18:54+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/system.eda.nokia.com/v1alpha1/system.json +# timestamp: 2025-05-07T11:44:22+00:00 diff --git a/pydantic_eda/com/nokia/eda/system/v1alpha1.py b/pydantic_eda/com/nokia/eda/system/v1alpha1.py index e891222..cf4dd0e 100644 --- a/pydantic_eda/com/nokia/eda/system/v1alpha1.py +++ b/pydantic_eda/com/nokia/eda/system/v1alpha1.py @@ -1,15 +1,12 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/system.eda.nokia.com/v1alpha1/system.json -# timestamp: 2025-01-29T15:18:54+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/system.eda.nokia.com/v1alpha1/system.json +# timestamp: 2025-05-07T11:44:22+00:00 from __future__ import annotations -from typing import Any, Dict, List, Optional +from typing import Annotated, Any, Dict, List, Optional -from pydantic import BaseModel, Field -from typing_extensions import Annotated - -from ..... import Metadata +from pydantic import BaseModel, Field, RootModel class Utilization(BaseModel): @@ -131,26 +128,6 @@ class Status(BaseModel): ] = None -class Monitor(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - Spec, - Field( - description='MonitorSpec defines the desired state of Monitor', - title='Specification', - ), - ] - status: Annotated[ - Optional[Status], - Field( - description='MonitorStatus defines the observed state of Monitor', - title='Status', - ), - ] = None - - class SpecModel(BaseModel): nodes: Annotated[ Optional[List[str]], @@ -160,36 +137,31 @@ class SpecModel(BaseModel): ] = None -class MonitorAggregateState(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel, - Field( - description='MonitorAggregateStateSpec defines the desired state of MonitorAggregateState', - title='Specification', - ), - ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='MonitorAggregateStateStatus defines the observed state of MonitorAggregateState', - title='Status', - ), - ] = None +class MonitorAggregateStateDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None -class MonitorAggregateStateList(BaseModel): - apiVersion: str - items: Optional[List[MonitorAggregateState]] = None - kind: str +class MonitorAggregateStateDeletedResources( + RootModel[List[MonitorAggregateStateDeletedResourceEntry]] +): + root: List[MonitorAggregateStateDeletedResourceEntry] -class MonitorList(BaseModel): - apiVersion: str - items: Optional[List[Monitor]] = None - kind: str +class MonitorAggregateStateMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str class MonitorSpec(BaseModel): @@ -239,10 +211,112 @@ class SpecModel1(BaseModel): ] +class MonitorStateDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class MonitorStateDeletedResources(RootModel[List[MonitorStateDeletedResourceEntry]]): + root: List[MonitorStateDeletedResourceEntry] + + +class MonitorStateMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class MonitorDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class MonitorDeletedResources(RootModel[List[MonitorDeletedResourceEntry]]): + root: List[MonitorDeletedResourceEntry] + + +class MonitorMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + +class Monitor(BaseModel): + apiVersion: str + kind: str + metadata: MonitorMetadata + spec: Annotated[ + Spec, + Field( + description='MonitorSpec defines the desired state of Monitor', + title='Specification', + ), + ] + status: Annotated[ + Optional[Status], + Field( + description='MonitorStatus defines the observed state of Monitor', + title='Status', + ), + ] = None + + +class MonitorAggregateState(BaseModel): + apiVersion: str + kind: str + metadata: MonitorAggregateStateMetadata + spec: Annotated[ + SpecModel, + Field( + description='MonitorAggregateStateSpec defines the desired state of MonitorAggregateState', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='MonitorAggregateStateStatus defines the observed state of MonitorAggregateState', + title='Status', + ), + ] = None + + +class MonitorAggregateStateList(BaseModel): + apiVersion: str + items: Optional[List[MonitorAggregateState]] = None + kind: str + + +class MonitorList(BaseModel): + apiVersion: str + items: Optional[List[Monitor]] = None + kind: str + + class MonitorState(BaseModel): apiVersion: str kind: str - metadata: Metadata + metadata: MonitorStateMetadata spec: Annotated[ SpecModel1, Field( diff --git a/pydantic_eda/com/nokia/eda/timing/__init__.py b/pydantic_eda/com/nokia/eda/timing/__init__.py index f455fb9..4dcd91b 100644 --- a/pydantic_eda/com/nokia/eda/timing/__init__.py +++ b/pydantic_eda/com/nokia/eda/timing/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/timing.eda.nokia.com/v1alpha1/timing.json -# timestamp: 2025-01-29T15:18:55+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/timing.eda.nokia.com/v1alpha1/timing.json +# timestamp: 2025-05-07T11:44:25+00:00 diff --git a/pydantic_eda/com/nokia/eda/timing/v1alpha1.py b/pydantic_eda/com/nokia/eda/timing/v1alpha1.py index 2038f08..9baad79 100644 --- a/pydantic_eda/com/nokia/eda/timing/v1alpha1.py +++ b/pydantic_eda/com/nokia/eda/timing/v1alpha1.py @@ -1,16 +1,13 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/timing.eda.nokia.com/v1alpha1/timing.json -# timestamp: 2025-01-29T15:18:55+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/timing.eda.nokia.com/v1alpha1/timing.json +# timestamp: 2025-05-07T11:44:25+00:00 from __future__ import annotations from datetime import date -from typing import List, Literal, Optional +from typing import Annotated, Dict, List, Literal, Optional -from pydantic import BaseModel, Field -from typing_extensions import Annotated - -from ..... import Metadata +from pydantic import BaseModel, Field, RootModel class Server(BaseModel): @@ -127,10 +124,35 @@ class Status(BaseModel): ] = None +class NTPClientDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + namespace: Optional[str] = None + transactionId: Optional[int] = None + + +class NTPClientDeletedResources(RootModel[List[NTPClientDeletedResourceEntry]]): + root: List[NTPClientDeletedResourceEntry] + + +class NTPClientMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + namespace: str + + class NTPClient(BaseModel): apiVersion: str kind: str - metadata: Metadata + metadata: NTPClientMetadata spec: Annotated[ Spec, Field( diff --git a/pydantic_eda/com/nokia/eda/topologies/__init__.py b/pydantic_eda/com/nokia/eda/topologies/__init__.py index 9302ce7..f4ab115 100644 --- a/pydantic_eda/com/nokia/eda/topologies/__init__.py +++ b/pydantic_eda/com/nokia/eda/topologies/__init__.py @@ -1,3 +1,3 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/topologies.eda.nokia.com/v1alpha1/topologies.json -# timestamp: 2025-01-29T15:18:56+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/topologies.eda.nokia.com/v1alpha1/topologies.json +# timestamp: 2025-05-07T11:44:28+00:00 diff --git a/pydantic_eda/com/nokia/eda/topologies/v1alpha1.py b/pydantic_eda/com/nokia/eda/topologies/v1alpha1.py index eba820b..ad011bc 100644 --- a/pydantic_eda/com/nokia/eda/topologies/v1alpha1.py +++ b/pydantic_eda/com/nokia/eda/topologies/v1alpha1.py @@ -1,15 +1,12 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/apps/topologies.eda.nokia.com/v1alpha1/topologies.json -# timestamp: 2025-01-29T15:18:56+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/apps/topologies.eda.nokia.com/v1alpha1/topologies.json +# timestamp: 2025-05-07T11:44:28+00:00 from __future__ import annotations -from typing import Any, Dict, List, Optional +from typing import Annotated, Any, Dict, List, Optional -from pydantic import BaseModel, Field -from typing_extensions import Annotated - -from ..... import Metadata +from pydantic import BaseModel, Field, RootModel class Topology(BaseModel): @@ -80,108 +77,123 @@ class Spec(BaseModel): ] = None -class CPUUtilOverlay(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - Spec, +class CPUUtilOverlayDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + transactionId: Optional[int] = None + + +class CPUUtilOverlayDeletedResources( + RootModel[List[CPUUtilOverlayDeletedResourceEntry]] +): + root: List[CPUUtilOverlayDeletedResourceEntry] + + +class CPUUtilOverlayMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='CPUUtilOverlaySpec defines the desired state of CPUUtilOverlay', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='CPUUtilOverlayStatus defines the observed state of CPUUtilOverlay', - title='Status', - ), - ] = None -class CPUUtilOverlayList(BaseModel): - apiVersion: str - items: Optional[List[CPUUtilOverlay]] = None - kind: str +class DeviationOverlayDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + transactionId: Optional[int] = None -class DeviationOverlay(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - Spec, +class DeviationOverlayDeletedResources( + RootModel[List[DeviationOverlayDeletedResourceEntry]] +): + root: List[DeviationOverlayDeletedResourceEntry] + + +class DeviationOverlayMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='DeviationOverlaySpec defines the desired state of DeviationOverlay', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='DeviationOverlayStatus defines the observed state of DeviationOverlay', - title='Status', - ), - ] = None -class DeviationOverlayList(BaseModel): - apiVersion: str - items: Optional[List[DeviationOverlay]] = None - kind: str +class DiskOverlayDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + transactionId: Optional[int] = None -class DiskOverlay(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - Spec, +class DiskOverlayDeletedResources(RootModel[List[DiskOverlayDeletedResourceEntry]]): + root: List[DiskOverlayDeletedResourceEntry] + + +class DiskOverlayMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='DiskOverlaySpec defines the desired state of DiskOverlay', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='DiskOverlayStatus defines the observed state of DiskOverlay', - title='Status', - ), - ] = None -class DiskOverlayList(BaseModel): - apiVersion: str - items: Optional[List[DiskOverlay]] = None - kind: str +class LldpOverlayDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + transactionId: Optional[int] = None -class MemoryOverlay(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - Spec, +class LldpOverlayDeletedResources(RootModel[List[LldpOverlayDeletedResourceEntry]]): + root: List[LldpOverlayDeletedResourceEntry] + + +class LldpOverlayMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, Field( - description='MemoryOverlaySpec defines the desired state of MemoryOverlay', - title='Specification', + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', ), ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='MemoryOverlayStatus defines the observed state of MemoryOverlay', - title='Status', - ), - ] = None -class MemoryOverlayList(BaseModel): - apiVersion: str - items: Optional[List[MemoryOverlay]] = None - kind: str +class MemoryOverlayDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + transactionId: Optional[int] = None + + +class MemoryOverlayDeletedResources(RootModel[List[MemoryOverlayDeletedResourceEntry]]): + root: List[MemoryOverlayDeletedResourceEntry] + + +class MemoryOverlayMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] class Overlay(BaseModel): @@ -266,26 +278,6 @@ class SpecModel(BaseModel): ] = None -class TopologyModel(BaseModel): - apiVersion: str - kind: str - metadata: Metadata - spec: Annotated[ - SpecModel, - Field( - description='TopologySpec defines the desired state of Topology', - title='Specification', - ), - ] - status: Annotated[ - Optional[Dict[str, Any]], - Field( - description='TopologyStatus defines the observed state of Topology', - title='Status', - ), - ] = None - - class GroupSelector(BaseModel): group: Annotated[ str, @@ -365,10 +357,277 @@ class SpecModel1(BaseModel): ] = None +class TopologyGroupingDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + transactionId: Optional[int] = None + + +class TopologyGroupingDeletedResources( + RootModel[List[TopologyGroupingDeletedResourceEntry]] +): + root: List[TopologyGroupingDeletedResourceEntry] + + +class TopologyGroupingMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + + +class TopologyDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + transactionId: Optional[int] = None + + +class TopologyDeletedResources(RootModel[List[TopologyDeletedResourceEntry]]): + root: List[TopologyDeletedResourceEntry] + + +class TopologyMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + + +class SpecModel2(BaseModel): + enabled: Annotated[ + bool, + Field( + description='Enable or disable the generation of the status of this overlay', + title='Enabled', + ), + ] + topology: Annotated[ + Topology, + Field( + description='Reference to the topology that this overlay is extending.', + title='Topology', + ), + ] + uiDescription: Annotated[ + Optional[str], + Field( + description='A description of the overlay to expose in the UI', + title='UI Description', + ), + ] = None + uiDescriptionKey: Annotated[ + Optional[str], + Field( + description='The translation key for the description of the overlay to expose in the UI', + title='UI Description Key', + ), + ] = None + uiName: Annotated[ + Optional[str], + Field( + description='The name of the overlay to expose in the UI', title='UI Name' + ), + ] = None + uiNameKey: Annotated[ + Optional[str], + Field( + description='The translation key for the name of the overlay to expose in the UI', + title='UI Name Key', + ), + ] = None + + +class TrafficRateOverlayDeletedResourceEntry(BaseModel): + commitTime: Optional[str] = None + hash: Optional[str] = None + name: Optional[str] = None + transactionId: Optional[int] = None + + +class TrafficRateOverlayDeletedResources( + RootModel[List[TrafficRateOverlayDeletedResourceEntry]] +): + root: List[TrafficRateOverlayDeletedResourceEntry] + + +class TrafficRateOverlayMetadata(BaseModel): + annotations: Optional[Dict[str, str]] = None + labels: Optional[Dict[str, str]] = None + name: Annotated[ + str, + Field( + max_length=253, + pattern='^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$', + ), + ] + + +class CPUUtilOverlay(BaseModel): + apiVersion: str + kind: str + metadata: CPUUtilOverlayMetadata + spec: Annotated[ + Spec, + Field( + description='CPUUtilOverlaySpec defines the desired state of CPUUtilOverlay', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='CPUUtilOverlayStatus defines the observed state of CPUUtilOverlay', + title='Status', + ), + ] = None + + +class CPUUtilOverlayList(BaseModel): + apiVersion: str + items: Optional[List[CPUUtilOverlay]] = None + kind: str + + +class DeviationOverlay(BaseModel): + apiVersion: str + kind: str + metadata: DeviationOverlayMetadata + spec: Annotated[ + Spec, + Field( + description='DeviationOverlaySpec defines the desired state of DeviationOverlay', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='DeviationOverlayStatus defines the observed state of DeviationOverlay', + title='Status', + ), + ] = None + + +class DeviationOverlayList(BaseModel): + apiVersion: str + items: Optional[List[DeviationOverlay]] = None + kind: str + + +class DiskOverlay(BaseModel): + apiVersion: str + kind: str + metadata: DiskOverlayMetadata + spec: Annotated[ + Spec, + Field( + description='DiskOverlaySpec defines the desired state of DiskOverlay', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='DiskOverlayStatus defines the observed state of DiskOverlay', + title='Status', + ), + ] = None + + +class DiskOverlayList(BaseModel): + apiVersion: str + items: Optional[List[DiskOverlay]] = None + kind: str + + +class LldpOverlay(BaseModel): + apiVersion: str + kind: str + metadata: LldpOverlayMetadata + spec: Annotated[ + Spec, + Field( + description='LldpOverlaySpec defines the desired state of lldp', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='LldpOverlayStatus defines the observed state of LldpOverlay', + title='Status', + ), + ] = None + + +class LldpOverlayList(BaseModel): + apiVersion: str + items: Optional[List[LldpOverlay]] = None + kind: str + + +class MemoryOverlay(BaseModel): + apiVersion: str + kind: str + metadata: MemoryOverlayMetadata + spec: Annotated[ + Spec, + Field( + description='MemoryOverlaySpec defines the desired state of MemoryOverlay', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='MemoryOverlayStatus defines the observed state of MemoryOverlay', + title='Status', + ), + ] = None + + +class MemoryOverlayList(BaseModel): + apiVersion: str + items: Optional[List[MemoryOverlay]] = None + kind: str + + +class TopologyModel(BaseModel): + apiVersion: str + kind: str + metadata: TopologyMetadata + spec: Annotated[ + SpecModel, + Field( + description='TopologySpec defines the desired state of Topology', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='TopologyStatus defines the observed state of Topology', + title='Status', + ), + ] = None + + class TopologyGrouping(BaseModel): apiVersion: str kind: str - metadata: Metadata + metadata: TopologyGroupingMetadata spec: Annotated[ SpecModel1, Field( @@ -395,3 +654,29 @@ class TopologyList(BaseModel): apiVersion: str items: Optional[List[TopologyModel]] = None kind: str + + +class TrafficRateOverlay(BaseModel): + apiVersion: str + kind: str + metadata: TrafficRateOverlayMetadata + spec: Annotated[ + SpecModel2, + Field( + description='TrafficRateOverlaySpec defines the desired state of TrafficRateOverlay', + title='Specification', + ), + ] + status: Annotated[ + Optional[Dict[str, Any]], + Field( + description='TrafficRateOverlayStatus defines the observed state of TrafficRateOverlay', + title='Status', + ), + ] = None + + +class TrafficRateOverlayList(BaseModel): + apiVersion: str + items: Optional[List[TrafficRateOverlay]] = None + kind: str diff --git a/pydantic_eda/core.py b/pydantic_eda/core.py index f05c72f..ff400d4 100644 --- a/pydantic_eda/core.py +++ b/pydantic_eda/core.py @@ -1,14 +1,13 @@ # generated by datamodel-codegen: -# filename: https://raw.githubusercontent.com/eda-labs/openapi/v24.12.1/core/core.json -# timestamp: 2025-01-29T15:18:31+00:00 +# filename: https://raw.githubusercontent.com/eda-labs/openapi/v25.4.1/core/core.json +# timestamp: 2025-05-07T11:43:07+00:00 from __future__ import annotations from datetime import datetime -from typing import Any, Dict, List, Literal, Optional +from typing import Annotated, Any, Dict, List, Literal, Optional from pydantic import BaseModel, Field, RootModel -from typing_extensions import Annotated class AlarmData(BaseModel): @@ -16,6 +15,10 @@ class AlarmData(BaseModel): Optional[bool], Field(description='An indication if the alarm has been acknowledged.'), ] = None + acknowledgedUntil: Annotated[ + Optional[str], + Field(description='Indicates the end time of the acknowledgement.'), + ] = None cleared: Annotated[ Optional[bool], Field(description='An indication if the alarm has been cleared.'), @@ -52,6 +55,9 @@ class AlarmData(BaseModel): description='The last time that the alarm was changed; as provided by the raiser of the alarm.' ), ] = None + lastSuppressed: Annotated[ + Optional[str], Field(description='the time this alarm was last suppressed.') + ] = None name: Annotated[ Optional[str], Field( @@ -67,10 +73,10 @@ class AlarmData(BaseModel): description='The number of occurrences of this alarm (the number of times it has been raised).' ), ] = None - parentAlarm: Annotated[ - Optional[str], + parentAlarms: Annotated[ + Optional[List[str]], Field( - description='a name of another alarm that is a parent of this alarm. This is used to\nfilter out alarms that are not a root cause.' + description='The names of other alarms that is are parents of this alarm. This is used to\nfilter out alarms that are not a root cause.' ), ] = None probableCause: Annotated[ @@ -90,7 +96,7 @@ class AlarmData(BaseModel): Field(description='The name of the resource that this alarm is present on.'), ] = None severity: Annotated[ - Optional[Literal['warning', ' minor', ' major', ' critical']], + Optional[Literal['warning', 'minor', 'major', 'critical']], Field(description='Severity of the alarm'), ] = None sourceGroup: Annotated[ @@ -116,10 +122,7 @@ class AlarmData(BaseModel): Field(description='An indication if the alarm has been suppressed.'), ] = None suppressedUntil: Annotated[ - Optional[str], - Field( - description='Indicates the time at which an active instance of the alarm will be raised again.' - ), + Optional[str], Field(description='Indicates the end time of the suppression.') ] = None type: Annotated[ Optional[str], Field(description='A kind for the alarm, e.g. InterfaceDown') @@ -153,13 +156,15 @@ class AuthPasswordPolicy(BaseModel): digits: Annotated[ Optional[int], Field( - description='Minimum number of digits required in a password. Can be zero.' + description='Minimum number of digits required in a password. Can be zero.', + ge=0, ), ] = None forceExpiredPasswordChange: Annotated[ Optional[int], Field( - description='The maximum number of days until a password change is enforced.\nA value of zero means no change is required.' + description='The maximum number of days until a password change is enforced.\nA value of zero means no change is required.', + ge=0, ), ] = None hashingAlgorithm: Annotated[ @@ -170,30 +175,34 @@ class AuthPasswordPolicy(BaseModel): ] = None length: Annotated[ Optional[int], - Field(description='Minimum password length. This must be at least 1.'), + Field(description='Minimum password length. This must be at least 1.', ge=1), ] = None lowerCase: Annotated[ Optional[int], Field( - description='Minimum number of lower case characters required in a password. Can be zero.' + description='Minimum number of lower case characters required in a password. Can be zero.', + ge=0, ), ] = None maxFailureWaitSeconds: Annotated[ Optional[int], Field( - description='The number of seconds before the users access will be restored, after too many authentication failures.' + description='The number of seconds before the users access will be restored, after too many authentication failures.', + ge=0, ), ] = None maxLoginFailure: Annotated[ Optional[int], Field( - description='The number of login/authentication failures before a lockout policy takes effect. Zero means no enforcement.' + description='The number of login/authentication failures before a lockout policy takes effect. Zero means no enforcement.', + ge=0, ), ] = None passwordHistory: Annotated[ Optional[int], Field( - description='The number of passwords remembered to enforce no re-use of passwords. Zero means no re-use enforcement.' + description='The number of passwords remembered to enforce no re-use of passwords. Zero means no re-use enforcement.', + ge=0, ), ] = None permanentLockout: Annotated[ @@ -205,19 +214,22 @@ class AuthPasswordPolicy(BaseModel): resetTimeSeconds: Annotated[ Optional[int], Field( - description='When lockout is not permanent, the count of authentication failures for a user will be reset\nthis many seconds after the last authentication failure.' + description='When lockout is not permanent, the count of authentication failures for a user will be reset\nthis many seconds after the last authentication failure.', + ge=0, ), ] = None specialChars: Annotated[ Optional[int], Field( - description='Minimum number of special characters required in a password. Can be zero.' + description='Minimum number of special characters required in a password. Can be zero.', + ge=0, ), ] = None upperCase: Annotated[ Optional[int], Field( - description='Minimum number of upper case characters required in a password. Can be zero.' + description='Minimum number of upper case characters required in a password. Can be zero.', + ge=0, ), ] = None @@ -251,7 +263,7 @@ class ErrorResponse(BaseModel): Optional[str], Field(description='The optional details of the error response.') ] = None dictionary: Annotated[ - Optional[Dict[str, Dict[str, Any]]], + Optional[Dict[str, Any]], Field( description='Dictionary/map of associated data/information relevant to the error.\nThe error "message" may contain {{name}} escapes that should be substituted\nwith information from this dictionary.' ), @@ -286,63 +298,60 @@ class ErrorResponse(BaseModel): ] = None -class GroupIDs(RootModel[List[str]]): - root: Annotated[ - List[str], Field(title='A list of user group identifiers (uuid values).') - ] - - -class GroupProviderConfig(BaseModel): - NameLDAPAttribute: Annotated[ - Optional[str], Field(description='The LDAP group name attribute') - ] = None - filter: Annotated[ - Optional[str], - Field( - description='Further for filtering when retrieving LDAP groups. Ensure starts and ends with parentheses if using.' - ), +class FlowListEntry(BaseModel): + id: Annotated[Optional[int], Field(description='The id of the workflow')] = None + name: Annotated[Optional[str], Field(description='Name of the workflow')] = None + namespace: Annotated[ + Optional[str], Field(description='The namespace in which the workflow ran') ] = None - groupLDAPDN: Annotated[ - Optional[str], Field(description='The LDAP DN where groups are found.') + parentId: Annotated[ + Optional[int], Field(description='The id of the parent workflow, if any') ] = None - memberAttribute: Annotated[ - Optional[str], - Field( - description='The group attribute for a members. usually "member" or "memberUid".' - ), + state: Optional[ + Literal[ + 'waitingToStart', + 'running', + 'waitingForInput', + 'terminated', + 'failed', + 'completed', + 'subflowWaitingForInput', + ] ] = None - memberOfAttribute: Annotated[ - Optional[str], - Field( - description='If strategy is "memberOf", this is the user attribute for group memberships.' - ), + type: Annotated[Optional[str], Field(description='The type of workflow')] = None + + +class FlowListResult(BaseModel): + flows: Optional[List[FlowListEntry]] = None + + +class FlowStage(BaseModel): + completed: Annotated[ + Optional[bool], Field(description='True if the stage has completed') ] = None - membershipAttributeType: Annotated[ - Optional[str], - Field( - description='How users are identified in a group member entry: either DN or UID.' - ), + hadError: Annotated[ + Optional[bool], + Field(description='True if the stage is complete and there was an error'), ] = None - membershipUserAttribute: Annotated[ - Optional[str], - Field( - description='Only valid if membershipAttributeType is UID; then it is\nthe user attribute that should match the group member value.' - ), + name: Annotated[Optional[str], Field(description='Name of the flow stage')] = None + skipped: Annotated[ + Optional[bool], Field(description='True if the stage was skipped') ] = None - objectClasses: Annotated[ - Optional[str], - Field( - description='The LDAP object class or classes es used for groups. If more than one, must be comma separated.' - ), + started: Annotated[ + Optional[bool], Field(description='True if the stage has started') ] = None - retrievalStrategy: Annotated[ - Optional[str], - Field( - description='The strategy for retrieving groups. "member" to get group membership from the group, ObjectNameParam\n"memberOf" to get group membership from the user.' - ), + subFlowIds: Annotated[ + Optional[List[int]], + Field(description='The ids of flows triggered by the stage'), ] = None +class GroupIDs(RootModel[List[str]]): + root: Annotated[ + List[str], Field(title='A list of user group identifiers (uuid values).') + ] + + class GroupVersionKind(BaseModel): group: Optional[str] = None kind: Optional[str] = None @@ -359,6 +368,14 @@ class HealthServiceStatus(BaseModel): ] +class K8SPatchOp(BaseModel): + from_: Annotated[Optional[str], Field(alias='from')] = None + op: str + path: str + value: Optional[Dict[str, Any]] = None + x_permissive: Annotated[Optional[bool], Field(alias='x-permissive')] = None + + class LabelCompletionResponse(BaseModel): results: Optional[List[str]] = None @@ -381,20 +398,42 @@ class Metadata(BaseModel): namespace: Optional[str] = None +class NamespaceData(BaseModel): + description: Annotated[ + Optional[str], Field(description='The description of the namespace') + ] = None + name: Annotated[Optional[str], Field(description='The namespace name')] = None + + +class NamespaceGetResponse(BaseModel): + allNamesapces: Annotated[ + Optional[bool], + Field( + description='If true, the requestor is considered to have permission to access all namespaces' + ), + ] = None + namespaces: Annotated[ + Optional[List[NamespaceData]], Field(description='The list of namespaces') + ] = None + + class NsCrGvkName(BaseModel): gvk: Optional[GroupVersionKind] = None name: Optional[str] = None namespace: Optional[str] = None +class Patch(RootModel[List[K8SPatchOp]]): + root: List[K8SPatchOp] + + class ProviderAuth(BaseModel): bindCredential: Annotated[ - Optional[str], - Field(description='Credentials to use when binding to an LDAP provider'), - ] = None + str, Field(description='Credentials to use when binding to an LDAP provider') + ] bindDN: Annotated[ - Optional[str], Field(description='DN to use when binding to an LDAP provider') - ] = None + str, Field(description='DN to use when binding to an LDAP provider') + ] class QueryCompletion(BaseModel): @@ -410,9 +449,22 @@ class QueryCompletionResponse(BaseModel): class ResourceRule(BaseModel): - apiGroups: List[str] - permissions: Optional[str] = None - resources: List[str] + apiGroups: Annotated[ + List[str], + Field( + description='The API groups for the resources controlled by the rule.\nAn API group consists of an apiGroup and a version, e.g. "apigroup/version".\nThe API group can be a wildcard ("*"), in which case it will match any API group.\nIn addition, the version can be a wildcard.' + ), + ] + permissions: Annotated[ + Optional[Literal['none', 'read', 'readWrite']], + Field(description='Permissions for resources specified by the rule.'), + ] = None + resources: Annotated[ + List[str], + Field( + description='Names for the resources controlled by the rule.\nIt can be a wildcard ("*"), in which case it will match any resource\nin the matching API groups.' + ), + ] class StreamResult(BaseModel): @@ -431,8 +483,18 @@ class StreamResult(BaseModel): class TableRule(BaseModel): - path: str - permissions: str + path: Annotated[ + str, + Field( + description='EDB path to which this rule applies. It can end in ".*"\nin which case the final portion of the table path can be anything, if the\nprefix matches. It can end in ".**" in which case the table path can be\nanything if the prefix matches.', + min_length=1, + pattern='^\\\\..*', + ), + ] + permissions: Annotated[ + Literal['none', 'read'], + Field(description='Permissions for the given EDB path.'), + ] class TopoAttrMetadata(BaseModel): @@ -446,6 +508,7 @@ class TopoAttrMetadata(BaseModel): class TopoLinkEndpoint(BaseModel): endpoint: Optional[str] = None node: Optional[str] = None + node_key: Optional[str] = None class TopoNodeGrouping(BaseModel): @@ -530,7 +593,7 @@ class TransactionId(BaseModel): ] = None -class TransactionInputCr(BaseModel): +class TransactionInputResource(BaseModel): isDelete: Optional[bool] = None name: Optional[NsCrGvkName] = None @@ -551,6 +614,11 @@ class TransactionNsCrGvkNames(BaseModel): namespace: Optional[str] = None +class TransactionPatch(BaseModel): + patchOps: Patch + target: NsCrGvkName + + class TransactionPoolAllocation(BaseModel): key: Optional[str] = None poolName: Optional[str] = None @@ -558,6 +626,19 @@ class TransactionPoolAllocation(BaseModel): value: Optional[str] = None +class TransactionResultInputResources(BaseModel): + inputCrs: Annotated[ + Optional[List[TransactionInputResource]], + Field(description='List of input resources from the transaction'), + ] = None + limitedAccess: Annotated[ + Optional[bool], + Field( + description='This field is true if the list returned here is not the complete list of input resources in the transaction because the user does not have read-access to some of them' + ), + ] = None + + class TransactionResultObjectString(BaseModel): data: Optional[str] = None @@ -628,12 +709,26 @@ class TransactionValue(BaseModel): class UrlRule(BaseModel): - path: str - permissions: Optional[str] = None + path: Annotated[ + str, + Field( + description='The API server URL path to which this rule applies. It can end in "/*"\nin which case the final portion of the URL path can be anything, if the\nprefix matches. It can end in "/**" in which case the URL path can be\nanything if the prefix matches.",', + min_length=1, + pattern='^/.*', + ), + ] + permissions: Annotated[ + Optional[Literal['none', 'read', 'readWrite']], + Field(description='The permissions for the API server URL for the rule.'), + ] = None class UserStatus(BaseModel): failedLoginSinceSuccessfulLogin: Optional[int] = None + isFederatedUser: Annotated[ + Optional[bool], + Field(description='True if the user comes from a federated LDAP server'), + ] = None lastFailedLogin: Optional[str] = None lastSuccessfulLogin: Optional[str] = None temporarilyDisabled: Optional[bool] = None @@ -723,19 +818,79 @@ class VersionInfo(RootModel[Optional[Dict[str, SingleVersionInfo]]]): root: Optional[Dict[str, SingleVersionInfo]] = None +class AuthProviderAuth(BaseModel): + bindCredential: Annotated[ + str, Field(description='Credentials to use when binding to an LDAP provider') + ] + bindDN: Annotated[ + str, Field(description='DN to use when binding to an LDAP provider') + ] + + +class AuthProviderGroupSupport(BaseModel): + NameLDAPAttribute: Annotated[ + str, Field(description='The LDAP group name attribute') + ] + filter: Annotated[ + Optional[str], + Field( + description='Further for filtering when retrieving LDAP groups. Ensure starts and ends with parentheses if using.' + ), + ] = None + groupLDAPDN: Annotated[ + str, Field(description='The LDAP DN where groups are found.') + ] + memberAttribute: Annotated[ + Optional[str], + Field( + description='The group attribute for a members. Usually "member" or "memberUid".' + ), + ] = None + memberOfAttribute: Annotated[ + Optional[str], + Field( + description='If retrievalStrategy is "memberOf", this is the LDAP user attribute for group memberships.' + ), + ] = None + membershipAttributeType: Annotated[ + Optional[Literal['DN', 'UID']], + Field( + description='How users are identified in a group member entry: either DN or UID.' + ), + ] = None + membershipUserAttribute: Annotated[ + Optional[str], + Field( + description='Only required if membershipAttributeType is UID; then it is the user attribute that should match the group member value.' + ), + ] = None + objectClasses: Annotated[ + str, + Field( + description='The LDAP object class or classes used for groups. If more than one, they must be comma-separated.' + ), + ] + retrievalStrategy: Annotated[ + Optional[Literal['member', 'memberOf']], + Field( + description='The strategy for retrieving groups. Should be "member" to get group membership from the group, or "memberOf" to get group membership from the user.' + ), + ] = None + + class AuthProvider(BaseModel): - auth: Optional[ProviderAuth] = None + auth: Optional[AuthProviderAuth] = None enabled: Annotated[ Optional[bool], Field(description='If true, checking/syncing this LDAP provider is enabled.'), ] = None - groupSupport: Optional[GroupProviderConfig] = None + groupSupport: Optional[AuthProviderGroupSupport] = None idAttribute: Annotated[ - Optional[str], + str, Field( description='Name of the LDAP attribute, which is used as a unique object identifier (UUID) for objects in LDAP.' ), - ] = None + ] import_: Annotated[ Optional[bool], Field( @@ -744,9 +899,8 @@ class AuthProvider(BaseModel): ), ] = None name: Annotated[ - Optional[str], - Field(description='The name to give to the LDAP provider; must be unique.'), - ] = None + str, Field(description='The name to give to the LDAP provider; must be unique.') + ] pagination: Annotated[ Optional[bool], Field(description='Set to true if the LDAP server supports pagination.'), @@ -764,19 +918,19 @@ class AuthProvider(BaseModel): ), ] = None rdnLDAPAttribute: Annotated[ - Optional[str], + str, Field( description="Name of the LDAP attribute, which is used as RDN (top attribute) of typical user DN. Usually it's the same as the Username LDAP attribute, however it is not required." ), - ] = None + ] readOnly: Annotated[ - Optional[bool], + bool, Field( - description='If true, changes made to LDAP-mapped attribute via EDA will be synced back to the LDAP server. Otherwise, changes are not made in LDAP.' + description='If false, changes made to LDAP-mapped attribute via EDA will be synced back to the LDAP server. Otherwise, changes are not made in LDAP.' ), - ] = None + ] scope: Annotated[ - Optional[str], + Optional[Literal['One Level', 'Subtree']], Field( description='Must be "One Level" or "Subtree". If "One Level", the search applies only for users in the DNs specified by User DNs. If "Subtree", the search applies to the whole subtree.' ), @@ -788,18 +942,23 @@ class AuthProvider(BaseModel): Optional[bool], Field(description='If true, encrypts the connection to LDAP using STARTTLS'), ] = None - url: Annotated[ - Optional[str], Field(description='Connection URL to your LDAP server') - ] = None + type: Annotated[ + Literal['ldap'], + Field(description='The type of provider. Currently only "ldap" is supported.'), + ] + url: Annotated[str, Field(description='Connection URL to your LDAP server')] userDN: Annotated[ - Optional[str], + str, Field( description='Full DN of LDAP tree where your users are. This DN is the parent of LDAP users.' ), - ] = None + ] userObjectClasses: Annotated[ - Optional[str], Field(examples=["'inetOrgPerson, organizationalPerson'."]) - ] = None + str, + Field( + description='All values of LDAP objectClass attribute for users in LDAP, divided by commas. (e.g. inetOrgPerson, organizationalPerson).' + ), + ] userSearchFilter: Annotated[ Optional[str], Field( @@ -807,20 +966,36 @@ class AuthProvider(BaseModel): ), ] = None usernameAttribute: Annotated[ - Optional[str], + str, Field( description="Name of the LDAP attribute, which is mapped as EDA username. For many LDAP server vendors it can be 'uid'." ), - ] = None + ] uuid: Annotated[ Optional[str], Field( description='The unique identifier given to the entry when it is created.' ), ] = None - vendor: Annotated[Optional[str], Field(description='LDAP vendor (provider).')] = ( - None - ) + vendor: Annotated[str, Field(description='LDAP vendor (provider).')] + + +class AuthProviderTestParams(BaseModel): + action: Annotated[ + Optional[Literal['connection', 'authentication']], + Field(description='The test action to take.'), + ] = None + auth: Optional[ProviderAuth] = None + timeout: Annotated[ + Optional[int], Field(description='LDAP connection timeout in milliseconds') + ] = None + tls: Annotated[ + Optional[bool], + Field(description='If true, encrypts the connection to LDAP using STARTTLS'), + ] = None + url: Annotated[ + Optional[str], Field(description='Connection URL to your LDAP server') + ] = None class AuthProviders(RootModel[List[AuthProvider]]): @@ -838,9 +1013,18 @@ class AuthRole(BaseModel): namespace: Annotated[ Optional[str], Field(pattern='^([a-z0-9]([-a-z0-9]*[a-z0-9])?)?$') ] = None - resourceRules: Optional[List[ResourceRule]] = None - tableRules: Optional[List[TableRule]] = None - urlRules: Optional[List[UrlRule]] = None + resourceRules: Annotated[ + Optional[List[ResourceRule]], + Field(description='Rules for access to resources.'), + ] = None + tableRules: Annotated[ + Optional[List[TableRule]], + Field(description='Rules for access to EDB tables, including via EQL.'), + ] = None + urlRules: Annotated[ + Optional[List[UrlRule]], + Field(description='Rules for access to APIServer routes.'), + ] = None class AuthRoles(RootModel[List[AuthRole]]): @@ -880,6 +1064,12 @@ class AuthUserGroup(BaseModel): description='contains the full role definitions of the Roles and ClusterRoles associated with the group, if requested' ), ] = None + isFederated: Annotated[ + Optional[bool], + Field( + description='if true, indicates that the group was imported from a federated LDAP server' + ), + ] = None name: Optional[str] = None roles: Annotated[ Optional[List[str]], @@ -909,8 +1099,50 @@ class CrAnnotation(BaseModel): lines: Optional[List[LineSegment]] = None +class FlowGetResponse(BaseModel): + error: Annotated[ + Optional[str], + Field(description='If no error is present, the flow completed successfully'), + ] = None + id: Annotated[Optional[int], Field(description='The id of the workflow')] = None + jsonResult: Annotated[ + Optional[str], Field(description='A JSON representation of the result') + ] = None + log: Annotated[Optional[str], Field(description='Log output from the flow')] = None + name: Annotated[Optional[str], Field(description='Name of the workflow')] = None + namespace: Annotated[ + Optional[str], Field(description='The namespace in which the flow ran') + ] = None + parentId: Annotated[ + Optional[int], Field(description='The id of the parent workflow, if any') + ] = None + stages: Annotated[ + Optional[List[FlowStage]], + Field(description='The list of stages of the workflow'), + ] = None + state: Optional[ + Literal[ + 'waitingToStart', + 'running', + 'waitingForInput', + 'terminated', + 'failed', + 'completed', + 'subflowWaitingForInput', + ] + ] = None + subflowsWaitingForInput: Annotated[ + Optional[List[int]], + Field(description='The ids of any subflows that are waiting for user input'), + ] = None + type: Annotated[Optional[str], Field(description='The type of workflow')] = None + waitForInputPrompt: Annotated[ + Optional[str], Field(description='Set if the state is waiting for input') + ] = None + + class GetLabelCompletionRequest(BaseModel): - gvk: GroupVersionKind + gvk: Optional[GroupVersionKind] = None limit: Annotated[ Optional[int], Field(description='The maximum number of results to return') ] = None @@ -1000,6 +1232,7 @@ class TopoLink(BaseModel): endpoint_a_details: Optional[TopoEndpoint] = None endpoint_b: Optional[TopoLinkEndpoint] = None endpoint_b_details: Optional[TopoEndpoint] = None + key: Optional[str] = None labels: Optional[Dict[str, str]] = None name: Optional[str] = None namespace: Optional[str] = None @@ -1011,6 +1244,7 @@ class TopoNode(BaseModel): attributes: Optional[Dict[str, Dict[str, Any]]] = None cr_name: Optional[str] = None grouping: Optional[TopoNodeGrouping] = None + key: Optional[str] = None labels: Optional[Dict[str, str]] = None name: Optional[str] = None namespace: Optional[str] = None @@ -1105,6 +1339,7 @@ class TransactionType(BaseModel): create: Optional[TransactionValue] = None delete: Optional[NsCrGvkName] = None modify: Optional[TransactionValue] = None + patch: Optional[TransactionPatch] = None replace: Optional[TransactionValue] = None @@ -1161,7 +1396,7 @@ class TransactionDetails(BaseModel): Field(description='List of general errors while running the transaction'), ] = None inputCrs: Annotated[ - Optional[List[TransactionInputCr]], + Optional[List[TransactionInputResource]], Field(description='List of input CRs from the transaction'), ] = None intentsRun: Annotated[ @@ -1182,6 +1417,31 @@ class TransactionDetails(BaseModel): ] = None +class TransactionExecutionResult(BaseModel): + changedCrs: Annotated[ + Optional[List[TransactionNsCrGvkNames]], + Field(description='List of changed CRs as part of the transaction'), + ] = None + executionSummary: Annotated[ + Optional[str], + Field(description='Information about time taken during processing'), + ] = None + generalErrors: Annotated[ + Optional[List[str]], + Field(description='List of general errors while running the transaction'), + ] = None + intentsRun: Annotated[ + Optional[List[TransactionIntentResult]], + Field(description='List of intents which ran as part of the transaction'), + ] = None + nodesWithConfigChanges: Annotated[ + Optional[List[TransactionNodeResult]], + Field( + description='List of nodes with configuration changes from the transaction' + ), + ] = None + + class Transaction(BaseModel): crs: Annotated[ List[TransactionCr],