Skip to content

Commit ecf3657

Browse files
committed
Merge branch 'jira-wdt-790-deprecate-vz' into 'develop-4.0'
Log a deprecation message when any vz target is applied See merge request weblogic-cloud/weblogic-deploy-tooling!1592
2 parents f1e02cd + deaaafd commit ecf3657

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

core/src/main/python/model_help.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Copyright (c) 2020, 2023, Oracle and/or its affiliates.
2+
Copyright (c) 2020, 2024, Oracle and/or its affiliates.
33
Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.
44
55
The entry point for the modelHelp tool.
@@ -86,10 +86,6 @@ def print_help(model_path, model_context):
8686

8787
__logger.entering(model_path, class_name=_class_name, method_name=_method_name)
8888

89-
product_key = model_context.get_target_configuration().get_product_key()
90-
if product_key == 'vz':
91-
__logger.deprecation("WLSDPLY-10139", product_key, model_context.get_target())
92-
9389
# default to NORMAL
9490
control_option = ControlOptions.NORMAL
9591

core/src/main/python/wlsdeploy/util/cla_utils.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from wlsdeploy.exception.exception_helper import create_cla_exception
2323
from wlsdeploy.json.json_translator import JsonToPython
2424
from wlsdeploy.logging.platform_logger import PlatformLogger
25+
from wlsdeploy.tool.util.targets.model_crd_helper import VERRAZZANO_PRODUCT_KEY
2526
from wlsdeploy.util import path_utils
2627
import wlsdeploy.util.unicode_helper as str_helper
2728
from wlsdeploy.util.exit_code import ExitCode
@@ -1014,7 +1015,7 @@ def is_target_switch(self, key):
10141015
return key == self.TARGET_SWITCH
10151016

10161017
def _validate_target_arg(self, value):
1017-
method_name = 'validate_kubernetes_script_file_switch'
1018+
method_name = '_validate_target_arg'
10181019

10191020
# Check if the target configuration file exists
10201021
target_configuration_file = path_utils.find_config_path(os.path.join('targets', value, 'target.json'))
@@ -1030,6 +1031,11 @@ def _validate_target_arg(self, value):
10301031

10311032
target_configuration.validate_configuration(ExitCode.ARG_VALIDATION_ERROR, target_configuration_file)
10321033

1034+
# check for deprecated VZ product
1035+
product_key = target_configuration.get_product_key()
1036+
if product_key == VERRAZZANO_PRODUCT_KEY:
1037+
_logger.deprecation("WLSDPLY-00914", product_key, value)
1038+
10331039
except SyntaxError, se:
10341040
ex = create_cla_exception(ExitCode.ARG_VALIDATION_ERROR, 'WLSDPLY-01644', target_configuration_file, se)
10351041
_logger.throwing(ex, class_name=self._class_name, method_name=method_name)

core/src/main/resources/oracle/weblogic/deploy/messages/wlsdeploy_rb.properties

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ WLSDPLY-01543=Failed to parse the directory rename number {0} into an integer: {
304304
WLSDPLY-01570=WDT Properties file not located or unable to load file at {0}. Internal defaults taken: {1}
305305
WLSDPLY-01571=Invalid value {0} for property {1} loaded during {2}. Will use default value {3} instead: {4}
306306

307-
# wlsdeploy/util/cla_util.py
307+
# wlsdeploy/util/cla_utils.py
308308
WLSDPLY-01600=Processing command-line argument {0}
309309
WLSDPLY-01601={0} does not recognize argument {1}
310310
WLSDPLY-01602=Supplied Oracle Home directory {0} was not valid: {1}
@@ -379,9 +379,7 @@ WLSDPLY-00910=Specified remote test file {0} was not an absolute path
379379
WLSDPLY-00911=Supplied local test file {0} was not valid: {1}
380380
WLSDPLY-00912=Supplied remote output directory {0} was not an absolute path
381381
WLSDPLY-00913=Supplied local output directory {0} was not valid: {1}
382-
383-
384-
382+
WLSDPLY-00914=Verrazzano product key {0} used by target {1} has been deprecated, and will be removed in a future release
385383

386384
# wlsdeploy/util/cla_helper.py
387385
WLSDPLY-01650=Saving the model to file {0}
@@ -1498,7 +1496,6 @@ WLSDPLY-10135=Sections
14981496
WLSDPLY-10136=Examples
14991497
WLSDPLY-10137=Model section {0} has no element {1} beneath it. Valid folders are: {2}. Valid attributes are {3}.
15001498
WLSDPLY-10138=Failed to describe location {0}: {1}
1501-
WLSDPLY-10139=Verrazzano product key {0} used by target {1} has been deprecated, and will be removed in a future release
15021499
WLSDPLY-10140=Show details for the specified attribute location
15031500

15041501
###############################################################################

0 commit comments

Comments
 (0)