mirror of
https://github.com/ZettaIO/restic-compose-backup.git
synced 2025-10-10 20:27:42 +00:00
Move test command
This commit is contained in:
@@ -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))
|
||||
|
Reference in New Issue
Block a user