Priyanka B
Committed by Gerrit Code Review

[Goldeneye] [ONOS-4158] Implement path computation algorithm based on various constraints

Change-Id: I82d3f41146c56a2d7671dc3dbef4d050ae70cc9a
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<!--
3 + ~ Copyright 2016-present Open Networking Laboratory
4 + ~
5 + ~ Licensed under the Apache License, Version 2.0 (the "License");
6 + ~ you may not use this file except in compliance with the License.
7 + ~ You may obtain a copy of the License at
8 + ~
9 + ~ http://www.apache.org/licenses/LICENSE-2.0
10 + ~
11 + ~ Unless required by applicable law or agreed to in writing, software
12 + ~ distributed under the License is distributed on an "AS IS" BASIS,
13 + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 + ~ See the License for the specific language governing permissions and
15 + ~ limitations under the License.
16 + -->
17 +<project xmlns="http://maven.apache.org/POM/4.0.0"
18 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20 + <modelVersion>4.0.0</modelVersion>
21 + <parent>
22 + <groupId>org.onosproject</groupId>
23 + <artifactId>onos-apps</artifactId>
24 + <version>1.6.0-SNAPSHOT</version>
25 + <relativePath>../pom.xml</relativePath>
26 + </parent>
27 + <artifactId>onos-app-pce</artifactId>
28 + <packaging>bundle</packaging>
29 +
30 + <description>PCE as central controller</description>
31 +
32 + <properties>
33 + <onos.app.name>org.onosproject.pce</onos.app.name>
34 + <onos.app.category>default</onos.app.category>
35 + <onos.app.url>http://onosproject.org</onos.app.url>
36 + <onos.app.readme>PCE as central controller.</onos.app.readme>
37 + </properties>
38 + <dependencies>
39 + <dependency>
40 + <groupId>org.onosproject</groupId>
41 + <artifactId>onlab-junit</artifactId>
42 + <scope>test</scope>
43 + </dependency>
44 + </dependencies>
45 +</project>
1 +/*
2 + * Copyright 2016-present Open Networking Laboratory
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 + * you may not use this file except in compliance with the License.
6 + * You may obtain a copy of the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + * See the License for the specific language governing permissions and
14 + * limitations under the License.
15 + */
16 +
17 +package org.onosproject.pce.pceservice;
18 +
19 +/**
20 + * Representation of LSP type.
21 + */
22 +public enum LspType {
23 + /**
24 + * Signifies that path is created via signaling mode.
25 + */
26 + WITH_SIGNALLING(0),
27 +
28 + /**
29 + * Signifies that path is created via SR mode.
30 + */
31 + SR_WITHOUT_SIGNALLING(1),
32 +
33 + /**
34 + * Signifies that path is created via without signaling and without SR mode.
35 + */
36 + WITHOUT_SIGNALLING_AND_WITHOUT_SR(2);
37 +
38 + int value;
39 +
40 + /**
41 + * Assign val with the value as the LSP type.
42 + *
43 + * @param val LSP type
44 + */
45 + LspType(int val) {
46 + value = val;
47 + }
48 +
49 + /**
50 + * Returns value of LSP type.
51 + *
52 + * @return LSP type
53 + */
54 + public byte type() {
55 + return (byte) value;
56 + }
57 +}
...\ No newline at end of file ...\ No newline at end of file
1 +/*
2 + * Copyright 2016-present Open Networking Laboratory
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 + * you may not use this file except in compliance with the License.
6 + * You may obtain a copy of the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + * See the License for the specific language governing permissions and
14 + * limitations under the License.
15 + */
16 +package org.onosproject.pce.pceservice.api;
17 +
18 +import java.util.List;
19 +
20 +import org.onosproject.net.DeviceId;
21 +import org.onosproject.net.intent.Constraint;
22 +import org.onosproject.pce.pceservice.LspType;
23 +
24 +/**
25 + * Service to compute path based on constraints, release path and update path with new constraints.
26 + */
27 +public interface PceService {
28 +
29 + /**
30 + * Creates new path based on constraints and lsp type.
31 + *
32 + * @param src source device
33 + * @param dst destination device
34 + * @param constraints list of constraints to be applied on path
35 + * @param lspType type of path to be setup
36 + * @return false on failure and true on successful path creation
37 + */
38 + boolean setupPath(DeviceId src, DeviceId dst, List<Constraint> constraints, LspType lspType);
39 +
40 + //TODO: updatePath
41 + //TODO: releasePath
42 + //TODO: queryPath
43 +}
...\ No newline at end of file ...\ No newline at end of file
1 +/*
2 + * Copyright 2016-present Open Networking Laboratory
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 + * you may not use this file except in compliance with the License.
6 + * You may obtain a copy of the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + * See the License for the specific language governing permissions and
14 + * limitations under the License.
15 + */
16 +
17 +/**
18 + * PCE service API.
19 + */
20 +package org.onosproject.pce.pceservice.api;
1 +/*
2 + * Copyright 2016-present Open Networking Laboratory
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 + * you may not use this file except in compliance with the License.
6 + * You may obtain a copy of the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + * See the License for the specific language governing permissions and
14 + * limitations under the License.
15 + */
16 +
17 +/**
18 + * PCE service application.
19 + */
20 +package org.onosproject.pce.pceservice;
...\ No newline at end of file ...\ No newline at end of file
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
48 <module>xos-integration</module> 48 <module>xos-integration</module>
49 <module>pcep-api</module> 49 <module>pcep-api</module>
50 <module>iptopology-api</module> 50 <module>iptopology-api</module>
51 + <module>pce</module>
51 <module>olt</module> 52 <module>olt</module>
52 <module>cip</module> 53 <module>cip</module>
53 <module>flowanalyzer</module> 54 <module>flowanalyzer</module>
......