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-09-03 11:07:58 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d1c06493087e87096b852a151d27ba450673656a
d1c06493
1 parent
f1c23575
Changed deviceConnected signature.
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
5 deletions
net/api/src/main/java/org/onlab/onos/net/device/DeviceProviderService.java
net/core/trivial/src/main/java/org/onlab/onos/net/trivial/impl/SimpleDeviceManager.java
net/api/src/main/java/org/onlab/onos/net/device/DeviceProviderService.java
View file @
d1c0649
package
org
.
onlab
.
onos
.
net
.
device
;
import
org.onlab.onos.net.DeviceId
;
import
org.onlab.onos.net.MastershipRole
;
import
org.onlab.onos.net.provider.ProviderService
;
import
java.util.List
;
...
...
@@ -18,9 +17,8 @@ public interface DeviceProviderService extends ProviderService<DeviceProvider> {
* Signals the core that a device has connected or has been detected somehow.
*
* @param deviceDescription information about network device
* @return mastership role chosen by the provider service
*/
MastershipRole
deviceConnected
(
DeviceId
deviceId
,
DeviceDescription
deviceDescription
);
void
deviceConnected
(
DeviceId
deviceId
,
DeviceDescription
deviceDescription
);
/**
* Signals the core that a device has disconnected or is no longer reachable.
...
...
net/core/trivial/src/main/java/org/onlab/onos/net/trivial/impl/SimpleDeviceManager.java
View file @
d1c0649
...
...
@@ -120,13 +120,12 @@ public class SimpleDeviceManager
}
@Override
public
MastershipRole
deviceConnected
(
DeviceId
deviceId
,
DeviceDescription
deviceDescription
)
{
public
void
deviceConnected
(
DeviceId
deviceId
,
DeviceDescription
deviceDescription
)
{
checkNotNull
(
deviceId
,
DEVICE_ID_NULL
);
checkNotNull
(
deviceDescription
,
DEVICE_DESCRIPTION_NULL
);
log
.
info
(
"Device {} connected: {}"
,
deviceId
,
deviceDescription
);
DeviceEvent
event
=
store
.
createOrUpdateDevice
(
deviceId
,
deviceDescription
);
post
(
event
);
return
MastershipRole
.
MASTER
;
}
@Override
...
...
Please
register
or
login
to post a comment