Hi,
I’m trying to use the API of LXD. I read the API docu at https://lxd.readthedocs.io/en/latest/rest-api/#rest-api and still have some questions.
- Why are the alias not the same on remote and local?
- How can I pull an image and create a container in one step?
To the first question:
I played with the api and downloaded an image with “lxc image copy ubuntu:lts local:” but the alias is not set. Can I do that with a parameter?
To the second question:
I found this snippet on the same url:
"source": {"type": "image", // Can be: "image", "migration", "copy" or "none"
"mode": "pull", // One of "local" (default) or "pull"
"server": "https://10.0.2.3:8443", // Remote server (pull mode only)
"protocol": "lxd", // Protocol (one of lxd or simplestreams, defaults to lxd)
"certificate": "PEM certificate", // Optional PEM certificate. If not mentioned, system CA is used.
"alias": "ubuntu/devel"},
What is the correct url for the server if I want to download the lts ubuntu version from the standard lxc remote? This would avoid scripting because it’s just one call.
Thanks for this great software