I am trying to replace the device config through the REST API, not that the operation did not succeed, but it doesn’t replace the existing one, suppose, I have the following:
devices:
eth0:
name: eth0
network: lxdbr0
type: nic
proxyPort27017:
connect: tcp:127.0.0.1:27017
listen: tcp:0.0.0.0:27017
proxy_protocol: "true"
type: proxy
root:
path: /
pool: default
type: disk
and I wanna replace it with:
devices:
eth0:
name: eth0
network: lxdbr0
type: nic
root:
path: /
pool: default
type: disk
Using the PUT request, gave me, the Volatile idmap keys can't be deleted by the user
using the PATCH request succeeded, but that did not replace it. I also stopped the instance before replacing the devices, but that did not work either.
Here is the PayLoad:
array:3 [
"description" => "This is container seven updated"
"devices" => array:2 [
"root" => array:3 [
"type" => "disk"
"path" => "/"
"pool" => "default"
]
"eth0" => array:3 [
"type" => "nic"
"name" => "eth0"
"network" => "lxdbr0"
]
]
"profiles" => array:1 [
0 => "default"
]
]
In JSON:
"{"description":"This is container seven updated","devices":{"root":{"type":"disk","path":"\/","pool":"default"},"eth0":{"type":"nic","name":"eth0","network":"lxdbr0"}},"profiles":["default"]}"