Add various todo items
This commit is contained in:
parent
4e9f4dd22c
commit
5102077443
|
@ -36,6 +36,8 @@ class Client:
|
|||
url = f"{self.endpoint}/{'/'.join(resources)}"
|
||||
res = requests.get(url, headers=self.hdrs)
|
||||
|
||||
# FIXME: Should apply errors from Vultr for extra details. Specficially 401
|
||||
# should also inidicate if the IP is unauthorized.
|
||||
if res.status_code in (200, 202):
|
||||
return res.json()
|
||||
elif res.status_code == 204:
|
||||
|
|
|
@ -27,6 +27,8 @@ class NotEnoughArgs(vultron.err.Error):
|
|||
return f"sub-command requires 1 more argument: {name}"
|
||||
|
||||
# FIXME: Handle paging
|
||||
# FIXME: Add generic list command
|
||||
# FIXME: Ability to nest commands via classes
|
||||
class Command:
|
||||
"""A nop Vultron command. This feature is not implemented yet."""
|
||||
|
||||
|
@ -64,6 +66,8 @@ class Command:
|
|||
display = vultron.display.FORMATS[self.out](data)
|
||||
print(display.render())
|
||||
|
||||
# FIXME: Support for aliases. E.g. BareMetal -> Bare-Metal
|
||||
# FIXME: Or Bare_Metal -> Bare-Metal
|
||||
def find(self, name):
|
||||
needle = f"{self.FTR_PRFX}{name}".lower()
|
||||
haystack = dir(self)
|
||||
|
|
Loading…
Reference in New Issue