Add keystone and neutron config classes and codec with unit tests
Change-Id: Ia89f5be9bac88927a383d56d56413ba23e3e5eb3
(cherry picked from commit c704b67f879912943d214cff2cdb105338455e93)
diff --git a/apps/openstacknode/network-cfg.json b/apps/openstacknode/network-cfg.json
index de02972..19e3b22 100644
--- a/apps/openstacknode/network-cfg.json
+++ b/apps/openstacknode/network-cfg.json
@@ -1,126 +1,112 @@
{
- "apps" : {
- "org.onosproject.openstacknode" : {
- "openstacknode" : {
- "nodes" : [
+ "nodes": [
+ {
+ "hostname": "compute-01",
+ "type": "COMPUTE",
+ "managementIp": "172.16.130.4",
+ "dataIp": "172.16.130.4",
+ "vlanPort": "eth2",
+ "integrationBridge": "of:00000000000000a1",
+ "phyIntfs": [
+ {
+ "network": "mgmtnetwork",
+ "intf": "eth3"
+ },
+ {
+ "network": "oamnetwork",
+ "intf": "eth4"
+ },
+ {
+ "network": "datanetwork",
+ "intf": "dpdk0"
+ }
+ ],
+ "sshAuth": {
+ "id": "id",
+ "password": "password"
+ },
+ "dpdkConfig": {
+ "datapathType": "netdev",
+ "socketDir": "/var/lib/libvirt/qemu",
+ "dpdkIntfs": [
{
- "hostname" : "compute-01",
- "type" : "COMPUTE",
- "managementIp" : "172.16.130.4",
- "dataIp" : "172.16.130.4",
- "vlanPort" : "eth2",
- "integrationBridge" : "of:00000000000000a1",
- "phyIntfs": [
- {
- "network": "mgmtnetwork",
- "intf": "eth3"
- },
- {
- "network": "oamnetwork",
- "intf": "eth4"
- },
- {
- "network": "datanetwork",
- "intf": "dpdk0"
- }
- ],
- "sshAuth" : {
- "id": "id",
- "password" : "password"
- },
- "dpdkConfig" : {
- "datapathType" : "netdev",
- "socketDir" : "/var/lib/libvirt/qemu",
- "dpdkIntfs" : [
- {
- "intf" : "dpdk0",
- "mtu" : 1500,
- "deviceName" : "br-int",
- "pciAddress" : "0000:85:00.0",
- "type" : "dpdk"
- },
- {
- "intf" : "dpdk1",
- "mtu" : 1500,
- "deviceName" : "br-tun",
- "pciAddress" : "0000:85:00.1",
- "type" : "dpdk"
- }
- ]
- },
- "controllers": [
- {
- "ip": "10.10.10.2",
- "port": 6653
- },
- {
- "ip": "10.10.10.3",
- "port": 6653
- },
- {
- "ip": "10.10.10.4",
- "port": 6653
- }
- ]
+ "intf": "dpdk0",
+ "mtu": 1500,
+ "deviceName": "br-int",
+ "pciAddress": "0000:85:00.0",
+ "type": "dpdk"
},
{
- "hostname" : "compute-02",
- "type" : "COMPUTE",
- "managementIp" : "172.16.130.6",
- "dataIp" : "172.16.130.6",
- "vlanPort" : "eth2",
- "integrationBridge" : "of:00000000000000a2",
- "phyIntfs": [
- {
- "network": "mgmtnetwork",
- "intf": "eth3"
- },
- {
- "network": "oamnetwork",
- "intf": "eth4"
- }
- ]
- },
- {
- "hostname" : "controller",
- "type" : "CONTROLLER",
- "managementIp" : "172.16.130.10",
- "endpoint" : "keystone-endpoint-url",
- "authentication" : {
- "version" : "v2.0",
- "port" : 35357,
- "protocol" : "HTTP",
- "project" : "admin",
- "username" : "admin",
- "password" : "nova",
- "perspective" : "PUBLIC"
- }
- },
- {
- "hostname" : "gateway-01",
- "type" : "GATEWAY",
- "managementIp" : "172.16.130.8",
- "dataIp" : "172.16.130.7",
- "vlanPort" : "eth2",
- "integrationBridge" : "of:00000000000000a3",
- "uplinkPort" : "ens6"
-
+ "intf": "dpdk1",
+ "mtu": 1500,
+ "deviceName": "br-tun",
+ "pciAddress": "0000:85:00.1",
+ "type": "dpdk"
}
]
- }
- }
- },
- "devices" : {
- "of:00000000000000a1" : {
- "basic" : {
- "driver" : "sona"
+ },
+ "controllers": [
+ {
+ "ip": "10.10.10.2",
+ "port": 6653
+ },
+ {
+ "ip": "10.10.10.3",
+ "port": 6653
+ },
+ {
+ "ip": "10.10.10.4",
+ "port": 6653
+ }
+ ]
+ },
+ {
+ "hostname": "compute-02",
+ "type": "COMPUTE",
+ "managementIp": "172.16.130.6",
+ "dataIp": "172.16.130.6",
+ "vlanPort": "eth2",
+ "integrationBridge": "of:00000000000000a2",
+ "phyIntfs": [
+ {
+ "network": "mgmtnetwork",
+ "intf": "eth3"
+ },
+ {
+ "network": "oamnetwork",
+ "intf": "eth4"
+ }
+ ]
+ },
+ {
+ "hostname": "controller",
+ "type": "CONTROLLER",
+ "managementIp": "172.16.130.10",
+ "keystoneConfig": {
+ "endpoint": "172.16.130.10:35357/v2.0",
+ "authentication": {
+ "version": "v2.0",
+ "protocol": "HTTP",
+ "project": "admin",
+ "username": "admin",
+ "password": "nova",
+ "perspective": "PUBLIC"
+ }
+ },
+ "neutronConfig": {
+ "useMetadataProxy": true,
+ "metadataProxySecret": "onos"
}
},
- "of:00000000000000a2" : {
- "basic" : {
- "driver" : "sona"
- }
+ {
+ "hostname": "gateway-01",
+ "type": "GATEWAY",
+ "managementIp": "172.16.130.8",
+ "dataIp": "172.16.130.7",
+ "vlanPort": "eth2",
+ "integrationBridge": "of:00000000000000a3",
+ "uplinkPort": "ens6"
}
- }
+ ]
}