Skip to content

Commit 495bb27

Browse files
authored
For -target vz and wko, omit cluster section if list is empty (#840)
* JIRA WDT-522 - Skip template block if false value in hash * JIRA-WDT-522 - Remove control character
1 parent a8ea337 commit 495bb27

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

core/src/main/python/wlsdeploy/tool/util/targets/file_template_helper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ def _create_file_from_stream(template_stream, template_hash, output_file):
103103
def _process_block(block_key, template_lines, template_hash, file_writer):
104104
value = dictionary_utils.get_element(template_hash, block_key)
105105

106-
if value is None:
106+
# skip block for value of False, None, or empty collection
107+
if not value:
107108
return
108109

109110
if not isinstance(value, list):

core/src/main/targetconfigs/vz/application.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Copyright (c) 2020, 2021, Oracle and/or its affiliates.
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3-
3+
44
apiVersion: core.oam.dev/v1alpha2
55
kind: ApplicationConfiguration
66
metadata:

0 commit comments

Comments
 (0)