Module n5k_lan

  • License: ASL 2.0

  • Version: 1.4.4

Typedefs

typedef n5k_lan::priority_type_t
  • Base type string

  • Type constraint (self in ['root priority', 'designated priority'])

typedef n5k_lan::spanning_tree_priority_t
  • Base type int

  • Type constraint std::validate_type('pydantic.conint',self,{'multiple_of': 4096, 'le': 61440})

typedef n5k_lan::switchport_mode_t
  • Base type string

  • Type constraint (self in ['trunk', 'private-vlan promiscuous', 'private-vlan host', 'private-vlan trunk secondary', 'private-vlan trunk promiscuous', 'access', 'fex-fabric', 'fabricpath'])

typedef n5k_lan::trunk_type_t
  • Base type string

  • Type constraint (self in ['trunk', 'private-vlan trunk'])

typedef n5k_lan::vlan_id
  • Base type int

  • Type constraint std::validate_type('pydantic.conint',self,{'ge': 1, 'lt': 4094})

typedef n5k_lan::vlan_mode_t
  • Base type string

  • Type constraint (self in ['ce', 'fabricpath'])

typedef n5k_lan::vlan_name_t
  • Base type std::ascii_word

  • Type constraint (std::length(self) <= 32)

Entities

entity n5k_lan::ConfigContainer

Parents: std::Entity

Basic config entity

attribute string _config

A config of the entity.

relation n5k_lan::ConfigContainer children [0:*]
entity n5k_lan::Credentials

Parents: std::Entity

The device credentials

attribute string username_env_var

Name of the username environment variable.

attribute string password_env_var

Name of the password environment variable.

The following implements statements select implementations for this entity:

entity n5k_lan::DesignatedVlanPriority

Parents: n5k_lan::VlanPriority

Designated priority for Vlan config. Child of Spanning Tree pseudo information. ‘vlan … designated priority …’ config entity.

relation n5k_lan::SpanningTree spanning_tree [1]

other end: n5k_lan::SpanningTree.vlan_designated_priority [0:*]

relation n5k_lan::Vlan vlan [0:*]

