def check_against_server_list(server_name, dynamic_size, prefix, starting): if dynamic_size > 0 and prefix is not None and server_name.startswith( prefix): split_it = server_name.split(prefix) if len(split_it) == 2: number = StringUtils.stringToInteger(split_it[1].strip()) if number is not None and starting <= number < (dynamic_size + starting): return True return False
if present == ValidationCodes.VALID: attr_name = aliases.get_wlst_attribute_name(location, DYNAMIC_CLUSTER_SIZE) else: attr_name = aliases.get_wlst_attribute_name(location, MAX_DYNAMIC_SERVER_COUNT) dynamic_size = _wlst_helper.get(attr_name) attr_name = aliases.get_wlst_attribute_name(location, SERVER_NAME_PREFIX) prefix = _wlst_helper.get(attr_name) starting = 1 present, __ = aliases.is_valid_model_attribute_name(location, SERVER_NAME_START_IDX) if present == ValidationCodes.VALID: attr_name = aliases.get_model_attribute_name(location, SERVER_NAME_START_IDX) starting = _wlst_helper.get(attr_name) if dynamic_size > 0 and prefix is not None and server_name.startswith(prefix): split_it = server_name.split(prefix) if len(split_it) == 2: number = StringUtils.stringToInteger(split_it[1].strip()) if number is not None and starting <= number < (dynamic_size + starting): return True return False def delete_online_deployment_targets(model, aliases, wlst_mode): """ For online deploy and update, remove any deleted targets from existing apps and libraries. This step needs to occur during the WLST edit session, before regular app/library deployment. :param model: the model to be examined :param aliases: to resolve WLST paths :param wlst_mode: to check for online mode """ if wlst_mode == WlstModes.ONLINE: app_deployments = dictionary_utils.get_dictionary_element(model.get_model(), APP_DEPLOYMENTS)