Skip to content

Commit 80dd2a7

Browse files
committed
Merge branch 'jira-wdt-941-verrazza-no' into 'main'
Remove references to Verrazzano, including type definitions, CRDs, and model references See merge request weblogic-cloud/weblogic-deploy-tooling!1827
2 parents 31c82e9 + bcf3983 commit 80dd2a7

File tree

35 files changed

+34
-1163
lines changed

35 files changed

+34
-1163
lines changed

core/src/main/python/wlsdeploy/aliases/model_constants.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,6 @@
350350
USER_ATTRIBUTES = 'UserAttribute'
351351
USE_SAMPLE_DATABASE = 'UseSampleDatabase'
352352
USE_SSL = "useSSL"
353-
VERRAZZANO = "verrazzano"
354353
VIRTUAL_HOST = 'VirtualHost'
355354
VIRTUAL_TARGET = 'VirtualTarget'
356355
VIRTUAL_USER_AUTHENTICATOR = 'VirtualUserAuthenticator'
@@ -480,14 +479,12 @@
480479
TOPOLOGY,
481480
RESOURCES,
482481
APP_DEPLOYMENTS,
483-
KUBERNETES,
484-
VERRAZZANO
482+
KUBERNETES
485483
]
486484

487485
# the contents of these sections are based on CRD schemas
488486
CRD_MODEL_SECTIONS = [
489-
KUBERNETES,
490-
VERRAZZANO
487+
KUBERNETES
491488
]
492489

493490
# these domain attributes have special processing in create,

core/src/main/python/wlsdeploy/tool/modelhelp/model_crd_section_printer.py

Lines changed: 4 additions & 4 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, 2025, Oracle and/or its affiliates.
33
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44
"""
55
from wlsdeploy.exception import exception_helper
@@ -17,7 +17,7 @@
1717

1818
class ModelCrdSectionPrinter(object):
1919
"""
20-
Class for printing kubernetes sections as model samples.
20+
Class for printing the kubernetes section as a model sample.
2121
"""
2222
_class_name = "ModelCrdSectionPrinter"
2323
_logger = PlatformLogger('wlsdeploy.modelhelp')
@@ -146,7 +146,7 @@ def _print_model_folder_sample(self, section_name, model_path_tokens, control_op
146146
lookup_token = token
147147
option_key = None
148148

149-
# check for a folder with multiple options, such as (verrazzano/.../trait#MetricsTrait)
149+
# check for a folder with multiple options, such as (.../folder#option)
150150
if '#' in token:
151151
parts = token.split('#', 1)
152152
lookup_token = parts[0]
@@ -161,7 +161,7 @@ def _print_model_folder_sample(self, section_name, model_path_tokens, control_op
161161
if lookup_token in valid_subfolder_keys:
162162
current_folder = properties[lookup_token]
163163

164-
# find matching option if folder has multiple options, such as (verrazzano/.../trait#MetricsTrait)
164+
# find matching option if folder has multiple options, such as (.../folder#option)
165165
token_suffix = ''
166166
folder_options = schema_helper.get_one_of_options(current_folder)
167167
if folder_options and option_key is not None:

core/src/main/python/wlsdeploy/tool/util/filter_helper.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
__id_filter_map = {
2424
# groups that execute multiple filters
2525
'k8s_filter': wko_filter.filter_model,
26-
'vz_filter': wko_filter.filter_model_for_vz,
2726
'wko_filter': wko_filter.filter_model_for_wko,
2827

2928
# individual filters for custom target environments
@@ -38,7 +37,6 @@
3837
__final_filter_map = {
3938
# groups that execute multiple filters
4039
'k8s_final_filter': wko_final_filter.filter_final_model,
41-
'vz_final_filter': wko_final_filter.filter_final_model_for_vz,
4240
'wko_final_filter': wko_final_filter.filter_final_model_for_wko,
4341
'wko3_final_filter': wko_final_filter.filter_final_model_for_wko3,
4442
}

core/src/main/python/wlsdeploy/tool/util/filters/wko_filter.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,6 @@ def filter_model_for_wko(model, model_context):
7979
filter_model(model, model_context)
8080

8181

82-
def filter_model_for_vz(model, model_context):
83-
"""
84-
Perform filtering operations on the specified model to prepare for Verrazzano deployment.
85-
Currently matches the general k8s target filtering.
86-
:param model: the model to be filtered
87-
:param model_context: used by nested filters
88-
"""
89-
filter_model(model, model_context)
90-
91-
9282
def filter_online_attributes(model, model_context):
9383
"""
9484
Remove any online-only attributes from the specified model.

