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

Add rabbitmq vhost_topics parameter #626

Merged
merged 1 commit into from
Aug 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion hvac/api/secrets_engines/rabbitmq.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def configure_lease(self, ttl, max_ttl, mount_point=DEFAULT_MOUNT_POINT):
json=params,
)

def create_role(self, name, tags="", vhosts="", mount_point=DEFAULT_MOUNT_POINT):
def create_role(self, name, tags="", vhosts="", vhost_topics="", mount_point=DEFAULT_MOUNT_POINT):
"""This endpoint creates or updates the role definition.

:param name: Specifies the name of the role to create.
Expand All @@ -76,6 +76,8 @@ def create_role(self, name, tags="", vhosts="", mount_point=DEFAULT_MOUNT_POINT)
:type tags: str | unicode
:param vhosts: pecifies a map of virtual hosts to permissions.
:type vhosts: str | unicode
:param vhost_topics: Specifies a map of virtual hosts and exchanges to topic permissions.
:type vhost_topics: str | unicode
:param mount_point: Specifies the place where the secrets engine will be accessible (default: rabbitmq).
:type mount_point: str | unicode
:return: The JSON response of the request.
Expand All @@ -85,6 +87,7 @@ def create_role(self, name, tags="", vhosts="", mount_point=DEFAULT_MOUNT_POINT)
params = {
"tags": tags,
"vhosts": vhosts,
"vhost_topics": vhost_topics
}
return self._adapter.post(
url=api_path,
Expand Down