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-08-26 01:39:47 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
18567e934b6b8f13e8b2a39b9eeb85cb5c5c32d6
18567e93
1 parent
d7356726
More documentation clean-up.
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
102 additions
and
9 deletions
net/api/src/main/java/org/onlab/onos/event/EventDispatcher.java
net/api/src/main/java/org/onlab/onos/net/Device.java
net/api/src/main/java/org/onlab/onos/net/Link.java
net/api/src/main/java/org/onlab/onos/net/provider/AbstractProvider.java
net/api/src/main/java/org/onlab/onos/net/provider/Provided.java
net/api/src/main/java/org/onlab/onos/event/EventDispatcher.java
View file @
18567e9
package
org
.
onlab
.
onos
.
event
;
/**
* Abstraction of a mechanism capable of accepting and dispatching events.
* Whether the events are accepted and the dispatched synchronously or
* asynchronously is unspecified.
* Abstraction of a mechanism capable of accepting and dispatching events to
* appropriate event sinks. Where the event sinks are obtained is unspecified.
* Similarly, whether the events are accepted and dispatched synchronously
* or asynchronously is unspecified as well.
*/
public
interface
EventDispatcher
<
E
extends
Event
>
{
...
...
net/api/src/main/java/org/onlab/onos/net/Device.java
View file @
18567e9
...
...
@@ -3,14 +3,63 @@ package org.onlab.onos.net;
import
org.onlab.onos.net.provider.Provided
;
/**
* Representation of a
n
network infrastructure device.
* Representation of a network infrastructure device.
*/
public
interface
Device
extends
Provided
{
// type, e.g. switch, router, firewall, ips, controller
/**
* Coarse classification of the type of the infrastructure device.
*/
public
enum
Type
{
SWITCH
,
ROUTER
,
FIREWALL
,
BALANCER
,
IPS
,
IDS
,
CONTROLLER
,
OTHER
}
// id (uri within)
/**
* Returns the device identifier.
*
* @return device id
*/
DeviceId
id
();
// ports
/**
* Returns the type of the infrastructure device.
*
* @return type of the device
*/
Type
type
();
/**
* Returns the device manufacturer name.
*
* @return manufacturer name
*/
String
manufacturer
();
/**
* Returns the device hardware version.
*
* @return hardware version
*/
String
hwVersion
();
/**
* Returns the device software version.
*
* @return software version
*/
String
swVersion
();
/**
* Returns the device serial number.
*
* @return serial number
*/
String
serialNumber
();
// Device realizedBy(); ?
// ports are not provided directly, but rather via DeviceService.getPorts(Device device);
// Set<Behavior> behaviours(); // set of supported behaviours
}
...
...
net/api/src/main/java/org/onlab/onos/net/Link.java
View file @
18567e9
...
...
@@ -5,7 +5,24 @@ import org.onlab.onos.net.provider.Provided;
/**
* Abstraction of a network infrastructure link.
*/
public
interface
Link
extends
Provided
{
// TODO: Also should extend graph Edge
public
interface
Link
extends
Provided
{
// TODO: Also should extend graph Edge once the graph module is checked in
/**
* Coarse representation of the link type.
*/
public
enum
Type
{
/**
* Signifies that this is a direct single-segment link.
*/
DIRECT
,
/**
* Signifies that this link is potentially comprised from multiple
* underlying segments or hops, e.g. optical links, tunnel links,
* multi-hop links spanning 'dark' switches
*/
INDIRECT
}
/**
* Returns the link source connection point.
...
...
@@ -21,4 +38,6 @@ public interface Link extends Provided { // TODO: Also should extend graph Edge
*/
ConnectPoint
dst
();
// LinkInfo info(); // Additional link information / decorations
}
...
...
net/api/src/main/java/org/onlab/onos/net/provider/AbstractProvider.java
0 → 100644
View file @
18567e9
package
org
.
onlab
.
onos
.
net
.
provider
;
/**
* Base provider implementation.
*/
public
abstract
class
AbstractProvider
implements
Provider
{
private
final
ProviderId
providerId
;
/**
* Creates a provider with the supplier identifier.
*
* @param id provider id
*/
protected
AbstractProvider
(
ProviderId
id
)
{
this
.
providerId
=
id
;
}
@Override
public
ProviderId
id
()
{
return
providerId
;
}
}
net/api/src/main/java/org/onlab/onos/net/provider/Provided.java
View file @
18567e9
...
...
@@ -10,6 +10,6 @@ public interface Provided {
*
* @return provider identification
*/
ProviderId
i
d
();
ProviderId
providerI
d
();
}
...
...
Please
register
or
login
to post a comment