john-griffith | d0860cc | 2014-01-23 11:31:10 -0700 | [diff] [blame] | 1 | # lib/cinder_plugins/solidfire |
| 2 | # Configure the solidfire driver |
| 3 | |
| 4 | # Enable with: |
| 5 | # |
| 6 | # CINDER_DRIVER=solidfire |
| 7 | |
| 8 | # Dependencies: |
| 9 | # |
| 10 | # - ``functions`` file |
| 11 | # - ``cinder`` configurations |
| 12 | |
| 13 | # configure_cinder_driver - make configuration changes, including those to other services |
| 14 | |
| 15 | # Save trace setting |
| 16 | MY_XTRACE=$(set +o | grep xtrace) |
| 17 | set +o xtrace |
| 18 | |
| 19 | |
| 20 | # Defaults |
| 21 | # -------- |
| 22 | |
| 23 | # Set up default directories |
| 24 | |
| 25 | |
| 26 | # Entry Points |
| 27 | # ------------ |
| 28 | |
| 29 | # configure_cinder_driver - Set config files, create data dirs, etc |
| 30 | function configure_cinder_driver() { |
| 31 | # To use solidfire, set the following in localrc: |
| 32 | # CINDER_DRIVER=solidfire |
| 33 | # SAN_IP=<mvip> |
| 34 | # SAN_LOGIN=<cluster-admin-account> |
| 35 | # SAN_PASSWORD=<cluster-admin-password> |
| 36 | |
| 37 | iniset $CINDER_CONF DEFAULT volume_driver "cinder.volume.drivers.solidfire.SolidFireDriver" |
| 38 | iniset $CINDER_CONF DEFAULT san_ip $SAN_IP |
| 39 | iniset $CINDER_CONF DEFAULT san_login $SAN_LOGIN |
| 40 | iniset $CINDER_CONF DEFAULT san_password $SAN_PASSWORD |
| 41 | } |
| 42 | |
| 43 | # Restore xtrace |
| 44 | $MY_XTRACE |
| 45 | |
| 46 | # Local variables: |
| 47 | # mode: shell-script |
| 48 | # End: |