Finish clone_template function
This commit is contained in:
parent
b9717e173c
commit
c44d13f532
19
main.py
19
main.py
@ -63,13 +63,26 @@ def delete_vm(
|
||||
|
||||
def clone_template(
|
||||
proxmox,
|
||||
node,
|
||||
vmid,
|
||||
newid=None,
|
||||
node: str,
|
||||
vmid: int,
|
||||
newid: int = None,
|
||||
prefix: int ='stepchenkoas',
|
||||
):
|
||||
if newid is None:
|
||||
newid = proxmox.cluster.get('nextid')
|
||||
|
||||
return proxmox.nodes(node).qemu(vmid).clone.post(
|
||||
newid=newid,
|
||||
node=node,
|
||||
vmid=vmid,
|
||||
format='raw',
|
||||
full=1,
|
||||
name=f'{prefix}-test-clone',
|
||||
pool='Virt_LAB',
|
||||
storage='rbd-storage',
|
||||
target=node,
|
||||
)
|
||||
|
||||
|
||||
def main():
|
||||
proxmox = ProxmoxAPI(
|
||||
|
Loading…
Reference in New Issue
Block a user