Closed peb-adr closed 2 years ago
It should be possible to provide the payload as a yaml-file (--payload-file). Maybe alternatively as a postitional argument (--payload-string), but this can be optional imo.
Another suggestion: openslides set <property> <path>|-
, where -
indicates stdin. That would cover both use cases without introducing any new flags.
The grep command is nice but I think we should not support all of them. I will add orga and meeting and it is ok for me if anyone else wants to extend the list. This is easy even without any Golang experience.
As we discussed a 'semi-generic' sub command for setting attributes on an OS4-instance would be nice.
The general syntax should be something like this:
where property can be one of the properties updatable by backend actions. (I did this to find suitable actions:
OpenSlides/openslides-backend/openslides_backend/action/actions $ grep -r -e '@register_action\(.*\.update.*\)'
)It should be possible to provide the payload as a yaml-file (--payload-file). Maybe alternatively as a postitional argument (--payload-string), but this can be optional imo.
As proposed the tool should keep a
map[property -> backend-action]
to lookup the backend action to call and also serve as white list of working commands.low prio: the help message for
may be quite generic. For a more specific one the backend must be available, i.e.
should ask the backend for available actions and parse the accepted fields form it's response to create a more detailed help message.
This functionality is currently no longer available, but will be reimplemented, see https://github.com/OpenSlides/openslides-backend/issues/1159.