15 Commits

Author SHA1 Message Date
Sean Dague
922c8ae680 clean up whitespace issues on exercises and friends
Change-Id: I812a73e46ddd4d5fed4d304d9ef92c1de243f497
2013-10-22 13:02:29 -04:00
Dean Troyer
893e66360c Add meta-config via local.conf
This defines a new local.conf file that is designed to take the place of all
of the 'pass-through'[1] configuration options that have been defined in DevStack.

* new local.conf file can contain multiple config file settings to be
  merged in to existing project config files
* localrc can be embedded into local.conf and will auto-extract if
  localrc does not exist
* Adds functions get_meta_section(), get_meta_section_files(),
  merge_config_file() and merge_config_group()
* Adds EXTRA_OPTS, EXTRA_BAREMETAL_OPTS, Q_DHCP_EXTRA_DEFAULT_OPTS and
  Q_SRV_EXTRA_DEFAULT_OPTS to the deprecated warning list at the end of stack.sh

[1] Pass-through options are those that do not configure or change DevStack's behaviour
but simply set a value in a project config file.  This includes most of the EXTRA_XXX_OPTS
configuration variables.

Change-Id: I367cadc86116621e9574ac203aafdab483d810d3
2013-10-11 11:41:58 -05:00
Dean Troyer
04762cd823 Fix is_package_installed() check with dpkg
is_package_installed() incorrectly returned '0' for packages that
had 'un' status in the dpkg database.

Change-Id: I81b77486c2ed7717ed81cb2c2572fe6c4b394ffc
2013-08-27 17:48:49 -05:00
Dean Troyer
d4f69b21f5 Remove python-netaddr requirement
Remove python-netaddr as a DevStack (stack.sh) requirement,
this does not change any individual project requirements.

Specifically it replaces address_in_net() and adds cidr2netmask()
and maskip() functions.

Change-Id: Ic604437fde2e057faced40a310ab282f3eb27726
2013-07-24 12:25:35 -05:00
Lianhao Lu
239f3246ad Support MultiStrOpt options in configuration file.
Fixed bug #1136964.

1. Added 3 ini functions to support MultiStrOpt:
  Function "iniset_multiline config-file section option value1 value2
value3 ..." sets a MultiStrOpt option in an ini file.

  Function "iniget_multiline config-file section option" gets the
MultiStrOpt option values.

  Function "iniadd config-file section option value1 value2 value3..."
appends an option without relacing the old values, which would result
the option to be MultiStrOpt.

2. Modified the nova configuation to correctly enable notification for
ceilometer.

Change-Id: I1c27db1a6e58b35bc4428e761f40627988f69e37
2013-03-06 09:42:14 +08:00
Attila Fazekas
588eb4129d Fix iniset and his friends
* In python the white spaces are part of the section name
* Handle options with empty value
* Support paths with white spaces

Change-Id: I69a584608853cfdb8b7dce1e24d929216ef2fc41
2012-12-20 11:00:42 +01:00
Vincent Untz
00011c0847 Add is_fedora and exit_distro_not_supported functions
Between is_fedora, is_ubuntu and is_suse, we can make the code a bit
simpler to read. We also use exit_distro_not_supported to identify
places where we need implementation details for new distros.

As "/sbin/service --skip-redirect" is Fedora-specific, guard this with a
is_fedora test too.

Change-Id: Ic77c0697ed9be0dbb5df8e73da93463e76025f0c
2012-12-07 09:06:07 +01:00
Dean Troyer
e83356217b Fix ini functions to handle spaces in section names
This allows section names to look like:

[ default ]

OpenSSL is the primary offender for this usage.

Change-Id: If5c711107e73cebab9d4a26ca02a7ce572224377
2012-11-27 17:00:16 -06:00
Vincent Untz
71ebc6ff65 Add is_package_installed function to know if a package is installed
This helps reduce the distro-dependent code in stack.sh, and also fixes
the bug where "rpm -qa | grep sudo" will work if gnome-sudoku is
installed.

Rebased

Change-Id: Ib1330b29b915b41d9724197edd791f0d4e0fe373
2012-09-09 17:40:19 -05:00
Doug Hellmann
f04178fd12 add functions to manipulate ENABLED_SERVICES
Editing ENABLED_SERVICES directly can get tricky when
the user wants to disable something. This patch includes
two new functions for adding or removing services
safely, and a third (for completeness) to clear the
settings entirely before adding a minimal set of
services.

It also moves the logic for dealing with "negated"
services into a function so it can be tested and
applied by the new functions for manipulating
ENABLED_SERVICES.

Change-Id: I88f205f3666b86e6f0b6a94e0ec32a26c4bc6873
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
2012-07-06 15:52:06 -04:00
Vincent Untz
bf3923174e Remove test.ini when done with it during tests
The file is created in the tests, and so should also be removed.

Change-Id: I8c087cc5cc71ac80b7c4974e2a69a747a929bedf
2012-06-14 15:52:44 +02:00
Dean Troyer
09e636e435 B) Use keystone config files from source; move to /etc/keystone
* Put all config files in /etc/keystone
* keystone.conf rewritten
* logging.conf.sample rewritten to logging.conf
* default_catalog.templates copied from devstack/files
* iniset() now properly adds options that do not previously exist

Fixed to re-configure the catalog templated backend; sql is the
default in trunk now but DevStack needs a bit more work before
it can use it.

Change-Id: Ic7060ef897e47495cd08ca3786e49fdebadf6723
2012-04-05 18:10:13 -05:00
Dean Troyer
13dc5ccd13 A) Add/move functions to 'functions' file
Add ini*() and tests
Add GetOSVersion()
Add install_package(), yum_install()
Add *_service()

Rebased

Change-Id: I570dba5ed4d2b988cdd1771cf6bed0aaf8e0fe27
2012-03-29 20:35:04 -05:00
Dean Troyer
27e326995a Simplify die_if_error
* Replace die_if_error() with the simpler die()
* Attempt to clean up unnecessary trace output
* Formatting cleanups on all exercise scripts

Change-Id: I72a542b3a59ee9bf12bee6bcc605edd7579205e0
2012-03-19 10:06:15 -05:00
Dean Troyer
489bd2a62b Improve exercise robustness
* Test returns and exit codes on most command invocations
* Add start and end banners to make output easier to find in
  long log files
* Adds die_if_error(), die_if_not_set() and is_set() to functions
* Add some function tests

Fixes bug 944593

Change-Id: I55e2962c5fec9aad237b674732b1e922ad37a62e
2012-03-02 17:55:37 -08:00