carsongee/ansible — pull request #1 by msabramo (2014-07-01 16:51:18+00:00)
Title: nova.py: Set defaults for OpenStack settings

`nova.py`: Set defaults for OpenStack settings

- `auth_system`
- `region_name`
- `service_type`

These are config settings that could be left out in many scenarios, but the current code is requiring them. In particular, `service_type` is a new one in PR #7444 so if we add that and don't set a default, then
existing .ini files won't work:

```
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ConfigParser.py",
line 618, in get
raise NoOptionError(option, section)
ConfigParser.NoOptionError: No option 'service_type' in section:
'openstack'
```

Providing a default for `service_type` allows us to maintain backwards compatibility with older .ini files.

Defaulting `auth_system` and `region_name` is just for convenience since I am able to set these to blank with my config (Metacloud and Nova compute 1.1 API) and stuff works. With this change, I can get by with just:

```ini
[openstack]
version=1.1
auth_url=http://{keystone_host}:5000/v2.0
project_id=web
username={username}
api_key={password}
```