Michele Santuari
Committed by Gerrit Code Review

Polling link provider

    The provider is capable of polling the environment using the
    device driver behaviour (LinkDiscovery)

Change-Id: Ia09f866299d38c4de9b13201c9cf63b03909164a
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.net.behaviour;
18 +
19 +import org.onosproject.net.driver.HandlerBehaviour;
20 +import org.onosproject.net.link.LinkDescription;
21 +
22 +import java.util.Set;
23 +
24 +/**
25 + * A HandlerBehaviour to discover links.
26 + */
27 +public interface LinkDiscovery extends HandlerBehaviour {
28 +
29 +
30 + /**
31 + * Returns set of discovered {@link LinkDescription}.
32 + * @return set of LinkDescription.
33 + */
34 + Set<LinkDescription> getLinks();
35 +}
...\ No newline at end of file ...\ No newline at end of file
1 +COMPILE_DEPS = [
2 + '//lib:CORE_DEPS',
3 +]
4 +
5 +TEST_DEPS = [
6 + '//lib:TEST_ADAPTERS',
7 + '//utils/osgi:onlab-osgi-tests',
8 +]
9 +
10 +osgi_jar_with_tests (
11 + deps = COMPILE_DEPS,
12 + test_deps = TEST_DEPS,
13 +)
14 +
15 +onos_app (
16 + app_name = 'org.onosproject.linkdiscovery',
17 + title = 'Link Discovery Provider',
18 + category = 'Provider',
19 + url = 'http://onosproject.org',
20 + description = 'ONOS link discovery provider.',
21 +)
...\ No newline at end of file ...\ No newline at end of file
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +
3 +<!--
4 + ~ Copyright 2016-present Open Networking Laboratory
5 + ~
6 + ~ Licensed under the Apache License, Version 2.0 (the "License");
7 + ~ you may not use this file except in compliance with the License.
8 + ~ You may obtain a copy of the License at
9 + ~
10 + ~ http://www.apache.org/licenses/LICENSE-2.0
11 + ~
12 + ~ Unless required by applicable law or agreed to in writing, software
13 + ~ distributed under the License is distributed on an "AS IS" BASIS,
14 + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 + ~ See the License for the specific language governing permissions and
16 + ~ limitations under the License.
17 + -->
18 +<app name="org.onosproject.linkdiscovery" origin="acino.eu" version="${project.version}"
19 + category="Provider" url="http://onosproject.org" title="ONOS link discovery provider"
20 + featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
21 + features="${project.artifactId}">
22 + <description>${project.description}</description>
23 + <artifact>mvn:${project.groupId}/onos-linkdiscovery-provider/${project.version}</artifact>
24 +</app>
1 +<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2 +
3 +<!--
4 + ~ Copyright 2016-present Open Networking Laboratory
5 + ~
6 + ~ Licensed under the Apache License, Version 2.0 (the "License");
7 + ~ you may not use this file except in compliance with the License.
8 + ~ You may obtain a copy of the License at
9 + ~
10 + ~ http://www.apache.org/licenses/LICENSE-2.0
11 + ~
12 + ~ Unless required by applicable law or agreed to in writing, software
13 + ~ distributed under the License is distributed on an "AS IS" BASIS,
14 + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 + ~ See the License for the specific language governing permissions and
16 + ~ limitations under the License.
17 + --><features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="${project.artifactId}-${project.version}">
18 + <feature name="${project.artifactId}" version="${project.version}"
19 + description="${project.description}">
20 + <feature>onos-api</feature>
21 + <bundle>mvn:${project.groupId}/onos-linkdiscovery-provider/${project.version}</bundle>
22 + </feature>
23 +</features>
24 +
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 +
18 +<project xmlns="http://maven.apache.org/POM/4.0.0"
19 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
21 + <modelVersion>4.0.0</modelVersion>
22 +
23 + <parent>
24 + <groupId>org.onosproject</groupId>
25 + <artifactId>onos-providers</artifactId>
26 + <version>1.7.0-SNAPSHOT</version>
27 + </parent>
28 +
29 +
30 + <artifactId>onos-linkdiscovery-provider</artifactId>
31 + <packaging>bundle</packaging>
32 +
33 + <properties>
34 + <onos.app.name>org.onosproject.linkdiscovery</onos.app.name>
35 + <onos.app.title>Link Discovery Provider</onos.app.title>
36 + <onos.app.origin>acino.eu</onos.app.origin>
37 + <onos.app.category>Provider</onos.app.category>
38 + <onos.app.readme>ONOS link discovery provider.</onos.app.readme>
39 + </properties>
40 +
41 + <description>ONOS link discovery provider</description>
42 +
43 + <dependencies>
44 + <dependency>
45 + <groupId>org.osgi</groupId>
46 + <artifactId>org.osgi.compendium</artifactId>
47 + </dependency>
48 + <dependency>
49 + <groupId>org.onosproject</groupId>
50 + <artifactId>onlab-osgi</artifactId>
51 + <version>${project.version}</version>
52 + <classifier>tests</classifier>
53 + <scope>test</scope>
54 + </dependency>
55 + <dependency>
56 + <groupId>org.onosproject</groupId>
57 + <artifactId>onlab-junit</artifactId>
58 + <scope>test</scope>
59 + </dependency>
60 + <dependency>
61 + <groupId>org.easymock</groupId>
62 + <artifactId>easymock</artifactId>
63 + <scope>test</scope>
64 + </dependency>
65 + <dependency>
66 + <groupId>org.onosproject</groupId>
67 + <artifactId>onos-api</artifactId>
68 + <classifier>tests</classifier>
69 + <scope>test</scope>
70 + </dependency>
71 + </dependencies>
72 +
73 +</project>
...\ 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 + * Provider that uses LinkDiscovery {@link org.onosproject.net.behaviour.LinkDiscovery}
19 + * to poll the network environment as a means of link discovery.
20 + */
21 +package org.onosproject.provider.linkdiscovery.impl;
...\ 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 + * Test package for the Link Discovery Provider.
19 + */
20 +package org.onosproject.provider.linkdiscovery.impl;
...\ No newline at end of file ...\ No newline at end of file
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
49 <module>isis</module> 49 <module>isis</module>
50 <module>lisp</module> 50 <module>lisp</module>
51 <module>ospf</module> 51 <module>ospf</module>
52 + <module>link</module>
52 </modules> 53 </modules>
53 54
54 <dependencies> 55 <dependencies>
......