| @@ 286-300 (lines=15) @@ | ||
| 283 | ||
| 284 | return result |
|
| 285 | ||
| 286 | def update_tags_from_config(self, to_update, config): |
|
| 287 | tags = to_update.get("tags", []) |
|
| 288 | if "strategy" in config: |
|
| 289 | tags.append("{0}_strategy".format(config["strategy"])) |
|
| 290 | if "complexity" in config: |
|
| 291 | tags.append("{0}_complexity".format(config["complexity"])) |
|
| 292 | if "disruption" in config: |
|
| 293 | tags.append("{0}_disruption".format(config["disruption"])) |
|
| 294 | if "reboot" in config: |
|
| 295 | if config["reboot"] == "true": |
|
| 296 | reboot_tag = "reboot_required" |
|
| 297 | else: |
|
| 298 | reboot_tag = "no_reboot_needed" |
|
| 299 | tags.append(reboot_tag) |
|
| 300 | to_update["tags"] = tags |
|
| 301 | ||
| 302 | def update_tags_from_rule(self, product, to_update): |
|
| 303 | if not self.associated_rule: |
|
| @@ 90-104 (lines=15) @@ | ||
| 87 | ||
| 88 | self.rule = None |
|
| 89 | ||
| 90 | def update_tags_from_config(self, to_update): |
|
| 91 | tags = to_update.get("tags", []) |
|
| 92 | if "strategy" in self.config: |
|
| 93 | tags.append("{0}_strategy".format(self.config["strategy"])) |
|
| 94 | if "complexity" in self.config: |
|
| 95 | tags.append("{0}_complexity".format(self.config["complexity"])) |
|
| 96 | if "disruption" in self.config: |
|
| 97 | tags.append("{0}_disruption".format(self.config["disruption"])) |
|
| 98 | if "reboot" in self.config: |
|
| 99 | if self.config["reboot"] == "true": |
|
| 100 | reboot_tag = "reboot_required" |
|
| 101 | else: |
|
| 102 | reboot_tag = "no_reboot_needed" |
|
| 103 | tags.append(reboot_tag) |
|
| 104 | to_update["tags"] = tags |
|
| 105 | ||
| 106 | def update_tags_from_rule(self, platform, to_update): |
|
| 107 | if not self.rule: |
|