[ONOS-7902] Add a set of interfaces, enums for kubernetes node

Change-Id: I76e380973386cebc785b00b42f05b22ffe674606
diff --git a/apps/k8s-node/BUILD b/apps/k8s-node/BUILD
new file mode 100644
index 0000000..83aaf44
--- /dev/null
+++ b/apps/k8s-node/BUILD
@@ -0,0 +1,12 @@
+BUNDLES = [
+    "//apps/k8s-node/api:onos-apps-k8s-node-api",
+    "//apps/k8s-node/app:onos-apps-k8s-node-app",
+]
+
+onos_app(
+    category = "Integration",
+    description = "SONA Kubernetes Node Application.",
+    included_bundles = BUNDLES,
+    title = "Kubernetes Node Application",
+    url = "https://wiki.onosproject.org/display/ONOS/SONA%3A+DC+Network+Virtualization",
+)
diff --git a/apps/k8s-node/api/BUILD b/apps/k8s-node/api/BUILD
new file mode 100644
index 0000000..36d2da1
--- /dev/null
+++ b/apps/k8s-node/api/BUILD
@@ -0,0 +1,11 @@
+COMPILE_DEPS = CORE_DEPS
+
+TEST_DEPS = TEST_ADAPTERS + [
+    "//core/api:onos-api-tests",
+    "//core/common:onos-core-common-tests",
+]
+
+osgi_jar_with_tests(
+    test_deps = TEST_DEPS,
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNode.java b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNode.java
new file mode 100644
index 0000000..8f307b5
--- /dev/null
+++ b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNode.java
@@ -0,0 +1,172 @@
+/*
+ * Copyright 2019-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.k8snode.api;
+
+import org.onlab.packet.IpAddress;
+import org.onosproject.net.DeviceId;
+import org.onosproject.net.PortNumber;
+
+/**
+ * Representation of a node used in k8s-networking service.
+ */
+public interface K8sNode {
+
+    /**
+     * Lists of kubernetes node types.
+     */
+    enum Type {
+        /**
+         * Signifies that this is a kubernetes master node.
+         */
+        MASTER,
+
+        /**
+         * Signifies that this is a kubernetes minion node.
+         */
+        MINION
+    }
+
+    /**
+     * Returns hostname of the node.
+     *
+     * @return hostname
+     */
+    String hostname();
+
+    /**
+     * Returns the type of the node.
+     *
+     * @return node type
+     */
+    Type type();
+
+    /**
+     * Returns the OVSDB device ID of the node.
+     *
+     * @return ovsdb device id
+     */
+    DeviceId ovsdb();
+
+    /**
+     * Returns the device ID of the integration bridge at the node.
+     *
+     * @return device id
+     */
+    DeviceId intgBridge();
+
+    /**
+     * Returns the management network IP address of the node.
+     *
+     * @return ip address
+     */
+    IpAddress managementIp();
+
+    /**
+     * Returns the data network IP address used for tunneling.
+     *
+     * @return ip address; null if vxlan mode is not enabled
+     */
+    IpAddress dataIp();
+
+    /**
+     * Returns the initialization state of the node.
+     *
+     * @return node state
+     */
+    K8sNodeState state();
+
+    /**
+     * Returns the GRE tunnel port number.
+     *
+     * @return GRE port number; null if the GRE tunnel port does not exist
+     */
+    PortNumber grePortNum();
+
+    /**
+     * Returns the VXLAN tunnel port number.
+     *
+     * @return VXLAN port number; null if tunnel port does not exist
+     */
+    PortNumber vxlanPortNum();
+
+    /**
+     * Returns the GENEVE tunnel port number.
+     *
+     * @return GENEVE port number; null if the GRE tunnel port does not exist
+     */
+    PortNumber genevePortNum();
+
+    /**
+     * Builder of new node entity.
+     */
+    interface Builder {
+
+        /**
+         * Builds an immutable kubernetes node instance.
+         *
+         * @return kubernetes node instance
+         */
+        K8sNode build();
+
+        /**
+         * Returns kubernetes node builder with supplied hostname.
+         *
+         * @param hostname hostname of the node
+         * @return kubernetes node builder
+         */
+        Builder hostname(String hostname);
+
+        /**
+         * Returns kubernetes node builder with supplied type.
+         *
+         * @param type kubernetes node type
+         * @return kubernetes node builder
+         */
+        Builder type(Type type);
+
+        /**
+         * Returns kubernetes node builder with supplied bridge name.
+         *
+         * @param deviceId integration bridge device ID
+         * @return kubernetes node builder
+         */
+        Builder intgBridge(DeviceId deviceId);
+
+        /**
+         * Returns kubernetes node builder with supplied management IP address.
+         *
+         * @param managementIp management IP address
+         * @return kubernetes node builder
+         */
+        Builder managementIp(IpAddress managementIp);
+
+        /**
+         * Returns kubernetes node builder with supplied data IP address.
+         *
+         * @param dataIp data IP address
+         * @return kubernetes node builder
+         */
+        Builder dataIp(IpAddress dataIp);
+
+        /**
+         * Returns kubernetes node builder with supplied node state.
+         *
+         * @param state kubernetes node state
+         * @return kubernetes node builder
+         */
+        Builder state(K8sNodeState state);
+    }
+}
diff --git a/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeAdminService.java b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeAdminService.java
new file mode 100644
index 0000000..ad85b9f
--- /dev/null
+++ b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeAdminService.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2019-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.k8snode.api;
+
+/**
+ * Service for administering inventory of Kubernetes nodes.
+ */
+public interface K8sNodeAdminService extends K8sNodeService {
+
+    /**
+     * Creates a new node.
+     *
+     * @param node kubernetes node
+     */
+    void createNode(K8sNode node);
+
+    /**
+     * Updates the node.
+     *
+     * @param node kubernetes node
+     */
+    void updateNode(K8sNode node);
+
+    /**
+     * Removes the node.
+     *
+     * @param hostname kubernetes node hostname
+     * @return removed node; null if the node does not exist
+     */
+    K8sNode removeNode(String hostname);
+}
diff --git a/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeEvent.java b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeEvent.java
new file mode 100644
index 0000000..841fe01
--- /dev/null
+++ b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeEvent.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2019-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.k8snode.api;
+
+import org.onosproject.event.AbstractEvent;
+
+/**
+ * Describes Kubernetes node init state event.
+ */
+public class K8sNodeEvent extends AbstractEvent<K8sNodeEvent.Type, K8sNode> {
+
+    /**
+     * Lists of kubernetes node event types.
+     */
+    public enum Type {
+
+        /**
+         * Signifies that new node is created.
+         */
+        K8S_NODE_CREATED,
+
+        /**
+         * Signifies that the node is updated.
+         */
+        K8S_NODE_UPDATED,
+
+        /**
+         * Signifies that the node state is completed.
+         */
+        K8S_NODE_COMPLETE,
+
+        /**
+         * Signifies that the node is removed.
+         */
+        K8S_NODE_REMOVED,
+
+        /**
+         * Signifies that the node state is incomplete.
+         */
+        K8S_NODE_INCOMPLETE
+    }
+
+    /**
+     * Creates an event with the given type and node.
+     *
+     * @param type event type
+     * @param subject kubernetes node
+     */
+    protected K8sNodeEvent(Type type, K8sNode subject) {
+        super(type, subject);
+    }
+}
diff --git a/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeHandler.java b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeHandler.java
new file mode 100644
index 0000000..3f63ad3
--- /dev/null
+++ b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeHandler.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2019-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.k8snode.api;
+
+/**
+ * Service handling kubernetes node stats.
+ */
+public interface K8sNodeHandler {
+
+    /**
+     * Processes the given node for init state.
+     * It creates required bridges on OVS by referring to node type.
+     *
+     * @param k8sNode kubernetes node
+     */
+    void processInitState(K8sNode k8sNode);
+
+    /**
+     * Processes the given node for device created state.
+     * It creates required ports on the bridges based on the node type
+     *
+     * @param k8sNode kubernetes node
+     */
+    void processDeviceCreatedState(K8sNode k8sNode);
+
+    /**
+     * Processes the given node for complete state.
+     * It performs post-init jobs for the complete node.
+     *
+     * @param k8sNode kubernetes node
+     */
+    void processCompleteState(K8sNode k8sNode);
+
+    /**
+     * Processes the given node for incomplete state.
+     *
+     * @param k8sNode kubernete node
+     */
+    void processIncompleteState(K8sNode k8sNode);
+}
diff --git a/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeListener.java b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeListener.java
new file mode 100644
index 0000000..268063c
--- /dev/null
+++ b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeListener.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2019-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.k8snode.api;
+
+import org.onosproject.event.EventListener;
+
+/**
+ * Listener for Kubernetes Node event.
+ */
+public interface K8sNodeListener extends EventListener<K8sNodeEvent> {
+}
diff --git a/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeService.java b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeService.java
new file mode 100644
index 0000000..455e42c
--- /dev/null
+++ b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeService.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2019-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.k8snode.api;
+
+import org.onosproject.event.ListenerService;
+import org.onosproject.k8snode.api.K8sNode.Type;
+import org.onosproject.net.DeviceId;
+
+import java.util.Set;
+
+/**
+ * Service for interfacing with the inventory of Kubernetes Node.
+ */
+public interface K8sNodeService extends ListenerService<K8sNodeEvent, K8sNodeListener> {
+
+    String APP_ID = "org.onosproject.k8snode";
+
+    /**
+     * Returns all registered nodes.
+     *
+     * @return set of kubernetes nodes
+     */
+    Set<K8sNode> nodes();
+
+    /**
+     * Returns all nodes with the specified type.
+     *
+     * @param type node type
+     * @return set of kubernetes nodes
+     */
+    Set<K8sNode> nodes(Type type);
+
+    /**
+     * Returns all nodes with complete states.
+     *
+     * @return set of kubernetes nodes
+     */
+    Set<K8sNode> completeNodes();
+
+    /**
+     * Returns all nodes with complete state and the specified type.
+     *
+     * @param type node type
+     * @return set of kubernetes nodes
+     */
+    Set<K8sNode> completeNodes(Type type);
+
+    /**
+     * Returns the node with the specified hostname.
+     *
+     * @param hostname hostname
+     * @return kubernetes node
+     */
+    K8sNode node(String hostname);
+
+    /**
+     * Returns the node with the specified device ID.
+     * The device ID can be any one of integration bridge, router bridge,
+     * or ovsdb device.
+     *
+     * @param deviceId device ID
+     * @return kubernetes node
+     */
+    K8sNode node(DeviceId deviceId);
+}
diff --git a/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeState.java b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeState.java
new file mode 100644
index 0000000..88c66c5
--- /dev/null
+++ b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeState.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2019-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.k8snode.api;
+
+/**
+ * Defines the initialization stats of Kubernetes node.
+ */
+public enum K8sNodeState {
+
+    /**
+     * Indicates the node is newly added.
+     */
+    INIT {
+        @Override
+        public void process(K8sNodeHandler handler, K8sNode node) {
+            handler.processInitState(node);
+        }
+
+        @Override
+        public K8sNodeState nextState() {
+            return DEVICE_CREATED;
+        }
+    },
+    /**
+     * Indicates bridge devices are added according to the node state.
+     */
+    DEVICE_CREATED {
+        @Override
+        public void process(K8sNodeHandler handler, K8sNode node) {
+            handler.processDeviceCreatedState(node);
+        }
+
+        @Override
+        public K8sNodeState nextState() {
+            return COMPLETE;
+        }
+    },
+    /**
+     * Indicates node initialization is done.
+     */
+    COMPLETE {
+        @Override
+        public void process(K8sNodeHandler handler, K8sNode node) {
+            handler.processCompleteState(node);
+        }
+
+        @Override
+        public K8sNodeState nextState() {
+            return COMPLETE;
+        }
+    },
+    /**
+     * Indicates node is broken.
+     */
+    INCOMPLETE {
+        @Override
+        public void process(K8sNodeHandler handler, K8sNode node) {
+            handler.processIncompleteState(node);
+        }
+
+        @Override
+        public K8sNodeState nextState() {
+            return INIT;
+        }
+    };
+
+    /**
+     * Processes the given node which is under a certain state.
+     *
+     * @param handler kubernetes node handler
+     * @param node kubernetes node
+     */
+    public abstract void process(K8sNodeHandler handler, K8sNode node);
+
+    /**
+     * Transits to the next state.
+     *
+     * @return the next kubernetes node state
+     */
+    public abstract K8sNodeState nextState();
+}
diff --git a/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeStore.java b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeStore.java
new file mode 100644
index 0000000..5bd6548
--- /dev/null
+++ b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeStore.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2019-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.k8snode.api;
+
+import org.onosproject.store.Store;
+
+import java.util.Set;
+
+/**
+ * Manages inventory of Kubernetes Node; not intended for direct use.
+ */
+public interface K8sNodeStore extends Store<K8sNodeEvent, K8sNodeStoreDelegate> {
+
+    /**
+     * Creates a new node.
+     *
+     * @param node kubernetes node
+     */
+    void createNode(K8sNode node);
+
+    /**
+     * Updates the node.
+     *
+     * @param node kubernetes node
+     */
+    void updateNode(K8sNode node);
+
+    /**
+     * Removes the node with the given hostname.
+     *
+     * @param hostname kubernetes node hostname
+     * @return removed kubernetes node; null if no node is associated with the hostname
+     */
+    K8sNode removeNode(String hostname);
+
+    /**
+     * Returns all registered nodes.
+     *
+     * @return set of kubernetes nodes
+     */
+    Set<K8sNode> nodes();
+
+    /**
+     * Returns the node with the specified hostname.
+     *
+     * @param hostname hostname
+     * @return kubernetes node
+     */
+    K8sNode node(String hostname);
+}
diff --git a/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeStoreDelegate.java b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeStoreDelegate.java
new file mode 100644
index 0000000..625a8c7
--- /dev/null
+++ b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sNodeStoreDelegate.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2019-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.k8snode.api;
+
+import org.onosproject.store.StoreDelegate;
+
+/**
+ * Kubernetes Node store delegate.
+ */
+public interface K8sNodeStoreDelegate extends StoreDelegate<K8sNodeEvent> {
+}
diff --git a/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/package-info.java b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/package-info.java
new file mode 100644
index 0000000..7cf14bb
--- /dev/null
+++ b/apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2019-present Open Networking Foundation
+ *
+ * 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.
+ */
+
+/**
+ * Application for bootstrapping Master/Minion Nodes in kubernetes.
+ */
+package org.onosproject.k8snode.api;
\ No newline at end of file
diff --git a/apps/k8s-node/app/BUILD b/apps/k8s-node/app/BUILD
new file mode 100644
index 0000000..90dc6e9
--- /dev/null
+++ b/apps/k8s-node/app/BUILD
@@ -0,0 +1,15 @@
+COMPILE_DEPS = CORE_DEPS + JACKSON + KRYO + CLI + REST + [
+    "//core/store/serializers:onos-core-serializers",
+    "//apps/k8s-node/api:onos-apps-k8s-node-api",
+]
+
+TEST_DEPS = TEST_ADAPTERS + [
+    "//core/api:onos-api-tests",
+    "//core/common:onos-core-common-tests",
+]
+
+osgi_jar_with_tests(
+    karaf_command_packages = ["org.onosproject.k8snode.cli"],
+    test_deps = TEST_DEPS,
+    deps = COMPILE_DEPS,
+)
diff --git a/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/cli/package-info.java b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/cli/package-info.java
new file mode 100644
index 0000000..de498e0
--- /dev/null
+++ b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/cli/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2019-present Open Networking Foundation
+ *
+ * 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.
+ */
+
+/**
+ * Console commands to manage k8s nodes.
+ */
+package org.onosproject.k8snode.cli;
\ No newline at end of file
diff --git a/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/codec/package-info.java b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/codec/package-info.java
new file mode 100644
index 0000000..001b14b
--- /dev/null
+++ b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/codec/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2019-present Open Networking Foundation
+ *
+ * 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 of the codec broker and k8snode entity JOSN codecs.
+ */
+package org.onosproject.k8snode.codec;
\ No newline at end of file
diff --git a/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/impl/package-info.java b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/impl/package-info.java
new file mode 100644
index 0000000..84b6940
--- /dev/null
+++ b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/impl/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2019-present Open Networking Foundation
+ *
+ * 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.
+ */
+
+/**
+ * Application for bootstrapping Master/Minion Nodes in kubernetes.
+ */
+package org.onosproject.k8snode.impl;
\ No newline at end of file
diff --git a/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/util/package-info.java b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/util/package-info.java
new file mode 100644
index 0000000..804527c
--- /dev/null
+++ b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/util/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2019-present Open Networking Foundation
+ *
+ * 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.
+ */
+
+/**
+ * K8s node utility package.
+ */
+package org.onosproject.k8snode.util;
\ No newline at end of file
diff --git a/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/web/package-info.java b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/web/package-info.java
new file mode 100644
index 0000000..eee6d25
--- /dev/null
+++ b/apps/k8s-node/app/src/main/java/org/onosproject/k8snode/web/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2019-present Open Networking Foundation
+ *
+ * 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.
+ */
+
+/**
+ * Application for bootstrapping Master/Minion Nodes in kubernetes.
+ */
+package org.onosproject.k8snode.web;
\ No newline at end of file