Move test command
This commit is contained in:
parent
516117f634
commit
01ae6ee0bf
|
@ -46,15 +46,6 @@ def main():
|
|||
elif args.action == 'alert':
|
||||
alert(config, containers)
|
||||
|
||||
# Random test stuff here
|
||||
elif args.action == "test":
|
||||
nodes = utils.get_swarm_nodes()
|
||||
print("Swarm nodes:")
|
||||
for node in nodes:
|
||||
addr = node.attrs['Status']['Addr']
|
||||
state = node.attrs['Status']['State']
|
||||
print(' - {} {} {}'.format(node.id, addr, state))
|
||||
|
||||
|
||||
def backup(config, containers):
|
||||
"""Request a backup to start"""
|
||||
|
|
|
@ -1,9 +1,15 @@
|
|||
from .base import BaseCommand
|
||||
|
||||
from restic_compose_backup import utils
|
||||
|
||||
class Command(BaseCommand):
|
||||
"""Test a command"""
|
||||
name = "test"
|
||||
|
||||
def run(self):
|
||||
print("Test!")
|
||||
"""Random test command"""
|
||||
nodes = utils.get_swarm_nodes()
|
||||
print("Swarm nodes:")
|
||||
for node in nodes:
|
||||
addr = node.attrs['Status']['Addr']
|
||||
state = node.attrs['Status']['State']
|
||||
print(' - {} {} {}'.format(node.id, addr, state))
|
||||
|
|
Loading…
Reference in New Issue