Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove enable_rbac option and ensure Keystone project synchronization #19

Merged
merged 2 commits into from
Mar 19, 2019

Conversation

philsphicas
Copy link
Contributor

No description provided.

Remove deprecated configuration option [patrole].enable_rbac

Reference:
https: //docs.openstack.org/releasenotes/patrole/v0.4.0.html#deprecation-notes
Change-Id: Icb575812d4a921d69f4cf472e6bad329043c62bd
This patch set ensures that projects are known to Tungsten Fabric
before project-specific resources (such as virtual networks) are
created.

Projects are not automatically synced from Keystone to TF.

The fqname-to-id call in resource_setup forces the synchronization.

Reference:
https: //bugs.launchpad.net/opencontrail/+bug/1685059
Change-Id: If3943572a5a05eab11c54ff4f4ad9350bce7cd23
@@ -395,6 +392,9 @@ def setup_clients(cls):
@classmethod
def resource_setup(cls):
cls.tenant_name = cls.os_primary.credentials.tenant_name
cls.tenant_id = cls.fq_client.fqname_to_id(fq_name=['default-domain',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO usage of cls.get_tenant_by_name(tenant_name) instead of cls.fq_client is better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't look like get_tenant_by_name will make the necessary call to the TF API to make it pull the information from Keystone.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I see, but what tests use the tenant_id variable? What is a reason of having this variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point is just to make the API call. If we don't do this, subsequent tests that rely on the creation of project-scoped resources (such as virtual-networks) fail.

The return value could be discarded or ignored instead, but it seemed to make sense to keep it around in case a future test wants it.

@aveeshek aveeshek merged commit ba5653d into tungstenfabric:master Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants