]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Make the SolidFire driver api port configurable.
authorPaul McMillan <paul.mcmillan@nebula.com>
Tue, 20 Aug 2013 00:58:02 +0000 (01:58 +0100)
committerPaul McMillan <paul.mcmillan@nebula.com>
Tue, 20 Aug 2013 15:52:44 +0000 (16:52 +0100)
Making the SolidFire driver api port configurable allows it to be
placed behind a transparent proxy.

Change-Id: I976ecfd5df11797722776faf65777ca1ffa5b0c4

cinder/volume/drivers/solidfire.py
etc/cinder/cinder.conf.sample

index b9e4e6f60acbfcd27fefd378849885a4f93574bd..3dc0555771cb4a6d0ff1db5d75475e6ee935a06c 100644 (file)
@@ -47,7 +47,12 @@ sf_opts = [
 
     cfg.StrOpt('sf_account_prefix',
                default=socket.gethostname(),
-               help='Create SolidFire accounts with this prefix'), ]
+               help='Create SolidFire accounts with this prefix'),
+
+    cfg.IntOpt('sf_api_port',
+               default=443,
+               help='SolidFire API port. Useful if the device api is behind '
+                    'a proxy on a different port.'), ]
 
 
 CONF = cfg.CONF
@@ -105,8 +110,7 @@ class SolidFireDriver(SanISCSIDriver):
                                    'xMaxSnapshotsPerNodeExceeded',
                                    'xMaxClonesPerNodeExceeded']
         host = self.configuration.san_ip
-        # For now 443 is the only port our server accepts requests on
-        port = 443
+        port = self.configuration.sf_api_port
 
         cluster_admin = self.configuration.san_login
         cluster_password = self.configuration.san_password
index 34d629786b357dfd2567665c135548c43ce6d57a..be17a234feefc8240ea766c0a3db6de5c8a1e3a0 100644 (file)
 # Options defined in cinder.volume.drivers.solidfire
 #
 
-# Set 512 byte emulation on volume creation (boolean value)
+# Set 512 byte emulation on volume creation (boolean value)
 #sf_emulate_512=true
 
 # Allow tenants to specify QOS on create (boolean value)
 #sf_allow_tenant_qos=false
 
+# Create solidfire accounts with this prefix. Defaults to current
+# hostname (string value)
+#sf_account_prefix=
+
+# Solidfire API port. Useful if the device is behind a proxy (integer value)
+#sf_api_port=443
+
 
 #
 # Options defined in cinder.volume.drivers.storwize_svc