List all available configs CLI Example: .. code-block:: bash salt '*' snapper.list_configs
()
| 192 | |
| 193 | |
| 194 | def list_configs(): |
| 195 | """ |
| 196 | List all available configs |
| 197 | |
| 198 | CLI Example: |
| 199 | |
| 200 | .. code-block:: bash |
| 201 | |
| 202 | salt '*' snapper.list_configs |
| 203 | """ |
| 204 | try: |
| 205 | configs = snapper.ListConfigs() |
| 206 | return {config[0]: config[2] for config in configs} |
| 207 | except dbus.DBusException as exc: |
| 208 | raise CommandExecutionError( |
| 209 | "Error encountered while listing configurations: {}".format( |
| 210 | _dbus_exception_to_reason(exc, locals()) |
| 211 | ) |
| 212 | ) |
| 213 | |
| 214 | |
| 215 | def _config_filter(value): |
no test coverage detected