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

[script] Thrift Python client example #3575

Merged
merged 1 commit into from
Jan 24, 2022

Conversation

csordasmarton
Copy link
Contributor

No description provided.

scripts/thrift/client.py Outdated Show resolved Hide resolved

try:
print(f"Login '{USERNAME}'...")
token = cli_auth.performLogin(
Copy link
Contributor

Choose a reason for hiding this comment

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

I have a server locally which doesn't need any authentication. I think this is a good thing that login example is here so the user of this script can see its usage. But shouldn't we make it optional? For example if USERNAME and PASSWORD variables are None then token should also be None so it works without authentication, or something like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From the server we can ask this information whether it requires authentication or not with the getAuthParameters API function. I changed this script to support this use case too what you have mentioned.

@bruntib bruntib merged commit 487b95c into Ericsson:master Jan 24, 2022
@csordasmarton csordasmarton deleted the thrift_client_example branch January 28, 2022 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants