Skip to content

Commit e7412a0

Browse files
committed
refactor(LVHDSR): rename to "LVMSR"
Signed-off-by: Ronan Abhamon <ronan.abhamon@vates.fr>
1 parent d2845fa commit e7412a0

File tree

13 files changed

+104
-104
lines changed

13 files changed

+104
-104
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SM_DRIVERS += udev
99
SM_DRIVERS += ISO
1010
SM_DRIVERS += HBA
1111
SM_DRIVERS += Linstor
12-
SM_DRIVERS += LVHD
12+
SM_DRIVERS += LVM
1313
SM_DRIVERS += LVHDoISCSI
1414
SM_DRIVERS += LVHDoHBA
1515
SM_DRIVERS += SHM
@@ -203,7 +203,7 @@ install: build
203203
ln -sf $$i"SR.py" $$i"SR"; \
204204
done
205205
rm $(SM_STAGING)$(SM_DEST)/SHMSR
206-
cd $(SM_STAGING)$(SM_DEST) && rm -f LVHDSR && ln -sf LVHDSR.py LVMSR
206+
cd $(SM_STAGING)$(SM_DEST) && rm -f LVMSR && ln -sf LVMSR.py LVHDSR
207207
cd $(SM_STAGING)$(SM_DEST) && rm -f RawISCSISR && ln -sf RawISCSISR.py ISCSISR
208208
cd $(SM_STAGING)$(SM_DEST) && rm -f LVHDoISCSISR && ln -sf LVHDoISCSISR.py LVMoISCSISR
209209
cd $(SM_STAGING)$(SM_DEST) && rm -f LVHDoHBASR && ln -sf LVHDoHBASR.py LVMoHBASR

drivers/LVHDoFCoESR.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import SR
2424
import VDI
2525
import LVHDoHBASR
26-
import LVHDSR
26+
import LVMSR
2727
import SRCommand
2828
import sys
2929
import xs_errors
@@ -89,7 +89,7 @@ def load(self, sr_uuid) -> None:
8989
raise xs_errors.XenError('ConfigSCSIid')
9090

9191
self.SCSIid = self.dconf['SCSIid']
92-
LVHDSR.LVHDSR.load(self, sr_uuid)
92+
LVMSR.LVMSR.load(self, sr_uuid)
9393

9494
@override
9595
def vdi(self, uuid) -> VDI.VDI:

drivers/LVHDoHBASR.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from sm_typing import override
2323

2424
import SR
25-
import LVHDSR
25+
import LVMSR
2626
import SRCommand
2727
import VDI
2828
import lvutil
@@ -58,7 +58,7 @@
5858
}
5959

6060

61-
class LVHDoHBASR(LVHDSR.LVHDSR):
61+
class LVHDoHBASR(LVMSR.LVMSR):
6262
"""LVHD over HBA storage repository"""
6363

6464
@override
@@ -120,7 +120,7 @@ def create(self, sr_uuid, size) -> None:
120120
self.mpathmodule.refresh(self.SCSIid, 0)
121121
self._pathrefresh(LVHDoHBASR)
122122
try:
123-
LVHDSR.LVHDSR.create(self, sr_uuid, size)
123+
LVMSR.LVMSR.create(self, sr_uuid, size)
124124
finally:
125125
if self.mpath == "true":
126126
self.mpathmodule.reset(self.SCSIid, explicit_unmap=True)
@@ -144,7 +144,7 @@ def attach(self, sr_uuid) -> None:
144144
# Must re-initialise the multipath node
145145
if self.mpath == "true":
146146
self.mpathmodule.refresh(self.SCSIid, 0)
147-
LVHDSR.LVHDSR.attach(self, sr_uuid)
147+
LVMSR.LVMSR.attach(self, sr_uuid)
148148
self._setMultipathableFlag(SCSIid=self.SCSIid)
149149

150150
@override
@@ -160,7 +160,7 @@ def scan(self, sr_uuid) -> None:
160160
self._setMultipathableFlag(SCSIid=self.SCSIid)
161161
else:
162162
self._pathrefresh(LVHDoHBASR)
163-
LVHDSR.LVHDSR.scan(self, sr_uuid)
163+
LVMSR.LVMSR.scan(self, sr_uuid)
164164

165165
@override
166166
def probe(self) -> str:
@@ -181,7 +181,7 @@ def probe(self) -> str:
181181

182182
try:
183183
self._pathrefresh(LVHDoHBASR)
184-
result = LVHDSR.LVHDSR.probe(self)
184+
result = LVMSR.LVMSR.probe(self)
185185
if self.mpath == "true":
186186
self.mpathmodule.reset(self.SCSIid, explicit_unmap=True)
187187
return result
@@ -192,7 +192,7 @@ def probe(self) -> str:
192192

193193
@override
194194
def detach(self, sr_uuid) -> None:
195-
LVHDSR.LVHDSR.detach(self, sr_uuid)
195+
LVMSR.LVMSR.detach(self, sr_uuid)
196196
self.mpathmodule.reset(self.SCSIid, explicit_unmap=True)
197197
try:
198198
pbdref = util.find_my_pbd(self.session, self.host_ref, self.sr_ref)
@@ -219,7 +219,7 @@ def _remove_device_nodes(self):
219219
def delete(self, sr_uuid) -> None:
220220
self._pathrefresh(LVHDoHBASR)
221221
try:
222-
LVHDSR.LVHDSR.delete(self, sr_uuid)
222+
LVMSR.LVMSR.delete(self, sr_uuid)
223223
finally:
224224
if self.mpath == "true":
225225
self.mpathmodule.reset(self.SCSIid, explicit_unmap=True)
@@ -230,7 +230,7 @@ def vdi(self, uuid) -> VDI.VDI:
230230
return LVHDoHBAVDI(self, uuid)
231231

