yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #19784
[Bug 1364758] [NEW] Metadata filtering logic too tightly coupled with other code
Public bug reported:
The def _get_all_instance_metadata() at
https://github.com/openstack/nova/blob/master/nova/compute/api.py#L2885
contains the logic for filtering a list of instances. The problem is, it
also contains nova-specific code, e.g. policy checking. This method is
being used by describe_tags of the EC2 API too. In an effort to add more
resources (e.g. voumes, volume snapshots) to the EC2 API, the filtering
logic needs to be abstracted out into a common function for all
resources (e.g. get_all_resource_metadata).
Another issue is, the functioning of this filtering logic is only
minimally tested in nova's core code. Strangely the filtering logic is
extensively tested in the EC2 API tests, which is the wrong place to
test them. As a part of fixing this bug, unit tests to test this new
common function should be added too.
** Affects: nova
Importance: Undecided
Assignee: Rushi Agrawal (rushiagr)
Status: New
** Tags: ec2 low-hanging-fruit testing
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1364758
Title:
Metadata filtering logic too tightly coupled with other code
Status in OpenStack Compute (Nova):
New
Bug description:
The def _get_all_instance_metadata() at
https://github.com/openstack/nova/blob/master/nova/compute/api.py#L2885
contains the logic for filtering a list of instances. The problem is,
it also contains nova-specific code, e.g. policy checking. This method
is being used by describe_tags of the EC2 API too. In an effort to add
more resources (e.g. voumes, volume snapshots) to the EC2 API, the
filtering logic needs to be abstracted out into a common function for
all resources (e.g. get_all_resource_metadata).
Another issue is, the functioning of this filtering logic is only
minimally tested in nova's core code. Strangely the filtering logic is
extensively tested in the EC2 API tests, which is the wrong place to
test them. As a part of fixing this bug, unit tests to test this new
common function should be added too.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1364758/+subscriptions
Follow ups
References