Skip to content

Conversation

@edudppaz
Copy link
Contributor

"auto" for the link level policy is missing from the choices in the ansible module. This adds the "auto" option to allow an auto negotiating interface speed to be configured on the APIC controller

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.

thank you for the contribution, see few comments that I believe would need to be added

@edudppaz
Copy link
Contributor Author

@akinross i have updated the documentation and added the new integration tests. i tried to run the whole test playbook to verify, but im getting throttled by the Cisco sandbox APIC API, and its not possible to change to certificate-based authentication. I could at least get some snippets from it:

Running aci_interface_policy_link_level integration test role

PLAY [aci] *********************************************************************

TASK [aci_interface_policy_link_level : Test that we have an ACI APIC host, ACI username and ACI password] ***
skipping: [sandboxapicdc.cisco.com]

TASK [aci_interface_policy_link_level : Verify Cloud and Non-Cloud Sites in use.] ***
included: /Users/edpozo/Git/AIB/ansible_collections/cisco/aci/tests/integration/targets/aci_cloud_provider/tasks/main.yml for sandboxapicdc.cisco.com

TASK [aci_interface_policy_link_level : Test that we have an ACI APIC host, ACI username and ACI password] ***
skipping: [sandboxapicdc.cisco.com]

TASK [aci_interface_policy_link_level : Set vars] ******************************
ok: [sandboxapicdc.cisco.com]

TASK [aci_interface_policy_link_level : Query system information] **************
[WARNING]: Platform darwin on host sandboxapicdc.cisco.com is using the
discovered Python interpreter at /opt/homebrew/bin/python3.11, but future
installation of another Python interpreter could change the meaning of that
path. See https://docs.ansible.com/ansible-
core/2.15/reference_appendices/interpreter_discovery.html for more information.
ok: [sandboxapicdc.cisco.com]

TASK [aci_interface_policy_link_level : Query cloud provider object] ***********
ok: [sandboxapicdc.cisco.com]

TASK [aci_interface_policy_link_level : Set vars] ******************************
skipping: [sandboxapicdc.cisco.com]

TASK [aci_interface_policy_link_level : Verify query_cloud for all sites] ******
ok: [sandboxapicdc.cisco.com] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [aci_interface_policy_link_level : Verify query_cloud for Cloud Sites] ****
skipping: [sandboxapicdc.cisco.com]

TASK [aci_interface_policy_link_level : Remove Link Level Policy] **************
changed: [sandboxapicdc.cisco.com]

TASK [aci_interface_policy_link_level : Add Link Level Policy (check mode)] ****
changed: [sandboxapicdc.cisco.com]

TASK [aci_interface_policy_link_level : Add Link Level Policy (normal mode)] ***
changed: [sandboxapicdc.cisco.com]

TASK [aci_interface_policy_link_level : Verify Add Link Level Policy] **********
ok: [sandboxapicdc.cisco.com] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [aci_interface_policy_link_level : Add Link Level Policy again (check mode)] ***
ok: [sandboxapicdc.cisco.com]

TASK [aci_interface_policy_link_level : Add Link Level Policy again (normal mode)] ***
ok: [sandboxapicdc.cisco.com]

TASK [aci_interface_policy_link_level : Verify Add Link Level Policy again] ****
ok: [sandboxapicdc.cisco.com] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [aci_interface_policy_link_level : Change description of Link Level Policy (check mode)] ***
changed: [sandboxapicdc.cisco.com]

TASK [aci_interface_policy_link_level : Change description of Link Level Policy (normal mode)] ***
changed: [sandboxapicdc.cisco.com]

TASK [aci_interface_policy_link_level : Verify add_policy_descr] ***************
ok: [sandboxapicdc.cisco.com] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [aci_interface_policy_link_level : Change description of Link Level Policy again (check mode)] ***
ok: [sandboxapicdc.cisco.com]

TASK [aci_interface_policy_link_level : Change description of Link Level Policy again (normal mode)] ***
ok: [sandboxapicdc.cisco.com]

TASK [aci_interface_policy_link_level : Verify add_policy_descr_again] *********
ok: [sandboxapicdc.cisco.com] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [aci_interface_policy_link_level : Add Link Level Policy again with no description (check mode)] ***
ok: [sandboxapicdc.cisco.com]

TASK [aci_interface_policy_link_level : Add Link Level Policy again with no description (normal mode)] ***
ok: [sandboxapicdc.cisco.com]

TASK [aci_interface_policy_link_level : Verify add_policy_again_no_descr] ******
ok: [sandboxapicdc.cisco.com] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [aci_interface_policy_link_level : Add Link Level Policy with various speeds (check mode)] ***
changed: [sandboxapicdc.cisco.com] => (item=speed-100M)
changed: [sandboxapicdc.cisco.com] => (item=speed-1G)
changed: [sandboxapicdc.cisco.com] => (item=speed-10G)
changed: [sandboxapicdc.cisco.com] => (item=speed-25G)
changed: [sandboxapicdc.cisco.com] => (item=speed-40G)
changed: [sandboxapicdc.cisco.com] => (item=speed-50G)
changed: [sandboxapicdc.cisco.com] => (item=speed-100G)
changed: [sandboxapicdc.cisco.com] => (item=speed-200G)
changed: [sandboxapicdc.cisco.com] => (item=speed-400G)
changed: [sandboxapicdc.cisco.com] => (item=speed-auto)
ok: [sandboxapicdc.cisco.com] => (item=speed-inherit)

TASK [aci_interface_policy_link_level : Add Link Level Policy with various speeds (normal mode)] ***
changed: [sandboxapicdc.cisco.com] => (item=speed-100M)
changed: [sandboxapicdc.cisco.com] => (item=speed-1G)
changed: [sandboxapicdc.cisco.com] => (item=speed-10G)
changed: [sandboxapicdc.cisco.com] => (item=speed-25G)
changed: [sandboxapicdc.cisco.com] => (item=speed-40G)
changed: [sandboxapicdc.cisco.com] => (item=speed-50G)

@edudppaz edudppaz requested a review from akinross January 12, 2024 09:32
@edudppaz
Copy link
Contributor Author

Got the whole tests running.

PLAY RECAP *********************************************************************
sandboxapicdc.cisco.com    : ok=43   changed=9    unreachable=0    failed=0    skipped=4    rescued=0    ignored=2   

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.

i will run tests locally when you have changed the assert for checkmode

@edudppaz edudppaz requested a review from akinross January 12, 2024 10:01
@edudppaz edudppaz requested a review from akinross January 15, 2024 09:04
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.

see comment response

@akinross akinross self-requested a review January 15, 2024 17:20
akinross
akinross previously approved these changes Jan 15, 2024
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

shrsr
shrsr previously approved these changes Jan 15, 2024
Copy link
Collaborator

@shrsr shrsr left a comment

Choose a reason for hiding this comment

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

LGTM

Co-authored-by: Samita B <98932546+samiib@users.noreply.github.com>
@edudppaz edudppaz dismissed stale reviews from shrsr and akinross via 4b08e2a January 16, 2024 14:36
@edudppaz edudppaz requested a review from samiib January 16, 2024 14:37
akinross
akinross previously approved these changes Jan 16, 2024
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

shrsr
shrsr previously approved these changes Jan 16, 2024
Copy link
Collaborator

@shrsr shrsr left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Jan 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (647dc30) 96.26% compared to head (666be5e) 35.20%.
Report is 6 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #577       +/-   ##
===========================================
- Coverage   96.26%   35.20%   -61.06%     
===========================================
  Files         231      231               
  Lines       10647    10663       +16     
  Branches     1603     1607        +4     
===========================================
- Hits        10249     3754     -6495     
- Misses        305     6909     +6604     
+ Partials       93        0       -93     
Flag Coverage Δ
integration ?
sanity 35.20% <ø> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

samiib
samiib previously approved these changes Jan 17, 2024
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

Co-authored-by: Lionel Hercot <lionel.hercot@gmail.com>
@edudppaz edudppaz dismissed stale reviews from samiib, shrsr, and akinross via 666be5e January 17, 2024 09:25
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

Copy link
Collaborator

@shrsr shrsr 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

Copy link
Member

@lhercot lhercot left a comment

Choose a reason for hiding this comment

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

LGTM

@lhercot lhercot merged commit a2c6f62 into CiscoDevNet:master Jan 17, 2024
@lhercot
Copy link
Member

lhercot commented Jan 17, 2024

Thanks for your contribution!

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.

Add auto to link level speed options (aci_interface_policy_link_level)

5 participants