Committed by
Gerrit Code Review
Placed API and implementation into separate packages
Change-Id: If8a9223a7a225db1b2aa2d09738857af482736bc
Showing
23 changed files
with
68 additions
and
30 deletions
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.cordvtn; | 16 | +package org.onosproject.cordvtn.api; |
17 | 17 | ||
18 | /** | 18 | /** |
19 | * Entity capable of handling a subject connected and disconnected situation. | 19 | * Entity capable of handling a subject connected and disconnected situation. | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.cordvtn; | 16 | +package org.onosproject.cordvtn.api; |
17 | 17 | ||
18 | import com.google.common.base.MoreObjects; | 18 | import com.google.common.base.MoreObjects; |
19 | import org.onlab.packet.IpAddress; | 19 | import org.onlab.packet.IpAddress; |
... | @@ -30,7 +30,7 @@ import static com.google.common.base.Preconditions.checkNotNull; | ... | @@ -30,7 +30,7 @@ import static com.google.common.base.Preconditions.checkNotNull; |
30 | 30 | ||
31 | public final class CordService { | 31 | public final class CordService { |
32 | 32 | ||
33 | - enum ServiceType { | 33 | + public enum ServiceType { |
34 | PRIVATE, | 34 | PRIVATE, |
35 | PUBLIC, | 35 | PUBLIC, |
36 | MANAGEMENT | 36 | MANAGEMENT | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.cordvtn; | 16 | +package org.onosproject.cordvtn.api; |
17 | 17 | ||
18 | import org.onlab.util.Identifier; | 18 | import org.onlab.util.Identifier; |
19 | 19 | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.cordvtn; | 16 | +package org.onosproject.cordvtn.api; |
17 | 17 | ||
18 | import com.fasterxml.jackson.databind.JsonNode; | 18 | import com.fasterxml.jackson.databind.JsonNode; |
19 | import com.google.common.collect.Maps; | 19 | import com.google.common.collect.Maps; | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.cordvtn; | 16 | +package org.onosproject.cordvtn.api; |
17 | 17 | ||
18 | import com.google.common.base.MoreObjects; | 18 | import com.google.common.base.MoreObjects; |
19 | import org.onlab.packet.TpPort; | 19 | import org.onlab.packet.TpPort; | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.cordvtn; | 16 | +package org.onosproject.cordvtn.api; |
17 | 17 | ||
18 | /** | 18 | /** |
19 | * Entity that defines possible init state of the cordvtn node. | 19 | * Entity that defines possible init state of the cordvtn node. | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.cordvtn; | 16 | +package org.onosproject.cordvtn.api; |
17 | 17 | ||
18 | import org.onlab.packet.IpAddress; | 18 | import org.onlab.packet.IpAddress; |
19 | import org.onlab.packet.MacAddress; | 19 | import org.onlab.packet.MacAddress; | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.cordvtn; | 16 | +package org.onosproject.cordvtn.api; |
17 | 17 | ||
18 | import com.google.common.base.MoreObjects; | 18 | import com.google.common.base.MoreObjects; |
19 | import org.onlab.packet.IpAddress; | 19 | import org.onlab.packet.IpAddress; | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.cordvtn; | 16 | +package org.onosproject.cordvtn.api; |
17 | 17 | ||
18 | import com.google.common.base.MoreObjects; | 18 | import com.google.common.base.MoreObjects; |
19 | import org.onlab.packet.Ip4Address; | 19 | import org.onlab.packet.Ip4Address; | ... | ... |
1 | /* | 1 | /* |
2 | - * Copyright 2015-present Open Networking Laboratory | 2 | + * Copyright 2016-present Open Networking Laboratory |
3 | * | 3 | * |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | * you may not use this file except in compliance with the License. | 5 | * you may not use this file except in compliance with the License. |
... | @@ -15,6 +15,6 @@ | ... | @@ -15,6 +15,6 @@ |
15 | */ | 15 | */ |
16 | 16 | ||
17 | /** | 17 | /** |
18 | - * Application for provisioning virtual tenant networks. | 18 | + * API for CORD VTN application. |
19 | */ | 19 | */ |
20 | -package org.onosproject.cordvtn; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
20 | +package org.onosproject.cordvtn.api; | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -18,7 +18,7 @@ package org.onosproject.cordvtn.cli; | ... | @@ -18,7 +18,7 @@ package org.onosproject.cordvtn.cli; |
18 | 18 | ||
19 | import org.apache.karaf.shell.commands.Command; | 19 | import org.apache.karaf.shell.commands.Command; |
20 | import org.onosproject.cli.AbstractShellCommand; | 20 | import org.onosproject.cli.AbstractShellCommand; |
21 | -import org.onosproject.cordvtn.CordVtnNodeManager; | 21 | +import org.onosproject.cordvtn.impl.CordVtnNodeManager; |
22 | 22 | ||
23 | /** | 23 | /** |
24 | * Deletes nodes from the service. | 24 | * Deletes nodes from the service. | ... | ... |
... | @@ -19,8 +19,8 @@ package org.onosproject.cordvtn.cli; | ... | @@ -19,8 +19,8 @@ package org.onosproject.cordvtn.cli; |
19 | import org.apache.karaf.shell.commands.Argument; | 19 | import org.apache.karaf.shell.commands.Argument; |
20 | import org.apache.karaf.shell.commands.Command; | 20 | import org.apache.karaf.shell.commands.Command; |
21 | import org.onosproject.cli.AbstractShellCommand; | 21 | import org.onosproject.cli.AbstractShellCommand; |
22 | -import org.onosproject.cordvtn.CordVtnNode; | 22 | +import org.onosproject.cordvtn.api.CordVtnNode; |
23 | -import org.onosproject.cordvtn.CordVtnNodeManager; | 23 | +import org.onosproject.cordvtn.impl.CordVtnNodeManager; |
24 | 24 | ||
25 | /** | 25 | /** |
26 | * Checks detailed node init state. | 26 | * Checks detailed node init state. | ... | ... |
... | @@ -19,8 +19,8 @@ package org.onosproject.cordvtn.cli; | ... | @@ -19,8 +19,8 @@ package org.onosproject.cordvtn.cli; |
19 | import org.apache.karaf.shell.commands.Argument; | 19 | import org.apache.karaf.shell.commands.Argument; |
20 | import org.apache.karaf.shell.commands.Command; | 20 | import org.apache.karaf.shell.commands.Command; |
21 | import org.onosproject.cli.AbstractShellCommand; | 21 | import org.onosproject.cli.AbstractShellCommand; |
22 | -import org.onosproject.cordvtn.CordVtnNodeManager; | 22 | +import org.onosproject.cordvtn.impl.CordVtnNodeManager; |
23 | -import org.onosproject.cordvtn.CordVtnNode; | 23 | +import org.onosproject.cordvtn.api.CordVtnNode; |
24 | 24 | ||
25 | import java.util.NoSuchElementException; | 25 | import java.util.NoSuchElementException; |
26 | 26 | ... | ... |
... | @@ -19,8 +19,8 @@ package org.onosproject.cordvtn.cli; | ... | @@ -19,8 +19,8 @@ package org.onosproject.cordvtn.cli; |
19 | import org.apache.karaf.shell.commands.Argument; | 19 | import org.apache.karaf.shell.commands.Argument; |
20 | import org.apache.karaf.shell.commands.Command; | 20 | import org.apache.karaf.shell.commands.Command; |
21 | import org.onosproject.cli.AbstractShellCommand; | 21 | import org.onosproject.cli.AbstractShellCommand; |
22 | -import org.onosproject.cordvtn.CordVtnNodeManager; | 22 | +import org.onosproject.cordvtn.impl.CordVtnNodeManager; |
23 | -import org.onosproject.cordvtn.CordVtnNode; | 23 | +import org.onosproject.cordvtn.api.CordVtnNode; |
24 | 24 | ||
25 | import java.util.NoSuchElementException; | 25 | import java.util.NoSuchElementException; |
26 | 26 | ... | ... |
... | @@ -21,8 +21,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; | ... | @@ -21,8 +21,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; |
21 | import com.fasterxml.jackson.databind.node.ArrayNode; | 21 | import com.fasterxml.jackson.databind.node.ArrayNode; |
22 | import org.apache.karaf.shell.commands.Command; | 22 | import org.apache.karaf.shell.commands.Command; |
23 | import org.onosproject.cli.AbstractShellCommand; | 23 | import org.onosproject.cli.AbstractShellCommand; |
24 | -import org.onosproject.cordvtn.CordVtnNodeManager; | 24 | +import org.onosproject.cordvtn.impl.CordVtnNodeManager; |
25 | -import org.onosproject.cordvtn.CordVtnNode; | 25 | +import org.onosproject.cordvtn.api.CordVtnNode; |
26 | 26 | ||
27 | import java.util.Collections; | 27 | import java.util.Collections; |
28 | import java.util.List; | 28 | import java.util.List; | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.cordvtn; | 16 | +package org.onosproject.cordvtn.impl; |
17 | 17 | ||
18 | import com.google.common.collect.Lists; | 18 | import com.google.common.collect.Lists; |
19 | import com.google.common.collect.Maps; | 19 | import com.google.common.collect.Maps; |
... | @@ -29,6 +29,11 @@ import org.onlab.packet.Ip4Address; | ... | @@ -29,6 +29,11 @@ import org.onlab.packet.Ip4Address; |
29 | import org.onlab.packet.IpAddress; | 29 | import org.onlab.packet.IpAddress; |
30 | import org.onlab.packet.MacAddress; | 30 | import org.onlab.packet.MacAddress; |
31 | import org.onlab.packet.VlanId; | 31 | import org.onlab.packet.VlanId; |
32 | +import org.onosproject.cordvtn.api.CordService; | ||
33 | +import org.onosproject.cordvtn.api.CordServiceId; | ||
34 | +import org.onosproject.cordvtn.api.CordVtnConfig; | ||
35 | +import org.onosproject.cordvtn.api.CordVtnNode; | ||
36 | +import org.onosproject.cordvtn.api.CordVtnService; | ||
32 | import org.onosproject.core.ApplicationId; | 37 | import org.onosproject.core.ApplicationId; |
33 | import org.onosproject.core.CoreService; | 38 | import org.onosproject.core.CoreService; |
34 | import org.onosproject.dhcp.DhcpService; | 39 | import org.onosproject.dhcp.DhcpService; | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.cordvtn; | 16 | +package org.onosproject.cordvtn.impl; |
17 | 17 | ||
18 | import com.google.common.collect.Maps; | 18 | import com.google.common.collect.Maps; |
19 | import org.onlab.packet.ARP; | 19 | import org.onlab.packet.ARP; | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.cordvtn; | 16 | +package org.onosproject.cordvtn.impl; |
17 | 17 | ||
18 | import com.google.common.collect.Sets; | 18 | import com.google.common.collect.Sets; |
19 | import com.jcraft.jsch.Session; | 19 | import com.jcraft.jsch.Session; |
... | @@ -29,6 +29,13 @@ import org.onlab.util.KryoNamespace; | ... | @@ -29,6 +29,13 @@ import org.onlab.util.KryoNamespace; |
29 | import org.onosproject.cluster.ClusterService; | 29 | import org.onosproject.cluster.ClusterService; |
30 | import org.onosproject.cluster.LeadershipService; | 30 | import org.onosproject.cluster.LeadershipService; |
31 | import org.onosproject.cluster.NodeId; | 31 | import org.onosproject.cluster.NodeId; |
32 | +import org.onosproject.cordvtn.api.ConnectionHandler; | ||
33 | +import org.onosproject.cordvtn.api.CordVtnConfig; | ||
34 | +import org.onosproject.cordvtn.api.CordVtnNode; | ||
35 | +import org.onosproject.cordvtn.api.CordVtnNodeState; | ||
36 | +import org.onosproject.cordvtn.api.CordVtnService; | ||
37 | +import org.onosproject.cordvtn.api.NetworkAddress; | ||
38 | +import org.onosproject.cordvtn.api.SshAccessInfo; | ||
32 | import org.onosproject.core.ApplicationId; | 39 | import org.onosproject.core.ApplicationId; |
33 | import org.onosproject.core.CoreService; | 40 | import org.onosproject.core.CoreService; |
34 | import org.onosproject.net.ConnectPoint; | 41 | import org.onosproject.net.ConnectPoint; | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.cordvtn; | 16 | +package org.onosproject.cordvtn.impl; |
17 | 17 | ||
18 | import com.google.common.collect.Lists; | 18 | import com.google.common.collect.Lists; |
19 | import com.google.common.collect.Maps; | 19 | import com.google.common.collect.Maps; |
... | @@ -28,6 +28,10 @@ import org.onlab.packet.MacAddress; | ... | @@ -28,6 +28,10 @@ import org.onlab.packet.MacAddress; |
28 | import org.onlab.packet.TpPort; | 28 | import org.onlab.packet.TpPort; |
29 | import org.onlab.packet.VlanId; | 29 | import org.onlab.packet.VlanId; |
30 | import org.onlab.util.ItemNotFoundException; | 30 | import org.onlab.util.ItemNotFoundException; |
31 | +import org.onosproject.cordvtn.api.CordService; | ||
32 | +import org.onosproject.cordvtn.api.CordServiceId; | ||
33 | +import org.onosproject.cordvtn.api.CordVtnConfig; | ||
34 | +import org.onosproject.cordvtn.api.CordVtnNode; | ||
31 | import org.onosproject.core.ApplicationId; | 35 | import org.onosproject.core.ApplicationId; |
32 | import org.onosproject.core.DefaultGroupId; | 36 | import org.onosproject.core.DefaultGroupId; |
33 | import org.onosproject.core.GroupId; | 37 | import org.onosproject.core.GroupId; | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.cordvtn; | 16 | +package org.onosproject.cordvtn.impl; |
17 | 17 | ||
18 | import com.google.common.collect.Sets; | 18 | import com.google.common.collect.Sets; |
19 | import com.google.common.io.CharStreams; | 19 | import com.google.common.io.CharStreams; |
... | @@ -23,6 +23,8 @@ import com.jcraft.jsch.JSch; | ... | @@ -23,6 +23,8 @@ import com.jcraft.jsch.JSch; |
23 | import com.jcraft.jsch.JSchException; | 23 | import com.jcraft.jsch.JSchException; |
24 | import com.jcraft.jsch.Session; | 24 | import com.jcraft.jsch.Session; |
25 | import org.onlab.packet.IpAddress; | 25 | import org.onlab.packet.IpAddress; |
26 | +import org.onosproject.cordvtn.api.NetworkAddress; | ||
27 | +import org.onosproject.cordvtn.api.SshAccessInfo; | ||
26 | import org.slf4j.Logger; | 28 | import org.slf4j.Logger; |
27 | 29 | ||
28 | import java.io.IOException; | 30 | import java.io.IOException; | ... | ... |
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 | + * Implementation for CORD VTN application. | ||
19 | + */ | ||
20 | +package org.onosproject.cordvtn.impl; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -20,7 +20,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; | ... | @@ -20,7 +20,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; |
20 | import com.google.common.collect.Maps; | 20 | import com.google.common.collect.Maps; |
21 | import org.onlab.packet.IpAddress; | 21 | import org.onlab.packet.IpAddress; |
22 | import org.onlab.packet.MacAddress; | 22 | import org.onlab.packet.MacAddress; |
23 | -import org.onosproject.cordvtn.CordVtnService; | 23 | +import org.onosproject.cordvtn.api.CordVtnService; |
24 | import org.onosproject.net.HostId; | 24 | import org.onosproject.net.HostId; |
25 | import org.onosproject.rest.AbstractWebResource; | 25 | import org.onosproject.rest.AbstractWebResource; |
26 | import org.slf4j.Logger; | 26 | import org.slf4j.Logger; | ... | ... |
... | @@ -15,8 +15,8 @@ | ... | @@ -15,8 +15,8 @@ |
15 | */ | 15 | */ |
16 | package org.onosproject.cordvtn.rest; | 16 | package org.onosproject.cordvtn.rest; |
17 | 17 | ||
18 | -import org.onosproject.cordvtn.CordVtnService; | 18 | +import org.onosproject.cordvtn.api.CordVtnService; |
19 | -import org.onosproject.cordvtn.CordServiceId; | 19 | +import org.onosproject.cordvtn.api.CordServiceId; |
20 | import org.onosproject.rest.AbstractWebResource; | 20 | import org.onosproject.rest.AbstractWebResource; |
21 | 21 | ||
22 | import javax.ws.rs.DELETE; | 22 | import javax.ws.rs.DELETE; | ... | ... |
-
Please register or login to post a comment