transpower-nz / open-scd

Apache License 2.0
4 stars 1 forks source link

Remove IED from project file #1

Closed Uffel3 closed 6 months ago

Uffel3 commented 7 months ago

There are currently three use cases where an IED removal is required

  1. Simple: Someone created a new SCD file (or modifies an existing SCD file) and added too many IED's from the Import Templates menu. removing this IED should be straightforward
  2. We have an existing SCD file. An IED (e.g. Merging Unit) has failed, and we do not have enough emergency spares, or we are no longer allowed to purchase and install this device. So now we need to replace the old IED with a new IED (and its ICD file). We are now breaking some MU/GOOSE publishers and subscriptions. OpenSCD needs to be smart enough to remove the device form all subscriptions and show the user a list af what is broken and need fixing.
  3. Transpower decides that Bay123 is no longer required. All IED's need to be removed. Similar to the previous case, but more complex.
danyill commented 7 months ago

Thanks for filing this issue.

I propose, for now that the MVP is a simple plugin to remove one or more IEDs.

It will remove all IEDs and all references to the IED (as if it had never been there).

Including references in "LNode", "ConnectedAP", "KDC", "ExtRef", "ClientLN", "Association", "LN > DOI[Go/SVCBRef]", "IEDName".

Case 1 and 3 are in scope. The subscriptions will all be removed for Case 2 and the end user must use the forthcoming diff/merge functionality to identify the required changes (or other documentation).

The approach will looks similar to the "Rename IEDs" plugin and allow multiselection and deletion of devices.

We'll contribute an upstream function to make this easier for others: https://github.com/OpenEnergyTools/scl-lib/issues/91

danyill commented 6 months ago

We now have a menu plugin "Remove IEDs". Please test and report any issues.