Comment 0 for bug 1936216

Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

The API only supports a list_all for networks.

        """Fetches a list of all networks for a project."""
        # Pass filters in "params" argument to do_request
        return self.list('networks', self.networks_path, retrieve_all,
                         **_params)

related bug - https://bugs.launchpad.net/horizon/+bug/1746184

Needs additional function with limit params.
If I have 100 networks, all 100 networks are returned.
This affects both horizon and cli.

openstack network list -f json --limit 1
usage: openstack network list [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN] [--quote {all,minimal,none,nonnumeric}] [--noindent] [--max-width <integer>] [--fit-width] [--print-empty]
                              [--sort-column SORT_COLUMN] [--external | --internal] [--long] [--name <name>] [--enable | --disable] [--project <project>]
                              [--project-domain <project-domain>] [--share | --no-share] [--status <status>] [--provider-network-type <provider-network-type>]
                              [--provider-physical-network <provider-physical-network>] [--provider-segment <provider-segment>] [--agent <agent-id>] [--tags <tag>[,<tag>,...]]
                              [--any-tags <tag>[,<tag>,...]] [--not-tags <tag>[,<tag>,...]] [--not-any-tags <tag>[,<tag>,...]]