Commit bebe4f74 authored by Weibin Sun's avatar Weibin Sun
Browse files

snmpit* related files are all modified to enable of functions

parent d05dd1de
......@@ -2480,7 +2480,6 @@ sub doTrunkDisable($$) {
#
# doOpenflowEnable(stacks, vlan)
# Enable Openflow on a VLAN
# Procurve stack only
#
sub doOpenflowEnable($$) {
my $stacks = shift;
......@@ -2497,8 +2496,9 @@ sub doOpenflowEnable($$) {
my $stack = $$stacks[0];
print "Enabling Openflow on VLAN $vlan ...\n"
if(!$quiet);
#
# TODO: check if Openflow has been enabled, now in HP stack code
# TODO: check if Openflow is already enabled. (Maybe in device code?)
#
if (!$stack->enableOpenflow($vlan)) {
return 1;
......@@ -2509,7 +2509,6 @@ sub doOpenflowEnable($$) {
#
# doOpenflowDisable(stack, vlan)
# Disable Openflow on a VLAN
# Procurve stack only
#
sub doOpenflowDisable($$) {
my $stacks = shift;
......@@ -2527,7 +2526,7 @@ sub doOpenflowDisable($$) {
print "Disabling Openflow on VLAN $vlan ...\n"
if(!$quiet);
#
# TODO: check if Openflow is enabled, now in HP stack code.
# TODO: check if Openflow is enabled. (in device code?)
#
if (!$stack->disableOpenflow($vlan)) {
return 1;
......@@ -2543,7 +2542,6 @@ sub doOpenflowDisable($$) {
#
# doSetController(stack, vlan, controller)
# Set controller for an Openflow-enabled VLAN
# Procurve stack only
#
sub doSetController($$$) {
my $stacks = shift;
......@@ -2575,7 +2573,6 @@ sub doSetController($$$) {
#
# doSetListener(stack, vlan, listener)
# Set listener for an Openflow-enabled VLAN
# Procurve stack only
#
sub doSetListener($$$) {
my $stacks = shift;
......
......@@ -204,5 +204,78 @@ sub UpdateField {
}
}
#
# Enable Openflow
#
sub enableOpenflow($$) {
my $self = shift;
my $vlan = shift;
my $RetVal;
#
# APC switch doesn't support Openflow yet.
#
warn "ERROR: APC swith doesn't support Openflow now";
return 0;
}
#
# Disable Openflow
#
sub disableOpenflow($$) {
my $self = shift;
my $vlan = shift;
my $RetVal;
#
# APC switch doesn't support Openflow yet.
#
warn "ERROR: APC swith doesn't support Openflow now";
return 0;
}
#
# Set controller
#
sub setController($$$) {
my $self = shift;
my $vlan = shift;
my $controller = shift;
my $RetVal;
#
# APC switch doesn't support Openflow yet.
#
warn "ERROR: APC swith doesn't support Openflow now";
return 0;
}
#
# Set listener
#
sub setListener($$$) {
my $self = shift;
my $vlan = shift;
my $listener = shift;
my $RetVal;
#
# APC switch doesn't support Openflow yet.
#
warn "ERROR: APC swith doesn't support Openflow now";
return 0;
}
#
# Check if Openflow is supported on this switch
#
sub isOpenflowSupported($) {
#
# APC switch doesn't support Openflow yet.
#
return 0;
}
# End with true
1;
......@@ -2263,5 +2263,77 @@ sub unlock($) {
$lock_held = 0;
}
#
# Enable Openflow
#
sub enableOpenflow($$) {
my $self = shift;
my $vlan = shift;
my $RetVal;
#
# Cisco switch doesn't support Openflow yet.
#
warn "ERROR: Cisco swith doesn't support Openflow now";
return 0;
}
#
# Disable Openflow
#
sub disableOpenflow($$) {
my $self = shift;
my $vlan = shift;
my $RetVal;
#
# Cisco switch doesn't support Openflow yet.
#
warn "ERROR: Cisco swith doesn't support Openflow now";
return 0;
}
#
# Set controller
#
sub setController($$$) {
my $self = shift;
my $vlan = shift;
my $controller = shift;
my $RetVal;
#
# Cisco switch doesn't support Openflow yet.
#
warn "ERROR: Cisco swith doesn't support Openflow now";
return 0;
}
#
# Set listener
#
sub setListener($$$) {
my $self = shift;
my $vlan = shift;
my $listener = shift;
my $RetVal;
#
# Cisco switch doesn't support Openflow yet.
#
warn "ERROR: Cisco swith doesn't support Openflow now";
return 0;
}
#
# Check if Openflow is supported on this switch
#
sub isOpenflowSupported($) {
#
# Cisco switch doesn't support Openflow yet.
#
return 0;
}
# End with true
1;
......@@ -1433,5 +1433,77 @@ sub debug($$;$) {
}
}
#
# Enable Openflow
#
sub enableOpenflow($$) {
my $self = shift;
my $vlan = shift;
my $RetVal;
#
# Foundry switch doesn't support Openflow yet.
#
warn "ERROR: Foundry swith doesn't support Openflow now";
return 0;
}
#
# Disable Openflow
#
sub disableOpenflow($$) {
my $self = shift;
my $vlan = shift;
my $RetVal;
#
# Foundry switch doesn't support Openflow yet.
#
warn "ERROR: Foundry swith doesn't support Openflow now";
return 0;
}
#
# Set controller
#
sub setController($$$) {
my $self = shift;
my $vlan = shift;
my $controller = shift;
my $RetVal;
#
# Foundry switch doesn't support Openflow yet.
#
warn "ERROR: Foundry swith doesn't support Openflow now";
return 0;
}
#
# Set listener
#
sub setListener($$$) {
my $self = shift;
my $vlan = shift;
my $listener = shift;
my $RetVal;
#
# Foundry switch doesn't support Openflow yet.
#
warn "ERROR: Foundry swith doesn't support Openflow now";
return 0;
}
#
# Check if Openflow is supported on this switch
#
sub isOpenflowSupported($) {
#
# Foundry switch doesn't support Openflow yet.
#
return 0;
}
# End with true
1;
......@@ -1847,6 +1847,24 @@ sub setListener($$$) {
return 1;
}
#
# Check if Openflow is supported on this switch
#
sub isOpenflowSupported($) {
my $self = shift;
my $ret;
#
# Still don't know how to detect if Openflow is supported.
# the ofOID is a directory. Maybe walking from it?
#
$ret = $self->get1($ofOID, 1); # not really
if (defined($ret)) {
return 1;
} else {
return 0;
}
}
# End with true
1;
......@@ -1223,6 +1223,79 @@ sub debug($$:$) {
}
}
#
# Enable Openflow
#
sub enableOpenflow($$) {
my $self = shift;
my $vlan = shift;
my $RetVal;
#
# Intel switch doesn't support Openflow yet.
#
warn "ERROR: Intel swith doesn't support Openflow now";
return 0;
}
#
# Disable Openflow
#
sub disableOpenflow($$) {
my $self = shift;
my $vlan = shift;
my $RetVal;
#
# Intel switch doesn't support Openflow yet.
#
warn "ERROR: Intel swith doesn't support Openflow now";
return 0;
}
#
# Set controller
#
sub setController($$$) {
my $self = shift;
my $vlan = shift;
my $controller = shift;
my $RetVal;
#
# Intel switch doesn't support Openflow yet.
#
warn "ERROR: Intel swith doesn't support Openflow now";
return 0;
}
#
# Set listener
#
sub setListener($$$) {
my $self = shift;
my $vlan = shift;
my $listener = shift;
my $RetVal;
#
# Intel switch doesn't support Openflow yet.
#
warn "ERROR: Intel swith doesn't support Openflow now";
return 0;
}
#
# Check if Openflow is supported on this switch
#
sub isOpenflowSupported($) {
#
# Intel switch doesn't support Openflow yet.
#
return 0;
}
# End with true
1;
Supports Markdown
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