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

Add object-group service support #1148

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

ArchelonU
Copy link

SUMMARY

Adding the ability to specify an object group of services in the ACL settings.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

acls.py

ADDITIONAL INFORMATION

Now you can add object-group service when creating ACL rule.

To do this, it is enough to specify a new variable "service_object_group":

- name: ACL_NAME
  acl_type: extended
  aces:
    - sequence: '10'
       grant: 'permit'
       service_object_group: 'OG_WITH_MANY_PORTS'
       source:
         object_group: 'OG_SOURCE_HOSTS'
       destination:
         object_group: 'OG_DESTINATION_HOSTS'

What actually translates into a command:

ip access-list extended ACL_NAME
 10 permit object-group OG_WITH_MANY_PORTS object-group OG_SOURCE_HOSTS object-group OG_DESTINATION_HOSTS

@roverflow
Copy link
Member

@ArchelonU Could you please add some tests to verify the change

@ArchelonU
Copy link
Author

@roverflow I have run tests in my branch, added fixes. Now as far as I understand, it requires approval to run testing here. Correct me if I'm wrong. Thx!

@roverflow roverflow self-requested a review December 21, 2024 14:22
@roverflow
Copy link
Member

@ArchelonU, could you please add a new unit test for this change? You can find the existing tests for acls in the tests folder, you can either modify the test to make use of the new attribute you have added or add a new test function. Thanks

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