Previously in the generation of the opts.py file, the option groups
were hard coded. Now, they are pulled out as the lines are parsed.
If a group doesn't already exist in the dictionary it gets added and
then the options are added to the section. If the group already exists,
the options are added to the proper section as you would expect, and if
the options being registered don't have a group, they are added to the
default section.
This patch also moves the check for a non-zero exit code from
oslo-config-generator to the right location in the file. This
logic had been put too late in the file and was not catching
oslo-config-generator failures as it should have been.