dlr-eoc / prosEO

prosEO – A Processing System for Earth Observation Data
GNU General Public License v3.0
14 stars 1 forks source link

CLI: Prevent attempts to change key parameters in "update" commands #102

Open tangobravo62 opened 3 years ago

tangobravo62 commented 3 years ago

The following shall be prevented:

prosEO (NM4T)> orbit update NM4T_Spacecraft_1 1234 spacecraftCode=NM4T_Spacecraft_200
(E2854) Orbit number 1234 not found for spacecraft NM4T_Spacecraft_200

Here the system tries to change an existing orbit with number 1234 for the spacecraft ...200, which does not exist, instead of (illegally) trying to locate orbit 1234 for spacecraft ...1 and to move it over to spacecraft ...200 (which is what the user intended). The attempt to change key attributes in any "xxx update" command shall be detected and prevented by issuing an error message. (Note that this might indeed lead to undesired behaviour, if spacecraft ...200 actually exists and already has an orbit 1234, which would then be modified instead of orbit 1234 for spacecraft ...1!)