Using ProLiant Essentials Rapid Deployment Pack for scripted blade based switch configuration

@tmp = $telnet->cmd("cfg save");
push(@lines, @tmp);
$ok = $telnet->print("logout");
$telnet->close();
return @lines;
}
# Using the passed in slot number, calculate the switch port numbers
# assigned to:
# iLO (Right Switch) or PxE (Left Switch). This is nic_0-1.
# NIC3 (Right Switch) or NIC2 (Left Switch). This is nic_2-3.
# Using the passed in slot number, calculate the switch port numbers
# assigned to:
# Data(Right Switch) or PxE (Left Switch). This is nic_0-1.
sub GetPortNumbers
{
local(%switch_ports);
local($slot) = @_[0]; # Get passed in slot number.
if($slot > 0 && $slot <= 10){ # Ensure a slot number was passed in.
$switch_ports{'nic_0-1'} = $slot;
} else {
die "Invalid slot number $slot\n";
}
return %switch_ports;
}
1;
22