diff options
Diffstat (limited to 'cli/objects/room.py')
-rw-r--r-- | cli/objects/room.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/cli/objects/room.py b/cli/objects/room.py index 66d0dba..e6b5445 100644 --- a/cli/objects/room.py +++ b/cli/objects/room.py @@ -20,10 +20,10 @@ class OgRoom(): type=int, required=True, help='provide the id of the center that will contain the room') - parser.add_argument('--location', + parser.add_argument('--desc', nargs='?', required=False, - help='specify the location of the room') + help='room description') parser.add_argument('--gateway', nargs='?', required=True, @@ -36,11 +36,11 @@ class OgRoom(): nargs='?', required=False, help='address of the dns server') - parser.add_argument('--group', + parser.add_argument('--folder', nargs='?', type=int, required=False, - help='id of the group that will contain the room') + help='id of the folder that will contain the room') parsed_args = parser.parse_args(args) err = False @@ -71,8 +71,10 @@ class OgRoom(): payload['ntp'] = parsed_args.ntp if parsed_args.dns: payload['dns'] = parsed_args.dns - if parsed_args.group: - payload['group'] = parsed_args.group + if parsed_args.folder: + payload['group'] = parsed_args.folder + if parsed_args.desc: + payload['location'] = parsed_args.desc rest.post('/room/add', payload=payload) @staticmethod |