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

how to access client's Cluster? #134

Open
databasedav opened this issue Jun 17, 2023 · 4 comments
Open

how to access client's Cluster? #134

databasedav opened this issue Jun 17, 2023 · 4 comments

Comments

@databasedav
Copy link

i need this to run admin commands, i was looking through the code and couldn't find a way, can we simply make Client.cluster pub?

@khaf
Copy link
Collaborator

khaf commented Jun 20, 2023

What API do you need to call?

@databasedav
Copy link
Author

@khaf create_user, grant_roles, and ideally create_role as well but that has not been implemented yet for the rust client (#137), my goal is to do all database management stuff programmatically for the managed service (which recently went live for me), right now that involves creating set-limited roles, users, and indices, for now i've manually created all roles with asadm but u can imagine the convenience of performing all migrations programmatically with this client as roles/users/indices need to be created/removed

@databasedav
Copy link
Author

also create_user doesn't seem to be working for me, e.g. hitting an aerospike-ee container locally e.g.

AdminCommand::create_user(
    &aerospike_client.cluster,
    "tester",
    "testpassword",
    &["truncate"],
)
.await
.map_err(|error| anyhow!(error.to_string()))?;

gives me Server error: Invalid field

seeing the same hitting the managed service as well

@khaf
Copy link
Collaborator

khaf commented Jun 21, 2023

I see. I don't know why those API are not exposed through the client itself. I will take care of these issues in the next few days.

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

No branches or pull requests

2 participants