Skip to content

Commit 0ca3a02

Browse files
committed
chore(cinder-understack): remove unused functions
These were added when this was one big class that didn't inherit from BaseVD but are not actually needed to be implemented by us.
1 parent 7128c12 commit 0ca3a02

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

python/cinder-understack/cinder_understack/dynamic_netapp_driver.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -456,37 +456,6 @@ def get_goodness_function(self):
456456
"""Return the goodness function for Cinder's scheduler scoring."""
457457
return self.configuration.safe_get("goodness_function") or None
458458

459-
def update_provider_info(self, *args, **kwargs):
460-
"""Update provider info for existing volumes.
461-
462-
This is called during service startup to sync our view of volumes
463-
with what's actually on the storage. The parent class has some
464-
weird argument handling, so we have to be defensive here.
465-
"""
466-
# Called during _sync_provider_info() in VolumeManager.
467-
# If not implemented, Cinder raises a TypeError during service startup.
468-
# Wrote this logic because it was registered with 3 and was called using 2 args
469-
# There is issue with in-built drivers calling logic
470-
if len(args) == 2:
471-
volumes, snapshots = args
472-
elif len(args) >= 3:
473-
_, volumes, snapshots = args[:3]
474-
else:
475-
raise TypeError(
476-
"update_provider_info() expects at least volumes and snapshots."
477-
)
478-
return {}, {}
479-
480-
def set_throttle(self):
481-
"""No-op throttle implementation to prevent AttributeError.
482-
483-
Some parts of Cinder expect this method to exist for rate limiting,
484-
but our driver doesn't implement throttling. This empty method
485-
prevents crashes when Cinder tries to call it.
486-
"""
487-
# Got AttributeError
488-
pass
489-
490459
def _get_flexvol_capacity_with_fallback(self, client, vol_name):
491460
"""Get FlexVol capacity with custom volume name to junction path mapping."""
492461
# TODO : find a API endpoint to fetch the junction path with svm and pool

0 commit comments

Comments
 (0)