core/src/main/python/wlsdeploy/tool/util/filters/wko_final_filter.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,6 @@ def filter_final_model_for_wko3(model, update_model, model_context):
6464
check_admin_server_defined(model, update_model, model_context)
6565

6666

67-
def filter_final_model_for_vz(model, update_model, model_context):
68-
"""
69-
Perform filtering operations on the specified model to prepare for Verrazzano deployment.
70-
Currently, matches the general k8s target filtering.
71-
:param model: the model to be filtered
72-
:param update_model: the model to be updated with any changes
73-
:param model_context: used by nested filters
74-
"""
75-
filter_final_model(model, update_model, model_context)
76-
77-
7867
def check_dynamic_cluster_prefixes(model, update_model, _model_context):
7968
"""
8069
All Dynamic Clusters must have a DynamicServers section with the ServerNamePrefix field explicitly declared.

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

Lines changed: 3 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
11
"""
2-
Copyright (c) 2020, 2024, Oracle and/or its affiliates.
2+
Copyright (c) 2020, 2025, Oracle and/or its affiliates.
33
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44
5-
Methods for creating Kubernetes resource configuration files for Verrazzano.
5+
Methods for creating Kubernetes resource configuration files for WKO.
66
"""
77
import os.path
88

99
from java.io import File
1010

11-
from wlsdeploy.aliases import alias_utils
1211
from wlsdeploy.aliases.location_context import LocationContext
13-
from wlsdeploy.aliases.model_constants import APPLICATION
1412
from wlsdeploy.aliases.model_constants import CLUSTER
15-
from wlsdeploy.aliases.model_constants import DYNAMIC_SERVERS
1613
from wlsdeploy.aliases.model_constants import JDBC_DRIVER_PARAMS
1714
from wlsdeploy.aliases.model_constants import JDBC_RESOURCE
1815
from wlsdeploy.aliases.model_constants import JDBC_SYSTEM_RESOURCE
19-
from wlsdeploy.aliases.model_constants import LISTEN_PORT
2016
from wlsdeploy.aliases.model_constants import SERVER
2117
from wlsdeploy.aliases.model_constants import SERVER_TEMPLATE
22-
from wlsdeploy.aliases.model_constants import TARGET
2318
from wlsdeploy.aliases.model_constants import URL
2419
from wlsdeploy.logging.platform_logger import PlatformLogger
2520
from wlsdeploy.tool.util import k8s_helper
@@ -31,15 +26,12 @@
3126
from wlsdeploy.util import target_configuration_helper
3227
import wlsdeploy.util.unicode_helper as str_helper
3328

34-
__class_name = 'vz_config_helper'
29+
__class_name = 'additional_output_helper'
3530
__logger = PlatformLogger('wlsdeploy.tool.util')
3631

3732
# substitution keys used in the templates
3833
ADDITIONAL_SECRET_NAME = 'additionalSecretName'
3934
ADDITIONAL_SECRETS = 'additionalSecrets'
40-
APPLICATIONS = 'applications'
41-
APPLICATION_NAME = 'applicationName'
42-
APPLICATION_PREFIX = 'applicationPrefix'
4335
CLUSTER_NAME = 'clusterName'
4436
CLUSTER_UID = 'clusterUid'
4537
CLUSTERS = 'clusters'
@@ -55,15 +47,9 @@
5547
DOMAIN_TYPE = 'domainType'
5648
DOMAIN_UID = 'domainUid'
5749
HAS_ADDITIONAL_SECRETS = 'hasAdditionalSecrets'
58-
HAS_APPLICATIONS = 'hasApplications'
5950
HAS_CLUSTERS = 'hasClusters'
6051
HAS_DATASOURCES = 'hasDatasources'
61-
HAS_HOST_APPLICATIONS = 'hasHostApplications'
6252
HAS_MODEL = 'hasModel'
63-
HOST_APPLICATION_APPLICATIONS = 'applications'
64-
HOST_APPLICATION_HOST = 'host'
65-
HOST_APPLICATION_PORT = 'port'
66-
HOST_APPLICATIONS = 'hostApplications'
6753
NAMESPACE = 'namespace'
6854
REPLICAS = 'replicas'
6955
RUNTIME_ENCRYPTION_SECRET = "runtimeEncryptionSecret"
@@ -255,73 +241,6 @@ def _build_template_hash(model, model_context, aliases, credential_injector, dom
255241
template_hash[DATASOURCES] = databases
256242
template_hash[HAS_DATASOURCES] = len(databases) != 0
257243

258-
# applications
259-
260-
apps = []
261-
262-
applications = dictionary_utils.get_dictionary_element(model.get_model_app_deployments(), APPLICATION)
263-
for app_name in applications:
264-
app_hash = dict()
265-
prefix = '/' + app_name
266-
267-
# get the prefix from the app descriptor?
268-
269-
app_hash[APPLICATION_NAME] = app_name
270-
app_hash[APPLICATION_PREFIX] = prefix
271-
272-
apps.append(app_hash)
273-
274-
template_hash[APPLICATIONS] = apps
275-
template_hash[HAS_APPLICATIONS] = len(apps) != 0
276-
277-
# host applications - applications organized by host, for Verrazzano IngressTrait
278-
279-
app_map = {}
280-
applications = dictionary_utils.get_dictionary_element(model.get_model_app_deployments(), APPLICATION)
281-
for app_name in applications:
282-
app_hash = dict()
283-
app_hash[APPLICATION_NAME] = app_name
284-
# this text is matched in crd_file_updater, be careful if changing
285-
app_hash[APPLICATION_PREFIX] = '(path for ' + app_name + ')'
286-
287-
app_folder = dictionary_utils.get_dictionary_element(applications, app_name)
288-
targets_value = dictionary_utils.get_dictionary_element(app_folder, TARGET)
289-
targets = alias_utils.create_list(targets_value, 'WLSDPLY-01682')
290-
for target in targets:
291-
if target not in app_map:
292-
app_map[target] = []
293-
app_map[target].append(app_hash)
294-
295-
host_apps = []
296-
target_keys = app_map.keys()
297-
target_keys.sort()
298-
for target_key in target_keys:
299-
listen_port = DEFAULT_LISTEN_PORT
300-
target_cluster = _find_cluster(model, target_key)
301-
if target_cluster is not None:
302-
full_host_name = k8s_helper.get_dns_name(domain_uid + '-cluster-' + target_key)
303-
dynamic_servers = dictionary_utils.get_dictionary_element(target_cluster, DYNAMIC_SERVERS)
304-
template_name = dictionary_utils.get_element(dynamic_servers, SERVER_TEMPLATE)
305-
if template_name:
306-
server_template = _find_server_template(model, template_name)
307-
if server_template:
308-
listen_port = server_template[LISTEN_PORT] or listen_port
309-
else:
310-
full_host_name = k8s_helper.get_dns_name(domain_uid + '-' + target_key)
311-
target_server = _find_server(model, target_key)
312-
if target_server is not None:
313-
listen_port = target_server[LISTEN_PORT] or listen_port
314-
315-
host_app = {
316-
HOST_APPLICATION_HOST: full_host_name,
317-
HOST_APPLICATION_PORT: str_helper.to_string(listen_port),
318-
HOST_APPLICATION_APPLICATIONS: app_map[target_key]
319-
}
320-
host_apps.append(host_app)
321-
322-
template_hash[HOST_APPLICATIONS] = host_apps
323-
template_hash[HAS_HOST_APPLICATIONS] = len(host_apps) != 0
324-
325244
# additional secrets - exclude admin
326245

327246
additional_secrets = []

0 commit comments

Comments
 (0)