Fix boards in fleet api.

Change-Id: If2ba85101fd00be46eca43d515096e4f674f3778
changes/06/607906/2
Fabio Verboso 4 years ago
parent 4ed0623dcf
commit ea8c81c502
  1. 10
      iotronicclient/v1/fleet.py
  2. 4
      iotronicclient/v1/fleet_shell.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'

@ -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, '<id>')
@ -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,

Loading…
Cancel
Save