| john-griffith | d0860cc | 2014-01-23 11:31:10 -0700 | [diff] [blame] | 1 | # lib/cinder_plugins/vsphere | 
|  | 2 | # Configure the vsphere driver | 
|  | 3 |  | 
|  | 4 | # Enable with: | 
|  | 5 | # | 
|  | 6 | #   CINDER_DRIVER=vsphere | 
|  | 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 | iniset $CINDER_CONF DEFAULT vmware_host_ip "$VMWAREAPI_IP" | 
|  | 32 | iniset $CINDER_CONF DEFAULT vmware_host_username "$VMWAREAPI_USER" | 
|  | 33 | iniset $CINDER_CONF DEFAULT vmware_host_password "$VMWAREAPI_PASSWORD" | 
|  | 34 | iniset $CINDER_CONF DEFAULT volume_driver "cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver" | 
|  | 35 | } | 
|  | 36 |  | 
|  | 37 | # Restore xtrace | 
|  | 38 | $MY_XTRACE | 
|  | 39 |  | 
|  | 40 | # Local variables: | 
|  | 41 | # mode: shell-script | 
|  | 42 | # End: |