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
tom
2014-10-06 20:52:14 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
800709a29473ba379711263af36e6e72bfe86539
800709a2
1 parent
1456fe75
Experimenting.
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
23 deletions
cli/src/main/java/org/onlab/onos/cli/SummaryCommand.java
core/net/src/main/java/org/onlab/onos/net/intent/impl/FlowTracker.java
core/net/src/main/java/org/onlab/onos/net/intent/impl/IntentManager.java
core/net/src/main/java/org/onlab/onos/net/intent/impl/TopologyChangeDelegate.java
cli/src/main/java/org/onlab/onos/cli/SummaryCommand.java
View file @
800709a
...
...
@@ -7,6 +7,7 @@ import org.onlab.onos.net.flow.FlowRuleService;
import
org.onlab.onos.net.host.HostService
;
import
org.onlab.onos.net.intent.IntentService
;
import
org.onlab.onos.net.link.LinkService
;
import
org.onlab.onos.net.topology.Topology
;
import
org.onlab.onos.net.topology.TopologyService
;
/**
...
...
@@ -19,12 +20,14 @@ public class SummaryCommand extends AbstractShellCommand {
@Override
protected
void
execute
()
{
TopologyService
topologyService
=
get
(
TopologyService
.
class
);
print
(
"nodes=%d, devices=%d, links=%d, hosts=%d, clusters=%s, flows=%d, intents=%d"
,
Topology
topology
=
topologyService
.
currentTopology
();
print
(
"nodes=%d, devices=%d, links=%d, hosts=%d, clusters=%s, paths=%d, flows=%d, intents=%d"
,
get
(
ClusterService
.
class
).
getNodes
().
size
(),
get
(
DeviceService
.
class
).
getDeviceCount
(),
get
(
LinkService
.
class
).
getLinkCount
(),
get
(
HostService
.
class
).
getHostCount
(),
topologyService
.
getClusters
(
topologyService
.
currentTopology
()).
size
(),
topologyService
.
getClusters
(
topology
).
size
(),
topology
.
pathCount
(),
get
(
FlowRuleService
.
class
).
getFlowRuleCount
(),
get
(
IntentService
.
class
).
getIntentCount
());
}
...
...
core/net/src/main/java/org/onlab/onos/net/intent/impl/FlowTracker.java
View file @
800709a
...
...
@@ -115,12 +115,7 @@ public class FlowTracker implements FlowTrackerService {
for
(
Event
reason
:
event
.
reasons
())
{
if
(
reason
instanceof
LinkEvent
)
{
LinkEvent
linkEvent
=
(
LinkEvent
)
reason
;
if
(
linkEvent
.
type
()
==
LinkEvent
.
Type
.
LINK_ADDED
||
linkEvent
.
type
()
==
LinkEvent
.
Type
.
LINK_UPDATED
)
{
delegate
.
bumpIntents
(
intentsByLink
.
get
(
new
LinkKey
(
linkEvent
.
subject
())));
}
else
if
(
linkEvent
.
type
()
==
LinkEvent
.
Type
.
LINK_REMOVED
)
{
delegate
.
failIntents
(
intentsByLink
.
get
(
new
LinkKey
(
linkEvent
.
subject
())));
}
}
}
}
...
...
core/net/src/main/java/org/onlab/onos/net/intent/impl/IntentManager.java
View file @
800709a
...
...
@@ -359,13 +359,5 @@ public class IntentManager
}
}
@Override
public
void
failIntents
(
Iterable
<
IntentId
>
intentIds
)
{
for
(
IntentId
intentId
:
intentIds
)
{
Intent
intent
=
getIntent
(
intentId
);
uninstallIntent
(
intent
);
compileIntent
(
intent
);
}
}
}
}
...
...
core/net/src/main/java/org/onlab/onos/net/intent/impl/TopologyChangeDelegate.java
View file @
800709a
...
...
@@ -15,12 +15,4 @@ public interface TopologyChangeDelegate {
*/
void
bumpIntents
(
Iterable
<
IntentId
>
intentIds
);
/**
* Notifies that topology has changed in such a way that the specified
* intents should be marked failed and then recompiled.
*
* @param intentIds intents that should be failed and recompiled
*/
void
failIntents
(
Iterable
<
IntentId
>
intentIds
);
}
...
...
Please
register
or
login
to post a comment