Skip to content

Update jobs.py to support Dynamic Groups #378

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jdpfda
Copy link

@jdpfda jdpfda commented Jun 4, 2025

Added support for Dynamic Groups into the Sync Data from Network Job.

Closes: #375

What's Changed

Added the ability to use a dynamic group for the Sync Data from Network job.
Changes:
32 + DynamicGroup,
...
646 + dynamic_group = ObjectVar(
647 + model=DynamicGroup,
648 + required=False,
649 + description="Only update devices that belong to this Dynamic Group.",
650 + )
...
677 + dynamic_group,
...
697 + self.dynamic_group = dynamic_group
...
738 + if self.dynamic_group:
739 + # Get all Device IDs in that DynamicGroup
740 + group_device_ids = self.dynamic_group.members.values_list("id", flat=True)
741 + # Overwrite (or set) the id__in filter so we only get devices in that group
742 + device_filter["id__in"] = list(group_device_ids)

To Do

N/A

Added support for Dynamic Groups into the Sync Data from Network Job.
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.

Sync Data from Network - Dynamic Group
1 participant