aboutsummaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2018-05-26 22:20:52 +0100
committerBryn M. Reeves <bmr@redhat.com>2018-06-20 18:01:21 +0100
commit6c7b540d72383d8669157a3726f1001777865723 (patch)
tree04874a653f2441a5649030c22d1b67537a448617 /man
parentb0dca512087d704d7f0bfa7e24e71f8c3c1cd8e5 (diff)
downloadsos-6c7b540d72383d8669157a3726f1001777865723.tar.gz
[policies] add on-disk preset support
Add the ability for the Policy class to load presets in JSON format: a PresetDefaults object maps directly to the JSON file structure: the outer container is a dictionary whose keys are the names of the contained presets, and each preset may contain a "name", "desc", "note", and "opts" member. Methods are provided to load, write, delete, user presets, and to register policy-defined built-in presets: PresetDefaults.write() PresetDefaults.delete() Policy.register_presets() Policy.load_presets() policy.add_preset() policy.del_preset() The name is used to select a preset (in the same way as a policy defined preset), and the description and note give further information on the preset and its behaviour (for e.g. performance impact). The "opts" key maps to a further dictionary mapping sos argument names to their preset values. Loaded presets are added to the active policie's presets store and are available to the user via --preset. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Diffstat (limited to 'man')
0 files changed, 0 insertions, 0 deletions