other end: n5k_lan::Vlan.designated_priority [0:1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity n5k_lan::Device

Parents: std::Entity

The device on which the configuration is managed.

attribute string schema_file='./nx-osv.yaml'
attribute string schema

Schema as YANG string.

attribute string host

Host name.

attribute int port

Port.

attribute bool autostart_agent=true

start an agent for this device

relation n5k_lan::Credentials credentials [1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity n5k_lan::Flag

Parents: n5k_lan::Flaggable

Basic generic flag entity.

The following implements statements select implementations for this entity:

  • constraint true

entity n5k_lan::Flaggable

Parents: n5k_lan::Parameter

Basic generic flaggable entity.

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity n5k_lan::Interface

Parents: n5k_lan::ManagedConfig, n5k_lan::Shutdownable, n5k_lan::Flag, n5k_lan::NullableValues

Basic Interface entity

attribute string name

Name of the interface.

attribute string? description=null

Interface description.

attribute n5k_lan::switchport_mode_t? switchport_mode=null
relation n5k_lan::TrunkVlan trunk_vlans [0:*]

other end: n5k_lan::TrunkVlan.interface [1]

relation n5k_lan::PrivateTrunkVlan private_trunk_vlans [0:*]

other end: n5k_lan::PrivateTrunkVlan.interface [1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity n5k_lan::ManagedConfig

Parents: n5k_lan::ConfigContainer

A managed config entity with attached resource and device.

relation n5k_lan::Resource resource [1]

other end: n5k_lan::Resource.configs [0:*]

relation n5k_lan::Device device [1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity n5k_lan::NullableValues

Parents: n5k_lan::Parameter

Provides an interface to operate on values that could be nullable. Values that are set to null are considered to be ignored in the config.

attribute dict mapping

Mapping for the values.

The following implements statements select implementations for this entity:

  • constraint true

entity n5k_lan::Parameter

Parents: n5k_lan::ConfigContainer

Base class for things that are managed on the switch such as VLAN, Interface, … Subclasses add attributes that generate parameters in the configuration.

attribute string parameter

String provided when Container is not purged

attribute string parameter_purged

String provided when Container is purged

attribute bool? purged

Defines if the Parameter is purged or not.

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity n5k_lan::PrivateTrunkVlan

Parents: n5k_lan::SwitchportAllowedVlan

Private vlan trunk range type.

relation n5k_lan::Interface interface [1]

other end: n5k_lan::Interface.private_trunk_vlans [0:*]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity n5k_lan::Resource

Parents: std::PurgeableResource, std::ManagedResource

A resource that is managed by the orchestrator. It contains one or more NX-OS config statements

attribute string name

Name of the resource

attribute string parent_command

Name of the parent config command

attribute bool purge_on_delete=false
relation n5k_lan::Device device [1]
relation n5k_lan::ManagedConfig configs [0:*]

other end: n5k_lan::ManagedConfig.resource [1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity n5k_lan::RootVlanPriority

Parents: n5k_lan::VlanPriority

Root piority for Vlan config. Child of Spanning Tree pseudo information. ‘vlan … root priority …’

relation n5k_lan::SpanningTree spanning_tree [1]

other end: n5k_lan::SpanningTree.vlan_root_priority [0:*]

relation n5k_lan::Vlan vlan [0:*]

other end: n5k_lan::Vlan.root_priority [0:1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity n5k_lan::ScriptedRange

Parents: n5k_lan::Parameter

ScriptedRange parameter that defines vlan range by ‘add’ and ‘remove’ commands.

attribute string name

Name of the Range list.

attribute string range

Range

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity n5k_lan::Shutdownable

Parents: n5k_lan::Parameter

Interface for managed entities that have a shutdown attribute

attribute bool? shutdown=false

Does the managed entity need to be shutdown or not?

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity n5k_lan::SpanningTree

Parents: n5k_lan::ManagedConfig, n5k_lan::Flag

‘spanning-tree pseudo-information’ config entity.

relation n5k_lan::RootVlanPriority vlan_root_priority [0:*]

other end: n5k_lan::RootVlanPriority.spanning_tree [1]

relation n5k_lan::DesignatedVlanPriority vlan_designated_priority [0:*]

other end: n5k_lan::DesignatedVlanPriority.spanning_tree [1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity n5k_lan::SwitchportAllowedVlan

Parents: std::Entity

Allowed vlans for switchport

attribute n5k_lan::trunk_type_t trunk_type

Trunk type.

attribute n5k_lan::vlan_id vlan

Vlan id.

attribute bool purged

Purged.

entity n5k_lan::TrunkVlan

Parents: n5k_lan::SwitchportAllowedVlan

Trunk vlan range type.

relation n5k_lan::Interface interface [1]

other end: n5k_lan::Interface.trunk_vlans [0:*]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity n5k_lan::Value

Parents: n5k_lan::Parameter

Basic generic value entity

attribute string name

Name of the parameter.

attribute string? value

Value of the parameter. If set to null, parameter is considered as purged.

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity n5k_lan::Vlan

Parents: n5k_lan::ManagedConfig, n5k_lan::Shutdownable, n5k_lan::Flag, n5k_lan::NullableValues

A L2 vlan on the switch.

attribute n5k_lan::vlan_id vlan

The vlan id of the VLAN. This is a mandatory parameter.

attribute n5k_lan::vlan_mode_t? mode=null

The mod of the vlan either ce for normal vlan or fabricpath

attribute n5k_lan::vlan_name_t? name=null

The name of the vlan

relation n5k_lan::RootVlanPriority root_priority [0:1]

other end: n5k_lan::RootVlanPriority.vlan [0:*]

relation n5k_lan::DesignatedVlanPriority designated_priority [0:1]

other end: n5k_lan::DesignatedVlanPriority.vlan [0:*]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity n5k_lan::VlanPriority

Parents: std::Entity

Basic vlan priority entity

attribute n5k_lan::spanning_tree_priority_t? priority

Priority

entity n5k_lan::VlanPriorityParameter

Parents: n5k_lan::Parameter, n5k_lan::VlanPriority

Vlan priority parameter.

attribute n5k_lan::priority_type_t priority_type

Type of the priority

attribute n5k_lan::vlan_id vlan

Vlan id

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

Implementations

implementation n5k_lan::instantiateAgent
implementation n5k_lan::stdDesignatedVlanPriority
implementation n5k_lan::stdDevice
implementation n5k_lan::stdFlaggable

Sets the parameter_purged to precede the parameter with ‘no’ keyword.

implementation n5k_lan::stdInterface
implementation n5k_lan::stdManagedConfig
implementation n5k_lan::stdParameter
implementation n5k_lan::stdPrivateTrunkVlan
implementation n5k_lan::stdResource
implementation n5k_lan::stdRootVlanPriority
implementation n5k_lan::stdScriptedRange
implementation n5k_lan::stdShutdownable
implementation n5k_lan::stdSpanningTree
implementation n5k_lan::stdTrunkVlan
implementation n5k_lan::stdValue
implementation n5k_lan::stdVlan
implementation n5k_lan::stdVlanPriorityParameter

Plugins

n5k_lan.switchport_vlan_list_by_purged(vlan_list: 'SwitchportAllowedVlan[]', purged: 'bool') 'string[]'

Converts list of TrunkVlan entities into a range string.

Parameters:

vlan_list – List of TrunkVlan entities.

Returns:

Range string

Resources

class n5k_lan.Resource

Handlers

class n5k_lan.ResourceHandler