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-10-22 13:55:05 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
69d95be9e5c5b1374017caf1744120ebb554a12d
69d95be9
1 parent
c8ccbd95
Fixed learning optical links
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
apps/optical/src/main/java/org/onlab/onos/optical/cfg/OpticalConfigProvider.java
apps/optical/src/main/resources/demo-3-roadm-2-ps.json
apps/optical/src/main/java/org/onlab/onos/optical/cfg/OpticalConfigProvider.java
View file @
69d95be
...
...
@@ -58,7 +58,7 @@ public class OpticalConfigProvider extends AbstractProvider implements DevicePro
// TODO: fix hard coded file path later.
private
static
final
String
DEFAULT_CONFIG_FILE
=
"
/opt/onos/
config/demo-3-roadm-2-ps.json"
;
"config/demo-3-roadm-2-ps.json"
;
private
String
configFileName
=
DEFAULT_CONFIG_FILE
;
@Reference
(
cardinality
=
ReferenceCardinality
.
MANDATORY_UNARY
)
...
...
@@ -83,7 +83,8 @@ public class OpticalConfigProvider extends AbstractProvider implements DevicePro
protected
OpticalNetworkConfig
opticalNetworkConfig
;
public
OpticalConfigProvider
()
{
super
(
new
ProviderId
(
"of"
,
"org.onlab.onos.provider.opticalConfig"
,
true
));
super
(
new
ProviderId
(
"optical"
,
"org.onlab.onos.provider"
+
".opticalConfig"
));
}
@Activate
...
...
@@ -238,7 +239,7 @@ public class OpticalConfigProvider extends AbstractProvider implements DevicePro
while
(
iterWdmNode
.
hasNext
())
{
Roadm
value
=
iterWdmNode
.
next
();
DeviceId
did
=
deviceId
(
"of:"
+
value
.
getNodeId
().
replace
(
":"
,
""
));
ChassisId
cid
=
new
ChassisId
(
value
.
getNodeId
()
);
ChassisId
cid
=
new
ChassisId
();
DefaultAnnotations
extendedAttributes
=
DefaultAnnotations
.
builder
()
.
set
(
OPTICAL_ANNOTATION
+
"switchType"
,
"ROADM"
)
.
set
(
OPTICAL_ANNOTATION
+
"switchName"
,
value
.
getName
())
...
...
apps/optical/src/main/resources/demo-3-roadm-2-ps.json
View file @
69d95be
...
...
@@ -47,7 +47,7 @@
"nodeName1"
:
"ROADM1"
,
"nodeName2"
:
"ROADM3"
,
"numWaves"
:
80
,
"port1"
:
1
0
,
"port1"
:
2
0
,
"port2"
:
30
},
"type"
:
"wdmLink"
...
...
@@ -63,7 +63,7 @@
"nodeName2"
:
"ROADM2"
,
"numWaves"
:
80
,
"port1"
:
31
,
"port2"
:
2
0
"port2"
:
2
1
},
"type"
:
"wdmLink"
},
...
...
@@ -78,7 +78,7 @@
"nodeName2"
:
"ROADM1"
,
"bandWidth"
:
100000
,
"port1"
:
10
,
"port2"
:
1
1
"port2"
:
1
0
},
"type"
:
"pktOptLink"
},
...
...
@@ -92,7 +92,7 @@
"nodeName2"
:
"ROADM2"
,
"bandWidth"
:
100000
,
"port1"
:
10
,
"port2"
:
2
1
"port2"
:
1
1
},
"type"
:
"pktOptLink"
}
...
...
Please
register
or
login
to post a comment