Пример #1
0
    def ui_content(self):
        profiles = [(profile, profile) for profile in
                    tuned.get_available_profiles()]

        ws = [ui.Header("header", "tuned Configuration"),
              ui.Label("label", "Choose the tuned profile you would " +
                       "like to apply to this system."),
              ui.Divider("divider[0]"),
              ui.KeywordLabel("tuned.profile", "Current Active Profile:  "),
              ui.Table("tuned.profile", "", "Available tuned Profiles",
                       profiles),
              ]
        page = ui.Page("page", ws)
        self.widgets.add(page)
        return page
Пример #2
0
    def ui_content(self):
        profiles = [(profile, profile)
                    for profile in tuned.get_available_profiles()]

        ws = [
            ui.Header("header", "tuned Configuration"),
            ui.Label(
                "label", "Choose the tuned profile you would " +
                "like to apply to this system."),
            ui.Divider("divider[0]"),
            ui.KeywordLabel("tuned.profile", "Current Active Profile:  "),
            ui.Table("tuned.profile", "", "Available tuned Profiles",
                     profiles),
        ]
        page = ui.Page("page", ws)
        self.widgets.add(page)
        return page
Пример #3
0
 def update(self, profile):
     all_profiles = tuned.get_available_profiles()
     if profile not in all_profiles:
         raise InvalidData("Unknown tuned profile: %s" % profile)
     return {"OVIRT_TUNED_PROFILE": profile}
Пример #4
0
 def update(self, profile):
     all_profiles = tuned.get_available_profiles()
     if profile not in all_profiles:
         raise InvalidData("Unknown tuned profile: %s" % profile)
     return {"OVIRT_TUNED_PROFILE": profile}