def wrapper_inner(config, **kwargs): # Check if the current node has "use_compact_node" if is_compat_node(CloudifyContext): kwargs['allow_multiple'] = True func(config, **kwargs) if kwargs.get('allow_multiple') and clean_duplicates_handler: clean_duplicates_handler(config)
def wrapper(**kwargs): ctx = kwargs.get('ctx', CloudifyContext) # Resolve the actual context which need to run operation, # the context could be belongs to relationship context or actual # node context ctx_node = resolve_ctx(ctx) # Check to see if we need to do properties transformation or not kwargs_config = {} if is_compat_node(ctx_node): compat = Compat(context=ctx_node, **kwargs) kwargs_config = compat.transform() if not kwargs_config: kwargs_config = kwargs func(**kwargs_config) update_runtime_properties_for_node_v2(ctx_node, kwargs_config)