dzs adapter¶
Inmanta module to manage DZS OLT devices.
Environment variables¶
Env variable name |
Description |
|---|---|
INMANTA_DZS_SESSION_IDLE_TIMEOUT |
Number of seconds an idle ssh session to a device is kept open before being closed (default: |
INMANTA_DZS_INVENTORY_TIMEOUT |
Number of seconds to wait for the |
The credentials of a dzs::Device can either be set directly (username/password) or resolved on the
agent at deploy time from an environment variable, using a reference (std::create_environment_reference).
Usage example¶
This example configures an onu, one of its rules and one of its bridges. It corresponds to the model
used in the test suite (tests/test_model.py).
import dzs
device = dzs::Device(
host="0.0.0.0",
username=std::create_environment_reference("DZS_USERNAME"),
password=std::create_environment_reference("DZS_PASSWORD"),
strict_key=false,
)
onu = dzs::Onu(
device=device,
slot=2,
olt=12,
me_profile="zhone-2424",
serial_number="00112233",
)
rule = dzs::Rule(
device=device,
group_index=1,
member_index=1,
access_type="PPPoE",
)
bridge = dzs::Bridge(
device=device,
onu=onu,
rule=rule,
vlan=100,
slan=0,
eth_port=1,
gtp=1,
encapsulation="tagged",
rg_bridged=false,
uni_vlan_priority_tagged=false,
)
dzs::Onu requires either regid or serial_number to be set (not both), to identify the onu on the
olt. The full model definition, with a description of every entity and attribute, is documented in
model/_init.cf and picked up by the generated module documentation, the same way as for other
Inmanta modules (e.g. netbox).