Beispiel #1
0
 def _show_run_vlans(self, vlans):
     for vlan in vlans:
         self.write_line("vlan {}".format(vlan.number))
         self.write_line("   name {}".format(vlan_display_name(vlan)))
         self.write_line("   mac address learning")
         self.write_line("   state active")
         self.write_line("!")
Beispiel #2
0
def _to_vlans_json(vlans):
    return {
        "vlans": {
            str(vlan.number): {
                "dynamic": False,
                "interfaces": {},
                "name": vlan_display_name(vlan),
                "status": "active"
            } for vlan in vlans
        }
    }