- if lookfor_network and create_network:
- # TODO create two tasks FIND + CREATE with their relationship
- task_action = "FIND"
- task_params = (lookfor_filter,)
- # task_action = "CREATE"
- # task_params = (net_vim_name, net_type, sce_net.get('ip_profile', None))
- # task
+ task_extra = {}
+ if create_network:
+ task_action = "CREATE"
+ task_extra["params"] = (net_vim_name, net_type, sce_net.get('ip_profile', None))
+ if lookfor_network:
+ task_extra["find"] = (lookfor_filter,)