Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
37e01e65
Commit
37e01e65
authored
Jun 10, 2015
by
Kirk Webb
Browse files
Neuter isOpenflowSupported() test. Doesn't work on HP 12910 as it was.
parent
b277d49a
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/snmpit_test/snmpit_h3c.pm
View file @
37e01e65
...
...
@@ -2738,18 +2738,30 @@ sub getUsedOpenflowListenerPorts($) {
#
sub
isOpenflowSupported
($)
{
my
$self
=
shift
;
my
$myret
=
0
;
my
$filter
=
mkOFPTestFilter
();
my
$res
=
$self
->
{
NCOBJ
}
->
doGet
(
$filter
);
if
(
$res
&&
$res
->
[
0
]
==
NCRPCDATA
())
{
my
$data_el
=
$res
->
[
1
];
my
$xpc
=
XML::LibXML::
XPathContext
->
new
(
$data_el
);
$xpc
->
registerNs
('
x
',
$H3C_DATA_URL
);
if
(
$xpc
->
findvalue
("
//x:Name
")
eq
"
ofp
")
{
$myret
=
1
;
}
}
# Just assume Comware switches support OF. We'll quickly find out
# otherwise when trying to get the current list of OF instances in
# one of the real OF commands above. Might want to add an option
# attribute to explicitly disable OF on a switch.
#
# We could call getOFInstances() here as a check, but that just
# makes the whole OF setup process take longer.
#
my
$myret
=
1
;
# Code below doesn't work on the HP 12910. Switch complains about
# the "RBAC" token in the filter.
#
#my $filter = mkOFPTestFilter();
#my $res = $self->{NCOBJ}->doGet($filter);
#if ($res && $res->[0] == NCRPCDATA()) {
# my $data_el = $res->[1];
# my $xpc = XML::LibXML::XPathContext->new($data_el);
# $xpc->registerNs('x',$H3C_DATA_URL);
# if ($xpc->findvalue("//x:Name") eq "ofp") {
# $myret = 1;
# }
#}
return
$myret
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment