e356684cd9
add paths to create and delete network interfaces, check for interface existence in modify interface, add vlan specification to user config and use in network interface creation, fix disk path security by checking disk existence or nonexistence, TODO: check create and mount disk against allowed bus types Signed-off-by: Arthur Lu <learthurgo@gmail.com>
104 lines
1.6 KiB
Plaintext
104 lines
1.6 KiB
Plaintext
{
|
|
"resources": {
|
|
"cores": {
|
|
"type": "numeric",
|
|
"multiplier": 1,
|
|
"base": 1024,
|
|
"compact": false,
|
|
"unit": "Cores"
|
|
},
|
|
"memory": {
|
|
"type": "numeric",
|
|
"multiplier": 1048576,
|
|
"base": 1024,
|
|
"compact": true,
|
|
"unit": "B"
|
|
},
|
|
"swap": {
|
|
"type": "numeric",
|
|
"multiplier": 1048576,
|
|
"base": 1024,
|
|
"compact": true,
|
|
"unit": "B"
|
|
},
|
|
"local": {
|
|
"type": "storage",
|
|
"multiplier": 1,
|
|
"base": 1024,
|
|
"compact": true,
|
|
"unit": "B",
|
|
"disks": [
|
|
"rootfs",
|
|
"mp",
|
|
"sata",
|
|
"unused"
|
|
]
|
|
},
|
|
"cephpl": {
|
|
"type": "storage",
|
|
"multiplier": 1,
|
|
"base": 1024,
|
|
"compact": true,
|
|
"unit": "B",
|
|
"disks": [
|
|
"rootfs",
|
|
"mp",
|
|
"sata",
|
|
"unused"
|
|
]
|
|
},
|
|
"network": {
|
|
"type": "network",
|
|
"multiplier": 1000000,
|
|
"base": 1000,
|
|
"compact": true,
|
|
"unit": "B/s"
|
|
}
|
|
},
|
|
"users": {
|
|
"exampleuser@realm": {
|
|
"resources": {
|
|
"max": {
|
|
"cores": 0,
|
|
"memory": 0,
|
|
"swap": 0,
|
|
"local": 0,
|
|
"cephpl": 0,
|
|
"network": 0
|
|
}
|
|
},
|
|
"nodes": [
|
|
"node-0-id",
|
|
"node-1-id"
|
|
],
|
|
"instances": {
|
|
"vmid": {
|
|
"min": 100,
|
|
"max": 199
|
|
},
|
|
"pool": "examplepool",
|
|
"vlan": "100",
|
|
"templates": {
|
|
"lxc": {
|
|
"net0": {
|
|
"value": "name=eth0,bridge=vmbr0,ip=dhcp,ip6=dhcp,tag=10,type=veth,rate=1000",
|
|
"resource": {
|
|
"name": "network",
|
|
"amount": 1000
|
|
}
|
|
}
|
|
},
|
|
"qemu": {
|
|
"net0": {
|
|
"value": "virtio,bridge=vmbr0,tag=10,rate=1000",
|
|
"resource": {
|
|
"name": "network",
|
|
"amount": 1000
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |