| Dean Troyer | 7b7bc92 | 2013-09-23 13:56:19 -0500 | [diff] [blame] | 1 | # lib/nova_plugins/hypervisor-vsphere | 
|  | 2 | # Configure the vSphere hypervisor | 
|  | 3 |  | 
|  | 4 | # Enable with: | 
|  | 5 | # VIRT_DRIVER=vsphere | 
|  | 6 |  | 
|  | 7 | # Dependencies: | 
|  | 8 | # ``functions`` file | 
|  | 9 | # ``nova`` configuration | 
|  | 10 |  | 
|  | 11 | # install_nova_hypervisor - install any external requirements | 
|  | 12 | # configure_nova_hypervisor - make configuration changes, including those to other services | 
|  | 13 | # start_nova_hypervisor - start any external services | 
|  | 14 | # stop_nova_hypervisor - stop any external services | 
|  | 15 | # cleanup_nova_hypervisor - remove transient data and cache | 
|  | 16 |  | 
|  | 17 | # Save trace setting | 
|  | 18 | MY_XTRACE=$(set +o | grep xtrace) | 
|  | 19 | set +o xtrace | 
|  | 20 |  | 
|  | 21 |  | 
|  | 22 | # Defaults | 
|  | 23 | # -------- | 
|  | 24 |  | 
|  | 25 |  | 
|  | 26 | # Entry Points | 
|  | 27 | # ------------ | 
|  | 28 |  | 
|  | 29 | # clean_nova_hypervisor - Clean up an installation | 
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 30 | function cleanup_nova_hypervisor { | 
| Dean Troyer | 7b7bc92 | 2013-09-23 13:56:19 -0500 | [diff] [blame] | 31 | # This function intentionally left blank | 
|  | 32 | : | 
|  | 33 | } | 
|  | 34 |  | 
|  | 35 | # configure_nova_hypervisor - Set config files, create data dirs, etc | 
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 36 | function configure_nova_hypervisor { | 
| Dean Troyer | 7b7bc92 | 2013-09-23 13:56:19 -0500 | [diff] [blame] | 37 | iniset $NOVA_CONF DEFAULT compute_driver "vmwareapi.VMwareVCDriver" | 
|  | 38 | VMWAREAPI_USER=${VMWAREAPI_USER:-"root"} | 
|  | 39 | iniset $NOVA_CONF vmware host_ip "$VMWAREAPI_IP" | 
|  | 40 | iniset $NOVA_CONF vmware host_username "$VMWAREAPI_USER" | 
|  | 41 | iniset $NOVA_CONF vmware host_password "$VMWAREAPI_PASSWORD" | 
|  | 42 | iniset $NOVA_CONF vmware cluster_name "$VMWAREAPI_CLUSTER" | 
|  | 43 | if is_service_enabled neutron; then | 
|  | 44 | iniset $NOVA_CONF vmware integration_bridge $OVS_BRIDGE | 
|  | 45 | fi | 
|  | 46 | } | 
|  | 47 |  | 
|  | 48 | # install_nova_hypervisor() - Install external components | 
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 49 | function install_nova_hypervisor { | 
| Dean Troyer | 7b7bc92 | 2013-09-23 13:56:19 -0500 | [diff] [blame] | 50 | # This function intentionally left blank | 
|  | 51 | : | 
|  | 52 | } | 
|  | 53 |  | 
|  | 54 | # start_nova_hypervisor - Start any required external services | 
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 55 | function start_nova_hypervisor { | 
| Dean Troyer | 7b7bc92 | 2013-09-23 13:56:19 -0500 | [diff] [blame] | 56 | # This function intentionally left blank | 
|  | 57 | : | 
|  | 58 | } | 
|  | 59 |  | 
|  | 60 | # stop_nova_hypervisor - Stop any external services | 
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 61 | function stop_nova_hypervisor { | 
| Dean Troyer | 7b7bc92 | 2013-09-23 13:56:19 -0500 | [diff] [blame] | 62 | # This function intentionally left blank | 
|  | 63 | : | 
|  | 64 | } | 
|  | 65 |  | 
|  | 66 |  | 
|  | 67 | # Restore xtrace | 
|  | 68 | $MY_XTRACE | 
|  | 69 |  | 
|  | 70 | # Local variables: | 
|  | 71 | # mode: shell-script | 
|  | 72 | # End: |