Oslo Generator Sample Default Behavior

Registered by Brian Stajkowski

Sample Default
---------------------
There is a disparity between a 'default' value and a 'sample_default' value, as the intended operation is to generate a default for sample files that might differ from the actual 'default'. It might serve better to use 'sample_default to display a possible example default value where either a default is not supplied or the default, as a true default value, cannot be used due to a requirement for the user to adjust the option value.

There are two cases that can be covered in oslo-config-generator:

     1. A default value is supplied, and it is a desire to showcase an example of some other way to configure the option.
     2. A default value is not supplied, and it is a desire to showcase how the option might be configured.

Usage
---------

Use case #1:

```
cfg.StrOpt('option1',
             default='mydefault_value',
             sample_default='https://www.myurl.com:9696/v2.0',
             help='This is help text.'),
```

Would yield an output from olso-config-generator:

```
[DEFAULT]
# This is help text. (string value)
# Example: option1 = https://www.myurl.com:9696/v2.0
# option1 = mydefault_value
```

Use case #2:

```
cfg.StrOpt('option1',
             sample_default='https://www.myurl.com:9696/v2.0',
             help='This is help text.'),
```

Would yield an output from olso-config-generator:

```
[DEFAULT]
# This is help text. (string value)
# option1 = <example: https://www.myurl.com:9696/v2.0>
```

Overall, this would provide some flexibility in displaying options in sample files along with the actual default vs. an example of what might be a different configuration value, without losing out on understanding what the actual default value is for the option.

References
---------------
[1] Cross Project Spec - https://review.openstack.org/#/c/295543
[2] http://docs.openstack.org/developer/oslo.config/opts.html

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Brian Stajkowski
Direction:
Needs approval
Assignee:
Brian Stajkowski
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.