add Keystone region configuration
Change-Id: If672a613f0b6d4ef2bbbf123b2fe716d95c86e2b
diff --git a/README.rst b/README.rst
index fd307a9..4a9bcbd 100644
--- a/README.rst
+++ b/README.rst
@@ -146,6 +146,22 @@
password: pwd
virtual_host: '/openstack'
+Neutron Keystone region
+
+.. code-block:: yaml
+
+ neutron:
+ server:
+ enabled: true
+ version: kilo
+ ...
+ identity:
+ region: RegionTwo
+ ...
+ compute:
+ region: RegionTwo
+ ...
+
Usage
=====
diff --git a/metadata/service/control/cluster.yml b/metadata/service/control/cluster.yml
index ee83890..93ebddc 100644
--- a/metadata/service/control/cluster.yml
+++ b/metadata/service/control/cluster.yml
@@ -22,6 +22,7 @@
password: ${_param:mysql_neutron_password}
identity:
engine: keystone
+ region: RegionOne
host: ${_param:cluster_vip_address}
port: 35357
user: neutron
@@ -37,6 +38,7 @@
ha_queues: true
compute:
host: ${_param:cluster_vip_address}
+ region: RegionOne
user: nova
password: ${_param:keystone_nova_password}
tenant: service
diff --git a/metadata/service/control/single.yml b/metadata/service/control/single.yml
index 9fde5a7..ea2c0f7 100644
--- a/metadata/service/control/single.yml
+++ b/metadata/service/control/single.yml
@@ -23,6 +23,7 @@
password: ${_param:mysql_neutron_password}
identity:
engine: keystone
+ region: RegionOne
host: ${_param:single_address}
port: 35357
user: neutron
@@ -37,6 +38,7 @@
virtual_host: '/openstack'
compute:
host: ${_param:single_address}
+ region: RegionOne
user: nova
password: ${_param:keystone_nova_password}
tenant: service
diff --git a/neutron/files/kilo/neutron-server.conf.contrail.Debian b/neutron/files/kilo/neutron-server.conf.contrail.Debian
index fe2defb..9990cec 100644
--- a/neutron/files/kilo/neutron-server.conf.contrail.Debian
+++ b/neutron/files/kilo/neutron-server.conf.contrail.Debian
@@ -352,7 +352,7 @@
# Name of nova region to use. Useful if keystone manages more than one region
# nova_region_name =
-nova_region_name = RegionOne
+nova_region_name = {{ neutron.compute.region }}
# Username for connection to nova in admin context
# nova_admin_username =
@@ -720,6 +720,7 @@
admin_password = {{ neutron.identity.password }}
auth_uri=http://{{ neutron.identity.host }}:5000
auth_url=http://{{ neutron.identity.host }}:35357
+auth_region={{ neutron.identity.region }}
[database]
# This line MUST be changed to actually run the plugin.
diff --git a/neutron/files/kilo/neutron-server.conf.contrail.RedHat b/neutron/files/kilo/neutron-server.conf.contrail.RedHat
index 806ab54..1af2d3c 100644
--- a/neutron/files/kilo/neutron-server.conf.contrail.RedHat
+++ b/neutron/files/kilo/neutron-server.conf.contrail.RedHat
@@ -352,7 +352,7 @@
# Name of nova region to use. Useful if keystone manages more than one region
# nova_region_name =
-nova_region_name = RegionOne
+nova_region_name = {{ neutron.compute.region }}
# Username for connection to nova in admin context
# nova_admin_username =
@@ -720,6 +720,7 @@
admin_password = {{ neutron.identity.password }}
auth_uri=http://{{ neutron.identity.host }}:5000
auth_url=http://{{ neutron.identity.host }}:35357
+auth_region={{ neutron.identity.region }}
[database]
# This line MUST be changed to actually run the plugin.
diff --git a/neutron/files/liberty/neutron-server.conf.contrail.Debian b/neutron/files/liberty/neutron-server.conf.contrail.Debian
index 7d75561..5b79d9c 100644
--- a/neutron/files/liberty/neutron-server.conf.contrail.Debian
+++ b/neutron/files/liberty/neutron-server.conf.contrail.Debian
@@ -357,7 +357,7 @@
# Name of nova region to use. Useful if keystone manages more than one region
# nova_region_name =
-nova_region_name = RegionOne
+nova_region_name = {{ neutron.compute.region }}
# Username for connection to nova in admin context
# nova_admin_username =
@@ -725,6 +725,7 @@
admin_password = {{ neutron.identity.password }}
auth_uri=http://{{ neutron.identity.host }}:5000
auth_url=http://{{ neutron.identity.host }}:35357
+auth_region={{ neutron.identity.region }}
[database]
# This line MUST be changed to actually run the plugin.
diff --git a/neutron/files/liberty/neutron-server.conf.contrail.RedHat b/neutron/files/liberty/neutron-server.conf.contrail.RedHat
index b30b4fa..3bfbc44 100644
--- a/neutron/files/liberty/neutron-server.conf.contrail.RedHat
+++ b/neutron/files/liberty/neutron-server.conf.contrail.RedHat
@@ -357,7 +357,7 @@
# Name of nova region to use. Useful if keystone manages more than one region
# nova_region_name =
-nova_region_name = RegionOne
+nova_region_name = {{ neutron.compute.region }}
# Username for connection to nova in admin context
# nova_admin_username =
@@ -725,6 +725,7 @@
admin_password = {{ neutron.identity.password }}
auth_uri=http://{{ neutron.identity.host }}:5000
auth_url=http://{{ neutron.identity.host }}:35357
+auth_region={{ neutron.identity.region }}
[database]
# This line MUST be changed to actually run the plugin.
diff --git a/tests/pillar/control_cluster.sls b/tests/pillar/control_cluster.sls
index 03b0392..9133472 100644
--- a/tests/pillar/control_cluster.sls
+++ b/tests/pillar/control_cluster.sls
@@ -18,6 +18,7 @@
password: password
identity:
engine: keystone
+ region: RegionOne
host: 127.0.0.1
port: 35357
user: neutron
@@ -33,6 +34,7 @@
ha_queues: true
compute:
host: 127.0.0.1
+ region: RegionOne
user: nova
password: password
tenant: service
diff --git a/tests/pillar/control_single.sls b/tests/pillar/control_single.sls
index 14741a5..0817493 100644
--- a/tests/pillar/control_single.sls
+++ b/tests/pillar/control_single.sls
@@ -18,6 +18,7 @@
password: password
identity:
engine: keystone
+ region: RegionOne
host: 127.0.0.1
port: 35357
user: neutron
@@ -32,6 +33,7 @@
virtual_host: '/openstack'
compute:
host: 127.0.0.1
+ region: RegionOne
user: nova
password: password
tenant: service