Fix boards in fleet api.
Change-Id: If2ba85101fd00be46eca43d515096e4f674f3778
This commit is contained in:
@@ -96,10 +96,10 @@ class FleetManager(base.CreateManager):
|
|||||||
return self._update(resource_id=fleet_id, patch=patch,
|
return self._update(resource_id=fleet_id, patch=patch,
|
||||||
method=http_method)
|
method=http_method)
|
||||||
|
|
||||||
def boards_in_fleets(self, status=None, marker=None, limit=None,
|
def boards_in_fleet(self, status=None, marker=None, limit=None,
|
||||||
detail=False, sort_key=None, sort_dir=None,
|
detail=False, sort_key=None, sort_dir=None,
|
||||||
fields=None,
|
fields=None,
|
||||||
project=None, fleet=None):
|
project=None, fleet=None):
|
||||||
"""Retrieve a list of boards.
|
"""Retrieve a list of boards.
|
||||||
|
|
||||||
:param marker: Optional, the UUID of a board, eg the last
|
:param marker: Optional, the UUID of a board, eg the last
|
||||||
@@ -147,7 +147,7 @@ class FleetManager(base.CreateManager):
|
|||||||
if status is not None:
|
if status is not None:
|
||||||
filters.append('status=%s' % status)
|
filters.append('status=%s' % status)
|
||||||
|
|
||||||
path = fleet + '/'
|
path = fleet + '/boards/'
|
||||||
|
|
||||||
if detail:
|
if detail:
|
||||||
path += 'detail'
|
path += 'detail'
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ def do_fleet_list(cc, args):
|
|||||||
default=[],
|
default=[],
|
||||||
help="One or more board fields. Only these fields will be fetched from "
|
help="One or more board fields. Only these fields will be fetched from "
|
||||||
"the server. Can not be used when '--detail' is specified.")
|
"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."""
|
"""List the boards which are registered in a Iotronic Fleet."""
|
||||||
fields = args.fields[0] if args.fields else None
|
fields = args.fields[0] if args.fields else None
|
||||||
utils.check_empty_arg(args.fleet, '<id>')
|
utils.check_empty_arg(args.fleet, '<id>')
|
||||||
@@ -200,7 +200,7 @@ def do_boards_in_fleets(cc, args):
|
|||||||
sort_fields,
|
sort_fields,
|
||||||
sort_field_labels))
|
sort_field_labels))
|
||||||
|
|
||||||
boards = cc.fleet.boards_in_fleets(**params)
|
boards = cc.fleet.boards_in_fleet(**params)
|
||||||
cliutils.print_list(boards, fields,
|
cliutils.print_list(boards, fields,
|
||||||
field_labels=field_labels,
|
field_labels=field_labels,
|
||||||
sortby_index=None,
|
sortby_index=None,
|
||||||
|
|||||||
Reference in New Issue
Block a user