Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Madan Jampani
2014-10-23 12:07:07 -0700
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
692ca59a980a78e101177363d7cc166bf22f5ca7
692ca59a
2 parents
31961c14
b358c1ec
Merge branch 'master' of
ssh://gerrit.onlab.us:29418/onos-next
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
26 deletions
apps/sdnip/src/main/resources/config-examples/sdnip.json
core/net/src/main/java/org/onlab/onos/net/link/impl/LinkManager.java
core/net/src/main/java/org/onlab/onos/net/statistic/impl/StatisticManager.java
providers/lldp/src/main/java/org/onlab/onos/provider/lldp/impl/LinkDiscovery.java
apps/sdnip/src/main/resources/config-examples/sdnip.json
View file @
692ca59
...
...
@@ -14,6 +14,16 @@
"attachmentDpid"
:
"00:00:00:00:00:00:00:a2"
,
"attachmentPort"
:
"1"
,
"ipAddress"
:
"192.168.30.1"
},
{
"attachmentDpid"
:
"00:00:00:00:00:00:00:a6"
,
"attachmentPort"
:
"1"
,
"ipAddress"
:
"192.168.40.1"
},
{
"attachmentDpid"
:
"00:00:00:00:00:00:00:a4"
,
"attachmentPort"
:
"4"
,
"ipAddress"
:
"192.168.60.1"
}
],
"bgpSpeakers"
:
[
...
...
core/net/src/main/java/org/onlab/onos/net/link/impl/LinkManager.java
View file @
692ca59
...
...
@@ -197,14 +197,7 @@ public class LinkManager
checkNotNull
(
linkDescription
,
LINK_DESC_NULL
);
checkValidity
();
ConnectPoint
src
=
linkDescription
.
src
();
ConnectPoint
dst
=
linkDescription
.
dst
();
// if we aren't master for the device associated with the ConnectPoint
// we probably shouldn't be doing this.
// if (deviceService.getRole(dst.deviceId()) != MastershipRole.MASTER) {
// return;
// }
LinkEvent
event
=
store
.
createOrUpdateLink
(
provider
().
id
(),
linkDescription
);
if
(
event
!=
null
)
{
...
...
@@ -232,11 +225,7 @@ public class LinkManager
public
void
linksVanished
(
ConnectPoint
connectPoint
)
{
checkNotNull
(
connectPoint
,
"Connect point cannot be null"
);
checkValidity
();
// if we aren't master for the device associated with the ConnectPoint
// we probably shouldn't be doing this.
if
(
deviceService
.
getRole
(
connectPoint
.
deviceId
())
!=
MastershipRole
.
MASTER
)
{
return
;
}
log
.
info
(
"Links for connection point {} vanished"
,
connectPoint
);
// FIXME: This will remove links registered by other providers
removeLinks
(
getLinks
(
connectPoint
));
...
...
@@ -246,11 +235,7 @@ public class LinkManager
public
void
linksVanished
(
DeviceId
deviceId
)
{
checkNotNull
(
deviceId
,
DEVICE_ID_NULL
);
checkValidity
();
// if we aren't master for the device associated with the ConnectPoint
// we probably shouldn't be doing this.
if
(
deviceService
.
getRole
(
deviceId
)
!=
MastershipRole
.
MASTER
)
{
return
;
}
log
.
info
(
"Links for device {} vanished"
,
deviceId
);
removeLinks
(
getDeviceLinks
(
deviceId
));
}
...
...
core/net/src/main/java/org/onlab/onos/net/statistic/impl/StatisticManager.java
View file @
692ca59
...
...
@@ -157,16 +157,12 @@ public class StatisticManager implements StatisticService {
case
RULE_UPDATED:
if
(
rule
instanceof
FlowEntry
)
{
statisticStore
.
addOrUpdateStatistic
((
FlowEntry
)
rule
);
}
else
{
log
.
warn
(
"IT AIN'T A FLOWENTRY"
);
}
break
;
case
RULE_ADD_REQUESTED:
log
.
info
(
"Preparing for stats"
);
statisticStore
.
prepareForStatistics
(
rule
);
break
;
case
RULE_REMOVE_REQUESTED:
log
.
info
(
"Removing stats"
);
statisticStore
.
removeFromStatistics
(
rule
);
break
;
case
RULE_REMOVED:
...
...
providers/lldp/src/main/java/org/onlab/onos/provider/lldp/impl/LinkDiscovery.java
View file @
692ca59
...
...
@@ -90,7 +90,7 @@ public class LinkDiscovery implements TimerTask {
* Instantiates discovery manager for the given physical switch. Creates a
* generic LLDP packet that will be customized for the port it is sent out on.
* Starts the the timer for the discovery process.
*
@param device the physical switch
* @param device the physical switch
* @param masterService
* @param useBDDP flag to also use BDDP for discovery
*/
...
...
@@ -217,7 +217,7 @@ public class LinkDiscovery implements TimerTask {
final
PortNumber
srcPort
=
PortNumber
.
portNumber
(
onoslldp
.
getPort
());
final
DeviceId
srcDeviceId
=
DeviceId
.
deviceId
(
onoslldp
.
getDeviceString
());
final
DeviceId
dstDeviceId
=
context
.
inPacket
().
receivedFrom
().
deviceId
();
this
.
ackProbe
(
src
Port
.
toLong
());
this
.
ackProbe
(
dst
Port
.
toLong
());
ConnectPoint
src
=
new
ConnectPoint
(
srcDeviceId
,
srcPort
);
ConnectPoint
dst
=
new
ConnectPoint
(
dstDeviceId
,
dstPort
);
...
...
@@ -245,7 +245,7 @@ public class LinkDiscovery implements TimerTask {
*/
@Override
public
void
run
(
final
Timeout
t
)
{
this
.
log
.
debug
(
"sending probes"
);
this
.
log
.
trace
(
"sending probes"
);
synchronized
(
this
)
{
final
Iterator
<
Long
>
fastIterator
=
this
.
fastPorts
.
iterator
();
Long
portNumber
;
...
...
@@ -256,7 +256,7 @@ public class LinkDiscovery implements TimerTask {
.
getAndIncrement
();
if
(
probeCount
<
LinkDiscovery
.
MAX_PROBE_COUNT
)
{
this
.
log
.
debug
(
"sending fast probe to port"
);
this
.
log
.
trace
(
"sending fast probe to port"
);
sendProbes
(
portNumber
);
}
else
{
// Update fast and slow ports
...
...
@@ -278,7 +278,7 @@ public class LinkDiscovery implements TimerTask {
Iterator
<
Long
>
slowIterator
=
this
.
slowPorts
.
iterator
();
while
(
slowIterator
.
hasNext
())
{
portNumber
=
slowIterator
.
next
();
this
.
log
.
debug
(
"sending slow probe to port {}"
,
portNumber
);
this
.
log
.
trace
(
"sending slow probe to port {}"
,
portNumber
);
sendProbes
(
portNumber
);
...
...
Please
register
or
login
to post a comment