Get Def Function Help - Plexxi/PlexxiControlCLI GitHub Wiki
These functions Get (return JSON or param) or Def (modify in Control or on Switch) Each Def function will specifically state in the help text below if it is pushed to the Switch
#defVLANName(vlan, name) Modifies the local VLAN name for PlexxiControl VLANs (this is not pushed to the Switches)
VLAN found, sets name to CustomerA. Returns 0
>>> defVLANName(100, 'CustomerA')
Set VLAN 100, CustomerA
('Set Name VLAN', 100, 'CustomerA')
0
VLAN not found, Returns Error 1
>>> defVLANName(101, 'bob')
Set VLAN 101, bob
('Vlan not found', 101)
1
#getPortVLAN(switch, port) Returns JSON with all the VLANs configured on port
>>> getPortVLAN('sim_01', 2)
Tag:1, Name:VLAN$0, Switch:sim_01
Tag:200, Name:VLAN$2, Switch:sim_01
{200: {'Name': u'VLAN$2'}, 1: {'Name': u'VLAN$0'}}
#defPortName(switch, port, name) Modifies the Control port name for a Switch port (is not pushed to Switches)
>>> defPortName('sim_04', 6, 'Switch4Port6')
Set port 6, Switch4Port6
('Set Name Port', 03734100040c0000531677a64d1d9266, 'Switch4Port6')
0
#getPortName(switch, port) Returns a string name for the port
>>> getPortName('sim_04', 6)
u'Switch4Port6'