Browse code

Additional options for XenAPINFS cinder driver

Related to bp xenapi-storage-manager-nfs

Add configuration options to devstack scripts, so it is easier to set up
a system with a XenAPINFS volume backend. It makes possible to test this
configuration with exercises. To enable the XenAPINFS driver, specify:

CINDER_DRIVER=XenAPINFS
CINDER_XENAPI_CONNECTION_URL=<url for a xenserver>
CINDER_XENAPI_CONNECTION_USERNAME=<username for the xenserver>
CINDER_XENAPI_CONNECTION_PASSWORD=<password for the xenserver>
CINDER_XENAPI_NFS_SERVER=<a box that has an nfs export>
CINDER_XENAPI_NFS_SERVERPATH=<exported catalog>

in your localrc

Change-Id: Ia214172aac377d273a03849c8cc2adcbf5b8f607

Mate Lakat authored on 2012/11/21 00:52:21
Showing 1 changed files
... ...
@@ -24,6 +24,9 @@ set +o xtrace
24 24
 # Defaults
25 25
 # --------
26 26
 
27
+# set up default driver
28
+CINDER_DRIVER=${CINDER_DRIVER:-default}
29
+
27 30
 # set up default directories
28 31
 CINDER_DIR=$DEST/cinder
29 32
 CINDERCLIENT_DIR=$DEST/python-cinderclient
... ...
@@ -145,6 +148,19 @@ function configure_cinder() {
145 145
         iniset $CINDER_CONF DEFAULT logging_debug_format_suffix "from (pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d"
146 146
         iniset $CINDER_CONF DEFAULT logging_exception_prefix "%(color)s%(asctime)s TRACE %(name)s %(instance)s"
147 147
     fi
148
+
149
+    if [ "$CINDER_DRIVER" == "XenAPINFS" ]; then
150
+        (
151
+            set -u
152
+            iniset $CINDER_CONF DEFAULT volume_driver "cinder.volume.xenapi_sm.XenAPINFSDriver"
153
+            iniset $CINDER_CONF DEFAULT xenapi_connection_url "$CINDER_XENAPI_CONNECTION_URL"
154
+            iniset $CINDER_CONF DEFAULT xenapi_connection_username "$CINDER_XENAPI_CONNECTION_USERNAME"
155
+            iniset $CINDER_CONF DEFAULT xenapi_connection_password "$CINDER_XENAPI_CONNECTION_PASSWORD"
156
+            iniset $CINDER_CONF DEFAULT xenapi_nfs_server "$CINDER_XENAPI_NFS_SERVER"
157
+            iniset $CINDER_CONF DEFAULT xenapi_nfs_serverpath "$CINDER_XENAPI_NFS_SERVERPATH"
158
+        )
159
+        [ $? -ne 0 ] && exit 1
160
+    fi
148 161
 }
149 162
 
150 163
 # init_cinder() - Initialize database and volume group