def _add_subfolders(self, model_nodes, location, excludes=None): """ Override the base method for sub-folders of resource group and template. Those sub-folders must be processed in a specific order, some with special processing. :param model_nodes: the child nodes of a model element :param location: the location where sub-folders should be added :param excludes: optional list of sub-folder names to be excluded from processing """ parent_type = self.get_location_type(location) is_in = (parent_type == RESOURCE_GROUP) or (parent_type == RESOURCE_GROUP_TEMPLATE) if is_in: self._add_resource_group_resources(model_nodes, location) return Deployer._add_subfolders(self, model_nodes, location, excludes=excludes) return
def _add_subfolders(self, model_nodes, location, excludes=None): """ Override the base method for sub-folders of self-tuning. The work manager sub-folder must be processed last. """ parent_type = self.get_location_type(location) if parent_type == SELF_TUNING: # add all sub-folders except work manager Deployer._add_subfolders(self, model_nodes, location, excludes=[WORK_MANAGER]) # add the work manager sub-folder last watch_nodes = dictionary_utils.get_dictionary_element( model_nodes, WORK_MANAGER) self._add_named_elements(WORK_MANAGER, watch_nodes, location) return Deployer._add_subfolders(self, model_nodes, location, excludes=excludes) return
def _add_subfolders(self, model_nodes, location, excludes=None): """ Override the base method for sub-folders of watch notification. The watch sub-folder must be processed last. """ parent_type = self.get_location_type(location) if parent_type == WATCH_NOTIFICATION: # add all sub-folders except watch Deployer._add_subfolders(self, model_nodes, location, excludes=[WATCH]) # add the watch sub-folder last watch_nodes = dictionary_utils.get_dictionary_element( model_nodes, WATCH) self._add_named_elements(WATCH, watch_nodes, location) return Deployer._add_subfolders(self, model_nodes, location, excludes=excludes) return