mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-18 04:10:46 +00:00
Support SNMPv2c for Juniper switch for switch based hardware discovery, format the output of disk info
This commit is contained in:
@ -324,7 +324,9 @@ sub refresh_table {
|
||||
$self->{switchparmhash}->{$curswitch}->{auth}='md5'; #Default to md5 auth if not specified but using v3
|
||||
}
|
||||
} elsif ($_->{snmpversion} =~ /2/) {
|
||||
$self->{switchparmhash}->{$curswitch}->{snmpversion}=2;
|
||||
#$self->{switchparmhash}->{$curswitch}->{snmpversion}=2;
|
||||
# we have Juniper switch enabled snmp v2c, not v2
|
||||
$self->{switchparmhash}->{$curswitch}->{snmpversion}=$_->{snmpversion};
|
||||
} else {
|
||||
$self->{switchparmhash}->{$curswitch}->{snmpversion}=1; #Default to lowest common denominator, snmpv1
|
||||
}
|
||||
|
@ -681,7 +681,7 @@ noderes => {
|
||||
switch => 'The hostname/address of the switch to which the settings apply',
|
||||
snmpversion => 'The version to use to communicate with switch. SNMPv1 is assumed by default.',
|
||||
username => 'The username to use for SNMPv3 communication, ignored for SNMPv1',
|
||||
password => 'The password or community string to use for SNMPv3 or SNMPv1 respectively. Falls back to passwd table, and site snmpc value if using SNMPv1',
|
||||
password => 'The password strinng for SNMPv3 or community string for SNMPv1/SNMPv2. Falls back to passwd table, and site snmpc value if using SNMPv1/SNMPv2.',
|
||||
privacy => 'The privacy protocol to use for v3. DES is assumed if v3 enabled, as it is the most readily available.',
|
||||
auth => 'The authentication protocol to use for SNMPv3. SHA is assumed if v3 enabled and this is unspecified',
|
||||
linkports => 'The ports that connect to other switches. Currently, this column is only used by vlan configuration. The format is: "port_number:switch,port_number:switch...". Please refer to the switch table for details on how to specify the port numbers.',
|
||||
|
@ -162,7 +162,9 @@ sub process_request {
|
||||
$basicdata->{memory} = $request->{memory}->[0];
|
||||
}
|
||||
if ($request->{disksize}->[0]) {
|
||||
$basicdata->{disksize} = $request->{disksize}->[0];
|
||||
my @disks = split /\n/,$request->{disksize}->[0];
|
||||
my $disk_info = join(",",@disks);
|
||||
$basicdata->{disksize} = $disk_info;
|
||||
}
|
||||
if ($request->{cpucount}->[0]) {
|
||||
$basicdata->{cpucount} = $request->{cpucount}->[0];
|
||||
|
Reference in New Issue
Block a user