blob: 3180d91f0a1dcf7725d9a9856598cf430c4a553b [file] [log] [blame]
Sean Daguee263c822014-12-05 14:25:28 -05001#!/bin/bash
2#
Dean Troyerf4bd16a2013-09-23 14:07:31 -05003# lib/nova_plugins/hypervisor-fake
4# Configure the fake hypervisor
5
6# Enable with:
7# VIRT_DRIVER=fake
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 Troyerf4bd16a2013-09-23 14:07:31 -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 Troyerf4bd16a2013-09-23 14:07:31 -050039 iniset $NOVA_CONF DEFAULT compute_driver "nova.virt.fake.FakeDriver"
40 # Disable arbitrary limits
41 iniset $NOVA_CONF DEFAULT quota_instances -1
42 iniset $NOVA_CONF DEFAULT quota_cores -1
43 iniset $NOVA_CONF DEFAULT quota_ram -1
44 iniset $NOVA_CONF DEFAULT quota_floating_ips -1
45 iniset $NOVA_CONF DEFAULT quota_fixed_ips -1
46 iniset $NOVA_CONF DEFAULT quota_metadata_items -1
47 iniset $NOVA_CONF DEFAULT quota_injected_files -1
48 iniset $NOVA_CONF DEFAULT quota_injected_file_path_bytes -1
49 iniset $NOVA_CONF DEFAULT quota_security_groups -1
50 iniset $NOVA_CONF DEFAULT quota_security_group_rules -1
51 iniset $NOVA_CONF DEFAULT quota_key_pairs -1
Joe Gordon7a15a0e2014-05-21 14:22:04 +090052 iniset $NOVA_CONF DEFAULT scheduler_default_filters "RetryFilter,AvailabilityZoneFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,CoreFilter,RamFilter,DiskFilter"
Dean Troyerf4bd16a2013-09-23 14:07:31 -050053}
54
55# install_nova_hypervisor() - Install external components
Ian Wienandaee18c72014-02-21 15:35:08 +110056function install_nova_hypervisor {
Dean Troyerf4bd16a2013-09-23 14:07:31 -050057 # This function intentionally left blank
58 :
59}
60
61# start_nova_hypervisor - Start any required external services
Ian Wienandaee18c72014-02-21 15:35:08 +110062function start_nova_hypervisor {
Dean Troyerf4bd16a2013-09-23 14:07:31 -050063 # This function intentionally left blank
64 :
65}
66
67# stop_nova_hypervisor - Stop any external services
Ian Wienandaee18c72014-02-21 15:35:08 +110068function stop_nova_hypervisor {
Dean Troyerf4bd16a2013-09-23 14:07:31 -050069 # This function intentionally left blank
70 :
71}
72
73
74# Restore xtrace
75$MY_XTRACE
76
77# Local variables:
78# mode: shell-script
79# End: