Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
5c9df1f2
Commit
5c9df1f2
authored
Jan 14, 2008
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fixes to previous revision.
parent
8795a5e9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
tbsetup/snmpit.proxy.in
tbsetup/snmpit.proxy.in
+7
-6
tbsetup/snmpit.proxynew.in
tbsetup/snmpit.proxynew.in
+7
-6
No files found.
tbsetup/snmpit.proxy.in
View file @
5c9df1f2
...
...
@@ -292,6 +292,7 @@ sub SetupVlans()
my
@members
=
keys
(
%
{
$vlantable
->
{
$id
}
});
my
$mstring
=
"
@members
";
my
$outer_id
;
my
$vlan
;
if
(
$debug
)
{
print
STDERR
"
$pid
$eid
$id
$mstring
\n
";
...
...
@@ -305,7 +306,7 @@ sub SetupVlans()
"
where pid='
$pid
' and eid='
$eid
' and inner_id='
$id
'
");
if
(
$query_result
->
numrows
==
1
)
{
(
$outer_id
)
=
$query_result
->
fetchrow
();
my
$vlan
=
VLan
->
Lookup
(
$outer_id
);
$vlan
=
VLan
->
Lookup
(
$outer_id
);
if
(
!
defined
(
$vlan
))
{
print
STDERR
"
*** $0:
\n
"
.
"
Could not lookup vlan for
$outer_id
\n
";
...
...
@@ -323,14 +324,14 @@ sub SetupVlans()
}
}
else
{
my
$new
vlan
=
VLan
->
Create
(
$experiment
,
$vtag
);
if
(
!
defined
(
$
new
vlan
))
{
$
vlan
=
VLan
->
Create
(
$experiment
,
$vtag
);
if
(
!
defined
(
$vlan
))
{
print
STDERR
"
*** $0:
\n
"
.
"
Could not insert vlan table entry for
$id
\n
";
$errors
++
;
next
;
}
$outer_id
=
$
new
vlan
->
lanid
();
$outer_id
=
$vlan
->
lanid
();
# Insert mapping between inner and outer vlan entries.
$query_result
=
DBQueryWarn
("
insert into elabinelab_vlans
"
.
...
...
@@ -344,7 +345,7 @@ sub SetupVlans()
"
Could not insert elabinelab_vlans table entry
"
.
"
for
$id
/
$outer_id
\n
";
$
new
vlan
->
Destroy
();
$vlan
->
Destroy
();
$errors
++
;
next
;
}
...
...
@@ -357,7 +358,7 @@ sub SetupVlans()
# Okay, save outer_id up for passing to snmpit below.
push
(
@outer_ids
,
$outer_id
);
# And save vlan object for getting the tag.
$outer_vlans
{
$outer_id
}
=
$
new
vlan
;
$outer_vlans
{
$outer_id
}
=
$vlan
;
}
# Now call snmpit to create the actual vlans.
if
(
$debug
)
{
...
...
tbsetup/snmpit.proxynew.in
View file @
5c9df1f2
...
...
@@ -292,6 +292,7 @@ sub SetupVlans()
my
@members
=
keys
(
%
{
$vlantable
->
{
$id
}
});
my
$mstring
=
"
@members
";
my
$outer_id
;
my
$vlan
;
if
(
$debug
)
{
print
STDERR
"
$pid
$eid
$id
$mstring
\n
";
...
...
@@ -305,7 +306,7 @@ sub SetupVlans()
"
where pid='
$pid
' and eid='
$eid
' and inner_id='
$id
'
");
if
(
$query_result
->
numrows
==
1
)
{
(
$outer_id
)
=
$query_result
->
fetchrow
();
my
$vlan
=
VLan
->
Lookup
(
$outer_id
);
$vlan
=
VLan
->
Lookup
(
$outer_id
);
if
(
!
defined
(
$vlan
))
{
print
STDERR
"
*** $0:
\n
"
.
"
Could not lookup vlan for
$outer_id
\n
";
...
...
@@ -323,14 +324,14 @@ sub SetupVlans()
}
}
else
{
my
$new
vlan
=
VLan
->
Create
(
$experiment
,
$vtag
);
if
(
!
defined
(
$
new
vlan
))
{
$
vlan
=
VLan
->
Create
(
$experiment
,
$vtag
);
if
(
!
defined
(
$vlan
))
{
print
STDERR
"
*** $0:
\n
"
.
"
Could not insert vlan table entry for
$id
\n
";
$errors
++
;
next
;
}
$outer_id
=
$
new
vlan
->
lanid
();
$outer_id
=
$vlan
->
lanid
();
# Insert mapping between inner and outer vlan entries.
$query_result
=
DBQueryWarn
("
insert into elabinelab_vlans
"
.
...
...
@@ -344,7 +345,7 @@ sub SetupVlans()
"
Could not insert elabinelab_vlans table entry
"
.
"
for
$id
/
$outer_id
\n
";
$
new
vlan
->
Destroy
();
$vlan
->
Destroy
();
$errors
++
;
next
;
}
...
...
@@ -357,7 +358,7 @@ sub SetupVlans()
# Okay, save outer_id up for passing to snmpit below.
push
(
@outer_ids
,
$outer_id
);
# And save vlan object for getting the tag.
$outer_vlans
{
$outer_id
}
=
$
new
vlan
;
$outer_vlans
{
$outer_id
}
=
$vlan
;
}
# Now call snmpit to create the actual vlans.
if
(
$debug
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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