Module dzs

DZS OLT config module

  • License: Inmanta EULA

  • Version: 1.3.2

Typedefs

typedef dzs::access_type_t
  • Base type string

  • Type constraint (self in ['PPPoE', 'DHCP'])

typedef dzs::encapsulation_t
  • Base type string

  • Type constraint (self in ['tagged', 'stagged'])

typedef dzs::hex_string
  • Base type string

  • Type constraint std::validate_type('pydantic.constr',self,{'regex': '^[0-9A-F]{8}$'})

typedef dzs::olt_port_t
  • Base type string

  • Type constraint std::validate_type('pydantic.constr',self,{'regex': '^\\d+/\\d+$'})

typedef dzs::rule_id_t
  • Base type string

  • Type constraint std::validate_type('pydantic.constr',self,{'regex': '^\\d+\\/\\d+$'})

typedef dzs::rule_name_t
  • Base type string

  • Type constraint std::validate_type('pydantic.constr',self,{'regex': '^[!-~]*$', 'strict': True})

Entities

entity dzs::BaseDiscovery

Parents: std::DiscoveryResource

Base entity for all the discovery resources of this module. A single instance of such entity only applies to a single host/device, and reports the resources it discovers on the agent of that device.

The values reported for a discovered resource are the attributes of its managed counterpart which the handler of that resource can read from the device. The resources are reported with the id their managed counterpart would have, except for the resources which refer to an onu registered with a regid: they are reported with the serial number of the onu, as the regid is not exposed by the olt inventory.

attribute string name

Name of the discovery

relation dzs::Device device [1]

The following implements statements select implementations for this entity:

entity dzs::BaseResource

Parents: std::PurgeableResource, std::ManagedResource

Base entity for all the managed resources of this module.

attribute bool send_event=true

Whether this resource should send an event to the resources depending on it, once it has been deployed.

relation dzs::Device device [1]
relation std::AgentConfig agent_config [1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity dzs::Bridge

Parents: dzs::BaseResource

Entity representing a Bridge on the device

attribute int vlan

Vlan to use for the bridge

attribute int slan

Slan to use for the bridge

attribute int eth_port

Ethernet port for the bridge

attribute int gtp

GTP number

attribute int egress_packet_rule

External packet rule

attribute dzs::encapsulation_t encapsulation

Encapsulation mode “tagged” or “stagged”

attribute bool rg_bridged

If the bridge needs to be rg bridged

attribute bool uni_vlan_priority_tagged

If the bridge needs to use prority tagged uni vlan

relation dzs::Onu onu [1]
relation dzs::Rule rule [1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity dzs::Device

Parents: std::Entity

Device to use

attribute string host

hostname or ip address of the device

attribute string? username=null

the user name to authenticate with, mutually exclusive with username_env_var

attribute string? password=null

the user password to authenticate with, mutually exclusive with password_env_var

attribute string? username_env_var=null

name of the environment variable (on the agent) providing the user name, mutually exclusive with username

attribute string? password_env_var=null

name of the environment variable (on the agent) providing the user password, mutually exclusive with password

attribute string? agent_name=null

name of the agent that will manage the resources for this device. When null, the host is used as agent name.

attribute bool strict_key=false

if the ssh connection use the strict key option

The following implements statements select implementations for this entity:

entity dzs::Onu

Parents: dzs::BaseResource

Entity representing an Onu on the device

attribute string name

Name that identifies the onu within the olt, set by the model as a reference.

attribute int slot

Slot number on the olt

attribute int olt

Olt port number

attribute int id

The unique identifier of than onu within the olt port, set by the model as a reference.

attribute string? regid=null

Register Id

attribute std::ascii_word me_profile
attribute dzs::hex_string? serial_number=null

Serial number of the onu device

attribute bool skip_if_not_found=false

Flag to make the resource skip if - in case of regid: the resource is set but not found in the inventory - in case of serial: the serno is not found in the device

relation dzs::OnuPorts ports [0:1]

other end: dzs::OnuPorts.onu [1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity dzs::OnuDiscovery

Parents: dzs::BaseDiscovery

A resource that will discover all the onus which are known by the device, either already registered on an olt port, or waiting to be registered.

On top of the attributes of the managed dzs::Onu resource, each discovered onu carries the model of the onu device, as reported by the olt (e.g. 5302). It is not the me profile the managed resource is configured with (e.g. zhone-5302), but it is the only information about the onu hardware the olt exposes.

The following implements statements select implementations for this entity:

  • constraint true

entity dzs::OnuPortBridge

Parents: dzs::BaseResource

The bridge used to configure the uplink of a onu, for a specific port. The bridge is identified in the model by the serial/regid of the onu, and the port we want to setup connectivity for, and in the handler, we use the resolved onu_id of the attached onu resource. The difference with the Bridge resource is the definition of the identity, this one is more fine grained, and allow us to find the bridge in use by a device even if it has been created for a different vlan/slan pair, or different rules, members, etc. This is a more robust implementation, but also more expensive as it will perform more cli checks when reading the config.

attribute string name
attribute int vlan

Vlan to use for the bridge

attribute int slan

Slan to use for the bridge

attribute int eth_port

Ethernet port for the bridge

attribute int gtp

GTP number

attribute dzs::encapsulation_t encapsulation

Encapsulation mode “tagged” or “stagged”

attribute bool rg_bridged

If the bridge needs to be rg bridged

attribute bool uni_vlan_priority_tagged

If the bridge needs to use prority tagged uni vlan

relation dzs::Onu onu [1]
relation dzs::Rule ingress_packet_rule [1]
relation dzs::Rule egress_packet_rule [1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity dzs::OnuPortBridgeDiscovery

Parents: dzs::BaseDiscovery

A resource that will discover all the bridges configured on the ports of the onus registered on the device.

The following implements statements select implementations for this entity:

  • constraint true

entity dzs::OnuPorts

Parents: dzs::BaseResource

Entity representing all the physical ports of an onu

attribute int[] enabled_ports

List of the port that needs to be up, all the other will be down

attribute dict config={}

Other config attributes for the ports

attribute int attempts=4

The number of time the handler should try to show the port status before skipping/failing. An exponential backoff (base of 2 seconds) is implemented to space the attempts.

attribute bool skip_if_not_found=true

When true, and the handler can not verify the status of the onu ports (because the onu is down), skip the resource instead of failing.

attribute bool suppress_read_error=false

When true, and the handler can not verify the status of the onu ports (because the onu is down), finish the resource execution with success. It goes before the skip_if_not_found

relation dzs::Onu onu [1]

other end: dzs::Onu.ports [0:1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity dzs::OnuPortsDiscovery

Parents: dzs::BaseDiscovery

A resource that will discover the state of the physical ports of all the onus registered on the device.

The following implements statements select implementations for this entity:

  • constraint true

entity dzs::Rule

Parents: dzs::BaseResource

Entity representing a Rule on the device

attribute int group_index

group identifier of the rule

attribute int member_index

member identifier of the rule

attribute dzs::access_type_t? access_type=null

Authentication type to use for this rule “PPPoE” or “DHCP”

attribute string? access_type_code

Authentication code to use, set by the model

attribute dzs::rule_name_t? name=null

Name of the rule

attribute string? filter='FFL/$SystemName/$Shelf/$Slot/$Port:$Vlan'

Filter of the rule

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity dzs::RuleDiscovery

Parents: dzs::BaseDiscovery

A resource that will discover all the rules of the device which this module can manage, i.e. the rules whose access type is one of the access types supported by the dzs::Rule entity.

The following implements statements select implementations for this entity:

  • constraint true

Implementations

implementation dzs::assert_values
implementation dzs::bridge_basic_config
implementation dzs::bridge_references
implementation dzs::emit_agent
implementation dzs::facts
implementation dzs::get_access_type_code
implementation dzs::phys_port_basic_config

Plugins

dzs.create_fact_reference(resource: <class 'inmanta.execute.proxy.DynamicProxy'>, fact_name: <class 'str'>) → <class 'inmanta_plugins.dzs.FactReference'>

Create a fact reference :param resource: The resource that contains the fact :param fact_name: The name of the fact :return: A reference to what can be resolved to a string

if context.refs exists it means that some facts might be mocked, so we pass them to the FactReference

Resources

class dzs.resource.Bridge
class dzs.resource.Onu
class dzs.discovery.OnuDiscovery
class dzs.resource.OnuPortBridge
class dzs.discovery.OnuPortBridgeDiscovery
class dzs.resource.OnuPorts
class dzs.discovery.OnuPortsDiscovery
class dzs.resource.Rule
class dzs.discovery.RuleDiscovery

Handlers

class dzs.resource.OnuHandler
class dzs.resource.RuleHandler
class dzs.resource.BridgeHandler
class dzs.resource.OnuPortBridgeHandler
class dzs.resource.OnuPortsHandler
class dzs.discovery.OnuDiscoveryHandler
class dzs.discovery.RuleDiscoveryHandler
class dzs.discovery.OnuPortBridgeDiscoveryHandler
class dzs.discovery.OnuPortsDiscoveryHandler