Initial implementation of k8s networking REST API with unit tests
Change-Id: Ifb11204edb3c1e75b26810c0b104423941b0801d
diff --git a/apps/k8s-networking/app/src/main/resources/definitions/K8sNetwork.json b/apps/k8s-networking/app/src/main/resources/definitions/K8sNetwork.json
new file mode 100644
index 0000000..1a5a7f2
--- /dev/null
+++ b/apps/k8s-networking/app/src/main/resources/definitions/K8sNetwork.json
@@ -0,0 +1,50 @@
+{
+ "type": "object",
+ "description": "A network object.",
+ "required": [
+ "networkId",
+ "type",
+ "name",
+ "segmentId",
+ "gatewayIp",
+ "cidr",
+ "mtu"
+ ],
+ "properties": {
+ "networkId": {
+ "type": "string",
+ "example": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
+ "description": "The ID of the attached network."
+ },
+ "type": {
+ "type": "string",
+ "example": "MINION",
+ "description": "Type of kubernetes node."
+ },
+ "name": {
+ "type": "string",
+ "example": "my_network",
+ "description": "The name of network."
+ },
+ "segmentId": {
+ "type": "string",
+ "example": "1",
+ "description": "Segment ID of tenant network."
+ },
+ "gatewayIp": {
+ "type": "string",
+ "example": "10.10.10.1",
+ "description": "The IP address of the gateway."
+ },
+ "cidr": {
+ "type": "string",
+ "example": "32",
+ "description": "The CIDR of this network."
+ },
+ "mtu": {
+ "type": "integer",
+ "example": 1500,
+ "description": "The Maximum Transmission Unit of this network."
+ }
+ }
+}
\ No newline at end of file
diff --git a/apps/k8s-networking/app/src/main/resources/definitions/K8sPort.json b/apps/k8s-networking/app/src/main/resources/definitions/K8sPort.json
new file mode 100644
index 0000000..6c8a069
--- /dev/null
+++ b/apps/k8s-networking/app/src/main/resources/definitions/K8sPort.json
@@ -0,0 +1,32 @@
+{
+ "type": "object",
+ "description": "A port object.",
+ "required": [
+ "portId",
+ "networkId",
+ "macAddress",
+ "ipAddress"
+ ],
+ "properties": {
+ "portId": {
+ "type": "string",
+ "example": "65c0ee9f-d634-4522-8954-51021b570b0d",
+ "description": "The ID of the resource."
+ },
+ "networkId": {
+ "type": "string",
+ "example": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
+ "description": "The ID of the attached network."
+ },
+ "macAddress": {
+ "type": "string",
+ "example": "fa:16:3e:c9:cb:f0",
+ "description": "The MAC address of the port."
+ },
+ "ipAddress": {
+ "type": "string",
+ "example": "10.10.10.10",
+ "description": "The IP address of the port."
+ }
+ }
+}
\ No newline at end of file