|
1 | 1 | """
|
2 |
| -Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. |
| 2 | +Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | The Universal Permissive License (UPL), Version 1.0
|
4 | 4 | """
|
5 | 5 |
|
6 | 6 | import wlsdeploy.tool.deploy.deployer_utils as deployer_utils
|
7 | 7 | import wlsdeploy.util.dictionary_utils as dictionary_utils
|
| 8 | +from oracle.weblogic.deploy.util import WLSDeployArchive |
8 | 9 |
|
9 | 10 | from wlsdeploy.aliases.location_context import LocationContext
|
10 | 11 | from wlsdeploy.aliases.model_constants import CLUSTER
|
11 | 12 | from wlsdeploy.aliases.model_constants import COHERENCE_CLUSTER_SYSTEM_RESOURCE
|
| 13 | +from wlsdeploy.aliases.model_constants import CUSTOM_IDENTITY_KEYSTORE_FILE |
12 | 14 | from wlsdeploy.aliases.model_constants import JDBC_SYSTEM_RESOURCE
|
| 15 | +from wlsdeploy.aliases.model_constants import NM_PROPERTIES |
13 | 16 | from wlsdeploy.aliases.model_constants import SERVER
|
14 | 17 | from wlsdeploy.aliases.model_constants import SERVER_TEMPLATE
|
15 | 18 | from wlsdeploy.tool.util.alias_helper import AliasHelper
|
@@ -113,3 +116,20 @@ def create_placeholder_jdbc_resources(self, resources):
|
113 | 116 | deployer_utils.create_and_cd(resource_location, existing_names, self.alias_helper)
|
114 | 117 |
|
115 | 118 | self.wlst_helper.cd(original_location)
|
| 119 | + |
| 120 | + def qualify_nm_properties(self, type_name, model_nodes, base_location, model_context, attribute_setter): |
| 121 | + """ |
| 122 | + For the NM properties MBean, update the keystore file path to be fully qualified with the domain directory. |
| 123 | + :param type_name: the type name of the MBean to be checked |
| 124 | + :param model_nodes: the model nodes of the MBean to be checked |
| 125 | + :param base_location: the parent location of the MBean |
| 126 | + :param model_context: the model context of the tool |
| 127 | + :param attribute_setter: the attribute setter to be used for update |
| 128 | + """ |
| 129 | + if type_name == NM_PROPERTIES: |
| 130 | + location = LocationContext(base_location).append_location(type_name) |
| 131 | + keystore_file = dictionary_utils.get_element(model_nodes, CUSTOM_IDENTITY_KEYSTORE_FILE) |
| 132 | + if keystore_file and WLSDeployArchive.isPathIntoArchive(keystore_file): |
| 133 | + value = model_context.get_domain_home() + "/" + keystore_file |
| 134 | + attribute_setter.set_attribute(location, CUSTOM_IDENTITY_KEYSTORE_FILE, value) |
| 135 | + |
0 commit comments