Don't put a null value description in the outputs when no description is provided.
Don't create an output if the value is null. Change-Id: I5ea108ec8f0a9c219535cd82fcf7263c9f61f339
This commit is contained in:
parent
a8e2cf59d9
commit
e022a26c32
@ -21,5 +21,8 @@ class HotOutput(object):
|
|||||||
self.description = description
|
self.description = description
|
||||||
|
|
||||||
def get_dict_output(self):
|
def get_dict_output(self):
|
||||||
return {self.name: {'value': self.value,
|
if self.description:
|
||||||
'description': self.description}}
|
return {self.name: {'value': self.value,
|
||||||
|
'description': self.description}}
|
||||||
|
else:
|
||||||
|
return {self.name: {'value': self.value}}
|
||||||
|
@ -34,6 +34,7 @@ class TranslateOutputs(object):
|
|||||||
hot_outputs = []
|
hot_outputs = []
|
||||||
for output in self.outputs:
|
for output in self.outputs:
|
||||||
hot_value = self.nodes.translate_param_value(output.value, None)
|
hot_value = self.nodes.translate_param_value(output.value, None)
|
||||||
hot_outputs.append(HotOutput(output.name, hot_value,
|
if hot_value is not None:
|
||||||
output.description))
|
hot_outputs.append(HotOutput(output.name, hot_value,
|
||||||
|
output.description))
|
||||||
return hot_outputs
|
return hot_outputs
|
||||||
|
@ -32,11 +32,10 @@ resources:
|
|||||||
get_file: myapp_configure.sh
|
get_file: myapp_configure.sh
|
||||||
outputs:
|
outputs:
|
||||||
map_val:
|
map_val:
|
||||||
description: null
|
description: map_val
|
||||||
value:
|
value:
|
||||||
get_input: map_val
|
get_input: map_val
|
||||||
concat_map_val:
|
concat_map_val:
|
||||||
description: null
|
|
||||||
value:
|
value:
|
||||||
str_replace:
|
str_replace:
|
||||||
params:
|
params:
|
||||||
@ -46,5 +45,4 @@ outputs:
|
|||||||
get_input: map_val
|
get_input: map_val
|
||||||
template: $s0$s1$s2
|
template: $s0$s1$s2
|
||||||
static_map_val:
|
static_map_val:
|
||||||
description: null
|
|
||||||
value: static_value
|
value: static_value
|
||||||
|
@ -71,6 +71,7 @@ topology_template:
|
|||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
map_val:
|
map_val:
|
||||||
|
description: map_val
|
||||||
value: { get_property: [ myapp, myfeature, my_map, test_key ] }
|
value: { get_property: [ myapp, myfeature, my_map, test_key ] }
|
||||||
|
|
||||||
static_map_val:
|
static_map_val:
|
||||||
|
Loading…
Reference in New Issue
Block a user