-
Notifications
You must be signed in to change notification settings - Fork 43
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
feat(rust): allow passing the API URL through the CLI #1495
Conversation
I have tried this out, with this testing setup:
Now I can try But it does not work yet:
$ ./target/release/agama --uri https://ohmu:10443/api auth login
> Please enter the root password: ********
Anyhow(error sending request for url (http://localhost/api/auth): error trying to connect: tcp connect error: Connection refused (os error 111) |
to enable - connecting to alternative servers, either production or test mocks - unauthenticated calls, either for the initial auth or test mocks This is needed for both #1438 and #1495 In the end, the API changes only by adding a `Default` trait implementation which does no authentication. Connecting to a mock server is achieved by assigning to the public `base_url` field.
0980b33
to
43307ea
Compare
With #1438 being merged, this PR could be extended to work with |
Also note that in #1438 I needed to connect to a mock HTTP server and made client APIs for that, which should be pretty useful for your use case too :) |
The current code looks good but the |
f625b32
to
47e6dbf
Compare
Yay! It gets somewhere... and then it fails on a self-signed certificate: $ ./rust/target/release/agama --api https://localhost:10443/api/ config show
Anyhow(Failed to communicate with the HTTP backend 'error sending request for url (https://localhost:10443/api/network/connections)'
Caused by:
0: error sending request for url (https://localhost:10443/api/network/connections)
1: client error (Connect)
2: error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1890: (self-signed certificate)
3: error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1890:) |
Done the same way as in similar NetworkStore
this is a workaround, instead it should be installed in https://github.com/yast/ci-ruby-container
clients instead of dbus ones
c02d644
to
eca3c77
Compare
fa43349
to
d634766
Compare
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.
It is looking better now. Thanks!
Problem
We want to be able to use different remote installation servers
Solution
Already done:
Testing