diff options
author | Håkon Solbjørg <hakon@solbj.org> | 2023-03-31 20:45:46 +0200 |
---|---|---|
committer | Håkon Solbjørg <hakon@solbj.org> | 2023-03-31 20:45:46 +0200 |
commit | 55fc17107e00a7de4d6181c9d2769d601b31435b (patch) | |
tree | 8bf8e3713d5bf24beec58c64ced66436955e0134 | |
parent | 507a2b94d28b54756b3badbf44b229a16f27ade6 (diff) |
feat(tags): Log selected uplink tag
-rw-r--r-- | tools/netbox/scripts/create-switch/create-switch.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/netbox/scripts/create-switch/create-switch.py b/tools/netbox/scripts/create-switch/create-switch.py index 3fad7c3..7537847 100644 --- a/tools/netbox/scripts/create-switch/create-switch.py +++ b/tools/netbox/scripts/create-switch/create-switch.py @@ -446,6 +446,7 @@ class CreateSwitch(Script): try: uplink_tag = Tag.objects.get(slug=f"{num_uplinks}-uplinks") switch.tags.add(uplink_tag) + self.log_info(f"Added tag for number of uplinks if it wasn't present already: {uplink_tag}") except Tag.DoesNotExist as e: self.log_error("Failed to find device tag with {num_uplinks} uplinks.") raise e |