mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
Linting
This commit is contained in:
parent
8fae5521be
commit
36e2a6c687
2 changed files with 17 additions and 8 deletions
|
@ -393,6 +393,7 @@ def vm_mem(vmid, mem):
|
|||
else:
|
||||
return '', 403
|
||||
|
||||
|
||||
@app.route('/vm/<string:vmid>/renew', methods=['POST'])
|
||||
@auth.oidc_auth
|
||||
def vm_renew(vmid):
|
||||
|
@ -408,6 +409,7 @@ def vm_renew(vmid):
|
|||
else:
|
||||
return '', 403
|
||||
|
||||
|
||||
@app.route('/vm/<string:vmid>/disk/create/<int:size>', methods=['POST'])
|
||||
@auth.oidc_auth
|
||||
def create_disk(vmid, size):
|
||||
|
@ -423,6 +425,7 @@ def create_disk(vmid, size):
|
|||
else:
|
||||
return '', 403
|
||||
|
||||
|
||||
@app.route('/vm/<string:vmid>/disk/<string:disk>/resize/<int:size>', methods=['POST'])
|
||||
@auth.oidc_auth
|
||||
def resize_disk(vmid, disk, size):
|
||||
|
@ -438,6 +441,7 @@ def resize_disk(vmid, disk, size):
|
|||
else:
|
||||
return '', 403
|
||||
|
||||
|
||||
@app.route('/vm/<string:vmid>/disk/<string:disk>/delete', methods=['POST'])
|
||||
@auth.oidc_auth
|
||||
def delete_disk(vmid, disk):
|
||||
|
@ -450,6 +454,7 @@ def delete_disk(vmid, disk):
|
|||
else:
|
||||
return '', 403
|
||||
|
||||
|
||||
@app.route('/vm/<string:vmid>/iso/create', methods=['POST'])
|
||||
@auth.oidc_auth
|
||||
def iso_create(vmid):
|
||||
|
@ -462,6 +467,7 @@ def iso_create(vmid):
|
|||
else:
|
||||
return '', 403
|
||||
|
||||
|
||||
@app.route('/vm/<string:vmid>/iso/<string:iso_drive>/delete', methods=['POST'])
|
||||
@auth.oidc_auth
|
||||
def iso_delete(vmid, iso_drive):
|
||||
|
@ -474,6 +480,7 @@ def iso_delete(vmid, iso_drive):
|
|||
else:
|
||||
return '', 403
|
||||
|
||||
|
||||
@app.route('/vm/<string:vmid>/iso/<string:iso_drive>/eject', methods=['POST'])
|
||||
@auth.oidc_auth
|
||||
def iso_eject(vmid, iso_drive):
|
||||
|
|
|
@ -315,7 +315,9 @@ class VM:
|
|||
@retry(wait=wait_fixed(2), stop=stop_after_attempt(5))
|
||||
def mount_iso(self, iso_drive, iso):
|
||||
proxmox = connect_proxmox()
|
||||
proxmox.nodes(self.node).qemu(self.id).config.post(**{iso_drive:'{},media=cdrom'.format(iso)})
|
||||
proxmox.nodes(self.node).qemu(self.id).config.post(
|
||||
**{iso_drive: '{},media=cdrom'.format(iso)}
|
||||
)
|
||||
|
||||
@retry(wait=wait_fixed(2), stop=stop_after_attempt(5))
|
||||
def create_disk(self, size):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue