crmsh icon indicating copy to clipboard operation
crmsh copied to clipboard

enhancement: copy resources

Open sjvudp opened this issue 5 years ago • 0 comments

When creating similar resources, on could edit (in configure context) the whole file using the editor to copy and then modify the desired resource. As an alternative one could first show the resource to copy, and then re-create it with a new name and parameters adapted.

Both do not look like a good solution; therefore I suggest (for configure context): As just copying a resource with parameters unchanged may violate some uniqueness restrictions, a command "copy resource" is problematic; instead extend the edit command for "edit [copy] *resource". That command would create a new resource copying resource with _copy (or -copy) being appended to the original resource name, and it will start the editor (just as edit would do) to allow changing the resource name and the parameters as intended. When adding the optional xml parameter, the XML version of the resource would be presented in the editor instead, so: "edit [xml] [copy] ..." Possibly also: "edit [xml] [copy] changed"

sjvudp avatar Dec 18 '20 07:12 sjvudp