Add designate config for rocky
Change-Id: I3ddc673abe8d23c0b332fac8012d3272f73c0977
Related-Prod: PROD-23724 (PROD:23724)
diff --git a/tests/integration/rocky/server_cluster/config_spec.rb b/tests/integration/rocky/server_cluster/config_spec.rb
new file mode 100644
index 0000000..6c5a738
--- /dev/null
+++ b/tests/integration/rocky/server_cluster/config_spec.rb
@@ -0,0 +1,77 @@
+ssl_enabled = attribute("ssl", default: false)
+
+oslo_messaging_default_ssl = {
+ 'transport_url' => 'rabbit://openstack:password@127.0.0.1:5671,openstack:password@127.0.0.2:5671,openstack:password@127.0.0.3:5671//openstack'
+}
+
+oslo_messaging_rabbit_ssl = {
+ 'ssl' => 'true',
+ 'ssl_version' => 'TLSv1_2',
+ 'ssl_ca_file' => '/etc/designate/ssl/mysql/ca-cert.pem',
+}
+
+oslo_messaging_default = {
+ 'transport_url' => 'rabbit://openstack:password@127.0.0.1:5672,openstack:password@127.0.0.2:5672,openstack:password@127.0.0.3:5672//openstack'
+}
+
+oslo_messaging_rabbit = {}
+
+service_sink = {
+ 'enabled_notification_handlers' => 'neutron_floatingip, nova_fixed'
+}
+
+handler_nova_fixed = {
+ 'zone_id' => '5186883b-91fb-4891-bd49-e6769234a8fc',
+ 'formatv4' => "'%(hostname)s.%(zone)s'",
+ 'formatv6' => "'%(hostname)s.%(zone)s'",
+}
+
+handler_neutron_floatingip = {
+ 'zone_id' => '5186883b-91fb-4891-bd49-e6769234a8fc',
+ 'formatv4' => "'%(octet0)s-%(octet1)s-%(octet2)s-%(octet3)s.%(zone)s'",
+}
+
+control 'Designate' do
+
+ describe parse_config_file('/etc/designate/designate.conf') do
+
+ describe 'Designate messaging' do
+
+ if ssl_enabled
+ oslo_messaging_default.merge!(oslo_messaging_default_ssl)
+ oslo_messaging_rabbit.merge!(oslo_messaging_rabbit_ssl)
+ describe 'SSL' do
+ its('DEFAULT') {
+ should include(oslo_messaging_default)
+ }
+ its('oslo_messaging_rabbit') {
+ should include(oslo_messaging_rabbit)
+ }
+ end
+ else
+ describe 'non SSL' do
+ its('DEFAULT') do
+ should include(oslo_messaging_default)
+ end
+ end
+ end
+
+ end
+
+ describe 'Designate notification handlers' do
+
+ its('service:sink') do
+ should include(service_sink)
+ end
+
+ its('handler:nova_fixed') do
+ should include(handler_nova_fixed)
+ end
+
+ its('handler:neutron_floatingip') do
+ should include(handler_neutron_floatingip)
+ end
+
+ end
+ end
+end
\ No newline at end of file
diff --git a/tests/integration/rocky/server_single/config_spec.rb b/tests/integration/rocky/server_single/config_spec.rb
new file mode 100644
index 0000000..ee8ca13
--- /dev/null
+++ b/tests/integration/rocky/server_single/config_spec.rb
@@ -0,0 +1,77 @@
+ssl_enabled = attribute("ssl", default: false)
+
+oslo_messaging_default_ssl = {
+ 'transport_url' => 'rabbit://openstack:password@127.0.0.1:5671//openstack'
+}
+
+oslo_messaging_rabbit_ssl = {
+ 'ssl' => 'true',
+ 'ssl_version' => 'TLSv1_2',
+ 'ssl_ca_file' => '/etc/designate/ssl/mysql/ca-cert.pem',
+}
+
+oslo_messaging_default = {
+ 'transport_url' => 'rabbit://openstack:password@127.0.0.1:5672//openstack'
+}
+
+oslo_messaging_rabbit = {}
+
+service_sink = {
+ 'enabled_notification_handlers' => 'neutron_floatingip, nova_fixed'
+}
+
+handler_nova_fixed = {
+ 'zone_id' => '5186883b-91fb-4891-bd49-e6769234a8fc',
+ 'formatv4' => "'%(hostname)s.%(zone)s'",
+ 'formatv6' => "'%(hostname)s.%(zone)s'",
+}
+
+handler_neutron_floatingip = {
+ 'zone_id' => '5186883b-91fb-4891-bd49-e6769234a8fc',
+ 'formatv4' => "'%(octet0)s-%(octet1)s-%(octet2)s-%(octet3)s.%(zone)s'",
+}
+
+control 'Designate' do
+
+ describe parse_config_file('/etc/designate/designate.conf') do
+
+ describe 'Designate messaging' do
+
+ if ssl_enabled
+ oslo_messaging_default.merge!(oslo_messaging_default_ssl)
+ oslo_messaging_rabbit.merge!(oslo_messaging_rabbit_ssl)
+ describe 'SSL' do
+ its('DEFAULT') {
+ should include(oslo_messaging_default)
+ }
+ its('oslo_messaging_rabbit') {
+ should include(oslo_messaging_rabbit)
+ }
+ end
+ else
+ describe 'non SSL' do
+ its('DEFAULT') do
+ should include(oslo_messaging_default)
+ end
+ end
+ end
+
+ end
+
+ describe 'Designate notification handlers' do
+
+ its('service:sink') do
+ should include(service_sink)
+ end
+
+ its('handler:nova_fixed') do
+ should include(handler_nova_fixed)
+ end
+
+ its('handler:neutron_floatingip') do
+ should include(handler_neutron_floatingip)
+ end
+
+ end
+ end
+end
\ No newline at end of file
diff --git a/tests/pillar/repo_mcp_openstack_rocky.sls b/tests/pillar/repo_mcp_openstack_rocky.sls
new file mode 100644
index 0000000..cb1c5b1
--- /dev/null
+++ b/tests/pillar/repo_mcp_openstack_rocky.sls
@@ -0,0 +1,12 @@
+linux:
+ system:
+ enabled: true
+ repo:
+ mirantis_openstack_repo:
+ source: "deb http://mirror.mirantis.com/nightly/openstack-rocky/{{ grains.get('oscodename') }} {{ grains.get('oscodename') }} main"
+ architectures: amd64
+ key_url: "http://mirror.mirantis.com/nightly/openstack-rocky/{{ grains.get('oscodename') }}/archive-openstack-rocky.key"
+ pin:
+ - pin: 'release l=rocky'
+ priority: 1050
+ package: '*'