forked from mstarikov/rbdsr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLVHDoISCSISR.patch
23 lines (21 loc) · 975 Bytes
/
LVHDoISCSISR.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- LVHDoISCSISR.py 2015-11-17 13:21:39.000000000 +1100
+++ LVHDoISCSISR.py-new 2015-11-17 13:23:24.000000000 +1100
@@ -18,7 +18,7 @@
# LVHDoISCSISR: LVHD over ISCSI software initiator SR driver
#
-import SR, VDI, LVHDSR, ISCSISR, SRCommand, util, scsiutil, lvutil
+import SR, VDI, LVHDSR, RBDSR, ISCSISR, SRCommand, util, scsiutil, lvutil
import statvfs, time
import os, socket, sys, re
import xs_errors
@@ -77,7 +77,10 @@
# This is a probe call, generate a temp sr_uuid
sr_uuid = util.gen_uuid()
- driver = SR.driver('iscsi')
+ if self.original_srcmd.dconf.has_key('port') and '6789' in self.original_srcmd.dconf['port']:
+ driver = SR.driver('rbd')
+ else:
+ driver = SR.driver('iscsi')
if self.original_srcmd.dconf.has_key('target'):
self.original_srcmd.dconf['targetlist'] = self.original_srcmd.dconf['target']
iscsi = driver(self.original_srcmd, sr_uuid)