diff --git a/magnumclient/api/bays.py b/magnumclient/api/bays.py index b69a8226..2cdea7f2 100644 --- a/magnumclient/api/bays.py +++ b/magnumclient/api/bays.py @@ -33,12 +33,12 @@ class BayManager(base.Manager): def _path(id=None): return '/v1/bays/%s' % id if id else '/v1/bays' - def list(self, marker=None, limit=None, sort_key=None, + def list(self, limit=None, marker=None, sort_key=None, sort_dir=None, detail=False): - """Retrieve a list of bays. + """Retrieve a list of port. - :param marker: Optional, the UUID of a bays, eg the last - bays from a previous result set. Return + :param marker: Optional, the UUID of a port, eg the last + port from a previous result set. Return the next result set. :param limit: The maximum number of results to return per request, if: @@ -72,13 +72,9 @@ class BayManager(base.Manager): path += '?' + '&'.join(filters) if limit is None: - # TODO(yuanying): if endpoint returns "map", - # change None to response_key - return self._list(self._path(path), None) + return self._list(self._path(path), "bays") else: - # TODO(yuanying): if endpoint returns "map", - # change None to response_key - return self._list_pagination(self._path(path), None, + return self._list_pagination(self._path(path), "bays", limit=limit) def get(self, id): diff --git a/magnumclient/api/shell.py b/magnumclient/api/shell.py index 1a1b563b..f7c87a48 100644 --- a/magnumclient/api/shell.py +++ b/magnumclient/api/shell.py @@ -35,7 +35,7 @@ def _show_bay(bay): def do_bay_list(cs, args): """Print a list of available bays.""" bays = cs.bays.list() - columns = ('id', 'name', 'type') + columns = ('uuid', 'name', 'type') utils.print_list(bays, columns, {'versions': _print_list_field('versions')})