Kiran Ramachandra
Committed by Gerrit Code Review

ONOS-4078: ISIS protocol API initial checkin.

Change-Id: I89743341348148835dc196321852945a20469c87
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<!--
3 + ~ Copyright 2016 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:xsi="http://www.w3.org/2001/XMLSchema-instance"
18 + xmlns="http://maven.apache.org/POM/4.0.0"
19 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
20 + <modelVersion>4.0.0</modelVersion>
21 +
22 + <parent>
23 + <groupId>org.onosproject</groupId>
24 + <artifactId>onos-isis</artifactId>
25 + <version>1.6.0-SNAPSHOT</version>
26 + <relativePath>../pom.xml</relativePath>
27 + </parent>
28 +
29 + <artifactId>onos-isis-api</artifactId>
30 + <packaging>bundle</packaging>
31 +
32 + <description>ONOS ISIS controller subsystem API</description>
33 +
34 + <dependencies>
35 + <dependency>
36 + <groupId>org.onosproject</groupId>
37 + <artifactId>onos-api</artifactId>
38 + </dependency>
39 + </dependencies>
40 +
41 +</project>
1 +/*
2 + * Copyright 2016 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.isis.controller;
17 +
18 +import java.util.List;
19 +
20 +/**
21 + * Representation of an ISIS controller.
22 + */
23 +public interface IsisController {
24 +
25 + /**
26 + * Registers a listener for router meta events.
27 + *
28 + * @param isisRouterListener isis router listener instance
29 + */
30 + void addRouterListener(IsisRouterListener isisRouterListener);
31 +
32 + /**
33 + * Unregisters a router listener.
34 + *
35 + * @param isisRouterListener isis router listener instance
36 + */
37 + void removeRouterListener(IsisRouterListener isisRouterListener);
38 +
39 + /**
40 + * Updates configuration of processes.
41 + *
42 + * @param processes process instance to update
43 + */
44 + void updateConfig(List<IsisProcess> processes);
45 +
46 + /**
47 + * Deletes configuration parameters.
48 + *
49 + * @param processes list of process instance
50 + * @param attribute attribute to delete
51 + */
52 + void deleteConfig(List<IsisProcess> processes, String attribute);
53 +
54 + /**
55 + * Gets the all configured processes.
56 + *
57 + * @return list of process instances
58 + */
59 + List<IsisProcess> allConfiguredProcesses();
60 +}
...\ No newline at end of file ...\ No newline at end of file
1 +/*
2 + * Copyright 2016 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.isis.controller;
17 +
18 +/**
19 + * Representation of an ISIS interface.
20 + */
21 +public interface IsisInterface {
22 +
23 + /**
24 + * Sets interface index.
25 + *
26 + * @param interfaceIndex interface index
27 + */
28 + void setInterfaceIndex(int interfaceIndex);
29 +
30 + /**
31 + * Sets intermediate system name.
32 + *
33 + * @param intermediateSystemName intermediate system name
34 + */
35 + void setIntermediateSystemName(String intermediateSystemName);
36 +
37 + /**
38 + * Sets system ID.
39 + *
40 + * @param systemId system ID
41 + */
42 + void setSystemId(String systemId);
43 +
44 + /**
45 + * Sets LAN ID.
46 + *
47 + * @param lanId LAN ID
48 + */
49 + void setLanId(String lanId);
50 +
51 + /**
52 + * Sets ID length.
53 + *
54 + * @param idLength ID length
55 + */
56 + void setIdLength(int idLength);
57 +
58 + /**
59 + * Sets max area addresses.
60 + *
61 + * @param maxAreaAddresses max area addresses
62 + */
63 + void setMaxAreaAddresses(int maxAreaAddresses);
64 +
65 + /**
66 + * Sets reserved packet circuit type.
67 + *
68 + * @param reservedPacketCircuitType reserved packet circuit type
69 + */
70 + void setReservedPacketCircuitType(int reservedPacketCircuitType);
71 +
72 + /**
73 + * Sets point to point.
74 + *
75 + * @param p2p point to point
76 + */
77 + void setP2p(int p2p);
78 +
79 + /**
80 + * Sets area address.
81 + *
82 + * @param areaAddress area address
83 + */
84 + void setAreaAddress(String areaAddress);
85 +
86 + /**
87 + * Sets area length.
88 + *
89 + * @param areaLength area length
90 + */
91 + void setAreaLength(int areaLength);
92 +
93 + /**
94 + * Sets link state packet ID.
95 + *
96 + * @param lspId link state packet ID
97 + */
98 + void setLspId(String lspId);
99 +
100 + /**
101 + * Sets holding time.
102 + *
103 + * @param holdingTime holding time
104 + */
105 + void setHoldingTime(int holdingTime);
106 +
107 + /**
108 + * Sets priority.
109 + *
110 + * @param priority priority
111 + */
112 + void setPriority(int priority);
113 +
114 + /**
115 + * Sets hello interval.
116 + *
117 + * @param helloInterval hello interval
118 + */
119 + void setHelloInterval(int helloInterval);
120 +}
...\ No newline at end of file ...\ No newline at end of file
1 +/*
2 + * Copyright 2016 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.isis.controller;
18 +
19 +/**
20 + * Representation of an ISIS link state database.
21 + */
22 +public interface IsisLsdb {
23 +
24 + /**
25 + * Gets the ISIS LSDB.
26 + *
27 + * @return ISIS LSDB
28 + */
29 + IsisLsdb isisLsdb();
30 +}
...\ No newline at end of file ...\ No newline at end of file
1 +/*
2 + * Copyright 2016 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.isis.controller;
18 +
19 +/**
20 + * Representation of an ISIS Message.
21 + */
22 +public interface IsisMessage {
23 +
24 + /**
25 + * Gets the type of ISIS PDU.
26 + *
27 + * @return ISIS PDU type instance
28 + */
29 + IsisPduType isisPduType();
30 +}
...\ No newline at end of file ...\ No newline at end of file
1 +/*
2 + * Copyright 2016 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.isis.controller;
18 +
19 +/**
20 + * Representation of ISIS PDU types.
21 + */
22 +public enum IsisPduType {
23 +
24 + /**
25 + * Represents Level-1 LAN hello packet.
26 + */
27 + L1HELLOPDU(15),
28 + /**
29 + * Represents Level-2 LAN hello packet.
30 + */
31 + L2HELLOPDU(16),
32 + /**
33 + * Represents point-to-point hello packet.
34 + */
35 + P2PHELLOPDU(17),
36 + /**
37 + * Represents Level-1 link state packet.
38 + */
39 + L1LSPDU(18),
40 + /**
41 + * Represents Level-2 link state packet.
42 + */
43 + L2LSPDU(20),
44 + /**
45 + * Represents Level-1 complete sequence number packet.
46 + */
47 + L1CSNP(24),
48 + /**
49 + * Represents Level-2 complete sequence number packet.
50 + */
51 + L2CSNP(25),
52 + /**
53 + * Represents Level-1 partial sequence number packet.
54 + */
55 + L1PSNP(26),
56 + /**
57 + * Represents Level-2 partial sequence number packet.
58 + */
59 + L2PSNP(27);
60 +
61 + private int value;
62 +
63 +
64 + /**
65 + * Creates an instance of ISIS PDU type.
66 + *
67 + * @param value represents ISIS PDU type
68 + */
69 + private IsisPduType(int value) {
70 + this.value = value;
71 + }
72 +
73 + /**
74 + * Gets the value representing PDU type.
75 + *
76 + * @return value represents PDU type
77 + */
78 + public int value() {
79 + return value;
80 + }
81 +}
...\ No newline at end of file ...\ No newline at end of file
1 +/*
2 + * Copyright 2016 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.isis.controller;
18 +
19 +import java.util.List;
20 +
21 +/**
22 + * Representation of an ISIS process.
23 + */
24 +public interface IsisProcess {
25 +
26 + /**
27 + * Sets process ID.
28 + *
29 + * @param processId process ID
30 + */
31 + void setProcessId(String processId);
32 +
33 + /**
34 + * Sets list of ISIS interfaces.
35 + *
36 + * @param isisInterfaceList list of ISIS interface details
37 + */
38 + void setIsisInterfaceList(List<IsisInterface> isisInterfaceList);
39 +}
...\ No newline at end of file ...\ No newline at end of file
1 +/*
2 + * Copyright 2016 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.isis.controller;
17 +
18 +import org.onlab.packet.Ip4Address;
19 +
20 +/**
21 + * Abstraction of an ISIS Router.
22 + */
23 +public interface IsisRouter {
24 +
25 + /**
26 + * Gets IP address of the router.
27 + *
28 + * @return IP address of the router
29 + */
30 + Ip4Address routerIp();
31 +
32 + /**
33 + * Gets IP address of the interface.
34 + *
35 + * @return IP address of the interface
36 + */
37 + Ip4Address interfaceId();
38 +
39 + /**
40 + * Sets IP address of the Router.
41 + *
42 + * @param routerIp IP address of the router
43 + */
44 + void setRouterIp(Ip4Address routerIp);
45 +}
...\ No newline at end of file ...\ No newline at end of file
1 +/*
2 + * Copyright 2016 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.isis.controller;
17 +
18 +/**
19 + * Abstraction of an ISIS Router Listener.
20 + * Allows for providers interested in switch events to be notified.
21 + */
22 +public interface IsisRouterListener {
23 +
24 + /**
25 + * Notifies that a router is added.
26 + *
27 + * @param isisRouter ISIS router instance
28 + */
29 + void routerAdded(IsisRouter isisRouter);
30 +
31 + /**
32 + * Notifies that a router is removed.
33 + *
34 + * @param isisRouter ISIS router instance
35 + */
36 + void routerRemoved(IsisRouter isisRouter);
37 +
38 + /**
39 + * Notifies that the router has changed in some way.
40 + *
41 + * @param isisRouter ISIS router instance
42 + */
43 + void routerChanged(IsisRouter isisRouter);
44 +}
...\ No newline at end of file ...\ No newline at end of file
1 +/*
2 + * Copyright 2016 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 + * Implementation of the ISIS controller.
19 + */
20 +package org.onosproject.isis.controller;
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<!--
3 + ~ Copyright 2016 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:xsi="http://www.w3.org/2001/XMLSchema-instance"
18 + xmlns="http://maven.apache.org/POM/4.0.0"
19 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
20 + <modelVersion>4.0.0</modelVersion>
21 +
22 + <parent>
23 + <groupId>org.onosproject</groupId>
24 + <artifactId>onos-protocols</artifactId>
25 + <version>1.6.0-SNAPSHOT</version>
26 + <relativePath>../pom.xml</relativePath>
27 + </parent>
28 +
29 + <artifactId>onos-isis</artifactId>
30 + <packaging>pom</packaging>
31 +
32 + <description>ONOS ISIS Protocol subsystem</description>
33 +
34 + <modules>
35 + <module>api</module>
36 + </modules>
37 +
38 +</project>
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
39 <module>bgp</module> 39 <module>bgp</module>
40 <module>rest</module> 40 <module>rest</module>
41 <module>ospf</module> 41 <module>ospf</module>
42 + <module>isis</module>
42 </modules> 43 </modules>
43 44
44 <dependencies> 45 <dependencies>
......