diff options
author | Zuul <zuul@review.openstack.org> | 2018-01-30 07:03:13 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2018-01-30 07:03:13 +0000 |
commit | 54dd15cfd85217adea2224d228306cb504c4164f (patch) | |
tree | 0ad25102945c4de177b1cb36c83ca630f4b37f7a | |
parent | 7f400ce64a1b5a0bd8cfc16c4b9988465f5c8834 (diff) | |
parent | 50088c572e5abe3001db47e35875a3dfe47e8381 (diff) | |
download | heat-10.0.0.0b3.tar.gz |
Merge "Updated the template guide."10.0.0.0b3
-rw-r--r-- | doc/source/ext/resources.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/doc/source/ext/resources.py b/doc/source/ext/resources.py index 02a53d403..f5475d49a 100644 --- a/doc/source/ext/resources.py +++ b/doc/source/ext/resources.py @@ -203,7 +203,7 @@ resources: return (x_status > y_status) - (x_status < y_status) def contribute_property(self, parent, prop_key, prop, upd_para=None, - id_pattern_prefix=None): + id_pattern_prefix=None, sub_prop=False): if not id_pattern_prefix: id_pattern_prefix = '%s-prop' id_pattern = id_pattern_prefix + '-' + prop_key @@ -218,6 +218,15 @@ resources: definition.append(note) return + if sub_prop and prop.type != properties.Schema.LIST and prop.type\ + != properties.Schema.MAP: + if prop.required: + para = nodes.paragraph('', _('Required.')) + definition.append(para) + else: + para = nodes.paragraph('', _('Optional.')) + definition.append(para) + if prop.description: para = nodes.paragraph('', prop.description) definition.append(para) @@ -272,7 +281,8 @@ resources: indent = nodes.block_quote() definition.append(indent) self.contribute_property( - indent, _key, _prop, upd_para, id_pattern) + indent, _key, _prop, upd_para, id_pattern, + sub_prop=True) def contribute_properties(self, parent): if not self.props_schemata: |