Skip to content

Commit 40ff386

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

13 files changed

Lines changed: 126 additions & 126 deletions

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.LVMVDI):
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

@@ -490,7 +490,7 @@ def attach(self, sr_uuid) -> None:
490490
# Check that we only have PVs for the volume group with the expected SCSI ID
491491
lvutil.checkPVScsiIds(self.vgname, self.SCSIid)
492492

493-
LVHDSR.LVHDSR.attach(self, sr_uuid)
493+
LVMSR.LVMSR.attach(self, sr_uuid)
494494
except Exception as inst:
495495
for i in self.iscsiSRs:
496496
i.detach(sr_uuid)
@@ -505,7 +505,7 @@ def attach(self, sr_uuid) -> None:
505505

506506
@override
507507
def detach(self, sr_uuid) -> None:
508-
LVHDSR.LVHDSR.detach(self, sr_uuid)
508+
LVMSR.LVMSR.detach(self, sr_uuid)
509509
for i in self.iscsiSRs:
510510
i.detach(sr_uuid)
511511

@@ -518,7 +518,7 @@ def scan(self, sr_uuid) -> None:
518518
i.attach(sr_uuid)
519519
except xs_errors.SROSError:
520520
util.SMlog("Connection failed for target %s, continuing.." % i.target)
521-
LVHDSR.LVHDSR.scan(self, sr_uuid)
521+
LVMSR.LVMSR.scan(self, sr_uuid)
522522

523523
@override
524524
def probe(self) -> str:
@@ -540,7 +540,7 @@ def probe(self) -> str:
540540
self.iscsi.attach(self.uuid)
541541
self.iscsi._attach_LUN_bySCSIid(self.SCSIid)
542542
self._pathrefresh(LVHDoISCSISR)
543-
out = LVHDSR.LVHDSR.probe(self)
543+
out = LVMSR.LVMSR.probe(self)
544544
self.iscsi.detach(self.uuid)
545545
return out
546546

@@ -563,7 +563,7 @@ def vdi(self, uuid) -> VDI.VDI:
563563
return LVHDoISCSIVDI(self, uuid)
564564

565565

566-
class LVHDoISCSIVDI(LVHDSR.LVHDVDI):
566+
class LVHDoISCSIVDI(LVMSR.LVMVDI):
567567
@override
568568
def generate_config(self, sr_uuid, vdi_uuid) -> str:
569569
util.SMlog("LVHDoISCSIVDI.generate_config")
@@ -592,7 +592,7 @@ def attach_from_config(self, sr_uuid, vdi_uuid) -> str:
592592
try:
593593
self.sr.iscsi.attach(sr_uuid)
594594
self.sr.iscsi._attach_LUN_bySCSIid(self.sr.SCSIid)
595-
return LVHDSR.LVHDVDI.attach(self, sr_uuid, vdi_uuid)
595+
return LVMSR.LVMVDI.attach(self, sr_uuid, vdi_uuid)
596596
except:
597597
util.logException("LVHDoISCSIVDI.attach_from_config")
598598
raise xs_errors.XenError('SRUnavailable', \

0 commit comments

Comments
 (0)