Copy and append to static lists
core_interfaces and standard_interfaces are both static members of BaseDriver we need to take a copy of them before appending to them. Change-Id: Ic6edc5e49a25849c7871dbc9e6e1d5a5eb229e57 Closes-Bug: #1672457
This commit is contained in:
parent
8aec5fb6a5
commit
338651eae5
@ -131,7 +131,6 @@ class BaseDriver(object):
|
|||||||
"""
|
"""
|
||||||
standard_interfaces.append('raid')
|
standard_interfaces.append('raid')
|
||||||
|
|
||||||
@abc.abstractmethod
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -164,20 +163,19 @@ class BareDriver(BaseDriver):
|
|||||||
class, as well as appended to core_interfaces or standard_interfaces here.
|
class, as well as appended to core_interfaces or standard_interfaces here.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
network = None
|
||||||
self.network = None
|
"""`Core` attribute for network connectivity.
|
||||||
"""`Core` attribute for network connectivity.
|
|
||||||
|
|
||||||
A reference to an instance of :class:NetworkInterface.
|
A reference to an instance of :class:NetworkInterface.
|
||||||
"""
|
"""
|
||||||
self.core_interfaces.append('network')
|
core_interfaces = BaseDriver.core_interfaces + ['network']
|
||||||
|
|
||||||
self.storage = None
|
storage = None
|
||||||
"""`Standard` attribute for (remote) storage interface.
|
"""`Standard` attribute for (remote) storage interface.
|
||||||
|
|
||||||
A reference to an instance of :class:StorageInterface.
|
A reference to an instance of :class:StorageInterface.
|
||||||
"""
|
"""
|
||||||
self.standard_interfaces.append('storage')
|
standard_interfaces = BaseDriver.standard_interfaces + ['storage']
|
||||||
|
|
||||||
|
|
||||||
ALL_INTERFACES = set(BareDriver().all_interfaces)
|
ALL_INTERFACES = set(BareDriver().all_interfaces)
|
||||||
|
3
releasenotes/notes/bug-1672457-563d5354b41b060e.yaml
Normal file
3
releasenotes/notes/bug-1672457-563d5354b41b060e.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- Fixed a bug that was causing an increase in CPU usage over time.
|
Loading…
Reference in New Issue
Block a user