summaryrefslogtreecommitdiffstats
path: root/cli/objects/server.py
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-09-12 11:42:30 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-09-12 11:42:30 +0200
commit175a38606ace0f14b538da2e613aaf9421b174e6 (patch)
tree38ba718760f36d960279be44cd5c4de9e162dd39 /cli/objects/server.py
parent7f09d148b4ec2b6bca500a7bb33f97072930bc9e (diff)
repo: server: replace --address with --ip
Make flag format uniform for all the commands.
Diffstat (limited to 'cli/objects/server.py')
-rw-r--r--cli/objects/server.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/objects/server.py b/cli/objects/server.py
index c3f83a8..468ff00 100644
--- a/cli/objects/server.py
+++ b/cli/objects/server.py
@@ -19,17 +19,17 @@ class OgServer():
@staticmethod
def add_server(rest, args):
parser = argparse.ArgumentParser(prog='ogcli add server')
- parser.add_argument('--address',
+ parser.add_argument('--ip',
nargs='?',
required=True,
help='valid ogserver ip address')
parsed_args = parser.parse_args(args)
- if not check_address(parsed_args.address):
- print(f'Invalid IP address: {parsed_args.address}')
+ if not check_address(parsed_args.ip):
+ print(f'Invalid IP address: {parsed_args.ip}')
return
- payload = {'address': parsed_args.address}
+ payload = {'address': parsed_args.ip}
rest.post('/server', payload=payload)
@staticmethod