Skip to content

Commit eedb53a

Browse files
committed
fix(cinder-understack): remove unnecessary methods
Some of these methods existed when everything was collapsed together into one class but they aren't necessary now.
1 parent da6b21a commit eedb53a

File tree

1 file changed

+4
-46
lines changed

1 file changed

+4
-46
lines changed

python/cinder-understack/cinder_understack/dynamic_netapp_driver.py

Lines changed: 4 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,20 @@ class NetappDynamicLibrary(NetAppNVMeStorageLibrary):
4040
- Ours: Multiple SVMs per backend, SVM name from volume type
4141
"""
4242

43+
REQUIRED_CMODE_FLAGS = []
44+
4345
def __init__(self, *args, **kwargs):
4446
"""Initialize driver without creating SVM connections.
4547
4648
Parent driver creates static connections during init. We defer
4749
SVM connections until volume creation when we know which SVM to use.
4850
"""
49-
self.initialized = False
50-
self.client = None
51-
driver_name = kwargs.pop("driver_name", "NetAppDynamicNVMe")
52-
driver_protocol = kwargs.pop("driver_protocol", "nvme")
53-
self.app_version = kwargs.get("app_version", "1.0.0")
54-
5551
self._setup_configuration(**kwargs)
5652

57-
super().__init__(driver_name, driver_protocol, **kwargs)
53+
super().__init__(*args, **kwargs)
54+
self.client = None
5855
self.ssc_library = None
5956
self.perf_library = None
60-
self.init_capabilities()
6157

6258
def _setup_configuration(self, **kwargs):
6359
"""Setup configuration using cinder.volume.configuration module."""
@@ -110,15 +106,6 @@ def _setup_configuration(self, **kwargs):
110106
"Failed to register configuration options for testing: %s", e
111107
)
112108

113-
@property
114-
def supported(self):
115-
# Used by Cinder to determine whether this driver is active/enabled
116-
return True
117-
118-
def get_version(self):
119-
# Called at Cinder service startup to report backend driver version
120-
return "NetappCinderDynamicDriver 1.0"
121-
122109
def do_setup(self, context):
123110
"""Skip static NetApp connections, defer to volume creation time."""
124111
LOG.info("Skipping static setup, will connect to SVMs dynamically")
@@ -132,22 +119,6 @@ def check_for_setup_error(self):
132119
"""Skip static validation since we connect to SVMs dynamically."""
133120
pass
134121

135-
def init_capabilities(self):
136-
"""Set driver capabilities for Cinder scheduler."""
137-
max_over_subscription_ratio = self.configuration.max_over_subscription_ratio
138-
self._capabilities = {
139-
"thin_provisioning_support": True,
140-
"thick_provisioning_support": True,
141-
"multiattach": True,
142-
"snapshot_support": True,
143-
"max_over_subscription_ratio": max_over_subscription_ratio,
144-
}
145-
self.capabilities = self._capabilities
146-
147-
def set_initialized(self):
148-
"""Mark driver as ready for volume operations."""
149-
self.initialized = True
150-
151122
def _get_all_svm_clients_from_volume_types(self):
152123
"""Connect to all SVMs found in volume type metadata."""
153124
svm_clients = {}
@@ -1029,10 +1000,6 @@ def get_volume_stats(self, refresh=False):
10291000
"""Get volume stats."""
10301001
return self.library.get_volume_stats(refresh)
10311002

1032-
def update_provider_info(self, volumes, snapshots):
1033-
"""Update provider info."""
1034-
return self.library.update_provider_info(volumes, snapshots)
1035-
10361003
def create_export(self, context, volume, connector):
10371004
"""Create export for volume."""
10381005
return self.library.create_export(context, volume, connector)
@@ -1044,12 +1011,3 @@ def ensure_export(self, context, volume):
10441011
def remove_export(self, context, volume):
10451012
"""Remove export for volume."""
10461013
return self.library.remove_export(context, volume)
1047-
1048-
1049-
# NOTES
1050-
# Namespace: Manually created because we skip standard do_setup()
1051-
# Pool: Custom svm#flexvol format to support multi-SVM
1052-
# Client: Runtime creation based on volume type metadata vs static config
1053-
# Metadata: volume type extra_specs vs cinder.conf
1054-
# Library Initialization: Lazy initialization during volume creation
1055-
# Pool Discovery: Multi-SVM aggregation vs single SVM

0 commit comments

Comments
 (0)