Cloud API: expose directory and file customizations
Expose the Directory and File customizations in the Cloud API. Also validate the provided customizations while processing the compose request by trying to convert them to internal representations `fsnode.File` and `fsnode.Directory`. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
15f1962c34
commit
e9af3bda64
4 changed files with 387 additions and 124 deletions
|
|
@ -927,7 +927,48 @@ func TestComposeCustomizations(t *testing.T) {
|
|||
"disabled": [
|
||||
"firewalld"
|
||||
]
|
||||
}
|
||||
},
|
||||
"directories": [
|
||||
{
|
||||
"path": "/etc/my/dir",
|
||||
"mode": "0700"
|
||||
},
|
||||
{
|
||||
"path": "/etc/my/dir1",
|
||||
"mode": "0700",
|
||||
"user": "user1",
|
||||
"group": "user1",
|
||||
"ensure_parents": true
|
||||
},
|
||||
{
|
||||
"path": "/etc/my/dir2",
|
||||
"mode": "0700",
|
||||
"user": 1000,
|
||||
"group": 1000,
|
||||
"ensure_parents": true
|
||||
}
|
||||
],
|
||||
"files": [
|
||||
{
|
||||
"path": "/etc/my/dir/file",
|
||||
"mode": "0600",
|
||||
"data": "Hello world!"
|
||||
},
|
||||
{
|
||||
"path": "/etc/my/dir/file2",
|
||||
"mode": "0600",
|
||||
"user": "user1",
|
||||
"group": "user1",
|
||||
"data": "Hello world!"
|
||||
},
|
||||
{
|
||||
"path": "/etc/my/dir/file3",
|
||||
"mode": "0600",
|
||||
"user": 1000,
|
||||
"group": 1000,
|
||||
"data": "Hello world!"
|
||||
}
|
||||
]
|
||||
},
|
||||
"image_request":{
|
||||
"architecture": "%s",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue