From 23c6b7f8999b5e396d4d5a47c4d4ff0fb764f85e Mon Sep 17 00:00:00 2001 From: nitishkrishna Date: Thu, 8 Sep 2016 17:43:26 -0700 Subject: [PATCH] Related-Bug: #1616579 - Added complete server JSON sample + schema Including TOR, Static Routes and multi-intf with bond intf Change-Id: I483440738448101bebce52354a9be81b7ea7bbdb --- src/client/new-server.json | 84 ++++++++++++++++++++++++++++--- src/client/server_json_schema.txt | 63 +++++++++++++++++++++++ 2 files changed, 141 insertions(+), 6 deletions(-) diff --git a/src/client/new-server.json b/src/client/new-server.json index 158826c8..0a23d4ca 100644 --- a/src/client/new-server.json +++ b/src/client/new-server.json @@ -21,17 +21,89 @@ } } }, - "network": { + "contrail": { + "control_data_interface": "eth1" + }, + "top_of_rack": { + "switches" : [ + { + "id": "1", + "ip_address": "10.87.141.84", + "tunnel_ip_address": "10.87.141.84", + "switch_name": "TOR1", + "type": "ovs", + "ovs_port": "6632", + "ovs_protocol": "tcp", + "http_server_port": "9912", + "vendor_name": "Juniper" + }, + { + "id": "2", + "ip_address": "10.87.141.83", + "tunnel_ip_address": "10.87.141.83", + "switch_name": "TOR2", + "type": "ovs", + "ovs_port": "6632", + "ovs_protocol": "tcp", + "http_server_port": "9913", + "vendor_name": "Juniper" + } + ] + }, + "network" : { "interfaces": [ { - "default_gateway": "10.84.51.254", - "ip_address": "10.84.51.12/24", - "mac_address": "00:25:90:a9:1b:6c", - "name": "eth1" + "name": "eth1", + "dhcp": true, + "mac_address": "aa:bb:cc:dd:ee:ff", + "ip_address": "172.16.70.40/24", + "default_gateway": "172.16.70.254" + }, + { + "name": "p20p1", + "mac_address": "aa:bb:cc:dd:ee:ab" + }, + { + "name": "p20p2", + "mac_address": "aa:bb:cc:dd:ee:cd" + }, + { + "name": "bond0", + "type": "bond", + "ip_address": "10.224.11.10/24", + "default_gateway": "10.224.12.1", + "bond_options": {"miimon": "100", "mode": "802.3ad","xmit_hash_policy": "layer3+4"}, + "member_interfaces": ["p20p1", "p20p2"] + }, + { + "default_gateway": "3.3.2.254", + "ip_address": "3.3.2.0/24", + "name": "eth2", + "mac_address": "aa:bb:cc:dd:ee:ef" + }, + { + "default_gateway": "3.3.3.254", + "ip_address": "3.3.3.0/24", + "name": "eth4", + "mac_address": "aa:bb:cc:dd:ee:12" } ], "management_interface": "eth1", - "provisioning": "kickstart" + "provisioning": "kickstart", + "routes": [ + { + "gateway": "3.3.2.254", + "interface": "enp129s0f0", + "netmask": "255.255.255.0", + "network": "3.3.4.0" + }, + { + "gateway": "3.3.3.254", + "interface": "enp129s0f1", + "netmask": "255.255.255.0", + "network": "3.3.5.0" + } + ] }, "password": "juniper", "roles": [ diff --git a/src/client/server_json_schema.txt b/src/client/server_json_schema.txt index 1c4c1502..a1df4cc3 100644 --- a/src/client/server_json_schema.txt +++ b/src/client/server_json_schema.txt @@ -103,6 +103,47 @@ } } }, + "top_of_rack": { + "type": "object", + "description": "Top of Rack configuration for server, listing the different switches connected to the server.", + "properties": { + "switches": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "ip_address": { + "type": "string" + }, + "tunnel_ip_address": { + "type": "string" + }, + "switch_name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "ovs_port": { + "type": "string" + }, + "ovs_protocol": { + "type": "string" + }, + "http_server_port": { + "type": "string" + }, + "vendor_name": { + "type": "string" + } + } + } + } + } + }, "network": { "type": "object", "title": "Network schema.", @@ -155,6 +196,28 @@ "title": "Provisioning schema.", "description": "Provisioning method", "default": "kickstart" + }, + "routes": { + "type": "array", + "title": "Static Route schema.", + "description": "List of static routes", + "items": { + "type": "object", + "properties": { + "gateway": { + "type": "string" + }, + "interface": { + "type": "string" + }, + "netmask": { + "type": "string" + }, + "network": { + "type": "string" + } + } + } } } },