Last active
February 24, 2016 16:37
-
-
Save xarses/0799c34179b45856c8b5 to your computer and use it in GitHub Desktop.
using a generator to seed the default value of an attribute
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/openstack/fuel-web/blob/master/nailgun/nailgun/fixtures/openstack.yaml#L750-l753 | |
password: | |
value: | |
generator: "password" | |
type: "password" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/openstack/fuel-web/blob/master/nailgun/nailgun/fixtures/openstack.yaml#L727-L735 | |
password: | |
value: "admin" | |
label: "Password" | |
description: "Password for Administrator" | |
weight: 20 | |
type: "password" | |
regex: | |
source: &non_empty_string '\S' | |
error: "Empty password" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/openstack/fuel-web/blob/master/nailgun/nailgun/utils/__init__.py#L137-l193 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
here dns_list attribute has it's default populated by a generator | |
https://github.com/openstack/fuel-web/blob/master/nailgun/nailgun/fixtures/openstack.yaml#L1057-l1067 | |
dns_list: | |
value: | |
generator: "from_settings" | |
generator_arg: "DNS_UPSTREAM" | |
label: "DNS list" | |
description: "List of upstream DNS servers, separated by comma (up to 3 values)" | |
weight: 10 | |
type: "text" | |
regex: | |
source: '^\*$|^(?:\d|1?\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d|1?\d\d|2[0-4]\d|25[0-5])){3}(?:\s*,\s*(?:\d|1?\d\d|2[0-4]\d|25[0-5])(?:\.(?:\d|1?\d\d|2[0-4]\d|25[0-5])){3}){0,2}$' | |
error: "Invalid IP address list" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment