Clarification on Creating ResourceSet via xo-cli
-
Hi,
I am trying to create a resource set using the xo-cli command with the following syntax:
xo-cli resourceSet.create name='test' subjects='["123"]' objects='["123", "456"]' limits='{"ram":"16","disk":"200","cpu":"8"}' tags='["3321"]' networks='["321"]' shareByDefault=true
Could you please confirm if this is the correct way to create a resource set in Xen Orchestra, or if any adjustments are required to ensure successful execution?
Thank you for your assistance!
-
Ping @julien-f
-
Hello,
When I try to create a:
resourceSet.create name=test-resource subjects=["d301d9ea-9e22-4480-bf40-111111111111"]' objects='["8fb06362-d8fe-598b-f819-11111111111111"]' shareByDefault=1
I always get this error:
✖ invalid parameters property @./subjects: must be array property @./objects: must be array
Also, I don't know how to specify the resource limits.
If you can help me, I would greatly appreciate it!
Thank you very much!
-
@samuelolavo Shell only handles string values, to pass other types to xo-cli you need to encode them in JSON and use the
json:
prefix:xo-cli resourceSet.create name=test-resource subjects=json:'["d301d9ea-9e22-4480-bf40-111111111111"]' objects=json:'["8fb06362-d8fe-598b-f819-11111111111111"]' shareByDefault=json:true