-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Please use varlink resolver, for the API examples #1864
Comments
@TomSweeneyRedHat Can you throw something together for this. |
@baude Is the work you are doing with bridging helping here? |
@baude is the work you are doing with bridging fixing this? Is varlink resolver smart enough to do this? How would it find the socket? |
@haraldh Do you have any ideas? |
I don't see how the examples are supposed to work over the bridge (by using the local socket) Of course you could give an explicit $ varlink --bridge "$VARLINK_BRIDGE" call -m unix:/run/podman/io.podman/io.podman.GetVersion
Unable to connect: CannotConnect i.e. instead of using the SSH bridge command, it goes straight for a local |
Even better would be if one could avoid the bridge parameter: varlink/libvarlink#10 That would make the above command shorter: $ varlink call io.podman.GetVersion
{
"built": "2019-04-01T17:08:58Z",
"git_commit": "ad467ba16e5f78a159c730ea005830cfa075de15-dirty",
"go_version": "go1.12",
"os_arch": "linux/amd64",
"remote_api_version": 1,
"version": "1.3.0-dev"
} Or if using the go version of varlink instead: $ varlink-go call io.podman.GetVersion
{
"built": "2019-04-01T17:08:58Z",
"git_commit": "ad467ba16e5f78a159c730ea005830cfa075de15-dirty",
"go_version": "go1.12",
"os_arch": "linux/amd64",
"remote_api_version": 1,
"version": "1.3.0-dev"
} |
Nobody should have to use |
The examples were on the API documentation page. Everyone elses uses pypodman or podman-remote |
Then the examples should be fixed in the podman API documentation |
So, something like this ? $ python3 -m varlink.cli -b "$VARLINK_BRIDGE" call io.podman.GetVersion "{}" Either way, it would still be better to use the resolver than to hard-code the socket. And unfortunately, it is still an awful experience trying to install Python 3 on Windows... |
What? Shell again? Why? |
Same format as on https://github.com/varlink/python, feel free to write better examples. The only point here was that it is wasteful to always say |
Probably not going to bother with using varlink, might as well use commands directly over ssh instead. That also means two less daemons to run (varlink resolver and podman varlink), and can use sudo... |
Is this a BUG REPORT or FEATURE REQUEST?:
kind feature
Description
Currently all examples are hardcoding the socket location, such as:
This looks ugly (well, "verbose") and doesn't work over the ssh bridge...
It would be better if they would use the varlink resolver, to look like:
varlink call -m io.podman.Ping
It uses a hardcoded
/run
address, to resolve all other varlink services:This does require that the org.varlink.resolver service has been set up.
Which requires that the resolver is responding, and configured properly.
The text was updated successfully, but these errors were encountered: