Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature.addpatchposition #381

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

Josephine-Rutten
Copy link
Collaborator

@Josephine-Rutten Josephine-Rutten commented Dec 19, 2024

Add patch positions to the interfaces. Make sure that the patch positions are unique per device.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
10.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

updated = False
intfs = session.query(Interface).filter(Interface.device == dev).all()
patch_positions = [intf.data["patch_position"] for intf in intfs if "patch_position" in intf.data]
print(patch_positions)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these lines looks like some left over debug info maybe?

@@ -271,7 +271,7 @@ def populate_device_vars(
ifindexnum = 0
if "ifclass" not in intf:
continue
extra_keys = ["aggregate_id", "enabled", "cli_append_str", "metric", "mtu", "tags"]
extra_keys = ["aggregate_id", "enabled", "cli_append_str", "metric", "mtu", "tags", "patch_postion"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is for dist/core devices, if you want to have an option for patch_position on those devices as well you need to make some changes in settings_fields.py as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants