-
Notifications
You must be signed in to change notification settings - Fork 65
Description
Some time ago 'list' operations has been introduced for openstack resources node types.
In general these operations are working fine, but for standard "openstack_config" (containing information about tenant e.g. with paramters: auth_url, password, tenant_name, username)
some methods are returning list of items used by given tenant only and some methods are returning list of items used by whole openstack system (sum for all tenants).
Methods which by default are returning list of items used by single tenant:
- openstack.nova_plugin.server.list_servers
- openstack.nova_plugin.keypair.list_keypairs
- openstack.cinder_plugin.volume.list_volumes
- openstack.glance_plugin.image.list_images
- openstack.nova_plugin.host_aggregate.list_host_aggregates
- openstack.nova_plugin.server_group.list_servergroups
-
openstack.nova_plugin.flavor.list_flavors
Methods which by default are returning list of items used by all tenants (even if tenant is set in openstack_config):
- openstack.neutron_plugin.subnet.list_subnets
- openstack.neutron_plugin.port.list_ports
- openstack.neutron_plugin.network.list_networks
- openstack.neutron_plugin.floatingip.list_floatingips
- openstack.neutron_plugin.security_group.list_security_groups
- openstack.neutron_plugin.router.list_routers
Reason of this bahaviour is fact that 'list' methods in neutron_client are returing data for all tenants.
Proper behaviour can be enforced by workaround in blueprint:
list:
implementation: openstack.neutron_plugin.subnet.list_subnets
inputs:
args:
tenant_id: '<tenant_id>' # tenant name doesn't work !
But issue is that current inconsistent behaviour is misleading for end user of plugin.
All 'list' methods should return list of tenant resources when tenant ID or name is present in openstack_config.
See also:
https://bugs.launchpad.net/python-neutronclient/+bug/1250766