n5k_lan adapter¶
Support for Cisco Nexus 5000 datacenter switch using Netconfig and CLI
Available Environment Variables¶
The available environment variables for this module are:
INMANTA_TEST_ENV
: The directory that the test case uses to store its requirements. This could increase the speed of test runs by using it as a caching mechanism.INMANTA_MODULE_REPO
: The repository URL to download the modules from.N5K_NETCONF_TIMEOUT
:Netconf
RPC timeout in seconds. Setting this value in environments with large config files will preventRPC
errors.
Example¶
import n5k_lan
switch = n5k_lan::Device(
host="myrouter",
credentials=n5k_lan::Credentials(
username_env_var="N5K_USER",
password_env_var="N5K_PASS",
),
schema_file = "./nx-osv.yaml",
)
resource = n5k_lan::Resource(
name="n5k",
device=switch
)
designated_priority = n5k_lan::DesignatedVlanPriority(priority=8192)
vlan = n5k_lan::Vlan(
resource=resource,
vlan={vlan},
purged=false,
designated_priority=designated_priority
)
spanning_tree = n5k_lan::SpanningTree(resource=resource)
spanning_tree.vlan_designated_priority += designated_priority