User Messages
For quite some time, OpenStack services have wanted to be able to send
messages to API end users (by user I do not mean the operator, but the
user that is interacting with the client).
This patch implements basic user messages with the following APIs.
GET /messages
GET /messages/<message_id>
DELETE /messages/<message_id>
Implements the basic /messages resource and tempest tests
The patch is aligned with related cinder patch where possible:
I8a635a07ed6ff93ccb71df8c404c927d1ecef005
DocImpact
APIImpact
Needed-By: I5ffb840a271c518f62ee1accfd8e20a97f45594d
Needed-By: I9ce096eebda3249687268e361b7141dea4032b57
Needed-By: Ic7d25a144905a39c56ababe8bd666b01bc0d0aef
Partially-implements: blueprint user-messages
Co-Authored-By: Jan Provaznik <jprovazn@redhat.com>
Change-Id: Ia0cc524e0bfb2ca5e495e575e17e9911c746690b
diff --git a/manila_tempest_tests/tests/api/base.py b/manila_tempest_tests/tests/api/base.py
index 3df7153..764a852 100644
--- a/manila_tempest_tests/tests/api/base.py
+++ b/manila_tempest_tests/tests/api/base.py
@@ -998,6 +998,25 @@
"d2value": d2value
})
+ def create_user_message(self):
+ """Trigger a 'no valid host' situation to generate a message."""
+ extra_specs = {
+ 'vendor_name': 'foobar',
+ 'driver_handles_share_servers': CONF.share.multitenancy_enabled,
+ }
+ share_type_name = data_utils.rand_name("share-type")
+
+ bogus_type = self.create_share_type(
+ name=share_type_name,
+ extra_specs=extra_specs)['share_type']
+
+ params = {'share_type_id': bogus_type['id'],
+ 'share_network_id': self.shares_v2_client.share_network_id}
+ share = self.shares_v2_client.create_share(**params)
+ self.addCleanup(self.shares_v2_client.delete_share, share['id'])
+ self.shares_v2_client.wait_for_share_status(share['id'], "error")
+ return self.shares_v2_client.wait_for_message(share['id'])
+
class BaseSharesAltTest(BaseSharesTest):
"""Base test case class for all Shares Alt API tests."""