Hyunsun Moon
Committed by Gerrit Code Review

Placed API and implementation into separate packages

Change-Id: If8a9223a7a225db1b2aa2d09738857af482736bc
Showing 23 changed files with 69 additions and 31 deletions
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.cordvtn;
package org.onosproject.cordvtn.api;
/**
* Entity capable of handling a subject connected and disconnected situation.
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.cordvtn;
package org.onosproject.cordvtn.api;
import com.google.common.base.MoreObjects;
import org.onlab.packet.IpAddress;
......@@ -30,7 +30,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
public final class CordService {
enum ServiceType {
public enum ServiceType {
PRIVATE,
PUBLIC,
MANAGEMENT
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.cordvtn;
package org.onosproject.cordvtn.api;
import org.onlab.util.Identifier;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.cordvtn;
package org.onosproject.cordvtn.api;
import com.fasterxml.jackson.databind.JsonNode;
import com.google.common.collect.Maps;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.cordvtn;
package org.onosproject.cordvtn.api;
import com.google.common.base.MoreObjects;
import org.onlab.packet.TpPort;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.cordvtn;
package org.onosproject.cordvtn.api;
/**
* Entity that defines possible init state of the cordvtn node.
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.cordvtn;
package org.onosproject.cordvtn.api;
import org.onlab.packet.IpAddress;
import org.onlab.packet.MacAddress;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.cordvtn;
package org.onosproject.cordvtn.api;
import com.google.common.base.MoreObjects;
import org.onlab.packet.IpAddress;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.cordvtn;
package org.onosproject.cordvtn.api;
import com.google.common.base.MoreObjects;
import org.onlab.packet.Ip4Address;
......
/*
* Copyright 2015-present Open Networking Laboratory
* Copyright 2016-present Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -15,6 +15,6 @@
*/
/**
* Application for provisioning virtual tenant networks.
* API for CORD VTN application.
*/
package org.onosproject.cordvtn;
\ No newline at end of file
package org.onosproject.cordvtn.api;
\ No newline at end of file
......
......@@ -18,7 +18,7 @@ package org.onosproject.cordvtn.cli;
import org.apache.karaf.shell.commands.Command;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.cordvtn.CordVtnNodeManager;
import org.onosproject.cordvtn.impl.CordVtnNodeManager;
/**
* Deletes nodes from the service.
......
......@@ -19,8 +19,8 @@ package org.onosproject.cordvtn.cli;
import org.apache.karaf.shell.commands.Argument;
import org.apache.karaf.shell.commands.Command;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.cordvtn.CordVtnNode;
import org.onosproject.cordvtn.CordVtnNodeManager;
import org.onosproject.cordvtn.api.CordVtnNode;
import org.onosproject.cordvtn.impl.CordVtnNodeManager;
/**
* Checks detailed node init state.
......
......@@ -19,8 +19,8 @@ package org.onosproject.cordvtn.cli;
import org.apache.karaf.shell.commands.Argument;
import org.apache.karaf.shell.commands.Command;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.cordvtn.CordVtnNodeManager;
import org.onosproject.cordvtn.CordVtnNode;
import org.onosproject.cordvtn.impl.CordVtnNodeManager;
import org.onosproject.cordvtn.api.CordVtnNode;
import java.util.NoSuchElementException;
......
......@@ -19,8 +19,8 @@ package org.onosproject.cordvtn.cli;
import org.apache.karaf.shell.commands.Argument;
import org.apache.karaf.shell.commands.Command;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.cordvtn.CordVtnNodeManager;
import org.onosproject.cordvtn.CordVtnNode;
import org.onosproject.cordvtn.impl.CordVtnNodeManager;
import org.onosproject.cordvtn.api.CordVtnNode;
import java.util.NoSuchElementException;
......
......@@ -21,8 +21,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
import org.apache.karaf.shell.commands.Command;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.cordvtn.CordVtnNodeManager;
import org.onosproject.cordvtn.CordVtnNode;
import org.onosproject.cordvtn.impl.CordVtnNodeManager;
import org.onosproject.cordvtn.api.CordVtnNode;
import java.util.Collections;
import java.util.List;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.cordvtn;
package org.onosproject.cordvtn.impl;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
......@@ -29,6 +29,11 @@ import org.onlab.packet.Ip4Address;
import org.onlab.packet.IpAddress;
import org.onlab.packet.MacAddress;
import org.onlab.packet.VlanId;
import org.onosproject.cordvtn.api.CordService;
import org.onosproject.cordvtn.api.CordServiceId;
import org.onosproject.cordvtn.api.CordVtnConfig;
import org.onosproject.cordvtn.api.CordVtnNode;
import org.onosproject.cordvtn.api.CordVtnService;
import org.onosproject.core.ApplicationId;
import org.onosproject.core.CoreService;
import org.onosproject.dhcp.DhcpService;
......@@ -719,7 +724,7 @@ public class CordVtn extends AbstractProvider implements CordVtnService, HostPro
.forEach(entry -> {
arpProxy.addGateway(entry.getKey(), entry.getValue());
log.info("Added public gateway IP {}, MAC {}",
entry.getKey().toString(), entry.getValue().toString());
entry.getKey().toString(), entry.getValue().toString());
});
// TODO notice gateway MAC change to VMs holds this gateway IP
}
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.cordvtn;
package org.onosproject.cordvtn.impl;
import com.google.common.collect.Maps;
import org.onlab.packet.ARP;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.cordvtn;
package org.onosproject.cordvtn.impl;
import com.google.common.collect.Sets;
import com.jcraft.jsch.Session;
......@@ -29,6 +29,13 @@ import org.onlab.util.KryoNamespace;
import org.onosproject.cluster.ClusterService;
import org.onosproject.cluster.LeadershipService;
import org.onosproject.cluster.NodeId;
import org.onosproject.cordvtn.api.ConnectionHandler;
import org.onosproject.cordvtn.api.CordVtnConfig;
import org.onosproject.cordvtn.api.CordVtnNode;
import org.onosproject.cordvtn.api.CordVtnNodeState;
import org.onosproject.cordvtn.api.CordVtnService;
import org.onosproject.cordvtn.api.NetworkAddress;
import org.onosproject.cordvtn.api.SshAccessInfo;
import org.onosproject.core.ApplicationId;
import org.onosproject.core.CoreService;
import org.onosproject.net.ConnectPoint;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.cordvtn;
package org.onosproject.cordvtn.impl;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
......@@ -28,6 +28,10 @@ import org.onlab.packet.MacAddress;
import org.onlab.packet.TpPort;
import org.onlab.packet.VlanId;
import org.onlab.util.ItemNotFoundException;
import org.onosproject.cordvtn.api.CordService;
import org.onosproject.cordvtn.api.CordServiceId;
import org.onosproject.cordvtn.api.CordVtnConfig;
import org.onosproject.cordvtn.api.CordVtnNode;
import org.onosproject.core.ApplicationId;
import org.onosproject.core.DefaultGroupId;
import org.onosproject.core.GroupId;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.cordvtn;
package org.onosproject.cordvtn.impl;
import com.google.common.collect.Sets;
import com.google.common.io.CharStreams;
......@@ -23,6 +23,8 @@ import com.jcraft.jsch.JSch;
import com.jcraft.jsch.JSchException;
import com.jcraft.jsch.Session;
import org.onlab.packet.IpAddress;
import org.onosproject.cordvtn.api.NetworkAddress;
import org.onosproject.cordvtn.api.SshAccessInfo;
import org.slf4j.Logger;
import java.io.IOException;
......
/*
* Copyright 2016-present Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Implementation for CORD VTN application.
*/
package org.onosproject.cordvtn.impl;
\ No newline at end of file
......@@ -20,7 +20,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.Maps;
import org.onlab.packet.IpAddress;
import org.onlab.packet.MacAddress;
import org.onosproject.cordvtn.CordVtnService;
import org.onosproject.cordvtn.api.CordVtnService;
import org.onosproject.net.HostId;
import org.onosproject.rest.AbstractWebResource;
import org.slf4j.Logger;
......
......@@ -15,8 +15,8 @@
*/
package org.onosproject.cordvtn.rest;
import org.onosproject.cordvtn.CordVtnService;
import org.onosproject.cordvtn.CordServiceId;
import org.onosproject.cordvtn.api.CordVtnService;
import org.onosproject.cordvtn.api.CordServiceId;
import org.onosproject.rest.AbstractWebResource;
import javax.ws.rs.DELETE;
......