This repository has been archived by the owner on Nov 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 114
Keep track of connections, introduce per-vhost limits #121
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
59d8c33
Keep track of connections, introduce per-vhost limits
michaelklishin 6b217ec
Introduce rabbit_ct_broker_helpers:{add,delete}_vhost/3
michaelklishin 2ee9912
Introduce rabbit_ct_broker_helpers:set_permissions/7, update exports
michaelklishin 482e98f
Adapt to recent server changes
michaelklishin 14e122e
Merge branch 'master' into rabbitmq-server-500-squashed
michaelklishin 67daa01
Merge branch 'master' into rabbitmq-server-500-squashed
michaelklishin 6e4d180
Merge branch 'master' into rabbitmq-server-500-squashed
michaelklishin 597478c
Merge branch 'master' into rabbitmq-server-500-squashed
michaelklishin 4f067fd
rabbit_ct_broker_helpers: Rename `NodeIndex` to `Node`
dumbbell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,6 +71,13 @@ | |
set_parameter/5, | ||
clear_parameter/4, | ||
|
||
add_vhost/2, | ||
delete_vhost/2, | ||
|
||
set_permissions/6, | ||
set_full_permissions/2, | ||
set_full_permissions/3, | ||
|
||
enable_plugin/3, | ||
disable_plugin/3, | ||
|
||
|
@@ -719,6 +726,25 @@ format_ipaddr_for_uri( | |
Res1 = re:replace(Res0, "(^0(:0)+$|^(0:)+|(:0)+$)|:(0:)+", "::"), | ||
"[" ++ Res1 ++ "]". | ||
|
||
|
||
%% Virtual host management | ||
|
||
add_vhost(Config, VHost) -> | ||
rabbit_ct_broker_helpers:rpc(Config, 0, rabbit_vhost, add, [VHost]). | ||
|
||
delete_vhost(Config, VHost) -> | ||
rabbit_ct_broker_helpers:rpc(Config, 0, rabbit_vhost, delete, [VHost]). | ||
|
||
set_full_permissions(Config, VHost) -> | ||
set_permissions(Config, <<"guest">>, VHost, <<".*">>, <<".*">>, <<".*">>). | ||
set_full_permissions(Config, Username, VHost) -> | ||
set_permissions(Config, Username, VHost, <<".*">>, <<".*">>, <<".*">>). | ||
set_permissions(Config, Username, VHost, ConfigurePerm, WritePerm, ReadPerm) -> | ||
rabbit_ct_broker_helpers:rpc(Config, 0, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as above. |
||
rabbit_auth_backend_internal, | ||
set_permissions, | ||
[Username, VHost, ConfigurePerm, WritePerm, ReadPerm]). | ||
|
||
%% Functions to execute code on a remote node/broker. | ||
|
||
add_code_path_to_node(Node, Module) -> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please not hard-code the node and take it as an argument instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can introduce a new function head but since vhost and user operations are cluster-wide, would they be used often?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nodes may not be clustered. As this is the responsability of the testcase, I would indicate the node in the test, not in
rabbit_ct_broker_helpers.erl
.