blob: c406e094f3c57a72e921a37420241faf0f213028 [file] [log] [blame]
Sean Daguee263c822014-12-05 14:25:28 -05001#!/bin/bash
2#
Dean Troyer7b7bc922013-09-23 13:56:19 -05003# lib/nova_plugins/hypervisor-vsphere
4# Configure the vSphere hypervisor
5
6# Enable with:
7# VIRT_DRIVER=vsphere
8
9# Dependencies:
10# ``functions`` file
11# ``nova`` configuration
12
13# install_nova_hypervisor - install any external requirements
14# configure_nova_hypervisor - make configuration changes, including those to other services
15# start_nova_hypervisor - start any external services
16# stop_nova_hypervisor - stop any external services
17# cleanup_nova_hypervisor - remove transient data and cache
18
19# Save trace setting
20MY_XTRACE=$(set +o | grep xtrace)
21set +o xtrace
22
23
24# Defaults
25# --------
26
27
28# Entry Points
29# ------------
30
31# clean_nova_hypervisor - Clean up an installation
Ian Wienandaee18c72014-02-21 15:35:08 +110032function cleanup_nova_hypervisor {
Dean Troyer7b7bc922013-09-23 13:56:19 -050033 # This function intentionally left blank
34 :
35}
36
37# configure_nova_hypervisor - Set config files, create data dirs, etc
Ian Wienandaee18c72014-02-21 15:35:08 +110038function configure_nova_hypervisor {
Dean Troyer7b7bc922013-09-23 13:56:19 -050039 iniset $NOVA_CONF DEFAULT compute_driver "vmwareapi.VMwareVCDriver"
40 VMWAREAPI_USER=${VMWAREAPI_USER:-"root"}
41 iniset $NOVA_CONF vmware host_ip "$VMWAREAPI_IP"
42 iniset $NOVA_CONF vmware host_username "$VMWAREAPI_USER"
43 iniset $NOVA_CONF vmware host_password "$VMWAREAPI_PASSWORD"
Sabari Kumar Murugesan1a3c3732014-03-24 14:26:08 -070044 iniset_multiline $NOVA_CONF vmware cluster_name "$VMWAREAPI_CLUSTER"
Dean Troyer7b7bc922013-09-23 13:56:19 -050045 if is_service_enabled neutron; then
46 iniset $NOVA_CONF vmware integration_bridge $OVS_BRIDGE
47 fi
48}
49
50# install_nova_hypervisor() - Install external components
Ian Wienandaee18c72014-02-21 15:35:08 +110051function install_nova_hypervisor {
Dean Troyer7b7bc922013-09-23 13:56:19 -050052 # This function intentionally left blank
53 :
54}
55
56# start_nova_hypervisor - Start any required external services
Ian Wienandaee18c72014-02-21 15:35:08 +110057function start_nova_hypervisor {
Dean Troyer7b7bc922013-09-23 13:56:19 -050058 # This function intentionally left blank
59 :
60}
61
62# stop_nova_hypervisor - Stop any external services
Ian Wienandaee18c72014-02-21 15:35:08 +110063function stop_nova_hypervisor {
Dean Troyer7b7bc922013-09-23 13:56:19 -050064 # This function intentionally left blank
65 :
66}
67
68
69# Restore xtrace
70$MY_XTRACE
71
72# Local variables:
73# mode: shell-script
74# End: