Skip to content

Addition of service graph modules and their test files (DCNE-410) #754

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 7 commits into
base: master
Choose a base branch
from

Conversation

shrsr
Copy link
Collaborator

@shrsr shrsr commented May 6, 2025

This PR contains completed service graph modules from #186

@shrsr shrsr self-assigned this May 6, 2025
@shrsr shrsr added the jira-sync Sync this issue to Jira label May 6, 2025
@github-actions github-actions bot changed the title Addition of service graph modules and their test files Addition of service graph modules and their test files (DCNE-410) May 6, 2025
@shrsr shrsr requested a review from akinross May 8, 2025 20:36
- cisco.aci.annotation

notes:
- The I(tenant), I(graph), I(contract) and I(node) must exist before using this module in your playbook.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- The I(tenant), I(graph), I(contract) and I(node) must exist before using this module in your playbook.
- The O(tenant), O(graph), O(contract) and O(node) must exist before using this module in your playbook.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This comment was already made by @gmicol in a related PR. In ansible ACI collection we've been using I() for Input in the other modules. I believe that this usage should be consistent within this collection.

type: str
permit_handoff:
description:
- Indicates whether to allow handoff of traffic to the associated logical interface.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does APIC default these Booleans to anything when unset? permit_handoff, acl, rule_type?

Comment on lines +387 to +399
# child_configs.append(
# {
# "vnsRsLIfCtxToBD": {
# "attributes": {
# "dn": child.get("vnsRsLIfCtxToBD").get("attributes").get("dn"),
# "status": "deleted",
# }
# }
# }
# )
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# child_configs.append(
# {
# "vnsRsLIfCtxToBD": {
# "attributes": {
# "dn": child.get("vnsRsLIfCtxToBD").get("attributes").get("dn"),
# "status": "deleted",
# }
# }
# }
# )

Not sure if you need the previous code. I think the comment is fine.

Copy link
Collaborator Author

@shrsr shrsr May 11, 2025

Choose a reason for hiding this comment

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

We left the code commented in other modules as well. I left it to be consistent with them..

Copy link
Member

Choose a reason for hiding this comment

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

@shrsr why are we keeping this commented code? When should we uncomment it? Is there something blocking?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Example -> In aci_access_span_src_group_src and a few modules we have the code commented to show that the traditional way of deleting the child is not possible with a code snippet. I can still remove it if it is not relevant..

if child.get("spanRsSrcToFilterGrp") and child.get("spanRsSrcToFilterGrp").get("attributes").get("tDn") != filter_group_tdn:
                    # Appending to child_config list not possible because of APIC Error 103: child (Rn) of class spanRsSrcGrpToFilterGrp is already attached.
                    # A seperate delete request to dn of the spanRsSrcGrpToFilterGrp is needed to remove the object prior to adding to child_configs.
                    # Failed child_config is displayed in below:
                    #
                    # child_configs.append(
                    #     {
                    #         "spanRsSrcGrpToFilterGrp": {
                    #             "attributes": {
                    #                 "dn": "uni/infra/srcgrp-{0}/src-{1}/rssrcGrpToFilterGrp".format(source_group, source),
                    #                 "status": "deleted",
                    #             }
                    #         }
                    #     }
                    # )

- cisco.aci.aci
- cisco.aci.annotation
notes:
- The I(tenant), I(contract), I(graph), I(device) and I(node) must exist before using this module in your playbook.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- The I(tenant), I(contract), I(graph), I(device) and I(node) must exist before using this module in your playbook.
- The O(tenant), O(contract), O(graph), O(device) and O(node) must exist before using this module in your playbook.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same comment as above

- cisco.aci.annotation
- cisco.aci.owner
notes:
- The I(tenant) must exist before using this module in your playbook.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- The I(tenant) must exist before using this module in your playbook.
- The O(tenant) must exist before using this module in your playbook.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same comment as above

choices: [ redirect, unspecified ]
is_copy:
description:
- Whether the device is a copy device.
Copy link
Collaborator

Choose a reason for hiding this comment

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

default?

type: bool
share_encap:
description:
- Whether to share encapsulation across the service graph.
Copy link
Collaborator

Choose a reason for hiding this comment

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

default?

- cisco.aci.annotation
- cisco.aci.owner
notes:
- The I(tenant), I(service_graph) and I(device) must exist before using this module in your playbook.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- The I(tenant), I(service_graph) and I(device) must exist before using this module in your playbook.
- The O(tenant), O(service_graph) and O(device) must exist before using this module in your playbook.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same comment as above

- cisco.aci.annotation
- cisco.aci.owner
notes:
- The I(tenant) and I(service_graph) must exist before using this module in your playbook.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- The I(tenant) and I(service_graph) must exist before using this module in your playbook.
- The O(tenant) and O(service_graph) must exist before using this module in your playbook.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same comment as above

@shrsr shrsr requested a review from samiib May 11, 2025 23:44
akinross
akinross previously approved these changes May 12, 2025
Copy link
Collaborator

@akinross akinross left a comment

Choose a reason for hiding this comment

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

LGTM

samiib
samiib previously approved these changes May 12, 2025
Copy link
Collaborator

@samiib samiib left a comment

Choose a reason for hiding this comment

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

LGTM

gmicol
gmicol previously approved these changes May 13, 2025
Copy link
Collaborator

@gmicol gmicol left a comment

Choose a reason for hiding this comment

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

LGTM

type: bool
adjacency_type:
description:
- Whether the adjacecncy is Layer2 or Layer3.
Copy link
Collaborator

Choose a reason for hiding this comment

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

adjacecncy -> adjacency

connector_direction:
description:
- The connector direction.
- The APIC defaults to C(uknown) when unset during creation.
Copy link
Collaborator

Choose a reason for hiding this comment

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

uknown -> unknown

@shrsr shrsr dismissed stale reviews from gmicol, samiib, and akinross via d106403 May 13, 2025 19:49
samiib
samiib previously approved these changes May 14, 2025
Copy link
Collaborator

@samiib samiib left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@akinross akinross left a comment

Choose a reason for hiding this comment

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

LGTM

anvitha-jain
anvitha-jain previously approved these changes May 15, 2025
Copy link
Collaborator

@anvitha-jain anvitha-jain left a comment

Choose a reason for hiding this comment

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

LGTM

@akinross akinross self-requested a review May 16, 2025 08:37
akinross
akinross previously approved these changes May 16, 2025
Copy link
Collaborator

@akinross akinross left a comment

Choose a reason for hiding this comment

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

LGTM

gmicol
gmicol previously approved these changes May 22, 2025
Copy link
Collaborator

@gmicol gmicol left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@samiib samiib left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira-sync Sync this issue to Jira
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants