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
Praseed Balakrishnan
2014-11-03 14:56:28 -0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2dd5abd17f9bfde33062a839df423df57ee43f24
2dd5abd1
1 parent
211f4e56
Optical Treatment to include SigType
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
9 deletions
core/api/src/main/java/org/onlab/onos/net/flow/DefaultTrafficSelector.java
core/api/src/main/java/org/onlab/onos/net/flow/TrafficSelector.java
core/api/src/main/java/org/onlab/onos/net/flow/criteria/Criteria.java
core/net/src/main/java/org/onlab/onos/net/intent/impl/OpticalPathIntentInstaller.java
providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/FlowEntryBuilder.java
providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/FlowModBuilder.java
core/api/src/main/java/org/onlab/onos/net/flow/DefaultTrafficSelector.java
View file @
2dd5abd
...
...
@@ -188,7 +188,7 @@ public final class DefaultTrafficSelector implements TrafficSelector {
}
@Override
public
Builder
matchOpticalSignalType
(
Byte
signalType
)
{
public
Builder
matchOpticalSignalType
(
Short
signalType
)
{
return
add
(
Criteria
.
matchOpticalSignalType
(
signalType
));
}
...
...
core/api/src/main/java/org/onlab/onos/net/flow/TrafficSelector.java
View file @
2dd5abd
...
...
@@ -147,7 +147,7 @@ public interface TrafficSelector {
* @param signalType
* @return a selection builder
*/
public
Builder
matchOpticalSignalType
(
Byte
signalType
);
public
Builder
matchOpticalSignalType
(
Short
signalType
);
/**
* Builds an immutable traffic selector.
...
...
core/api/src/main/java/org/onlab/onos/net/flow/criteria/Criteria.java
View file @
2dd5abd
...
...
@@ -161,11 +161,11 @@ public final class Criteria {
/**
* Creates a match on lambda field using the specified value.
*
* @param
lambda
* @param
sigType
* @return match criterion
*/
public
static
Criterion
matchOpticalSignalType
(
Byte
lambda
)
{
return
new
OpticalSignalTypeCriterion
(
lambda
,
Type
.
OCH_SIGTYPE
);
public
static
Criterion
matchOpticalSignalType
(
Short
sigType
)
{
return
new
OpticalSignalTypeCriterion
(
sigType
,
Type
.
OCH_SIGTYPE
);
}
...
...
@@ -587,10 +587,10 @@ public final class Criteria {
public
static
final
class
OpticalSignalTypeCriterion
implements
Criterion
{
private
final
byte
signalType
;
private
final
Short
signalType
;
private
final
Type
type
;
public
OpticalSignalTypeCriterion
(
byte
signalType
,
Type
type
)
{
public
OpticalSignalTypeCriterion
(
Short
signalType
,
Type
type
)
{
this
.
signalType
=
signalType
;
this
.
type
=
type
;
}
...
...
@@ -600,7 +600,7 @@ public final class Criteria {
return
this
.
type
;
}
public
Byte
signalType
()
{
public
Short
signalType
()
{
return
this
.
signalType
;
}
...
...
core/net/src/main/java/org/onlab/onos/net/intent/impl/OpticalPathIntentInstaller.java
View file @
2dd5abd
...
...
@@ -79,6 +79,7 @@ public class OpticalPathIntentInstaller implements IntentInstaller<OpticalPathIn
private
ApplicationId
appId
;
//final short WAVELENGTH = 80;
static
final
short
SIGNAL_TYPE
=
(
short
)
1
;
@Activate
public
void
activate
()
{
...
...
@@ -151,7 +152,9 @@ public class OpticalPathIntentInstaller implements IntentInstaller<OpticalPathIn
prev
=
link
.
dst
();
selectorBuilder
.
matchInport
(
link
.
dst
().
port
());
selectorBuilder
.
matchOpticalSignalType
(
SIGNAL_TYPE
);
//todo
selectorBuilder
.
matchLambda
((
short
)
la
.
toInt
());
}
// build the last T port rule
...
...
providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/FlowEntryBuilder.java
View file @
2dd5abd
...
...
@@ -289,7 +289,10 @@ public class FlowEntryBuilder {
case
OCH_SIGID:
builder
.
matchLambda
(
match
.
get
(
MatchField
.
OCH_SIGID
).
getChannelNumber
());
break
;
case
OCH_SIGTYPE_BASIC:
case
OCH_SIGTYPE:
builder
.
matchOpticalSignalType
(
match
.
get
(
MatchField
.
OCH_SIGTYPE
).
getValue
());
break
;
case
ARP_OP:
case
ARP_SHA:
case
ARP_SPA:
...
...
providers/openflow/flow/src/main/java/org/onlab/onos/provider/of/flow/impl/FlowModBuilder.java
View file @
2dd5abd
...
...
@@ -19,6 +19,7 @@ import static org.slf4j.LoggerFactory.getLogger;
import
org.onlab.onos.net.flow.FlowRule
;
import
org.onlab.onos.net.flow.TrafficSelector
;
import
org.onlab.onos.net.flow.criteria.Criteria
;
import
org.onlab.onos.net.flow.criteria.Criteria.EthCriterion
;
import
org.onlab.onos.net.flow.criteria.Criteria.EthTypeCriterion
;
import
org.onlab.onos.net.flow.criteria.Criteria.IPCriterion
;
...
...
@@ -46,6 +47,7 @@ import org.projectfloodlight.openflow.types.Masked;
import
org.projectfloodlight.openflow.types.OFPort
;
import
org.projectfloodlight.openflow.types.OFVlanVidMatch
;
import
org.projectfloodlight.openflow.types.TransportPort
;
import
org.projectfloodlight.openflow.types.U8
;
import
org.projectfloodlight.openflow.types.VlanPcp
;
import
org.projectfloodlight.openflow.types.VlanVid
;
import
org.slf4j.Logger
;
...
...
@@ -195,6 +197,12 @@ public abstract class FlowModBuilder {
mBuilder
.
setExact
(
MatchField
.
OCH_SIGID
,
new
CircuitSignalID
((
byte
)
1
,
(
byte
)
2
,
lc
.
lambda
(),
(
short
)
1
));
break
;
case
OCH_SIGTYPE:
Criteria
.
OpticalSignalTypeCriterion
sc
=
(
Criteria
.
OpticalSignalTypeCriterion
)
c
;
mBuilder
.
setExact
(
MatchField
.
OCH_SIGTYPE
,
U8
.
of
(
sc
.
signalType
()));
break
;
case
ARP_OP:
case
ARP_SHA:
case
ARP_SPA:
...
...
Please
register
or
login
to post a comment