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
Thomas Vachuska
2014-10-24 11:04:36 -0700
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
70c17ac5962f464983b0d52c075fbc41b542aa94
70c17ac5
2 parents
d1aee8d0
8e6dba29
Merge remote-tracking branch 'origin/master'
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
56 deletions
apps/optical/src/main/java/org/onlab/onos/optical/cfg/OpticalConfigProvider.java
apps/optical/src/main/resources/demo-3-roadm-2-ps.json
core/net/src/main/java/org/onlab/onos/net/intent/impl/OpticalConnectivityIntentCompiler.java
core/net/src/main/java/org/onlab/onos/net/intent/impl/OpticalPathIntentInstaller.java
apps/optical/src/main/java/org/onlab/onos/optical/cfg/OpticalConfigProvider.java
View file @
70c17ac
...
...
@@ -291,6 +291,17 @@ public class OpticalConfigProvider extends AbstractProvider implements DevicePro
linkProviderService
.
linkDetected
(
linkDescription
);
log
.
info
(
String
.
format
(
"WDM link: %s : %s"
,
linkDescription
.
src
().
toString
(),
linkDescription
.
dst
().
toString
()));
DefaultLinkDescription
linkDescriptionReverse
=
new
DefaultLinkDescription
(
snkPoint
,
srcPoint
,
Link
.
Type
.
OPTICAL
,
extendedAttributes
);
linkProviderService
.
linkDetected
(
linkDescriptionReverse
);
log
.
info
(
String
.
format
(
"WDM link: %s : %s"
,
linkDescriptionReverse
.
src
().
toString
(),
linkDescriptionReverse
.
dst
().
toString
()));
}
// Discover the packet optical link objects
...
...
@@ -322,6 +333,16 @@ public class OpticalConfigProvider extends AbstractProvider implements DevicePro
linkProviderService
.
linkDetected
(
linkDescription
);
log
.
info
(
String
.
format
(
"Packet-optical link: %s : %s"
,
linkDescription
.
src
().
toString
(),
linkDescription
.
dst
().
toString
()));
DefaultLinkDescription
linkDescriptionReverse
=
new
DefaultLinkDescription
(
snkPoint
,
srcPoint
,
Link
.
Type
.
OPTICAL
,
extendedAttributes
);
linkProviderService
.
linkDetected
(
linkDescriptionReverse
);
log
.
info
(
String
.
format
(
"Packet-optical link: %s : %s"
,
linkDescriptionReverse
.
src
().
toString
(),
linkDescriptionReverse
.
dst
().
toString
()));
}
}
...
...
apps/optical/src/main/resources/demo-3-roadm-2-ps.json
View file @
70c17ac
...
...
@@ -52,37 +52,9 @@
},
"type"
:
"wdmLink"
},
{
"allowed"
:
true
,
"nodeDpid1"
:
"00:00:ff:ff:ff:ff:ff:03"
,
"nodeDpid2"
:
"00:00:ff:ff:ff:ff:ff:01"
,
"params"
:
{
"distKms"
:
1000
,
"nodeName1"
:
"ROADM3"
,
"nodeName2"
:
"ROADM1"
,
"numWaves"
:
80
,
"port1"
:
30
,
"port2"
:
10
},
"type"
:
"wdmLink"
},
{
"allowed"
:
true
,
"nodeDpid1"
:
"00:00:ff:ff:ff:ff:ff:02"
,
"nodeDpid2"
:
"00:00:ff:ff:ff:ff:ff:03"
,
"params"
:
{
"distKms"
:
2000
,
"nodeName1"
:
"ROADM2"
,
"nodeName2"
:
"ROADM3"
,
"numWaves"
:
80
,
"port1"
:
20
,
"port2"
:
31
},
"type"
:
"wdmLink"
},
{
"allowed"
:
true
,
"nodeDpid1"
:
"00:00:ff:ff:ff:ff:ff:03"
,
"nodeDpid2"
:
"00:00:ff:ff:ff:ff:ff:02"
,
"params"
:
{
...
...
@@ -104,20 +76,7 @@
"nodeName1"
:
"ROUTER1"
,
"nodeName2"
:
"ROADM1"
,
"bandWidth"
:
100000
,
"port1"
:
10
,
"port2"
:
10
},
"type"
:
"pktOptLink"
},
{
"allowed"
:
true
,
"nodeDpid1"
:
"00:00:ff:ff:ff:ff:ff:01"
,
"nodeDpid2"
:
"00:00:ff:ff:ff:ff:00:01"
,
"params"
:
{
"nodeName1"
:
"ROADM1"
,
"nodeName2"
:
"ROUTER1"
,
"bandWidth"
:
100000
,
"port1"
:
11
,
"port1"
:
1
,
"port2"
:
10
},
"type"
:
"pktOptLink"
...
...
@@ -131,24 +90,11 @@
"nodeName1"
:
"ROUTER2"
,
"nodeName2"
:
"ROADM2"
,
"bandWidth"
:
100000
,
"port1"
:
1
0
,
"port1"
:
1
,
"port2"
:
11
},
"type"
:
"pktOptLink"
},
{
"allowed"
:
true
,
"nodeDpid1"
:
"00:00:ff:ff:ff:ff:ff:02"
,
"nodeDpid2"
:
"00:00:ff:ff:ff:ff:00:02"
,
"params"
:
{
"nodeName1"
:
"ROADM2"
,
"nodeName2"
:
"ROUTER2"
,
"bandWidth"
:
100000
,
"port1"
:
21
,
"port2"
:
10
},
"type"
:
"pktOptLink"
}
]
}
...
...
core/net/src/main/java/org/onlab/onos/net/intent/impl/OpticalConnectivityIntentCompiler.java
View file @
70c17ac
...
...
@@ -70,6 +70,7 @@ public class OpticalConnectivityIntentCompiler implements IntentCompiler<Optical
public
List
<
Intent
>
compile
(
OpticalConnectivityIntent
intent
)
{
// TODO: compute multiple paths using the K-shortest path algorithm
List
<
Intent
>
retList
=
new
ArrayList
<>();
log
.
info
(
"The system is comipling the OpticalConnectivityIntent:"
+
intent
.
toString
());
Path
path
=
calculatePath
(
intent
.
getSrcConnectPoint
(),
intent
.
getDst
());
if
(
path
==
null
)
{
return
retList
;
...
...
@@ -88,6 +89,8 @@ public class OpticalConnectivityIntentCompiler implements IntentCompiler<Optical
intent
.
getDst
(),
path
);
log
.
info
(
"a new OpticalPathIntent was created: "
+
newIntent
.
toString
());
retList
.
add
(
newIntent
);
return
retList
;
...
...
@@ -123,6 +126,7 @@ public class OpticalConnectivityIntentCompiler implements IntentCompiler<Optical
Iterator
<
Path
>
itr
=
paths
.
iterator
();
while
(
itr
.
hasNext
())
{
Path
path
=
itr
.
next
();
// log.info(String.format("total link number.:%d", path.links().size()));
if
(
path
.
cost
()
>=
10000
)
{
itr
.
remove
();
}
...
...
core/net/src/main/java/org/onlab/onos/net/intent/impl/OpticalPathIntentInstaller.java
View file @
70c17ac
...
...
@@ -116,6 +116,7 @@ public class OpticalPathIntentInstaller implements IntentInstaller<OpticalPathIn
appId
,
100
,
true
);
rules
.
add
(
new
FlowRuleBatchEntry
(
FlowRuleOperation
.
ADD
,
rule
));
prev
=
link
.
dst
();
...
...
Please
register
or
login
to post a comment