Skip to content

Commit

Permalink
vm desc uses auth (closes #9)
Browse files Browse the repository at this point in the history
  • Loading branch information
matt c committed Sep 27, 2024
1 parent 07b3308 commit e62c30c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pveautomate/automate.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def assign_admin_vm_permissions(self, vm_id, user):
)
response.raise_for_status()

def set_vm_desc(self, ticket, csrf_token, vm_id, desc):
def set_vm_desc(self, vm_id, desc):
"""
Set the description (Notes) of a VMID.
Expand All @@ -155,6 +155,7 @@ def set_vm_desc(self, ticket, csrf_token, vm_id, desc):
desc (str): The description to set for the VM.
"""
conf_url = f"{self.proxmox_url}/nodes/{self.node}/qemu/{vm_id}/config"
ticket, csrf_token = self.authenticate()
headers = {
"Cookie": f"PVEAuthCookie={ticket}",
"CSRFPreventionToken": csrf_token,
Expand Down

0 comments on commit e62c30c

Please sign in to comment.