COSC Learning Lab

03 Network Interfaces

Table of Contents

Preamble


In [1]:
from importlib import import_module
from inspect import getdoc

Sample Scripts


In [2]:
print(getdoc(import_module('learning_lab.03_management_interface')))


Sample usage of function 'management_interface'.

Print the function's documentation.
Invoke the function.
Print the function output.

One device that is mounted will be selected for the demonstration.

In [3]:
print(getdoc(import_module('learning_lab.03_interface_names')))


Sample usage of function 'interface_names'.

Print the function's documentation then apply the function to any one device that is mounted and connected.

In [4]:
print(getdoc(import_module('learning_lab.03_interface_properties')))


Sample usage of function 'interface_properties'.

Print the function's documentation then invoke the function and print the output.
Apply the function to one interface on one device.
The selected device must be connected.
The selected interface is on the 'data plane' 
Interfaces on the 'control plane' are excluded.

In [5]:
print(getdoc(import_module('learning_lab.03_interface_configuration')))


Sample usage of function 'interface_configuration'.

Print the function's documentation then invoke the function and print the output.
Apply the function to one interface on one device.
The selected device must be connected.
The selected interface is on the 'data plane' 
Interfaces on the 'control plane' are excluded.

In [6]:
print(getdoc(import_module('learning_lab.03_interface_configuration_update')))


Sample usage of function 'interface_configuration_update'.

Print the function's documentation then invoke the function.
Use any one interface on any one device that is connected.
Verify that the configuration has changed.
Restore the configuration.

In [7]:
print(getdoc(import_module('learning_lab.03_interface_shutdown')))


Sample usage of function 'interface_configuration_update' to shutdown an interface.

Print the function's documentation then invoke the function.
Apply the function to one interface on one device.
The device must be connected.
The interface must be on the 'data plane', not the 'control plane'.
The interface must be 'up'.

In [8]:
print(getdoc(import_module('learning_lab.03_interface_startup')))


Sample usage of function 'interface_configuration_update' to startup an interface.

Print the function's documentation then invoke the function.
Apply the function to one interface on one device.
The device must be connected.
The interface must be on the 'data plane', not the 'control plane'.
The interface must be 'down' already.