Hello all,
I've been manually adding in all my Aerohive access points into packetfence
using the web admin gui, but that seems incredibly slow and cumbersome as
opposed to using something command-line driven (I have about 300 access
points left to go with the relevant fields in a csv file and would like to
import them from the CLI).
Unfortunately, it doesn't appear that
pfcmd switchconfig add
or
pfcmd switchconfig edit
or
pfcmd switchconfig get
support the 'Description' field:
** note pfconfig switchconfig get does not return 'description' as a valid
assignment:
dvpf1-dev:~ # /usr/local/pf/bin/pfcmd switchconfig 'get 10.3.240.20'
ip|type|mode|inlineTrigger|VoIPEnabled|vlans|normalVlan|registrationVlan|isolationVlan|macDetectionVlan|guestVlan|voiceVlan|inlineVlan|customVlan1|customVlan2|customVlan3|customVlan4|customVlan5|uplink|deauthMethod|cliTransport|cliUser|cliPwd|cliEnablePwd|wsTransport|wsUser|wsPwd|SNMPVersionTrap|SNMPCommunityTrap|SNMPUserNameTrap|SNMPAuthProtocolTrap|SNMPAuthPasswordTrap|SNMPPrivProtocolTrap|SNMPPrivPasswordTrap|SNMPVersion|SNMPCommunityRead|SNMPCommunityWrite|SNMPEngineID|SNMPUserNameRead|SNMPAuthProtocolRead|SNMPAuthPasswordRead|SNMPPrivProtocolRead|SNMPPrivPasswordRead|SNMPUserNameWrite|SNMPAuthProtocolWrite|SNMPAuthPasswordWrite|SNMPPrivProtocolWrite|SNMPPrivPasswordWrite|radiusSecret|controllerIp|roles|macSearchesMaxNb|macSearchesSleepInterval
10.3.240.20|AeroHIVE::AP|production||N|1,2,3,4,5|1|220|230|4|210|5|6||||||1|RADIUS|Telnet||||http|||2c|******||||||2c|public|private||||||||||||******|||30|2
**pfcmd switchconfig edit succeeds with other fields like vlans and type:
dvpf1:/usr/local/pf # /usr/local/pf/bin/pfcmd switchconfig 'edit
10.47.240.20 vlans="1,2,3",type="Aerohive::AP"'
dvpf1:/usr/local/pf #
** pfccmd switchconfig edit fails if the description field is included:
dvpf1:/usr/local/pf # /usr/local/pf/bin/pfcmd switchconfig 'edit
10.47.240.20 description="test"'
Command not understood. (pfcmd grammar test failed at line 207.)
Usage: pfcmd switchconfig get <all|default|IP>
pfcmd switchconfig add <IP> [assignments]
pfcmd switchconfig edit <IP> [assignments]
pfcmd switchconfig delete <IP>
query/modify switches.conf configuration file
**pfconfig switchconfig add works ok without the description field:
dvpf1:/usr/local/pf # /usr/local/pf/bin/pfcmd switchconfig 'add
10.47.240.20 vlans="1,2,3,4,5",type="Aerohive::AP"'
**delete test switch and start over:
dvpf1:/usr/local/pf # /usr/local/pf/bin/pfcmd switchconfig 'delete
10.47.240.20'
** fails with the description field:
dvpf1:/usr/local/pf # /usr/local/pf/bin/pfcmd switchconfig 'add
10.47.240.20
vlans="1,2,3,4,5",type="Aerohive::AP",description="ahap-ths-auditorium1'
Command not understood. (pfcmd grammar test failed at line 207.)
Usage: pfcmd switchconfig get <all|default|IP>
pfcmd switchconfig add <IP> [assignments]
pfcmd switchconfig edit <IP> [assignments]
pfcmd switchconfig delete <IP>
query/modify switches.conf configuration file
**note that when manually added or edited via the web gui, switches.conf
DOES get correctly updated with the description field:
[10.47.240.20]
type=AeroHIVE::AP
vlans=1,2,3
description=AHAP-THS-CAFETERIA1
VoIPEnabled=N
Is this omission intentional or is there some way to add switches to the
switches.conf from the command line and retain the 'description' field?
Thanks,
I've been manually adding in all my Aerohive access points into packetfence
using the web admin gui, but that seems incredibly slow and cumbersome as
opposed to using something command-line driven (I have about 300 access
points left to go with the relevant fields in a csv file and would like to
import them from the CLI).
Unfortunately, it doesn't appear that
pfcmd switchconfig add
or
pfcmd switchconfig edit
or
pfcmd switchconfig get
support the 'Description' field:
** note pfconfig switchconfig get does not return 'description' as a valid
assignment:
dvpf1-dev:~ # /usr/local/pf/bin/pfcmd switchconfig 'get 10.3.240.20'
ip|type|mode|inlineTrigger|VoIPEnabled|vlans|normalVlan|registrationVlan|isolationVlan|macDetectionVlan|guestVlan|voiceVlan|inlineVlan|customVlan1|customVlan2|customVlan3|customVlan4|customVlan5|uplink|deauthMethod|cliTransport|cliUser|cliPwd|cliEnablePwd|wsTransport|wsUser|wsPwd|SNMPVersionTrap|SNMPCommunityTrap|SNMPUserNameTrap|SNMPAuthProtocolTrap|SNMPAuthPasswordTrap|SNMPPrivProtocolTrap|SNMPPrivPasswordTrap|SNMPVersion|SNMPCommunityRead|SNMPCommunityWrite|SNMPEngineID|SNMPUserNameRead|SNMPAuthProtocolRead|SNMPAuthPasswordRead|SNMPPrivProtocolRead|SNMPPrivPasswordRead|SNMPUserNameWrite|SNMPAuthProtocolWrite|SNMPAuthPasswordWrite|SNMPPrivProtocolWrite|SNMPPrivPasswordWrite|radiusSecret|controllerIp|roles|macSearchesMaxNb|macSearchesSleepInterval
10.3.240.20|AeroHIVE::AP|production||N|1,2,3,4,5|1|220|230|4|210|5|6||||||1|RADIUS|Telnet||||http|||2c|******||||||2c|public|private||||||||||||******|||30|2
**pfcmd switchconfig edit succeeds with other fields like vlans and type:
dvpf1:/usr/local/pf # /usr/local/pf/bin/pfcmd switchconfig 'edit
10.47.240.20 vlans="1,2,3",type="Aerohive::AP"'
dvpf1:/usr/local/pf #
** pfccmd switchconfig edit fails if the description field is included:
dvpf1:/usr/local/pf # /usr/local/pf/bin/pfcmd switchconfig 'edit
10.47.240.20 description="test"'
Command not understood. (pfcmd grammar test failed at line 207.)
Usage: pfcmd switchconfig get <all|default|IP>
pfcmd switchconfig add <IP> [assignments]
pfcmd switchconfig edit <IP> [assignments]
pfcmd switchconfig delete <IP>
query/modify switches.conf configuration file
**pfconfig switchconfig add works ok without the description field:
dvpf1:/usr/local/pf # /usr/local/pf/bin/pfcmd switchconfig 'add
10.47.240.20 vlans="1,2,3,4,5",type="Aerohive::AP"'
**delete test switch and start over:
dvpf1:/usr/local/pf # /usr/local/pf/bin/pfcmd switchconfig 'delete
10.47.240.20'
** fails with the description field:
dvpf1:/usr/local/pf # /usr/local/pf/bin/pfcmd switchconfig 'add
10.47.240.20
vlans="1,2,3,4,5",type="Aerohive::AP",description="ahap-ths-auditorium1'
Command not understood. (pfcmd grammar test failed at line 207.)
Usage: pfcmd switchconfig get <all|default|IP>
pfcmd switchconfig add <IP> [assignments]
pfcmd switchconfig edit <IP> [assignments]
pfcmd switchconfig delete <IP>
query/modify switches.conf configuration file
**note that when manually added or edited via the web gui, switches.conf
DOES get correctly updated with the description field:
[10.47.240.20]
type=AeroHIVE::AP
vlans=1,2,3
description=AHAP-THS-CAFETERIA1
VoIPEnabled=N
Is this omission intentional or is there some way to add switches to the
switches.conf from the command line and retain the 'description' field?
Thanks,