diff --git a/iotronicclient/v1/fleet.py b/iotronicclient/v1/fleet.py index 62da4ab..dadbe86 100644 --- a/iotronicclient/v1/fleet.py +++ b/iotronicclient/v1/fleet.py @@ -96,10 +96,10 @@ class FleetManager(base.CreateManager): return self._update(resource_id=fleet_id, patch=patch, method=http_method) - def boards_in_fleets(self, status=None, marker=None, limit=None, - detail=False, sort_key=None, sort_dir=None, - fields=None, - project=None, fleet=None): + def boards_in_fleet(self, status=None, marker=None, limit=None, + detail=False, sort_key=None, sort_dir=None, + fields=None, + project=None, fleet=None): """Retrieve a list of boards. :param marker: Optional, the UUID of a board, eg the last @@ -147,7 +147,7 @@ class FleetManager(base.CreateManager): if status is not None: filters.append('status=%s' % status) - path = fleet + '/' + path = fleet + '/boards/' if detail: path += 'detail' diff --git a/iotronicclient/v1/fleet_shell.py b/iotronicclient/v1/fleet_shell.py index eca487c..cb0a102 100644 --- a/iotronicclient/v1/fleet_shell.py +++ b/iotronicclient/v1/fleet_shell.py @@ -164,7 +164,7 @@ def do_fleet_list(cc, args): default=[], help="One or more board fields. Only these fields will be fetched from " "the server. Can not be used when '--detail' is specified.") -def do_boards_in_fleets(cc, args): +def do_boards_in_fleet(cc, args): """List the boards which are registered in a Iotronic Fleet.""" fields = args.fields[0] if args.fields else None utils.check_empty_arg(args.fleet, '') @@ -200,7 +200,7 @@ def do_boards_in_fleets(cc, args): sort_fields, sort_field_labels)) - boards = cc.fleet.boards_in_fleets(**params) + boards = cc.fleet.boards_in_fleet(**params) cliutils.print_list(boards, fields, field_labels=field_labels, sortby_index=None,