ska_tmc_centralnode.commands package
Submodules
ska_tmc_centralnode.commands.central_node_command module
Command class for central node
- class ska_tmc_centralnode.commands.central_node_command.AssignReleaseResources(*args: Any, **kwargs: Any)
Bases:
CentralNodeCommandAssignResources command class
- init_adapters_low()
Initialises adapter for central node low
- Returns:
tuple of ResultCode and message.
- Return type:
Tuple(ResultCode, str)
- init_adapters_mid()
Initialises adapters for mid
- Returns:
tuple of ResultCode and message.
- Return type:
Tuple(ResultCode, str)
- class ska_tmc_centralnode.commands.central_node_command.CentralNodeCommand(component_manager, *args, logger=<Logger ska_tmc_centralnode.commands.central_node_command (WARNING)>, **kwargs)
Bases:
TMCCommandCentral node command class
- adapter_error_message(dev_name, error)
Adapter Error message
- Parameters:
dev_name (str) – name of the device.
error – error message.
- Return type:
Tuple[ResultCode,str]- Returns:
A tuple containing a return code and a string msg. For Example: (ResultCode.FAILED, “”)
- do(argin=None)
Do method for central node command class
- Return type:
ResultCode
- init_adapters()
Initialises adapters for central node command class
- Return type:
Tuple[ResultCode,str]
- invoke_command(adapters, command_caller, err_msg, command_name)
Invokes command on adapters
- Parameters:
adapters (
List) – list of the adapters.command_caller – command caller.
err_msg (str) – error message.
command_name (str) – Command name.
- Returns:
tuple containing a list of return codes and a listof string msg. For Example: (ResultCode.OK, “”).
- Return type:
Tuple(List, List)
- reject_command(message)
Rejects command method for logs error message.
- Parameters:
message (str) – Error message
- Return type:
Tuple[TaskStatus,str]- Returns:
A tuple containing a return code and a string msg. For Example: (TaskStatus.REJECTED, “”)
- send_command(adapters, description, command, argin=None)
Submit command in progress
- Parameters:
adapters (
Optional[AdapterFactory]) – list of the adapters.description (str) – message.
command (str) – Command name.
argin – Command input argument.
- Returns:
Tuple of list of ResultCodes and messages
- Return type:
Tuple(List, List)
- class ska_tmc_centralnode.commands.central_node_command.LoadDishCfgCommand(component_manager, adapter_factory=None, *args, logger=None, **kwargs)
Bases:
CentralNodeCommandThis command class for LoadDishConfig command which load dishid-vcc map json from CAR and pass it to CSP Master
- init_adapters_mid()
Initialises Adapters for mid
- Return type:
Tuple[ResultCode,str]
- class ska_tmc_centralnode.commands.central_node_command.TelescopeOnOff(*args: Any, **kwargs: Any)
Bases:
CentralNodeCommandCentral node abstract command class
- init_adapters_low()
Initialises adapter low
- Returns:
Tuple containing ResultCode and message
- Return type:
Tuple(ResultCode, str)
- init_adapters_mid()
Initialises adapters for mid
- Returns:
Tuple containing ResultCode and message
- Return type:
Tuple(ResultCode, str)
- ska_tmc_centralnode.commands.central_node_command.task_callback_default(status=None, progress=None, result=None, exception=None)
Default method if the taskcallback is not passed
- Parameters:
status (
Optional[TaskStatus]) – status of the task.progress (
Optional[int]) – progress of the task.result (
Optional[Any]) – result of the task.exception (
Optional[Exception]) – an exception raised from the task.
- Return type:
None
ska_tmc_centralnode.commands.assign_resources_command module
AssignResources Command class for CentralNode.
- class ska_tmc_centralnode.commands.assign_resources_command.AssignResources(*args: Any, **kwargs: Any)
Bases:
AssignReleaseResourcesA class for CentralNode’s AssignResources() command.
Assigns resources to a given subarray. It accepts the subarray ID, receptor ID list, and SDP block in JSON string format.
Upon successful execution, the ‘receptor_ids’ attribute of the given subarray is populated with the given receptors.
Checking for duplicate allocation of resources is done. If already allocated, it will throw an error message regarding the prior existence of the resource.
- create_mccs_cmd_data(json_argument)
Method to prepare the input json_argument required while invoking AssignResources() command on MCCS Master Leaf Node.
- Parameters:
json_argument (dict) – The string in JSON format.
- Returns:
The string in JSON format.
- Return type:
dict
- do_low(argin)
Method to invoke AssignResources command on Subarray.
- Parameters:
argin (str) – Input argument for the command
Example JSON for Assign Resources low{ "interface": "https://schema.skao.int/ska-low-tmc-assignresources/4.1", "transaction_id": "txn-....-00001", "subarray_id": 1, "mccs": { "interface": "https://schema.skao.int/ska-low-mccs-controller-allocate/3.0", "subarray_beams": [ { "subarray_beam_id": 1, "apertures": [ { "station_id": 1, "aperture_id": "AP001.01" } ], "number_of_channels": 8 } ] }, "csp": { "pss": { "pss_beam_ids": [ 1, 2, 3 ] }, "pst": { "pst_beam_ids": [ 1 ] } }, "sdp": { "interface": "https://schema.skao.int/ska-sdp-assignres/1.0", "resources": { "receptors": [ "SKA001", "SKA002", "SKA003", "SKA004" ], "receive_nodes": 1 }, "execution_block": { "eb_id": "eb-test-20220916-00000", "context": {}, "max_length": 3600.0, "beams": [ { "beam_id": "vis0", "function": "visibilities" } ], "scan_types": [ { "scan_type_id": ".default", "beams": { "vis0": { "channels_id": "vis_channels", "polarisations_id": "all" } } }, { "scan_type_id": "target:a", "derive_from": ".default", "beams": { "vis0": { "field_id": "field_a" } } }, { "scan_type_id": "calibration:b", "derive_from": ".default", "beams": { "vis0": { "field_id": "field_b" } } } ], "channels": [ { "channels_id": "vis_channels", "spectral_windows": [ { "spectral_window_id": "fsp_1_channels", "count": 4, "start": 0, "stride": 2, "freq_min": 350000000.0, "freq_max": 368000000.0, "link_map": [ [ 0, 0 ], [ 200, 1 ], [ 744, 2 ], [ 944, 3 ] ] } ] } ], "polarisations": [ { "polarisations_id": "all", "corr_type": [ "XX", "XY", "YX", "YY" ] } ], "fields": [ { "field_id": "field_a", "phase_dir": { "target_name": "target_a", "reference_frame": "icrs", "attrs": { "c1": 201.365, "c2": -43.0191667 } }, "pointing_fqdn": "low-tmc/telstate/0/pointing" } ] }, "processing_blocks": [ { "pb_id": "pb-test-20220916-00000", "script": { "kind": "realtime", "name": "test-receive-addresses", "version": "0.7.1" }, "sbi_ids": [ "sbi-mvp01-20210623-00000" ], "parameters": { } } ] } }
- Returns:
tuple containing a return code and a string msg. For Example: (ResultCode.OK, “”)
- Return type:
Tuple(ResultCode, str)
- Raises:
KeyError if input argument json string contains invalid key
ValueError if input argument json string contains invalid value
AssertionError if Mccs On command is not completed.
- do_mid(argin)
Method to invoke the AssignResources command on a Subarray.
- Parameters:
argin (str) – Input argument for the command
Example JSON for Assign Resources mid{ "interface": "https://schema.skao.int/ska-tmc-assignresources/2.2", "transaction_id": "txn-....-00001", "subarray_id": 1, "dish": { "receptor_ids": ["SKA001"] }, "sdp": { "interface": "https://schema.skao.int/ska-sdp-assignres/1.0", "execution_block": { "eb_id": "eb-mvp01-20210623-00000", "max_length": 100.0, "context": {}, "beams": [{ "beam_id": "vis0", "function": "visibilities" }, { "beam_id": "pss1", "search_beam_id": 1, "function": "pulsar search" }, { "beam_id": "pss2", "search_beam_id": 2, "function": "pulsar search" }, { "beam_id": "pst1", "timing_beam_id": 1, "function": "pulsar timing" }, { "beam_id": "pst2", "timing_beam_id": 2, "function": "pulsar timing" }, { "beam_id": "vlbi1", "vlbi_beam_id": 1, "function": "vlbi" }], "scan_types": [{ "scan_type_id": ".default", "beams": { "vis0": { "channels_id": "vis_channels", "polarisations_id": "all" }, "pss1": { "field_id": "pss_field_0", "channels_id": "pulsar_channels", "polarisations_id": "all" }, "pss2": { "field_id": "pss_field_1", "channels_id": "pulsar_channels", "polarisations_id": "all" }, "pst1": { "field_id": "pst_field_0", "channels_id": "pulsar_channels", "polarisations_id": "all" }, "pst2": { "field_id": "pst_field_1", "channels_id": "pulsar_channels", "polarisations_id": "all" }, "vlbi": { "field_id": "vlbi_field", "channels_id": "vlbi_channels", "polarisations_id": "all" } } }, { "scan_type_id": "target:a", "derive_from": ".default", "beams": { "vis0": { "field_id": "field_a" } } }], "channels": [{ "channels_id": "vis_channels", "spectral_windows": [{ "spectral_window_id": "fsp_1_channels", "count": 744, "start": 0, "stride": 2, "freq_min": 350000000.0, "freq_max": 368000000.0, "link_map": [ [0, 0], [200, 1], [744, 2], [944, 3] ] }, { "spectral_window_id": "fsp_2_channels", "count": 744, "start": 2000, "stride": 1, "freq_min": 360000000.0, "freq_max": 368000000.0, "link_map": [ [2000, 4], [2200, 5] ] }, { "spectral_window_id": "zoom_window_1", "count": 744, "start": 4000, "stride": 1, "freq_min": 360000000.0, "freq_max": 361000000.0, "link_map": [ [4000, 6], [4200, 7] ] }] }, { "channels_id": "pulsar_channels", "spectral_windows": [{ "spectral_window_id": "pulsar_fsp_channels", "count": 744, "start": 0, "freq_min": 350000000.0, "freq_max": 368000000.0 }] }], "polarisations": [{ "polarisations_id": "all", "corr_type": ["XX", "XY", "YY", "YX"] }], "fields": [ { "field_id": "field_a", "phase_dir": { "target_name": "target_a", "reference_frame": "icrs", "attrs": { "c1": 201.365, "c2": -43.0191667 } } } ] }, "processing_blocks": [{ "pb_id": "pb-mvp01-20210623-00000", "sbi_ids": ["sbi-mvp01-20200325-00001"], "script": { "kind": "realtime", "name": "vis_receive", "version": "0.1.0" }, "parameters": {} }, { "pb_id": "pb-mvp01-20210623-00001", "sbi_ids": ["sbi-mvp01-20200325-00001"], "script": { "kind": "realtime", "name": "test_realtime", "version": "0.1.0" }, "parameters": {} }, { "pb_id": "pb-mvp01-20210623-00002", "sbi_ids": ["sbi-mvp01-20200325-00002"], "script": { "kind": "batch", "name": "ical", "version": "0.1.0" }, "parameters": {}, "dependencies": [{ "pb_id": "pb-mvp01-20210623-00000", "kind": ["visibilities"] }] }, { "pb_id": "pb-mvp01-20210623-00003", "sbi_ids": ["sbi-mvp01-20200325-00001", "sbi-mvp01-20200325-00002"], "script": { "kind": "batch", "name": "dpreb", "version": "0.1.0" }, "parameters": {}, "dependencies": [{ "pb_id": "pb-mvp01-20210623-00002", "kind": ["calibration"] }] }], "resources": { "csp_links": [1, 2, 3, 4], "receptors": ["FS4", "FS8", "FS16", "FS17", "FS22", "FS23", "FS30", "FS31", "FS32", "FS33", "FS36", "FS52", "FS56", "FS57", "FS59", "FS62", "FS66", "FS69", "FS70", "FS72", "FS73", "FS78", "FS80", "FS88", "FS89", "FS90", "FS91", "FS98", "FS108", "FS111", "FS132", "FS144", "FS146", "FS158", "FS165", "FS167", "FS176", "FS183", "FS193", "FS200", "FS345", "FS346", "FS347", "FS348", "FS349", "FS350", "FS351", "FS352", "FS353", "FS354", "FS355", "FS356", "FS429", "FS430", "FS431", "FS432", "FS433", "FS434", "FS465", "FS466", "FS467", "FS468", "FS469", "FS470"], "receive_nodes": 10 } } }
- Returns:
Result code and message
- Return type:
Tuple(ResultCode, str)
- get_subarray_adapter(subarray_id)
Method for obtaining the adapter for a subarray.
- Parameters:
subarray_id (int) – An integer representing the subarray ID.
- Return type:
Tuple[ResultCode,str]- Returns:
A tuple containing a ResultCode enum value and a string message.
- update_resource_config_file(json_argument, sdp_id)
Updates the resource configuration file.
This method updates the resource configuration file with unique identifiers for execution blocks and processing blocks. It fetches unique IDs using the skuid service and updates the corresponding entries in the provided JSON argument.
- Parameters:
json_argument (dict) – A dictionary containing the JSON argument for the update. This dictionary should have a specific structure with keys for ‘sdp’, ‘execution_block’, and ‘processing_blocks’.
sdp_id (str) – A string representing the ID for the resource configuration file.
- Raises:
Exception – If the ‘processing_blocks’ key is not present in the input JSON argument.
- Return type:
None
- update_task_status(result, exception='')
Updates the task status for a command.
- Parameters:
result (
Tuple[ResultCode,str]) – A tuple containing the result code and a message. The result code indicates whether the command succeeded or failed.exception (str) – A string representing any exception message. This is used when the result indicates a failure. Default is an empty string.
- Return type:
None
ska_tmc_centralnode.commands.release_resources_command module
ReleaseResources class for CentralNode.
- class ska_tmc_centralnode.commands.release_resources_command.ReleaseResources(component_manager, adapter_factory=None, *args, logger=None, **kwargs)
Bases:
AssignReleaseResourcesA class for CentralNode’s ReleaseResources() command.
Release all the resources assigned to the given Subarray. It accepts the subarray id, releaseALL flag and receptorIDList in JSON string format. When the releaseALL flag is True, ReleaseAllResources command is invoked on the respective SubarrayNode. In this case,the receptorIDList tag is empty as all the resources of the Subarray are to be released. When releaseALL is False, ReleaseResources will be invoked on the SubarrayNode and the resources provided in receptorIDList tag, are to be released from the Subarray. The selective release of the resources when releaseALL Flag is False is not yet supported.
- create_mccs_input_data(json_argument)
Creates mccs input strings
- Parameters:
json_argument (dict) – Json argument
- Returns:
MCCS input data json
- Return type:
dict
- do_low(argin)
Method to invoke ReleaseResources command on Subarray Node.
- Parameters:
argin (str) – Input argument for the command
Example JSON for Release Resources low{ "interface": "https://schema.skao.int/ska-low-tmc-releaseresources/3.0", "transaction_id": "txn-....-00001", "subarray_id": 1, "release_all": true }
- Returns:
A tuple containing a return code and a string msg. For Example: (ResultCode.OK, “”)
- Raises:
ValueError if input argument json string contains invalid value
KeyError if input argument json string contains invalid key
DevFailed if the command execution or command invocation on SubarrayNode is not successful
- do_mid(argin)
Method to invoke ReleaseResources command on Subarray.
- Parameters:
argin (str) – Input argument for the command
Example JSON for Release Resources mid{"interface":"https://schema.skao.int/ska-tmc-releaseresources/2.0","transaction_id":"txn-....-00001","subarray_id":1,"release_all":true,"receptor_ids":[]}
- Return type:
Tuple[ResultCode,str]- Returns:
A tuple containing a return code and a string msg. For Example: (ResultCode.OK, “”)
- release_all_resources(adapter)
Releases all resources
- Parameters:
adapter – Adapter
- Returns:
Tuple of list of ResulCodes and lists of messages.
- Return type:
Tuple(list, list)
- release_all_resources_mccs(adapter, argin)
Releases all resources mccs
- Parameters:
adapter – Adapter
- Returns:
Tuple of list of ResulCodes and lists of messages.
- Return type:
Tuple(list, list)
- update_task_status(result, exception='')
Updates the task status for command ReleaseResources
- Parameters:
result (
Tuple[ResultCode,str]) – A tuple containing the result code and a message. The result code indicates whether the command succeeded or failed.exception (str) – A string representing any exception message. This is used when the result indicates a failure. Default is an empty string.
- Return type:
None
ska_tmc_centralnode.commands.stow_antennas_command module
Command class for StowAntennas()
- class ska_tmc_centralnode.commands.stow_antennas_command.StowAntennas(*args: Any, **kwargs: Any)
Bases:
CentralNodeCommandA class for CentralNode’s StowAntennas() command.
Invokes the command SetStowMode on the specified receptors.
- check_allowed()
Checks whether this command is allowed It checks that the device is in a state to perform this command and that all the component needed for the operation are not faulty
- Returns:
True if this command is allowed
- Return type:
bool
- Raises:
CommandNotAllowed – If command is not allowed
- do(argin)
Method to invoke StowAntennas command.
- Parameters:
argin (
List[str]) – List of Receptors to be stowed.- Returns:
Tuple of ReultCode and message.
- Return type:
Tuple(ResultCode, str)
- init_adapters()
Initialise adapters
- Returns:
Tuple of ResultCode and status message.
- Return type:
Tuple(ResultCode, str)
- set_stow_mode_dishes(adapters)
Method for set stow mode for dish
- Parameters:
adapters – Adapters
- Returns:
Tuple containing list of ResultCodes and list of messages
- Return type:
Tuple(List, List)
ska_tmc_centralnode.commands.telescope_off_command module
Command class for TelescopeOff()
- class ska_tmc_centralnode.commands.telescope_off_command.TelescopeOff(*args: Any, **kwargs: Any)
Bases:
TelescopeOnOffA class for CentralNode’s TelescopeOff() command. Sets the CentralNode into telescopeState to OFF.
- do_low(argin=None)
Method to invoke Off command on lower level devices.
- Parameters:
argin (Str) – Default is None.
- Returns:
tuple containing a return code and a string message indicating status.
- Return type:
Tuple(ResultCode, str)
- do_mid(argin=None)
Method to invoke Off command on lower level devices.
- Parameters:
argin (str) – Default is None.
- Returns:
tuple containing a return code and a string message indicating status.
- Return type:
Tuple(ResultCode, str)
- telescope_off(logger, task_callback=None, task_abort_event=None)
This is a long running method
- Parameters:
logger (
Logger) – loggertask_callback (
Optional[Callable]) – Update task state, defaults to Nonetask_abort_event (
Optional[Event]) – Check for abort, defaults to Nonetask_abort_event – Event, optional
- Return type:
None
- turn_off_csp()
Turn off the CSP devices
- Returns:
Tuple containing list of ResultCodes and list of messages
- Return type:
Tuple(List, List)
- turn_off_dishes()
Turn off the dishes
- Returns:
tuple containing list of ReturnCodes and list of string message indicating status.
- Return type:
Tuple(List, List)
- turn_off_mccs()
Turn off the MCCS devices
- Returns:
Tuple of list of Resultcodes and list of messages.
- Return type:
Tuple(List, List)
- turn_off_sdp()
Turn off the SDP devices
- Returns:
Tuple containing list of ResultCodes and list of messages
- Return type:
Tuple(List, List)
- turn_off_subarrays()
Turn off the subarrays
- Returns:
tuple containing list of ReturnCodes and list of string message indicating status.
- Return type:
Tuple(List, List)
- update_task_status()
Updates task status implemented to
ska_tmc_centralnode.commands.telescope_on_command module
Command class for TelescopeOn()
- class ska_tmc_centralnode.commands.telescope_on_command.TelescopeOn(*args: Any, **kwargs: Any)
Bases:
TelescopeOnOffA class for CentralNode’s TelescopeOn() command.
TelescopeOn command on Central node enables the telescope to perform further operations and observations. It Invokes On command on lower level devices.
- do_low(argin=None)
Method to invoke On command on Lower level devices.
- Parameters:
argin (str) – Default to None in case of TelescopeOn.
- Returns:
Tuple containing a return code and a string message indicating status.
- Return type:
Tuple(ReSultCode, str)
- do_mid(argin=None)
Method to invoke On command on Lower level devices.
- Parameters:
argin (str) – Defaults to None in case of TelescopeOn.
- Returns:
tuple containing a return code and a string message indicating status.
- Return type:
Tuple(ResultCode, str)
- set_standby_fp_mode_dishes()
Sets standby fb mode in dishes
- Returns:
Tuple containing list of return codes and list of string message indicating status.
- Return type:
Tuple(List, List)
- telescope_on(logger, task_callback=None, task_abort_event=None)
This is a long running method for TelescopeOn command, it executes do hook, invokes TelescopeOn command on lowe level devices.
- Parameters:
logger (
Logger) – loggertask_callback (
Optional[Callable]) – Update task state, defaults to Nonetask_abort_event (
Optional[Event]) – Check for abort, defaults to None
- Return type:
None
- turn_on_csp()
Turns on the csp
- Returns:
A tuple containing list of return codes and list of string message indicating status.
- Return type:
Tuple(List, List)
- turn_on_mccs()
Turns on the MCCS
- Returns:
Tuple containing list of ResultCodes and list of messages
- Return type:
Tuple(List, List)
- turn_on_sdp()
Turns on the SDP
- Returns:
Tuple containing list of return codes and list of string message indicating status.
- Return type:
Tuple(List, List)
- turn_on_subarrays()
Turns on the subarrays
- Returns:
Tuple containing list of return codes and list of string message indicating status.
- Return type:
Tuple(List, List)
- update_task_status()
Updates task status implemented to
ska_tmc_centralnode.commands.telescope_standby_command module
Command class for TelescopeStandby command
- class ska_tmc_centralnode.commands.telescope_standby_command.TelescopeStandby(*args: Any, **kwargs: Any)
Bases:
TelescopeOnOffA class for CentralNode’s TelescopeStandby() command.
- do_low(argin=None)
Method to invoke Standby command on SubarrayNode and MCCS Master Leaf Node.
- Parameters:
argin (str) – Default None.
- Returns:
tuple containing a return code and a string message indicating status.
- Return type:
Tuple(ResultCode, str)
- do_mid(argin=None)
Method to invoke TelescopeStandby command on SubarrayNode, CSP and SDP Master Leaf Nodes. Also to invoke StandbyFP and then StandbyLP commands on Dish Leaf Nodes.
- Parameters:
argin (str) – Default is None in case of TelescopeStandby.
- Returns:
tuple containing a return code and a string message indicating status.
- Return type:
Tuple(List, List)
- telescope_standby(logger, task_callback=None, task_abort_event=None)
This is a long running method for TelescopeStandby command, it executes do hook, invokes TelescopeStandby command on lower level devices.
- Parameters:
logger (
Logger) – loggertask_callback (
Optional[Callable]) – Update task state, defaults to Nonetask_abort_event (
Optional[Event]) – Check for abort, defaults to None
- Return type:
None
- turn_off_dishes()
Turns off the dishes
- Returns:
tuple of list of ResultCodes and list of messages.
- Return type:
Tuple(List, List)
- turn_standby_csp()
Turns csp to standby
- Returns:
tuple of list of ResultCodes and list of messages.
- Return type:
Tuple(List, List)
- turn_standby_mccs()
Turns MCCS into standby
- Returns:
tuple of list of ResultCodes and list of messages.
- Return type:
Tuple(List, List)
- turn_standby_sdp()
Turns sdp to standby
- Returns:
tuple of list of ResultCodes and list of messages.
- Return type:
Tuple(List, List)
- turn_standby_subarrays()
Turns subarrays to standby
- Returns:
tuple of list of ResultCodes and list of messages.
- Return type:
Tuple(List, List)
- update_task_status()
blank method for resolving pylint errors
ska_tmc_centralnode.commands.load_dish_config_command module
Commad class for Load_dish_config_command
- class ska_tmc_centralnode.commands.load_dish_config_command.LoadDishCfg(*args: Any, **kwargs: Any)
Bases:
LoadDishCfgCommandA class for CentralNode’s LoadDishConfig command. Load DishId-VCC map from CAR URI and provide it to Csp Master Leaf Node After Validation
- check_and_validate_dish_vcc_data(dishid_vcc_map_params)
This method downloads dish vcc json from telmodel and validates the data. :type dishid_vcc_map_params:
str:param dishid_vcc_map_params: JSON string containing parametersto fetch the dish VCC map.
- Returns:
- A tuple containing the dish VCC map JSON
and an error message string (empty if no error).
- Return type:
Tuple[dict, str]
- do(argin)
This command performs the following steps:
Loads the content of the DishId-VCC mapping file from CAR URI.
Validates the JSON.
Invokes a command on the CSP master leaf node.
4. Invokes the SetKValue command on the Dish Leaf Node for each dish ID provided in the DishId-VCC map.
- Parameters:
argin (str) – DishId-VCC map parameters in JSON string format.
- Returns:
Result code and message
- Return type:
Tuple(ResultCode, str)
- fetch_dishid_vcc_map(dish_cfg_params)
Fetch the DishId-VCC map JSON.
- Parameters:
dish_cfg_params (str) – Dish config parameters
- Returns:
tuple of DishId-VCC map JSON and error message if any
- Return type:
Tuple(dict, str)
- get_dishid_vcc_map_json(initial_params)
Get DishId-VCC map json from initial params
- Parameters:
initial_param (dict) – this param containg tm data source uri and file path which is used for extracting vcc_map json file
- Returns:
tuple having DishId-VCC map json and Error message if any
- Return type:
Tuple(dict, str)
- load_dish_cfg(dish_cfg_params, logger=None, task_callback=None, task_abort_event=None)
- Parameters:
logger (logging.Logger) – logger
dish_cfg_params (
str) – dishid vcc map paramstask_callback (Callable, optional) – Update task state, defaults to None
task_abort_event (Event, optional) – Check for abort, defaults to None
- Return type:
None
- load_dish_config_json_validator(argin)
Method to validate the JSON for LoadDishConfig Command
- Parameters:
argin – Input argument for DishConfigValidator
- Returns:
Tuple of boolean representing valid dish config and string representing message
- Return type:
Tuple(bool, str)
- update_memorized_attribute()
Update memorized attribute so after restart this attribute used to get dish map vcc version set before restart
- Return type:
None
- update_task_status(result, exception='')
Updates the task status for command
- Parameters:
result (
Tuple[ResultCode,str]) – Result code of commandexception (str) – any message returned as a part of command
- Return type:
None