Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
2a27f38
[minor_change] Add nd_local_user as a new network resource module for…
gmicol Aug 19, 2025
a04235c
[ignore] First Pydantic implementation: Add Pydantic Models for nd_lo…
gmicol Jan 15, 2026
7089148
[ignore] Second Pydantic Implementation: Create a NDBaseModel to be i…
gmicol Jan 20, 2026
fe944d0
[ignore] Pydantic Models: Modify and Clean both local_user.py and bas…
gmicol Jan 22, 2026
c4a4da2
[ignore] Pydantic ND base models and local_user models: Final proposi…
gmicol Jan 23, 2026
d518bf3
[ignore] Pydantic ND Config Collection: Final proposition of core des…
gmicol Jan 23, 2026
b35fa8d
[ignore] Pydantic Base ND Network Resource Module: Final proposition …
gmicol Jan 23, 2026
dc9649e
[ignore] Modify nd_local_user based on Pydantic implementation and ch…
gmicol Jan 23, 2026
dead722
[ignore] Add api_endpoints for configuring endpoints and orchestrator…
gmicol Feb 17, 2026
4b65c25
[ignore] Modifiy models/local_user to take full advantage of Pydantic…
gmicol Feb 18, 2026
229af5a
[ignore] Adapt the Network Resource Module architecture for ND to sma…
gmicol Feb 24, 2026
b04a82b
[ignore] Default to none and update condition for regarding in mod…
gmicol Feb 25, 2026
48b62be
[ignore] Add choice for when no identifier is needed. Add quick com…
gmicol Feb 26, 2026
e2101f9
[ignore] Complete orchestrators/base.py by making simple CRUD operati…
gmicol Feb 26, 2026
b41b5b8
[ignore] Fix and in nd_config_collections.py. Move to utils.py.
gmicol Feb 26, 2026
9cdfa66
[ignore] Rename NDNetworkResourceModule to NDStateMachine. Add file f…
gmicol Feb 26, 2026
df99ff3
[ignore] Make a small change to NDModule request function.
gmicol Feb 26, 2026
96dde6c
[ignore] Modify nd_state_machine to work with orchestrators/models/ap…
gmicol Mar 2, 2026
7afd933
[ignore] Add proper path dependencies and Ran black formatting.
gmicol Mar 3, 2026
08b011b
[ignore] Clean code for sanity purposes (except Pydantic import checks.
gmicol Mar 3, 2026
8d72e06
[ignore] Restructure api_endpoints folder into endpoints -> v1. Fix s…
gmicol Mar 3, 2026
88c0bdf
[ignore] Remove NDModule inheritence from NDStateMachine. Add first i…
gmicol Mar 3, 2026
25b621a
[ignore] Rename NDBaseSmartEndpoint to NDBaseEndpoint. Fix importatio…
gmicol Mar 3, 2026
6e81ee0
[ignore] Replace all pydantic imports with pydantic_compat. Fix sanit…
gmicol Mar 4, 2026
520625b
[ignore] Add NDOutput class. Modify NDStateMachine and nd_local_user …
gmicol Mar 6, 2026
36d5759
[ignore] Update NDOutput class. Remove all fail_json dependencies in …
gmicol Mar 10, 2026
25f746a
[minor_change] Add nd_local_user as a new network resource module for…
gmicol Aug 19, 2025
e952517
[ignore] First Pydantic implementation: Add Pydantic Models for nd_lo…
gmicol Jan 15, 2026
727d25e
[ignore] Second Pydantic Implementation: Create a NDBaseModel to be i…
gmicol Jan 20, 2026
49b307b
[ignore] Pydantic Models: Modify and Clean both local_user.py and bas…
gmicol Jan 22, 2026
5608592
[ignore] Pydantic ND base models and local_user models: Final proposi…
gmicol Jan 23, 2026
4677805
[ignore] Pydantic ND Config Collection: Final proposition of core des…
gmicol Jan 23, 2026
146063f
[ignore] Pydantic Base ND Network Resource Module: Final proposition …
gmicol Jan 23, 2026
09404e1
[ignore] Modify nd_local_user based on Pydantic implementation and ch…
gmicol Jan 23, 2026
08bc604
[ignore] Add api_endpoints for configuring endpoints and orchestrator…
gmicol Feb 17, 2026
91d1770
[ignore] Modifiy models/local_user to take full advantage of Pydantic…
gmicol Feb 18, 2026
9df5de1
[ignore] Adapt the Network Resource Module architecture for ND to sma…
gmicol Feb 24, 2026
0dca2b5
[ignore] Default to none and update condition for regarding in mod…
gmicol Feb 25, 2026
3d3cda4
[ignore] Add choice for when no identifier is needed. Add quick com…
gmicol Feb 26, 2026
b765404
[ignore] Complete orchestrators/base.py by making simple CRUD operati…
gmicol Feb 26, 2026
9f9d32d
[ignore] Fix and in nd_config_collections.py. Move to utils.py.
gmicol Feb 26, 2026
5398a80
[ignore] Rename NDNetworkResourceModule to NDStateMachine. Add file f…
gmicol Feb 26, 2026
cd44c8b
[ignore] Make a small change to NDModule request function.
gmicol Feb 26, 2026
3d86efb
[ignore] Modify nd_state_machine to work with orchestrators/models/ap…
gmicol Mar 2, 2026
5badb5a
[ignore] Add proper path dependencies and Ran black formatting.
gmicol Mar 3, 2026
eec86e0
[ignore] Clean code for sanity purposes (except Pydantic import checks.
gmicol Mar 3, 2026
9e8bde4
[ignore] Restructure api_endpoints folder into endpoints -> v1. Fix s…
gmicol Mar 3, 2026
a6bf7bb
[ignore] Remove NDModule inheritence from NDStateMachine. Add first i…
gmicol Mar 3, 2026
f54a137
[ignore] Rename NDBaseSmartEndpoint to NDBaseEndpoint. Fix importatio…
gmicol Mar 3, 2026
ea22129
[ignore] Replace all pydantic imports with pydantic_compat. Fix sanit…
gmicol Mar 4, 2026
ced4703
[ignore] Add NDOutput class. Modify NDStateMachine and nd_local_user …
gmicol Mar 6, 2026
d619c3f
[ignore] Update NDOutput class. Remove all fail_json dependencies in …
gmicol Mar 10, 2026
624d1e2
[ignore] Fix serialization of model with minimal changes to base.py …
gmicol Mar 11, 2026
0544351
[ignore] Complete nd_local_user integration test for creation and upd…
gmicol Mar 11, 2026
9ce2460
[ignore] Finish integration test file for nd_local_user module. Remov…
gmicol Mar 12, 2026
89843aa
[ignore] Fix sanity issues by enhancing pydantic_compat.py. Fix Black…
gmicol Mar 12, 2026
790a26b
[ignore] Remove all TODO comments.
gmicol Mar 12, 2026
ceebe4c
[ignore] Update endpoints to match latest nd42_integration branch. Up…
gmicol Mar 12, 2026
e4c42b3
[ignore] Update pydantic_compat.py to support extra Pydantic methods …
gmicol Mar 12, 2026
fb135c7
Fabric Module Tests Working
mikewiebe Mar 12, 2026
c6dfe8d
[ignore] Restructure api_endpoints folder into endpoints -> v1. Fix s…
gmicol Mar 3, 2026
3a2d1c1
[ignore] Rename NDBaseSmartEndpoint to NDBaseEndpoint. Fix importatio…
gmicol Mar 3, 2026
efdf4a2
[ignore] Replace all pydantic imports with pydantic_compat. Fix sanit…
gmicol Mar 4, 2026
3f6ed5f
[ignore] Add NDOutput class. Modify NDStateMachine and nd_local_user …
gmicol Mar 6, 2026
e56d0f2
[ignore] Update NDOutput class. Remove all fail_json dependencies in …
gmicol Mar 10, 2026
a706662
Merge branch 'add_network_ressource_nd_local_user' into fabric_ibgp
mikewiebe Mar 12, 2026
3d2ccbe
Fix fabric module following rebase
mikewiebe Mar 12, 2026
7be3177
Normalize changes to upstream fork
mikewiebe Mar 12, 2026
efb5a17
Change endpoint names to adhere to convention
mikewiebe Mar 12, 2026
87c481f
Modify orchestrator to use path instead of base_path
mikewiebe Mar 12, 2026
c7f5ea3
Add initial integration tests
mikewiebe Mar 13, 2026
e20ff4d
Refactor all endpoints to inherit from base class
mikewiebe Mar 13, 2026
2a79077
Inherit from NDEndpointBaseModel
mikewiebe Mar 13, 2026
a0ea474
[minor_change] Add nd_local_user as a new network resource module for…
gmicol Aug 19, 2025
576552a
[ignore] First Pydantic implementation: Add Pydantic Models for nd_lo…
gmicol Jan 15, 2026
39d2133
[ignore] Second Pydantic Implementation: Create a NDBaseModel to be i…
gmicol Jan 20, 2026
10d1a3b
[ignore] Pydantic Models: Modify and Clean both local_user.py and bas…
gmicol Jan 22, 2026
a3c6833
[ignore] Pydantic ND base models and local_user models: Final proposi…
gmicol Jan 23, 2026
24d5fe6
[ignore] Pydantic ND Config Collection: Final proposition of core des…
gmicol Jan 23, 2026
958adef
[ignore] Pydantic Base ND Network Resource Module: Final proposition …
gmicol Jan 23, 2026
ade11d4
[ignore] Modify nd_local_user based on Pydantic implementation and ch…
gmicol Jan 23, 2026
1a81615
[ignore] Add api_endpoints for configuring endpoints and orchestrator…
gmicol Feb 17, 2026
fd7ff67
[ignore] Modifiy models/local_user to take full advantage of Pydantic…
gmicol Feb 18, 2026
93079d3
[ignore] Adapt the Network Resource Module architecture for ND to sma…
gmicol Feb 24, 2026
be8f3af
[ignore] Default to none and update condition for regarding in mod…
gmicol Feb 25, 2026
3107942
[ignore] Add choice for when no identifier is needed. Add quick com…
gmicol Feb 26, 2026
f57dfaa
[ignore] Complete orchestrators/base.py by making simple CRUD operati…
gmicol Feb 26, 2026
43f3e1a
[ignore] Fix and in nd_config_collections.py. Move to utils.py.
gmicol Feb 26, 2026
2eb7775
[ignore] Rename NDNetworkResourceModule to NDStateMachine. Add file f…
gmicol Feb 26, 2026
2baca0a
[ignore] Make a small change to NDModule request function.
gmicol Feb 26, 2026
cd60f77
[ignore] Modify nd_state_machine to work with orchestrators/models/ap…
gmicol Mar 2, 2026
8be0d52
[ignore] Add proper path dependencies and Ran black formatting.
gmicol Mar 3, 2026
427947b
[ignore] Clean code for sanity purposes (except Pydantic import checks.
gmicol Mar 3, 2026
9945839
[ignore] Restructure api_endpoints folder into endpoints -> v1. Fix s…
gmicol Mar 3, 2026
2dec365
[ignore] Remove NDModule inheritence from NDStateMachine. Add first i…
gmicol Mar 3, 2026
244a547
[ignore] Rename NDBaseSmartEndpoint to NDBaseEndpoint. Fix importatio…
gmicol Mar 3, 2026
903a5e9
[ignore] Replace all pydantic imports with pydantic_compat. Fix sanit…
gmicol Mar 4, 2026
dd93541
[ignore] Add NDOutput class. Modify NDStateMachine and nd_local_user …
gmicol Mar 6, 2026
344fe19
[ignore] Update NDOutput class. Remove all fail_json dependencies in …
gmicol Mar 10, 2026
b0f04bc
[ignore] Fix serialization of model with minimal changes to base.py …
gmicol Mar 11, 2026
595e514
[ignore] Complete nd_local_user integration test for creation and upd…
gmicol Mar 11, 2026
8585215
[ignore] Finish integration test file for nd_local_user module. Remov…
gmicol Mar 12, 2026
de87bb1
[ignore] Fix sanity issues by enhancing pydantic_compat.py. Fix Black…
gmicol Mar 12, 2026
d78bae4
[ignore] Remove all TODO comments.
gmicol Mar 12, 2026
109ff9e
[ignore] Update endpoints to match latest nd42_integration branch. Up…
gmicol Mar 12, 2026
028a123
[ignore] Update pydantic_compat.py to support extra Pydantic methods …
gmicol Mar 12, 2026
5985f50
Model updates for bgp_asn and site_id
mikewiebe Mar 13, 2026
58f78df
Update model defaults, enums and tests
mikewiebe Mar 13, 2026
39c443e
Add ebgp and external fabric models
mikewiebe Mar 13, 2026
255507d
New ebgp fabric module
mikewiebe Mar 16, 2026
71ebe3a
Update exception granularity in main
mikewiebe Mar 16, 2026
7658313
[ignore] Remove Python 2.7 compatibilities.
gmicol Mar 17, 2026
fea8adc
[ignore] Fix comments and docstrings. made and static methods for …
gmicol Mar 17, 2026
704b671
[ignore] Restructure api_endpoints folder into endpoints -> v1. Fix s…
gmicol Mar 3, 2026
ac380fe
[ignore] Rename NDBaseSmartEndpoint to NDBaseEndpoint. Fix importatio…
gmicol Mar 3, 2026
d470895
[ignore] Add NDOutput class. Modify NDStateMachine and nd_local_user …
gmicol Mar 6, 2026
6b6732f
[ignore] Update NDOutput class. Remove all fail_json dependencies in …
gmicol Mar 10, 2026
501f2d6
Merge branch 'add_network_ressource_nd_local_user' into fabric_ibgp
mikewiebe Mar 18, 2026
67c410e
[ignore] Slightly modify Exceptions handling in NDStateMachine. Remov…
gmicol Mar 18, 2026
95af9c0
[ignore] Rename aaa_local_users.py to infra_aaa_local_users.py. Move …
gmicol Mar 18, 2026
d1a1110
[ignore] Restructure api_endpoints folder into endpoints -> v1. Fix s…
gmicol Mar 3, 2026
f9616f9
[ignore] Rename NDBaseSmartEndpoint to NDBaseEndpoint. Fix importatio…
gmicol Mar 3, 2026
69f308e
[ignore] Add NDOutput class. Modify NDStateMachine and nd_local_user …
gmicol Mar 6, 2026
d6234cd
Merge branch 'add_network_ressource_nd_local_user' into fabric_ibgp
mikewiebe Mar 18, 2026
4365d95
Enforce proper naming and directory structure
mikewiebe Mar 19, 2026
50e8dea
[ignore] Update integration tests for nd_local_user module.
gmicol Mar 19, 2026
a92a301
[ignore] Revert local users endpoints filename to aaa_local_users.py.
gmicol Mar 19, 2026
64ae6ec
[ignore] Change in NDStateMachine initialization to take advantage o…
gmicol Mar 19, 2026
a2037ac
[ignore] Remove ValidationError import from nd_state_machine.py.
gmicol Mar 19, 2026
fff4f7d
[ignore] Add function to nd_local_user module. Slighty fix Documenta…
gmicol Mar 24, 2026
f4d58f5
[ignore] Make NDBaseOrchestrator a Generic class.
gmicol Mar 24, 2026
8a44e8d
[ignore] Restructure api_endpoints folder into endpoints -> v1. Fix s…
gmicol Mar 3, 2026
76d6b4e
[ignore] Rename NDBaseSmartEndpoint to NDBaseEndpoint. Fix importatio…
gmicol Mar 3, 2026
c03bea8
[ignore] Add NDOutput class. Modify NDStateMachine and nd_local_user …
gmicol Mar 6, 2026
217de4f
Merge branch 'add_network_ressource_nd_local_user' into fabric_ibgp
mikewiebe Mar 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions plugins/module_utils/common/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

# Copyright: (c) 2026, Allen Robel (@arobel) <arobel@cisco.com>
# Copyright: (c) 2026, Gaspard Micol (@gmicol) <gmicol@cisco.com>

# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
Expand All @@ -16,10 +15,6 @@
# fmt: on
# isort: on

# pylint: disable=invalid-name
__metaclass__ = type
# pylint: enable=invalid-name

from typing import Any, Optional

from ansible_collections.cisco.nd.plugins.module_utils.common.pydantic_compat import (
Expand Down Expand Up @@ -144,3 +139,11 @@ def to_dict(self) -> dict[str, Any]:
- None
"""
return self.error_data.model_dump(exclude_none=True)


class NDStateMachineError(Exception):
"""
Raised when NDStateMachine is failing.
"""

pass
6 changes: 0 additions & 6 deletions plugins/module_utils/common/log.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
# -*- coding: utf-8 -*-

# Copyright: (c) 2026, Allen Robel (@arobel) <arobel@cisco.com>

# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)

from __future__ import absolute_import, division, print_function

# pylint: disable=invalid-name
__metaclass__ = type
# pylint: enable=invalid-name

import json
import logging
from enum import Enum
Expand Down
57 changes: 51 additions & 6 deletions plugins/module_utils/common/pydantic_compat.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

# Copyright: (c) 2026, Allen Robel (@arobel) <arobel@cisco.com>
# Copyright: (c) 2026, Gaspard Micol (@gmicol) <gmicol@cisco.com>

# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)

Expand Down Expand Up @@ -34,10 +33,6 @@
# fmt: on
# isort: on

# pylint: disable=invalid-name
__metaclass__ = type
# pylint: enable=invalid-name

import traceback
from typing import TYPE_CHECKING, Any, Callable, Union

Expand All @@ -51,11 +46,16 @@
Field,
PydanticExperimentalWarning,
StrictBool,
SecretStr,
ValidationError,
field_serializer,
model_serializer,
field_validator,
model_validator,
validator,
computed_field,
FieldSerializationInfo,
SerializationInfo,
)

HAS_PYDANTIC = True # pylint: disable=invalid-name
Expand All @@ -71,11 +71,16 @@
Field,
PydanticExperimentalWarning,
StrictBool,
SecretStr,
ValidationError,
field_serializer,
model_serializer,
field_validator,
model_validator,
validator,
computed_field,
FieldSerializationInfo,
SerializationInfo,
)
except ImportError:
HAS_PYDANTIC = False # pylint: disable=invalid-name
Expand Down Expand Up @@ -127,6 +132,15 @@ def decorator(func):

return decorator

# Fallback: model_serializer decorator that does nothing
def model_serializer(*args, **kwargs): # pylint: disable=unused-argument
"""Pydantic model_serializer fallback when pydantic is not available."""

def decorator(func):
return func

return decorator

# Fallback: field_validator decorator that does nothing
def field_validator(*args, **kwargs) -> Callable[..., Any]: # pylint: disable=unused-argument,invalid-name
"""Pydantic field_validator fallback when pydantic is not available."""
Expand All @@ -136,6 +150,15 @@ def decorator(func):

return decorator

# Fallback: computed_field decorator that does nothing
def computed_field(*args, **kwargs): # pylint: disable=unused-argument
"""Pydantic computed_field fallback when pydantic is not available."""

def decorator(func):
return func

return decorator

# Fallback: AfterValidator that returns the function unchanged
def AfterValidator(func): # pylint: disable=invalid-name
"""Pydantic AfterValidator fallback when pydantic is not available."""
Expand All @@ -152,6 +175,9 @@ def BeforeValidator(func): # pylint: disable=invalid-name
# Fallback: StrictBool
StrictBool = bool

# Fallback: SecretStr
SecretStr = str

# Fallback: ValidationError
class ValidationError(Exception):
"""
Expand Down Expand Up @@ -183,6 +209,20 @@ def decorator(func):

return decorator

# Fallback: FieldSerializationInfo placeholder class that does nothing
class FieldSerializationInfo:
"""Pydantic FieldSerializationInfo fallback when pydantic is not available."""

def __init__(self, **kwargs):
pass

# Fallback: SerializationInfo placeholder class that does nothing
class SerializationInfo:
"""Pydantic SerializationInfo fallback when pydantic is not available."""

def __init__(self, **kwargs):
pass

else:
HAS_PYDANTIC = True # pylint: disable=invalid-name
PYDANTIC_IMPORT_ERROR = None # pylint: disable=invalid-name
Expand Down Expand Up @@ -234,10 +274,15 @@ def main():
"PYDANTIC_IMPORT_ERROR",
"PydanticExperimentalWarning",
"StrictBool",
"SecretStr",
"ValidationError",
"field_serializer",
"model_serializer",
"field_validator",
"model_validator",
"require_pydantic",
"validator",
"computed_field",
"FieldSerializationInfo",
"SerializationInfo",
]
47 changes: 44 additions & 3 deletions plugins/module_utils/constants.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,49 @@
# -*- coding: utf-8 -*-

# Copyright: (c) 2022, Akini Ross (@akinross) <akinross@cisco.com>
# Copyright: (c) 2024, Gaspard Micol (@gmicol) <gmicol@cisco.com>

# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)

from __future__ import absolute_import, division, print_function

__metaclass__ = type
from typing import Dict
from types import MappingProxyType
from copy import deepcopy


class NDConstantMapping:
def __init__(self, data: Dict):
self.data = data
self.new_dict = deepcopy(data)
for k, v in data.items():
self.new_dict[v] = k
self.new_dict = MappingProxyType(self.new_dict)

def get_dict(self):
return self.new_dict

def get_original_data(self):
return list(self.data.keys())


from typing import Dict
from types import MappingProxyType
from copy import deepcopy


class NDConstantMapping(Dict):
def __init__(self, data: Dict):
self.data = data
self.new_dict = deepcopy(data)
for k, v in data.items():
self.new_dict[v] = k
self.new_dict = MappingProxyType(self.new_dict)

def get_dict(self):
return self.new_dict

def get_original_data(self):
return list(self.data.keys())


OBJECT_TYPES = {
"tenant": "OST_TENANT",
Expand Down Expand Up @@ -157,6 +193,11 @@
"restart",
"delete",
"update",
"merged",
"replaced",
"overridden",
"deleted",
"gathered",
)

INTERFACE_FLOW_RULES_TYPES_MAPPING = {"port_channel": "PORTCHANNEL", "physical": "PHYSICAL", "l3out_sub_interface": "L3_SUBIF", "l3out_svi": "SVI"}
Expand Down
6 changes: 6 additions & 0 deletions plugins/module_utils/endpoints/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright: (c) 2026, Allen Robel (@arobel) <arobel@cisco.com>
# Copyright: (c) 2026, Gaspard Micol (@gmicol) <gmicol@cisco.com>

# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
Expand All @@ -22,6 +23,7 @@
Field,
)
from ansible_collections.cisco.nd.plugins.module_utils.enums import HttpVerbEnum
from ansible_collections.cisco.nd.plugins.module_utils.types import IdentifierKey


class NDEndpointBaseModel(BaseModel, ABC):
Expand Down Expand Up @@ -129,3 +131,7 @@ def verb(self) -> HttpVerbEnum:

None
"""

# NOTE: function to set endpoints attribute fields from identifiers -> acts as the bridge between Models and Endpoints for API Request Orchestration
def set_identifiers(self, identifier: IdentifierKey = None):
pass
47 changes: 47 additions & 0 deletions plugins/module_utils/endpoints/enums.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Copyright: (c) 2026, Allen Robel (@allenrobel) <arobel@cisco.com>
# Copyright: (c) 2026, Gaspard Micol (@gmicol) <gmicol@cisco.com>

# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
Enums used in endpoints.
"""

from __future__ import absolute_import, division, print_function

from enum import Enum


class VerbEnum(str, Enum):
"""
# Summary
Enum for HTTP verb values used in endpoints.
## Members
- GET: Represents the HTTP GET method.
- POST: Represents the HTTP POST method.
- PUT: Represents the HTTP PUT method.
- DELETE: Represents the HTTP DELETE method.
"""

GET = "GET"
POST = "POST"
PUT = "PUT"
DELETE = "DELETE"


class BooleanStringEnum(str, Enum):
"""
# Summary
Enum for boolean string values used in query parameters.
## Members
- TRUE: Represents the string "true".
- FALSE: Represents the string "false".
"""

TRUE = "true"
FALSE = "false"
4 changes: 2 additions & 2 deletions plugins/module_utils/endpoints/mixins.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright: (c) 2026, Allen Robel (@arobel) <arobel@cisco.com>
# Copyright: (c) 2026, Allen Robel (@allenrobel) <arobel@cisco.com>
# Copyright: (c) 2026, Gaspard Micol (@gmicol) <gmicol@cisco.com>

# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
Expand All @@ -10,7 +11,6 @@

from __future__ import absolute_import, annotations, division, print_function


from typing import Optional

from ansible_collections.cisco.nd.plugins.module_utils.enums import BooleanStringEnum
Expand Down
2 changes: 0 additions & 2 deletions plugins/module_utils/endpoints/query_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@

from __future__ import absolute_import, annotations, division, print_function


from enum import Enum
from typing import Optional, Protocol
from urllib.parse import quote


from ansible_collections.cisco.nd.plugins.module_utils.common.pydantic_compat import (
BaseModel,
Field,
Expand Down
Loading
Loading