Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 22 additions & 0 deletions plugins/module_utils/models/interfaces/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ class AccessPoHostPolicyTypeEnum(str, Enum):
ACCESS_PO_HOST = "accessPoHost"


class TrunkPoHostPolicyTypeEnum(str, Enum):
"""
# Summary

Policy type for port-channel trunk host interfaces.
"""

TRUNK_PO_HOST = "trunkPoHost"


class BpduFilterEnum(str, Enum):
"""
# Summary
Expand Down Expand Up @@ -74,6 +84,18 @@ class LacpRateEnum(str, Enum):
FAST = "fast"


class LinkTypeEnum(str, Enum):
"""
# Summary

Spanning-tree link type.
"""

AUTO = "auto"
POINT_TO_POINT = "pointToPoint"
SHARED = "shared"


class MtuEnum(str, Enum):
"""
# Summary
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Copyright: (c) 2026, Allen Robel (@allenrobel)

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

"""
Port-channel trunkPoHost interface orchestrator for Nexus Dashboard.

This module provides `PortChannelTrunkHostInterfaceOrchestrator`, which manages CRUD operations
for port-channel trunkPoHost interfaces. It inherits all shared port-channel logic from
`PortChannelBaseOrchestrator` and only defines the model class and managed policy types.
"""

from __future__ import annotations

from typing import ClassVar, Type

from ansible_collections.cisco.nd.plugins.module_utils.models.base import NDBaseModel
from ansible_collections.cisco.nd.plugins.module_utils.models.interfaces.enums import TrunkPoHostPolicyTypeEnum
from ansible_collections.cisco.nd.plugins.module_utils.models.interfaces.port_channel_trunk_host_interface import (
PortChannelTrunkHostInterfaceModel,
)
from ansible_collections.cisco.nd.plugins.module_utils.orchestrators.port_channel_base import PortChannelBaseOrchestrator


class PortChannelTrunkHostInterfaceOrchestrator(PortChannelBaseOrchestrator):
"""
# Summary

Orchestrator for port-channel trunkPoHost interface CRUD operations on Nexus Dashboard.

Inherits all shared port-channel logic from `PortChannelBaseOrchestrator`. Defines `model_class` as
`PortChannelTrunkHostInterfaceModel` and manages the `trunkPoHost` policy type.

## Raises

### RuntimeError

- Via inherited methods. See `PortChannelBaseOrchestrator` for full details.
"""

model_class: ClassVar[Type[NDBaseModel]] = PortChannelTrunkHostInterfaceModel

def _managed_policy_types(self) -> set[str]:
"""
# Summary

Return the set of API-side policy type values managed by this orchestrator.

## Raises

None
"""
return {e.value for e in TrunkPoHostPolicyTypeEnum}
Loading