From a9f3fabc241e5fac2ae487e31ec31bf738150da9 Mon Sep 17 00:00:00 2001 From: matt c Date: Fri, 27 Sep 2024 18:23:53 +0100 Subject: [PATCH] ensure create_range has user arg (closes #10) --- README.md | 5 ++++- pveautomate/automate.py | 4 +--- setup.py | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b5be655..895f986 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # pveautomate -Proxmox VE api (not fully implemented) \ No newline at end of file +Proxmox VE API + +## Missing a function you need? +Feel free to open a PR or Issue, but be aware API implementation has been prioritized for Alchemicode's own softwware that relies on this package. \ No newline at end of file diff --git a/pveautomate/automate.py b/pveautomate/automate.py index 87288e1..954e122 100644 --- a/pveautomate/automate.py +++ b/pveautomate/automate.py @@ -254,7 +254,7 @@ def destroy_range(self): print("Destroying VMID " + str(vm["VMID"])) self.destroy_vm(vm["VMID"]) - def create_range(self, ids, user=None): + def create_range(self, ids, user): """ Create cloned VMs for a given username. @@ -263,8 +263,6 @@ def create_range(self, ids, user=None): user (str): The username to assign to the cloned VMs. Defaults to None. """ template_vm_ids = ids - if user is None: - user = input("Owner user (format 'foo@pve' or 'foo@pam'): ") uf = user.split("@")[0] new_instance_names = [uf + "-win1", uf + "-win2", uf + "-win3"] diff --git a/setup.py b/setup.py index c87b74a..cffe6ee 100644 --- a/setup.py +++ b/setup.py @@ -5,8 +5,8 @@ version="0.1.9", description="A package to automate Proxmox VE tasks", long_description=open("README.md").read() - + "\n# Usage Docs:\n" - + open("DOCS.md").read(), + + "\n\n# Usage Docs:\n" + + open("docs.html").read(), long_description_content_type="text/markdown", author="Matt Compton", author_email="matt@alchemicode.com",