mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-25 21:22:05 +00:00
Merge pull request #2319 from cxhong/usage
Modify usage for config switch scripts
This commit is contained in:
commit
b2af1550f6
@ -545,15 +545,16 @@ sub config_desc {
|
||||
sub usage
|
||||
{
|
||||
print "Usage:
|
||||
configBNT [-?│-h│--help]
|
||||
configBNT [--switches switchnames] [--all]
|
||||
configBNT [--switches switchnames] [--ip]
|
||||
configBNT [--switches switchnames] [--name ]
|
||||
configBNT [--switches switchnames] [--snmp] [--user snmp_user] [--password snmp_password] [--group snmp_group]
|
||||
configBNT [--switches switchnames] [--port port] [--vlan vlan]
|
||||
configBNT -h│--help
|
||||
configBNT --switches switchnames --ip
|
||||
configBNT --switches switchnames --name
|
||||
configBNT --switches switchnames --snmp [--user snmp_user] [--password snmp_password] [--group snmp_group]
|
||||
configBNT --switches switchnames --port port --vlan vlan
|
||||
|
||||
To set the ip address, hostname and config snmp:
|
||||
configBNT --switches switchnames --all
|
||||
|
||||
To set the description for a port on the switch:
|
||||
|
||||
configBNT --switches switchnames --port port --desc \"description\"
|
||||
\n";
|
||||
}
|
||||
|
@ -329,12 +329,16 @@ sub run_rspconfig {
|
||||
sub usage
|
||||
{
|
||||
print "Usage:
|
||||
configMellanox [-?│-h│--help]
|
||||
configMellanox [--switches switchnames] [--all]
|
||||
configMellanox [--switches switchnames] [--ip]
|
||||
configMellanox [--switches switchnames] [--name]
|
||||
configMellanox [--switches switchnames] [--snmp] [--user snmp_user] [--password snmp_password] [--auth snmp_auth]
|
||||
configMellanox [--switches switchnames] [--config]
|
||||
configMellanox -h│--help
|
||||
configMellanox --switches switchnames --ip
|
||||
configMellanox --switches switchnames --name
|
||||
configMellanox --switches switchnames --snmp [--user snmp_user] [--password snmp_password] [--auth snmp_auth]
|
||||
|
||||
To set the ip address, hostname, config snmp and run rspconfig command:
|
||||
configMellanox --switches switchnames --all
|
||||
|
||||
To run rspconfig command:
|
||||
configMellanox --switches switchnames --config
|
||||
\n";
|
||||
}
|
||||
|
||||
|
@ -227,6 +227,7 @@ sub install_license {
|
||||
print "file = $license_file\n";
|
||||
if (!(-e $license_file) ) {
|
||||
print "$license_file is not exist\n";
|
||||
return;
|
||||
}
|
||||
|
||||
foreach my $switch (@nodes) {
|
||||
@ -371,21 +372,6 @@ sub config_ntp {
|
||||
|
||||
}
|
||||
|
||||
sub config_vlan {
|
||||
if ($::PORT) {
|
||||
$port = $::PORT;
|
||||
} else {
|
||||
&usage;
|
||||
exit(1);
|
||||
}
|
||||
$vlan = $::VLAN;
|
||||
print "Tagging VLAN=$vlan for $switches port $port\n";
|
||||
#create vlan, tagged vlan
|
||||
#$cmd = `xdsh $switches --devicetype EthSwitch::BNT "enable;configure terminal;vlan $vlan;exit;interface port $port;switchport mode trunk;switchport trunk allowed vlan $vlan;write memory;exit;exit"`;
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------
|
||||
|
||||
=head3 usage
|
||||
@ -398,13 +384,14 @@ sub config_vlan {
|
||||
sub usage
|
||||
{
|
||||
print "Usage:
|
||||
configBNT [-?│-h│--help]
|
||||
configBNT [--switches switchnames] [--all]
|
||||
configBNT [--switches switchnames] [--ssh]
|
||||
configBNT [--switches switchnames] [--license filename ]
|
||||
configBNT [--switches switchnames] [--snmp] [--user snmp_user] [--password snmp_password] [--group snmp_group]
|
||||
configBNT [--switches switchnames] [--ntp]
|
||||
configBNT [--switches switchnames] [--port port] [--vlan vlan]
|
||||
configcumulus -h│--help
|
||||
configcumulus --switches switchnames --ssh
|
||||
configcumulus --switches switchnames --license filename
|
||||
configcumulus --switches switchnames --snmp [--user snmp_user] [--password snmp_password] [--group snmp_group]
|
||||
configcumulus --switches switchnames --ntp
|
||||
|
||||
To set ssh, install license(license file: /root/license.txt), config snmp and ntp:
|
||||
configcumulus --switches switchnames --all
|
||||
\n";
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user