Commit 0f7e93dd authored by Brian Kroth's avatar Brian Kroth

need to issue the vlan create separately from the vlan name command

kudos to blodgett
parent 159328cb
...@@ -902,17 +902,25 @@ sub createVlan($$;$$$) { ...@@ -902,17 +902,25 @@ sub createVlan($$;$$$) {
[$VlanType,"1.$vlan_number","ethernet","INTEGER"], [$VlanType,"1.$vlan_number","ethernet","INTEGER"],
[$VlanName,"1.$vlan_number",$vlan_id,"OCTETSTR"], [$VlanName,"1.$vlan_number",$vlan_id,"OCTETSTR"],
[$VlanSAID,"1.$vlan_number",$SAID,"OCTETSTR"]); [$VlanSAID,"1.$vlan_number",$SAID,"OCTETSTR"]);
my @varList;
my @varList = ($vlan_number > 1000) ? ($statusRow, $nameRow)
: ($statusRow, $typeRow, $nameRow, $saidRow);
if ($self->{OSTYPE} eq 'NX-OS') { if ($self->{OSTYPE} eq 'NX-OS') {
@varList = ($statusRow, $nameRow); # must do statusRow alone, to create vlan subtree
} @varList = $statusRow;
else {
@varList = ($vlan_number > 1000) ? ($statusRow, $nameRow)
: ($statusRow, $typeRow, $nameRow, $saidRow);
} }
my $RetVal = snmpitSetWarn($self->{SESS}, new SNMP::VarList(@varList)); my $RetVal = snmpitSetWarn($self->{SESS}, new SNMP::VarList(@varList));
print "",($RetVal? "Succeeded":"Failed"), ".\n"; print "",($RetVal? "Succeeded":"Failed"), ".\n";
if ($self->{OSTYPE} eq 'NX-OS') {
# run the naming of the vlan as a separate call
@varList = $nameRow;
$RetVal = snmpitSetWarn($self->{SESS}, new SNMP::VarList(@varList));
}
# #
# Check for success # Check for success
# #
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment