portainer: list -> list_stacks
This commit is contained in:
parent
6d81e48b47
commit
b9dac2daaa
@ -76,7 +76,7 @@ class PortainerHost(BaseCLi):
|
|||||||
self.error('No "jwt" key in /auth response found.')
|
self.error('No "jwt" key in /auth response found.')
|
||||||
return token
|
return token
|
||||||
|
|
||||||
def list(self) -> List[PortainerStack]:
|
def list_stacks(self) -> List[PortainerStack]:
|
||||||
response = self.api.get('/stacks')
|
response = self.api.get('/stacks')
|
||||||
raw_stacks = response.json()
|
raw_stacks = response.json()
|
||||||
return [classFromArgs(PortainerStack, stack) for stack in raw_stacks]
|
return [classFromArgs(PortainerStack, stack) for stack in raw_stacks]
|
||||||
|
|||||||
@ -69,7 +69,7 @@ class PortainerStackCLi(BaseCLi):
|
|||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
host = PortainerHost(PORTAINER_HOST_URLS[self.args.hostname])
|
host = PortainerHost(PORTAINER_HOST_URLS[self.args.hostname])
|
||||||
print(host.list()[0])
|
print(host.list_stacks()[0])
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user