Committed by
Gerrit Code Review
DHCP Relay Application, addressed the review comments for patch-2.
Change-Id: If447f3786c661c667460f43fc659ea71dd198be7
Showing
8 changed files
with
177 additions
and
0 deletions
... | @@ -98,6 +98,7 @@ APPS = [ | ... | @@ -98,6 +98,7 @@ APPS = [ |
98 | 98 | ||
99 | # Apps | 99 | # Apps |
100 | '//apps/dhcp:onos-apps-dhcp-oar', | 100 | '//apps/dhcp:onos-apps-dhcp-oar', |
101 | + '//apps/dhcprelay:onos-apps-dhcprelay-oar', | ||
101 | '//apps/fwd:onos-apps-fwd-oar', | 102 | '//apps/fwd:onos-apps-fwd-oar', |
102 | '//apps/acl:onos-apps-acl-oar', | 103 | '//apps/acl:onos-apps-acl-oar', |
103 | '//apps/bgprouter:onos-apps-bgprouter-oar', | 104 | '//apps/bgprouter:onos-apps-bgprouter-oar', |
... | @@ -147,6 +148,7 @@ APP_JARS = [ | ... | @@ -147,6 +148,7 @@ APP_JARS = [ |
147 | '//apps/routing-api:onos-apps-routing-api', | 148 | '//apps/routing-api:onos-apps-routing-api', |
148 | '//apps/dhcp/api:onos-apps-dhcp-api', | 149 | '//apps/dhcp/api:onos-apps-dhcp-api', |
149 | '//apps/dhcp/app:onos-apps-dhcp-app', | 150 | '//apps/dhcp/app:onos-apps-dhcp-app', |
151 | + '//apps/dhcprelay:onos-apps-dhcprelay', | ||
150 | '//apps/fwd:onos-apps-fwd', | 152 | '//apps/fwd:onos-apps-fwd', |
151 | '//apps/iptopology-api:onos-apps-iptopology-api', | 153 | '//apps/iptopology-api:onos-apps-iptopology-api', |
152 | '//apps/openstacknode:onos-apps-openstacknode', | 154 | '//apps/openstacknode:onos-apps-openstacknode', | ... | ... |
apps/dhcprelay/BUCK
0 → 100644
1 | +COMPILE_DEPS = [ | ||
2 | + '//lib:CORE_DEPS', | ||
3 | +] | ||
4 | + | ||
5 | +osgi_jar ( | ||
6 | + deps = COMPILE_DEPS, | ||
7 | +) | ||
8 | + | ||
9 | +onos_app ( | ||
10 | + app_name = 'org.onosproject.dhcprelay', | ||
11 | + title = 'DHCP Relay Agent App', | ||
12 | + category = 'default', | ||
13 | + url = 'http://onosproject.org', | ||
14 | + description = 'DHCP Relay Agent Application.', | ||
15 | +) |
apps/dhcprelay/pom.xml
0 → 100644
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="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
18 | + <modelVersion>4.0.0</modelVersion> | ||
19 | + | ||
20 | + <parent> | ||
21 | + <groupId>org.onosproject</groupId> | ||
22 | + <artifactId>onos-apps</artifactId> | ||
23 | + <version>1.7.0-SNAPSHOT</version> | ||
24 | + <relativePath>../pom.xml</relativePath> | ||
25 | + </parent> | ||
26 | + | ||
27 | + <artifactId>onos-app-dhcprelay</artifactId> | ||
28 | + <packaging>bundle</packaging> | ||
29 | + | ||
30 | + <description>DHCP Relay Agent</description> | ||
31 | + <url>http://onosproject.org</url> | ||
32 | + | ||
33 | + <properties> | ||
34 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
35 | + <onos.version>1.6.0-SNAPSHOT</onos.version> | ||
36 | + <onos.app.name>org.onosproject.dhcprelay</onos.app.name> | ||
37 | + <onos.app.title>DHCP Relay Agent App</onos.app.title> | ||
38 | + <onos.app.origin>ON.Lab</onos.app.origin> | ||
39 | + <onos.app.category>default</onos.app.category> | ||
40 | + <onos.app.url>http://onosproject.org</onos.app.url> | ||
41 | + <onos.app.readme>DHCP Relay Agent Application.</onos.app.readme> | ||
42 | + </properties> | ||
43 | + | ||
44 | + <dependencies> | ||
45 | + <dependency> | ||
46 | + <groupId>org.onosproject</groupId> | ||
47 | + <artifactId>onos-api</artifactId> | ||
48 | + <version>${onos.version}</version> | ||
49 | + </dependency> | ||
50 | + | ||
51 | + <dependency> | ||
52 | + <groupId>org.onosproject</groupId> | ||
53 | + <artifactId>onlab-osgi</artifactId> | ||
54 | + <version>${onos.version}</version> | ||
55 | + </dependency> | ||
56 | + | ||
57 | + <dependency> | ||
58 | + <groupId>junit</groupId> | ||
59 | + <artifactId>junit</artifactId> | ||
60 | + <version>4.12</version> | ||
61 | + <scope>test</scope> | ||
62 | + </dependency> | ||
63 | + | ||
64 | + <dependency> | ||
65 | + <groupId>org.onosproject</groupId> | ||
66 | + <artifactId>onlab-junit</artifactId> | ||
67 | + <scope>test</scope> | ||
68 | + </dependency> | ||
69 | + | ||
70 | + <dependency> | ||
71 | + <groupId>org.onosproject</groupId> | ||
72 | + <artifactId>onos-api</artifactId> | ||
73 | + <version>${onos.version}</version> | ||
74 | + <scope>test</scope> | ||
75 | + <classifier>tests</classifier> | ||
76 | + </dependency> | ||
77 | + | ||
78 | + <dependency> | ||
79 | + <groupId>org.apache.felix</groupId> | ||
80 | + <artifactId>org.apache.felix.scr.annotations</artifactId> | ||
81 | + <version>1.9.12</version> | ||
82 | + <scope>provided</scope> | ||
83 | + </dependency> | ||
84 | + </dependencies> | ||
85 | +</project> |
This diff is collapsed. Click to expand it.
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.dhcprelay; | ||
17 | + | ||
18 | +import org.onosproject.core.ApplicationId; | ||
19 | +import org.onosproject.net.ConnectPoint; | ||
20 | +import org.onosproject.net.config.Config; | ||
21 | + | ||
22 | +import static org.onosproject.net.config.Config.FieldPresence.MANDATORY; | ||
23 | +/** | ||
24 | + * DHCP Relay Config class. | ||
25 | + */ | ||
26 | +public class DhcpRelayConfig extends Config<ApplicationId> { | ||
27 | + | ||
28 | + private static final String DHCP_CONNECT_POINT = "dhcpserverConnectPoint"; | ||
29 | + | ||
30 | + @Override | ||
31 | + public boolean isValid() { | ||
32 | + | ||
33 | + return hasOnlyFields(DHCP_CONNECT_POINT) && | ||
34 | + isConnectPoint(DHCP_CONNECT_POINT, MANDATORY); | ||
35 | + } | ||
36 | + | ||
37 | + /** | ||
38 | + * Returns the dhcp server connect point. | ||
39 | + * | ||
40 | + * @return dhcp server connect point | ||
41 | + */ | ||
42 | + public ConnectPoint getDhcpServerConnectPoint() { | ||
43 | + return ConnectPoint.deviceConnectPoint(object.path(DHCP_CONNECT_POINT).asText()); | ||
44 | + } | ||
45 | +} |
1 | +/* | ||
2 | + * Copyright 2014-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 | + * DHCP-RELAY application. | ||
19 | + */ | ||
20 | +package org.onosproject.dhcprelay; |
... | @@ -53,6 +53,7 @@ | ... | @@ -53,6 +53,7 @@ |
53 | <module>flowanalyzer</module> | 53 | <module>flowanalyzer</module> |
54 | <module>vtn</module> | 54 | <module>vtn</module> |
55 | <module>dhcp</module> | 55 | <module>dhcp</module> |
56 | + <module>dhcprelay</module> | ||
56 | <module>mfwd</module> | 57 | <module>mfwd</module> |
57 | <module>pim</module> | 58 | <module>pim</module> |
58 | <module>mlb</module> | 59 | <module>mlb</module> | ... | ... |
-
Please register or login to post a comment