<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hello.</div><div><br></div><div>I am developing GUI tests (Selenium) for the openstack director. I am now trying to make use of tempest Swift client in one of the tests which needs to fetch a file from the tripleo plans. I added this code in our base class to access the client:</div><div><br></div><div><span style="font-family:monospace,monospace">class GUITestCase(test.BaseTestCase):<br><br>    credentials = ('admin', 'primary')<br><br>    @classmethod<br>    def setup_clients(cls): <br>        super(GUITestCase, cls).setup_clients()<br>        # Clients for Swift     <br>        cls.account_client = cls.os_admin.account_client<br>        cls.container_client = cls.os_admin.container_client<br>        cls.object_client = cls.os_admin.object_client</span><br><br></div><div>I then try to list the objects in the "overcloud" container, which is where the default plans are found:</div><div><br></div><div><span style="font-family:monospace,monospace">class TestSwift(GUITestCase):<br><br>    def test_swift(self):<br>        (resp, body) = self.container_client.list_container_objects(<br>            "overcloud")<br>        print resp<br>        print body</span><br></div><div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><br></div><div>It returns a "not found" error. I'm pretty sure that the reason for it not finding the container (which is definitely there) is that it creates a project and a user for itself, and uses those credentials for its interactions with the undercloud. I can see the POST calls in tempest.log that show that it's creating itself the dynamic credentials:</div><div><br></div><div>INFO tempest.lib.common.rest_client [req-54a... ] Request (TestSwift:setUpClass): 201 POST <a href="http://192.168.24.3:35357/v3/projects">http://192.168.24.3:35357/v3/projects</a> 0.365s<br>INFO tempest.lib.common.rest_client [req-d3f... ] Request (TestSwift:setUpClass): 201 POST <a href="http://192.168.24.3:35357/v3/users">http://192.168.24.3:35357/v3/users</a> 0.493s<br>INFO tempest.lib.common.rest_client [req-480... ] Request (TestSwift:setUpClass): 200 GET <a href="http://192.168.24.3:35357/v3/roles">http://192.168.24.3:35357/v3/roles</a> 0.297s<br>INFO tempest.lib.common.rest_client [req-e0a... ] Request (TestSwift:setUpClass): 204 PUT <a href="http://192.168.24.3:35357/v3/projects/9e1e6b33dcbd4aebb546c56a7258d5e0/users/cc715537a0c048b7a8692a0c8304b94d/roles/a7e0a38246d24ad58c9ca06d2db98099">http://192.168.24.3:35357/v3/projects/9e1e6b33dcbd4aebb546c56a7258d5e0/users/cc715537a0c048b7a8692a0c8304b94d/roles/a7e0a38246d24ad58c9ca06d2db98099</a> 0.270s<br>INFO tempest.lib.common.dynamic_creds [-] <b>Acquired dynamic creds:</b><br> credentials: Credentials: {'username': u'tempest-TestSwift-1494291785', 'project_name': u'tempest-TestSwift-1494291785', 'project_domain_id': u'default', 'user_domain_id': u'default', 'tenant_id': u'9e1e6b33dcbd4aebb546c56a7258d5e0', 'user_domain_name': u'Default', 'domain_name': u'Default', 'tenant_name': u'tempest-TestSwift-1494291785', 'user_id': u'cc715537a0c048b7a8692a0c8304b94d', 'project_id': u'9e1e6b33dcbd4aebb546c56a7258d5e0', 'domain_id': u'default', 'project_domain_name': u'Default'}, Network: None, Subnet: None, Router: None<br><br></div><div>So I'm looking for a way to utilize the client without it automatically creating itself dynamic credentials; it has to use the already-existing admin credentials on the admin project in order to see the container with the plans. What's the right way to do that, please? Thanks a lot in advance!<br></div><div><br>Regards,<br></div>Udi Kalifon; Senior QE; RHOS-UI<span> Automation</span><br><br></div></div></div></div></div></div></div></div></div></div>