232232

233-
class LVHDoHBAVDI(LVHDSR.LVHDVDI):
233+
class LVHDoHBAVDI(LVMSR.LVHDVDI):
234234
@override
235235
def generate_config(self, sr_uuid, vdi_uuid) -> str:
236236
util.SMlog("LVHDoHBAVDI.generate_config")

drivers/LVHDoISCSISR.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
import SR
2424
import VDI
25-
import LVHDSR
25+
import LVMSR
2626
import BaseISCSI
2727
import SRCommand
2828
import util
@@ -71,7 +71,7 @@
7171
}
7272

7373

74-
class LVHDoISCSISR(LVHDSR.LVHDSR):
74+
class LVHDoISCSISR(LVMSR.LVMSR):
7575
"""LVHD over ISCSI storage repository"""
7676

7777
@override
@@ -99,7 +99,7 @@ def load(self, sr_uuid) -> None:
9999
else:
100100
self.create_iscsi_sessions(sr_uuid)
101101

102-
LVHDSR.LVHDSR.load(self, sr_uuid)
102+
LVMSR.LVMSR.load(self, sr_uuid)
103103

104104
def create_iscsi_sessions(self, sr_uuid):
105105
if 'target' in self.original_srcmd.dconf:
@@ -441,7 +441,7 @@ def create(self, sr_uuid, size) -> None:
441441
try:
442442
self.iscsi._attach_LUN_bySCSIid(self.SCSIid)
443443
self._pathrefresh(LVHDoISCSISR)
444-
LVHDSR.LVHDSR.create(self, sr_uuid, size)
444+
LVMSR.LVMSR.create(self, sr_uuid, size)
445445
except Exception as inst:
446446
self.iscsi.detach(sr_uuid)
447447
raise xs_errors.XenError("SRUnavailable", opterr=inst)
@@ -450,7 +450,7 @@ def create(self, sr_uuid, size) -> None:
450450
@override
451451
def delete(self, sr_uuid) -> None:
452452
self._pathrefresh(LVHDoISCSISR)
453-
LVHDSR.LVHDSR.delete(self, sr_uuid)
453+
LVMSR.LVMSR.delete(self, sr_uuid)
454454
for i in self.iscsiSRs:
455455
i.detach(sr_uuid)
456456

@@ -486,7 +486,7 @@ def attach(self, sr_uuid) -> None:
486486
scsiutil.rescan([self.iscsi.adapter[a]])
487487

488488
self._pathrefresh(LVHDoISCSISR)
489-
LVHDSR.LVHDSR.attach(self, sr_uuid)
489+
LVMSR.LVMSR.attach(self, sr_uuid)
490490
except Exception as inst:
491491
for i in self.iscsiSRs:
492492
i.detach(sr_uuid)
@@ -495,7 +495,7 @@ def attach(self, sr_uuid) -> None:
495495

496496
@override
497497
def detach(self, sr_uuid) -> None:
498-
LVHDSR.LVHDSR.detach(self, sr_uuid)
498+
LVMSR.LVMSR.detach(self, sr_uuid)
499499
for i in self.iscsiSRs:
500500
i.detach(sr_uuid)
501501

@@ -508,7 +508,7 @@ def scan(self, sr_uuid) -> None:
508508
i.attach(sr_uuid)
509509
except xs_errors.SROSError:
510510
util.SMlog("Connection failed for target %s, continuing.." % i.target)
511-
LVHDSR.LVHDSR.scan(self, sr_uuid)
511+
LVMSR.LVMSR.scan(self, sr_uuid)
512512

513513
@override
514514
def probe(self) -> str:
@@ -530,7 +530,7 @@ def probe(self) -> str:
530530
self.iscsi.attach(self.uuid)
531531
self.iscsi._attach_LUN_bySCSIid(self.SCSIid)
532532
self._pathrefresh(LVHDoISCSISR)
533-
out = LVHDSR.LVHDSR.probe(self)
533+
out = LVMSR.LVMSR.probe(self)
534534
self.iscsi.detach(self.uuid)
535535
return out
536536

@@ -553,7 +553,7 @@ def vdi(self, uuid) -> VDI.VDI:
553553
return LVHDoISCSIVDI(self, uuid)
554554

555555

556-
class LVHDoISCSIVDI(LVHDSR.LVHDVDI):
556+
class LVHDoISCSIVDI(LVMSR.LVHDVDI):
557557
@override
558558
def generate_config(self, sr_uuid, vdi_uuid) -> str:
559559
util.SMlog("LVHDoISCSIVDI.generate_config")
@@ -582,7 +582,7 @@ def attach_from_config(self, sr_uuid, vdi_uuid) -> str:
582582
try:
583583
self.sr.iscsi.attach(sr_uuid)
584584
self.sr.iscsi._attach_LUN_bySCSIid(self.sr.SCSIid)
585-
return LVHDSR.LVHDVDI.attach(self, sr_uuid, vdi_uuid)
585+
return LVMSR.LVHDVDI.attach(self, sr_uuid, vdi_uuid)
586586
except:
587587
util.logException("LVHDoISCSIVDI.attach_from_config")
588588
raise xs_errors.XenError('SRUnavailable', \

0 commit comments

Comments
 (0)