Merge "Update the old doc links"
diff --git a/.gitreview b/.gitreview
index eb7801e..83ef1a7 100644
--- a/.gitreview
+++ b/.gitreview
@@ -1,4 +1,4 @@
[gerrit]
-host=review.openstack.org
+host=review.opendev.org
port=29418
project=openstack/barbican-tempest-plugin.git
diff --git a/.zuul.yaml b/.zuul.yaml
index 32c02f4..c321caf 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -1,8 +1,12 @@
- project:
+ templates:
+ - tempest-plugin-jobs
+ - check-requirements
check:
jobs:
- barbican-simple-crypto-devstack-tempest
gate:
+ queue: barbican
jobs:
- barbican-simple-crypto-devstack-tempest
experimental:
diff --git a/barbican_tempest_plugin/clients.py b/barbican_tempest_plugin/clients.py
index 9c009ba..6808da4 100644
--- a/barbican_tempest_plugin/clients.py
+++ b/barbican_tempest_plugin/clients.py
@@ -12,20 +12,11 @@
# License for the specific language governing permissions and limitations under
# the License.
-from tempest import clients
-from tempest.common import credentials_factory as common_creds
from tempest import config
from tempest.lib.services import clients as cli
CONF = config.CONF
-ADMIN_CREDS = common_creds.get_configured_admin_credentials()
-
-
-class Manager(clients.Manager):
- def __init__(self, credentials=ADMIN_CREDS):
- super(Manager, self).__init__(credentials)
-
class Clients(cli.ServiceClients):
"""Tempest stable service clients and loaded plugins service clients"""
diff --git a/barbican_tempest_plugin/config.py b/barbican_tempest_plugin/config.py
index eae7a17..0c4a2ac 100644
--- a/barbican_tempest_plugin/config.py
+++ b/barbican_tempest_plugin/config.py
@@ -43,3 +43,14 @@
default=256,
help="The key size used to encrypt ephemeral storage."),
]
+
+image_signature_verification_group = cfg.OptGroup(
+ name="image_signature_verification",
+ title="Image Signature Verification Options")
+
+ImageSignatureVerificationGroup = [
+ cfg.BoolOpt('enforced',
+ default=True,
+ help="Does the test environment enforce glance image "
+ "verification?"),
+]
diff --git a/barbican_tempest_plugin/plugin.py b/barbican_tempest_plugin/plugin.py
index a586eb0..1914ecb 100644
--- a/barbican_tempest_plugin/plugin.py
+++ b/barbican_tempest_plugin/plugin.py
@@ -37,6 +37,8 @@
conf.register_group(project_config.ephemeral_storage_encryption_group)
conf.register_opts(project_config.EphemeralStorageEncryptionGroup,
project_config.ephemeral_storage_encryption_group)
+ conf.register_opts(project_config.ImageSignatureVerificationGroup,
+ project_config.image_signature_verification_group)
def get_opt_lists(self):
return [('service_available', [project_config.service_option])]
diff --git a/barbican_tempest_plugin/tests/scenario/barbican_manager.py b/barbican_tempest_plugin/tests/scenario/barbican_manager.py
index 2cf7a7f..d560a63 100644
--- a/barbican_tempest_plugin/tests/scenario/barbican_manager.py
+++ b/barbican_tempest_plugin/tests/scenario/barbican_manager.py
@@ -30,7 +30,6 @@
from oslo_log import log as logging
from tempest import config
-from barbican_tempest_plugin import clients
from barbican_tempest_plugin.tests.scenario import manager as mgr
CONF = config.CONF
@@ -40,7 +39,6 @@
class BarbicanScenarioTest(mgr.ScenarioTest):
credentials = ('primary', 'admin')
- manager = clients.Manager()
def setUp(self):
super(BarbicanScenarioTest, self).setUp()
@@ -81,16 +79,12 @@
)
if CONF.compute_feature_enabled.attach_encrypted_volume:
- if CONF.volume_feature_enabled.api_v2:
+ if (CONF.volume_feature_enabled.api_v2 or
+ CONF.volume_feature_enabled.api_v3):
cls.admin_volume_types_client =\
os_adm.volume_types_v2_client
cls.admin_encryption_types_client =\
os_adm.encryption_types_v2_client
- else:
- cls.admin_volume_types_client =\
- os_adm.volume_types_client
- cls.admin_encryption_types_client =\
- os_adm.encryption_types_client
def _get_uuid(self, href):
return href.split('/')[-1]
diff --git a/barbican_tempest_plugin/tests/scenario/manager.py b/barbican_tempest_plugin/tests/scenario/manager.py
index 1aa009e..8be324a 100644
--- a/barbican_tempest_plugin/tests/scenario/manager.py
+++ b/barbican_tempest_plugin/tests/scenario/manager.py
@@ -75,12 +75,10 @@
cls.security_group_rules_client = (
cls.os_primary.security_group_rules_client)
- if CONF.volume_feature_enabled.api_v2:
- cls.volumes_client = cls.os_primary.volumes_v2_client
- cls.snapshots_client = cls.os_primary.snapshots_v2_client
- else:
- cls.volumes_client = cls.os_primary.volumes_client
- cls.snapshots_client = cls.os_primary.snapshots_client
+ if (CONF.volume_feature_enabled.api_v2 or
+ CONF.volume_feature_enabled.api_v3):
+ cls.volumes_client = cls.os_primary.volumes_client_latest
+ cls.snapshots_client = cls.os_primary.snapshots_client_latest
# ## Test functions library
#
@@ -333,6 +331,7 @@
waiters.wait_for_volume_resource_status(self.volumes_client,
volume['id'], 'in-use')
+ self.addCleanup(self.nova_volume_detach, server, volume)
# Return the updated volume after the attachment
return self.volumes_client.show_volume(volume['id'])['volume']
diff --git a/barbican_tempest_plugin/tests/scenario/test_image_signing.py b/barbican_tempest_plugin/tests/scenario/test_image_signing.py
index 794d33e..191b613 100644
--- a/barbican_tempest_plugin/tests/scenario/test_image_signing.py
+++ b/barbican_tempest_plugin/tests/scenario/test_image_signing.py
@@ -70,6 +70,10 @@
* Attempt to boot the incorrectly signed image
* Confirm an exception is thrown
"""
+ if not CONF.image_signature_verification.enforced:
+ raise self.skipException("Image signature verification is not "
+ "enforced in this environment")
+
img_uuid = self.sign_and_upload_image()
LOG.debug("Modifying image signature to be incorrect")
diff --git a/barbican_tempest_plugin/tests/scenario/test_volume_encryption.py b/barbican_tempest_plugin/tests/scenario/test_volume_encryption.py
index 95ba5d5..c2033fb 100644
--- a/barbican_tempest_plugin/tests/scenario/test_volume_encryption.py
+++ b/barbican_tempest_plugin/tests/scenario/test_volume_encryption.py
@@ -56,7 +56,7 @@
def attach_detach_volume(self, server, volume, keypair):
# Attach volume
- attached_volume = self.nova_volume_attach(server, volume)
+ self.nova_volume_attach(server, volume)
# Write a timestamp to volume
server_ip = self.get_server_ip(server)
@@ -72,9 +72,6 @@
)
self.assertEqual(timestamp, timestamp2)
- # Detach volume
- self.nova_volume_detach(server, attached_volume)
-
@decorators.idempotent_id('89165fb4-5534-4b9d-8429-97ccffb8f86f')
@utils.services('compute', 'volume', 'image')
def test_encrypted_cinder_volumes_luks(self):
diff --git a/requirements.txt b/requirements.txt
index 9f8c683..761711f 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -4,7 +4,8 @@
pbr!=2.1.0,>=2.0.0 # Apache-2.0
+six>=1.10.0 # MIT
tempest>=17.1.0 # Apache-2.0
-cryptography!=2.0,>=1.9 # BSD/Apache-2.0
+cryptography>=2.1 # BSD/Apache-2.0
-oslo.config>=5.1.0 # Apache-2.0
+oslo.config>=5.2.0 # Apache-2.0
diff --git a/test-requirements.txt b/test-requirements.txt
index a89f7d2..cbd9858 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -5,8 +5,6 @@
hacking<0.13,>=0.12.0 # Apache-2.0
python-subunit>=1.0.0 # Apache-2.0/BSD
-sphinx!=1.6.6,>=1.6.2 # BSD
-oslosphinx>=4.7.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
diff --git a/tox.ini b/tox.ini
index 1f1ce01..faa94df 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,7 +5,7 @@
[testenv]
usedevelop = True
-install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
+install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning