diff options
| author | omnom62 <omnom62@outlook.com> | 2026-06-28 21:48:37 +1000 |
|---|---|---|
| committer | omnom62 <omnom62@outlook.com> | 2026-06-28 21:48:37 +1000 |
| commit | e10d40b3083885b588c3d9ccddea12e8aa16fda5 (patch) | |
| tree | 267b39cd47c974ca9e8bf2dce4816e59bfdb40fa /plugins/modules | |
| parent | fc94ef215186102ead4f1e23f132af91478e1f58 (diff) | |
| download | rest.vyos-e10d40b3083885b588c3d9ccddea12e8aa16fda5.tar.gz rest.vyos-e10d40b3083885b588c3d9ccddea12e8aa16fda5.zip | |
T8989: SIT updated
Diffstat (limited to 'plugins/modules')
| -rw-r--r-- | plugins/modules/vyos_banner.py | 2 | ||||
| -rw-r--r-- | plugins/modules/vyos_snmp_server.py | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/modules/vyos_banner.py b/plugins/modules/vyos_banner.py index 304fa20..bcda26d 100644 --- a/plugins/modules/vyos_banner.py +++ b/plugins/modules/vyos_banner.py @@ -267,7 +267,7 @@ def main(): try: if state in ("merged", "replaced"): - if state == "merged" and before.get("text") == desired_text: + if before.get("text") == desired_text: module.exit_json(changed=False, before=before, commands=[]) client.configure_set(path, _encode_banner(desired_text)) commands.append("set {p} '...'".format(p=" ".join(path))) diff --git a/plugins/modules/vyos_snmp_server.py b/plugins/modules/vyos_snmp_server.py index 3b40344..1079402 100644 --- a/plugins/modules/vyos_snmp_server.py +++ b/plugins/modules/vyos_snmp_server.py @@ -525,12 +525,12 @@ def _build_scalar_commands(want, have, state): want_val = want.get(argspec_key) have_val = have.get(argspec_key) path = SNMP_BASE + [api_key] - if state in ("merged", "replaced", "overridden"): - if want_val and want_val != have_val: - cmds.append(_set(path + [want_val])) if state in ("replaced", "overridden"): if have_val and want_val != have_val: cmds.append(_delete(path)) + if state in ("merged", "replaced", "overridden"): + if want_val and want_val != have_val: + cmds.append(_set(path + [want_val])) return cmds @@ -547,10 +547,10 @@ def _build_community_commands(want_list, have_list, state): base = SNMP_BASE + ["community", name] want_auth = want_comm.get("authorization_type") have_auth = have_comm.get("authorization_type") - if want_auth and want_auth != have_auth: - cmds.append(_set(base + ["authorization", want_auth])) if state in ("replaced", "overridden") and have_auth and want_auth != have_auth: cmds.append(_delete(base + ["authorization"])) + if want_auth and want_auth != have_auth: + cmds.append(_set(base + ["authorization", want_auth])) want_clients = set(want_comm.get("clients") or []) have_clients = set(have_comm.get("clients") or []) for c in want_clients - have_clients: |
