summaryrefslogtreecommitdiffstats
path: root/cli/objects
diff options
context:
space:
mode:
Diffstat (limited to 'cli/objects')
-rw-r--r--cli/objects/client.py8
-rw-r--r--cli/objects/modes.py10
2 files changed, 9 insertions, 9 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())
diff --git a/cli/objects/modes.py b/cli/objects/modes.py
index 53cd79a..c228eb0 100644
--- a/cli/objects/modes.py
+++ b/cli/objects/modes.py
@@ -19,19 +19,19 @@ class OgModes():
def set_modes(rest, args):
parser = argparse.ArgumentParser()
group = parser.add_argument_group('clients', 'Client selection args')
- group.add_argument('--center',
+ group.add_argument('--center-id',
type=int,
action='append',
default=[],
required=False,
- help='Clients from given center')
+ help='Clients from given center id')
group.add_argument('--room-id',
type=int,
action='append',
default=[],
required=False,
help='Clients from given room id')
- group.add_argument('--client',
+ group.add_argument('--client-ip',
action='append',
default=[],
required=False,
@@ -66,13 +66,13 @@ class OgModes():
scopes = r.json()
ips = set()
- for center in parsed_args.center:
+ for center in parsed_args.center_id:
center_scope = scope_lookup(center, 'center', scopes)
ips.update(ips_in_scope(center_scope))
for room in parsed_args.room_id:
room_scope = scope_lookup(room, 'room', scopes)
ips.update(ips_in_scope(room_scope))
- for l in parsed_args.client:
+ for l in parsed_args.client_ip:
ips.add(l)
if not ips: