neops.core.provider.base.base_run_cycle
BaseRunCycle
Description of the base run cycle for a provider
Access to Task and Input Arguments
To access to the task arguments and to the given input values use the following arguments passed to every run cycle methhod
Task Arguments
Run Input ArgumentsClass variables
Methods
add_markdown_helptext(self,md_content: neops.core.libs.helptext.markdown_content.MarkDownContent) -> NoneType
\ param md_content: MarkDownContent of the current documentation of this element.
pre_run_global(self,execute_on: List[int],execute_on_type: neops.core.provider.base.enum.RunOnEnum,dry_run: bool,task_input_kwargs: Dict[Any, Any],search_query: str,task_kwargs: Dict[Any, Any],result=neops.core.provider.base.result.provider_global_result.ProviderGlobalResult,**kwargs) -> Any
\ param execute_on (List[int]): ids on which elements the task is executed \ param execute_on_type (RunOnEnum): on which entity type the task is executed \ param dry_run (bool): defines if no changes should be applied (especially for configuration tasks) \ param task_input_kwargs (Dict[Any, Any]): additional input arguments per task \ param search_query (str): search query to limit elements to run on \ param task_kwargs (Dict[Any, Any]): task arguments \ param result ([ProviderGlobalResult], optional): empty ProviderGlobalResult to be updated
\ return: results or exceptions are stored in a ProviderGlobalResult object
pre_run_on_client_of_interface(self,execute_on: List[int],execute_on_type: neops.core.provider.base.enum.RunOnEnum,dry_run: bool,task_input_kwargs: Dict[Any, Any],search_query: str,task_kwargs: Dict[Any, Any],task: nornir.core.task.Task,nornir_device_id: int,device_id: int,interface_id: int,client_id: int,client_result=neops.core.provider.base.result.coupled_provider_result_types.ProviderClientResult,**kwargs) -> Any
\ param execute_on (List[int]): ids on which elements the task is executed \ param execute_on_type (RunOnEnum): on which entity type the task is executed \ param dry_run (bool): defines if no changes should be applied (especially for configuration tasks) \ param task_input_kwargs (Dict[Any, Any]): additional input arguments per task \ param search_query (str): search query to limit elements to run on \ param task_kwargs (Dict[Any, Any]): task arguments \ param task (Task): nornir Task object \ param nornir_device_id (int): id of the related nornir device \ param device_id (int): id of the related device \ param interface_id (int): id of the connected interface \ param client_id (int): id of the current client \ param client_result ([ProviderClientResult], optional): empty ProviderClientResult to be updated (with a reference to the related parent objects)
\ return: results or exceptions are stored in a ProviderClientResult object
pre_run_on_client_of_location(self,execute_on: List[int],execute_on_type: neops.core.provider.base.enum.RunOnEnum,dry_run: bool,task_input_kwargs: Dict[Any, Any],search_query: str,task_kwargs: Dict[Any, Any],location_id: int,client_id: int,client_result=neops.core.provider.base.result.coupled_provider_result_types.ProviderClientResult,**kwargs) -> Any
\ param execute_on (List[int]): ids on which elements the task is executed \ param execute_on_type (RunOnEnum): on which entity type the task is executed \ param dry_run (bool): defines if no changes should be applied (especially for configuration tasks) \ param task_input_kwargs (Dict[Any, Any]): additional input arguments per task \ param search_query (str): search query to limit elements to run on \ param task_kwargs (Dict[Any, Any]): task arguments \ param location_id (int): id of the related location/device group \ param client_id (int): id of the current client \ param client_result ([ProviderClientResult], optional): empty ProviderClientResult to be updated (with a reference to the related parent objects)
\ return: results or exceptions are stored in a ProviderClientResult object
pre_run_on_device(self,execute_on: List[int],execute_on_type: neops.core.provider.base.enum.RunOnEnum,dry_run: bool,task_input_kwargs: Dict[Any, Any],search_query: str,task_kwargs: Dict[Any, Any],task: nornir.core.task.Task,nornir_device_id: int,device_id: int,device_result=neops.core.provider.base.result.coupled_provider_result_types.ProviderDeviceResult,**kwargs) -> Any
\ param execute_on (List[int]): ids on which elements the task is executed \ param execute_on_type (RunOnEnum): on which entity type the task is executed \ param dry_run (bool): defines if no changes should be applied (especially for configuration tasks) \ param task_input_kwargs (Dict[Any, Any]): additional input arguments per task \ param search_query (str): search query to limit elements to run on \ param task_kwargs (Dict[Any, Any]): task arguments \ param task (Task): nornir Task object \ param nornir_device_id (int): id of the related nornir device \ param device_id (int): id of the current device \ param device_result ([ProviderDeviceResult], optional): empty ProviderDeviceResult to be updated (with a reference to the related parent objects)
\ return: results or exceptions are stored in a ProviderDeviceResult object
pre_run_on_device_group(self,execute_on: List[int],execute_on_type: neops.core.provider.base.enum.RunOnEnum,dry_run: bool,task_input_kwargs: Dict[Any, Any],search_query: str,task_kwargs: Dict[Any, Any],device_group_id: int,device_group_result=neops.core.provider.base.result.coupled_provider_result_types.ProviderDeviceGroupResult,**kwargs) -> Any
\ param execute_on (List[int]): ids on which elements the task is executed \ param execute_on_type (RunOnEnum): on which entity type the task is executed \ param dry_run (bool): defines if no changes should be applied (especially for configuration tasks) \ param task_input_kwargs (Dict[Any, Any]): additional input arguments per task \ param search_query (str): search query to limit elements to run on \ param task_kwargs (Dict[Any, Any]): task arguments \ param device_group_id (int): id of the current device group \ param device_group_result ([ProviderDeviceGroupResult], optional): empty ProviderDeviceGroupResult to be updated
\ return: results or exceptions are stored in a ProviderDeviceGroupResult object
pre_run_on_interface(self,execute_on: List[int],execute_on_type: neops.core.provider.base.enum.RunOnEnum,dry_run: bool,task_input_kwargs: Dict[Any, Any],search_query: str,task_kwargs: Dict[Any, Any],task: nornir.core.task.Task,nornir_device_id: int,device_id: int,interface_id: int,interface_result=neops.core.provider.base.result.coupled_provider_result_types.ProviderInterfaceResult,**kwargs) -> Any
\ param execute_on (List[int]): ids on which elements the task is executed \ param execute_on_type (RunOnEnum): on which entity type the task is executed \ param dry_run (bool): defines if no changes should be applied (especially for configuration tasks) \ param task_input_kwargs (Dict[Any, Any]): additional input arguments per task \ param search_query (str): search query to limit elements to run on \ param task_kwargs (Dict[Any, Any]): task arguments \ param task (Task): nornir Task object \ param nornir_device_id (int): id of the related nornir device \ param device_id (int): id of the related device \ param interface_id (int): id of the current interface \ param interface_result ([ProviderInterfaceResult], optional): empty ProviderInterfaceResult to be updated (with a reference to the related parent objects)
\ return: results or exceptions are stored in a ProviderInterfaceResult object
pre_run_on_nornir_device(self,execute_on: List[int],execute_on_type: neops.core.provider.base.enum.RunOnEnum,dry_run: bool,task_input_kwargs: Dict[Any, Any],search_query: str,task_kwargs: Dict[Any, Any],task: nornir.core.task.Task,nornir_device_id: int,nornir_device_result=neops.core.provider.base.result.coupled_provider_result_types.ProviderNornirDeviceResult,**kwargs) -> Any
A nornir_device is in the most cases the same as a device, except you have controller configured devices, then it's the controller itself or in otherwords where configurations are applied.
Nornir devices are executed and threaded with nornir task runner.
\ param execute_on (List[int]): ids on which elements the task is executed \ param execute_on_type (RunOnEnum): on which entity type the task is executed \ param dry_run (bool): defines if no changes should be applied (especially for configuration tasks) \ param task_input_kwargs (Dict[Any, Any]): additional input arguments per task \ param search_query (str): search query to limit elements to run on \ param task_kwargs (Dict[Any, Any]): task arguments \ param task (Task): nornir Task object \ param nornir_device_id (int): id of the current nornir device \ param nornir_device_result ([ProviderNornirDeviceResult], optional): empty ProviderNornirDeviceResult to be updated (with a reference to the related parent objects)
\ return: results or exceptions are stored in a ProviderNornirDeviceResult object
run_global(self,execute_on: List[int],execute_on_type: neops.core.provider.base.enum.RunOnEnum,dry_run: bool,task_input_kwargs: Dict[Any, Any],search_query: str,task_kwargs: Dict[Any, Any],result=neops.core.provider.base.result.provider_global_result.ProviderGlobalResult,**kwargs) -> Any
\ param execute_on (List[int]): ids on which elements the task is executed \ param execute_on_type (RunOnEnum): on which entity type the task is executed \ param dry_run (bool): defines if no changes should be applied (especially for configuration tasks) \ param task_input_kwargs (Dict[Any, Any]): additional input arguments per task \ param search_query (str): search query to limit elements to run on \ param task_kwargs (Dict[Any, Any]): task arguments \ param result ([ProviderGlobalResult], optional): ProviderGlobalResult with the result of step 1 \ return: results or exceptions are stored in a ProviderGlobalResult object
run_on_client_of_interface(self,execute_on: List[int],execute_on_type: neops.core.provider.base.enum.RunOnEnum,dry_run: bool,task_input_kwargs: Dict[Any, Any],search_query: str,task_kwargs: Dict[Any, Any],task: nornir.core.task.Task,nornir_device_id: int,device_id: int,interface_id: int,client_id: int,client_result: neops.core.provider.base.result.coupled_provider_result_types.ProviderClientResult,**kwargs) -> Any
\ param execute_on (List[int]): ids on which elements the task is executed \ param execute_on_type (RunOnEnum): on which entity type the task is executed \ param dry_run (bool): defines if no changes should be applied (especially for configuration tasks) \ param task_input_kwargs (Dict[Any, Any]): additional input arguments per task \ param search_query (str): search query to limit elements to run on \ param task_kwargs (Dict[Any, Any]): task arguments \ param task (Task): nornir Task object \ param nornir_device_id (int): id of the related nornir device \ param device_id (int): id of the related device \ param interface_id (int): id of the connected interface \ param client_id (int): id of the current client \ param client_result ([ProviderClientResult], optional): ProviderClientResult with the results of step 7
\ return: results or exceptions are stored in a ProviderClientResult object
run_on_client_of_location(self,execute_on: List[int],execute_on_type: neops.core.provider.base.enum.RunOnEnum,dry_run: bool,task_input_kwargs: Dict[Any, Any],search_query: str,task_kwargs: Dict[Any, Any],location_id: int,client_id: int,client_result=neops.core.provider.base.result.coupled_provider_result_types.ProviderClientResult,**kwargs) -> Any
\ param execute_on (List[int]): ids on which elements the task is executed \ param execute_on_type (RunOnEnum): on which entity type the task is executed \ param dry_run (bool): defines if no changes should be applied (especially for configuration tasks) \ param task_input_kwargs (Dict[Any, Any]): additional input arguments per task \ param search_query (str): search query to limit elements to run on \ param task_kwargs (Dict[Any, Any]): task arguments \ param location_id (int): id of the related location/device group \ param client_id (int): id of the current client \ param client_result ([ProviderClientResult], optional): ProviderClientResult with the result of step 3
\ return: results or exceptions are stored in a ProviderClientResult object
run_on_device(self,execute_on: List[int],execute_on_type: neops.core.provider.base.enum.RunOnEnum,dry_run: bool,task_input_kwargs: Dict[Any, Any],search_query: str,task_kwargs: Dict[Any, Any],task: nornir.core.task.Task,nornir_device_id: int,device_id: int,device_result: neops.core.provider.base.result.coupled_provider_result_types.ProviderDeviceResult,**kwargs) -> Any
\ param execute_on (List[int]): ids on which elements the task is executed \ param execute_on_type (RunOnEnum): on which entity type the task is executed \ param dry_run (bool): defines if no changes should be applied (especially for configuration tasks) \ param task_input_kwargs (Dict[Any, Any]): additional input arguments per task \ param search_query (str): search query to limit elements to run on \ param task_kwargs (Dict[Any, Any]): task arguments \ param task (Task): nornir Task object \ param nornir_device_id (int): id of the related nornir device \ param device_id (int): id of the current device \ param device_result ([ProviderDeviceResult], optional): ProviderDeviceResult with the result of step 5
\ return: results or exceptions are stored in a ProviderDeviceResult object
run_on_device_group(self,execute_on: List[int],execute_on_type: neops.core.provider.base.enum.RunOnEnum,dry_run: bool,task_input_kwargs: Dict[Any, Any],search_query: str,task_kwargs: Dict[Any, Any],device_group_id: int,device_group_result=neops.core.provider.base.result.coupled_provider_result_types.ProviderDeviceGroupResult,**kwargs) -> Any
\ param execute_on (List[int]): ids on which elements the task is executed \ param execute_on_type (RunOnEnum): on which entity type the task is executed \ param dry_run (bool): defines if no changes should be applied (especially for configuration tasks) \ param task_input_kwargs (Dict[Any, Any]): additional input arguments per task \ param search_query (str): search query to limit elements to run on \ param task_kwargs (Dict[Any, Any]): task arguments \ param device_group_id (int): id of the current device group \ param device_group_result ([ProviderDeviceGroupResult], optional): ProviderDeviceGroupResult with the result of step 2
\ return: results or exceptions are stored in a ProviderDeviceGroupResult object
run_on_interface(self,execute_on: List[int],execute_on_type: neops.core.provider.base.enum.RunOnEnum,dry_run: bool,task_input_kwargs: Dict[Any, Any],search_query: str,task_kwargs: Dict[Any, Any],task: nornir.core.task.Task,nornir_device_id: int,device_id: int,interface_id: int,interface_result=neops.core.provider.base.result.coupled_provider_result_types.ProviderInterfaceResult,**kwargs) -> Any
\ param execute_on (List[int]): ids on which elements the task is executed \ param execute_on_type (RunOnEnum): on which entity type the task is executed \ param dry_run (bool): defines if no changes should be applied (especially for configuration tasks) \ param task_input_kwargs (Dict[Any, Any]): additional input arguments per task \ param search_query (str): search query to limit elements to run on \ param task_kwargs (Dict[Any, Any]): task arguments \ param task (Task): nornir Task object \ param nornir_device_id (int): id of the related nornir device \ param device_id (int): id of the related device \ param interface_id (int): id of the current interface \ param interface_result ([ProviderInterfaceResult], optional): ProviderInterfaceResult with the result of step 6
\ return: results or exceptions are stored in a ProviderInterfaceResult object
run_on_nornir_device(self,execute_on: List[int],execute_on_type: neops.core.provider.base.enum.RunOnEnum,dry_run: bool,task_input_kwargs: Dict[Any, Any],search_query: str,task_kwargs: Dict[Any, Any],task: nornir.core.task.Task,nornir_device_id: int,nornir_device_result=neops.core.provider.base.result.coupled_provider_result_types.ProviderNornirDeviceResult,**kwargs) -> Any
A nornir_device is in the most cases the same as a device, except you have controller configured devices, then it's the controller itself or in otherwords where configurations are applied.
Nornir devices are executed and threaded with nornir task runner.
\ param execute_on (List[int]): ids on which elements the task is executed \ param execute_on_type (RunOnEnum): on which entity type the task is executed \ param dry_run (bool): defines if no changes should be applied (especially for configuration tasks) \ param task_input_kwargs (Dict[Any, Any]): additional input arguments per task \ param search_query (str): search query to limit elements to run on \ param task_kwargs (Dict[Any, Any]): task arguments \ param task (Task): nornir Task object \ param nornir_device_id (int): id of the current nornir device \ param nornir_device_result ([ProviderNornirDeviceResult], optional): ProviderNornirDeviceResult with the result of step 4
\ return: results or exceptions are stored in a ProviderNornirDeviceResult object