yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #07939
[Bug 1266344] [NEW] duplicate __init__() in ExtensionResource
Public bug reported:
Let's go in codes directly, to get resources from extension, the child
class[0] has an __init__() to register itself, and the farther class
[1]'s __init__() has already did this. If there are no some specified
variables needed by child class, the child's __init__ could be removed.
In <nova>/nova/api/openstack/compute/contrib/, nearly all of extensions
class don't have such a duplicate __init__(). Removing the __init__() in
child class could help keeping codes consistent and clean.
[0] https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/contrib/fixed_ips.py#L88
[1] https://github.com/openstack/nova/blob/master/nova/api/openstack/extensions.py#L63
** Affects: nova
Importance: Undecided
Assignee: Kun Huang (academicgareth)
Status: New
** Changed in: nova
Assignee: (unassigned) => Kun Huang (academicgareth)
--
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/1266344
Title:
duplicate __init__() in ExtensionResource
Status in OpenStack Compute (Nova):
New
Bug description:
Let's go in codes directly, to get resources from extension, the child
class[0] has an __init__() to register itself, and the farther class
[1]'s __init__() has already did this. If there are no some specified
variables needed by child class, the child's __init__ could be
removed. In <nova>/nova/api/openstack/compute/contrib/, nearly all of
extensions class don't have such a duplicate __init__(). Removing the
__init__() in child class could help keeping codes consistent and
clean.
[0] https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/contrib/fixed_ips.py#L88
[1] https://github.com/openstack/nova/blob/master/nova/api/openstack/extensions.py#L63
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1266344/+subscriptions
Follow ups
References