summaryrefslogtreecommitdiffstats
path: root/cli/objects/client.py
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2021-03-03 10:17:11 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2021-03-03 11:17:05 +0100
commitc80f27c98ca1748ca08cb00bd57eb4c3baba79a5 (patch)
tree31979199147dd935fc0f526f5820f9e95f95b0e2 /cli/objects/client.py
parent1be7f3f8a85ee1f09fd681e774511674538067ef (diff)
Make client and center params more specific
Non specific parameter names like '--center' or '--client' should not be used to specify an ip or id, only a literal name. Rename --client to --client-ip and --center to --center-id to leave unspecific parameters free to later implement --center or --client using names.
Diffstat (limited to 'cli/objects/client.py')
-rw-r--r--cli/objects/client.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/objects/client.py b/cli/objects/client.py
index 5b2b1a9..d060af1 100644
--- a/cli/objects/client.py
+++ b/cli/objects/client.py
@@ -18,26 +18,26 @@ class OgClient():
@staticmethod
def list_client_hardware(rest, args):
parser = argparse.ArgumentParser()
- parser.add_argument('--client',
+ parser.add_argument('--client-ip',
nargs=1,
type=str,
required=True,
help='client IP')
parsed_args = parser.parse_args(args)
- payload = {'client': parsed_args.client}
+ payload = {'client': parsed_args.client_ip}
r = rest.get('/hardware', payload=payload)
print(r.json())
@staticmethod
def get_client_properties(rest, args):
parser = argparse.ArgumentParser()
- parser.add_argument('--client',
+ parser.add_argument('--client-ip',
nargs=1,
required=True,
help='client IP')
parsed_args = parser.parse_args(args)
- payload = {'client': parsed_args.client}
+ payload = {'client': parsed_args.client_ip}
r = rest.get('/client/info', payload=payload)
print(r.json())