From 195872d0d8e173a25f28ae0e2f2867c7ba58e259 Mon Sep 17 00:00:00 2001 From: Keith Schincke Date: Sun, 2 Oct 2016 23:34:09 -0400 Subject: [PATCH] Add cinder backup to scenario002 Configure cinder backup to use swift and test Change-Id: I9b645b2e7b76e97403b95459578979ec9f53c0b4 Depends-On: I588c9864cd20c75de7caecf733603a3587c34d12 --- README.md | 1 + fixtures/scenario002.pp | 2 ++ manifests/cinder.pp | 14 ++++++++++++++ manifests/tempest.pp | 6 ++++++ run_tests.sh | 3 +++ 5 files changed, 26 insertions(+) diff --git a/README.md b/README.md index c3cf511ca..6e67eef86 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ scenario](#all-in-one). | ceilometer | X | | | | | aodh | X | | | | | designate | | | bind | | +| backup | | swift | | | | gnocchi | rbd | | | | | heat | | | X | | | swift | | X | | | diff --git a/fixtures/scenario002.pp b/fixtures/scenario002.pp index 0032e3666..d4261370b 100644 --- a/fixtures/scenario002.pp +++ b/fixtures/scenario002.pp @@ -66,6 +66,7 @@ class { '::openstack_integration::nova': class { '::openstack_integration::cinder': volume_encryption => $barbican_enabled, + cinder_backup => 'swift', } if $barbican_enabled { @@ -74,6 +75,7 @@ if $barbican_enabled { class { '::openstack_integration::tempest': cinder => true, + cinder_backup => true, swift => true, ironic => true, zaqar => $zaqar_enabled, diff --git a/manifests/cinder.pp b/manifests/cinder.pp index 9775ad9e4..5da003f95 100644 --- a/manifests/cinder.pp +++ b/manifests/cinder.pp @@ -9,9 +9,14 @@ # (optional) Boolean to configure or not volume encryption # Defaults to false. # +# [*cinder_backup*] +# (optional) Set type of cinder backup +# Possible values: false, swift +# defaults to false. class openstack_integration::cinder ( $backend = 'iscsi', $volume_encryption = false, + $cinder_backup = false, ) { include ::openstack_integration::config @@ -136,4 +141,13 @@ class openstack_integration::cinder ( properties => ['volume_backend_name=BACKEND_1'], } + if $cinder_backup == swift { + include ::cinder::backup + class { '::cinder::backup::swift': + backup_swift_user_domain => 'Default', + backup_swift_project_domain => 'Default', + backup_swift_project => 'Default', + } + } + } diff --git a/manifests/tempest.pp b/manifests/tempest.pp index bb8049287..e16a33a43 100644 --- a/manifests/tempest.pp +++ b/manifests/tempest.pp @@ -12,6 +12,10 @@ # (optional) Define if Cinder needs to be tested. # Default to false. # +# [*cinder_backup*] +# (optional) Define if Cinder Backup needs to be tested. +# Default to false. +# # [*designate*] # (optional) Define if Designate needs to be tested. # Default to false. @@ -72,6 +76,7 @@ class openstack_integration::tempest ( $aodh = false, $ceilometer = false, $cinder = false, + $cinder_backup = false, $designate = false, $glance = true, $gnocchi = false, @@ -121,6 +126,7 @@ class openstack_integration::tempest ( image_name => 'cirros', image_name_alt => 'cirros_alt', cinder_available => $cinder, + cinder_backup_available => $cinder_backup, designate_available => $designate, glance_available => $glance, horizon_available => $horizon, diff --git a/run_tests.sh b/run_tests.sh index 66113658d..5a59a04fc 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -204,6 +204,9 @@ echo "api.baremetal.admin.test_drivers" >> /tmp/openstack/tempest/test-whitelist # Zaqar echo "v2.test_queues.TestManageQueue" >> /tmp/openstack/tempest/test-whitelist.txt +# Cinder Backup +echo "VolumesBackupsAdminV2Test" >> /tmp/openstack/tempest/test-whitelist.txt + # Cinder encrypted volumes echo "TestEncryptedCinderVolumes" >> /tmp/openstack/tempest/test-whitelist.txt