Question: please solve problem in python NameError: name 'VLANSetup' is not defined In network administration, many admins will use a VLAN (Virtual Local Area Network) to
please solve problem in python
NameError: name 'VLANSetup' is not defined
In network administration, many admins will use a VLAN (Virtual Local Area Network) to create logical subnetworks. The advantages of this type of a setup is better confinement of broadcast domains, reduced broadcast traffic and more efficient maintenance of the network. The admin can group network nodes that are physically dispersed into similar broadcast domains for improved network traffic management.
Configuration of VLANS on multiple switches can be very time consuming. Python scripts can help automate tasks reducing the need to physically go from switch to switch. Minimal configuration variables may include VLAN name, VLAN number, and Network device.
The main.py template provides a list of 5 network switch names. The script will simulate the configuration of those 5 devices.
Define the VLANSetup class in VLANSetup.py with a constructor to initialize a VLAN's information. The constructor should by default initialize the VLAN's name to "None" and the VLAN number to 0.
Define the NetManage class in NetManage.py with a constructor to initialize a device's hostname. The constructor should by default initialize the Network device to "None" and add a VLANSetup object. Add an import statement to import the VLANSetup class.
Add import statements to main.py to import the VLANSetup and NetManage classes.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
