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

Addition of new module ndo_ptp_policy and its child ndo_ptp_policy_profiles (DCNE-68) #578

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

Conversation

shrsr
Copy link
Collaborator

@shrsr shrsr commented Dec 10, 2024

No description provided.

@shrsr shrsr self-assigned this Dec 11, 2024
@github-actions github-actions bot changed the title Addition of new module ndo_ptp_policy and its child ndo_ptp_policy_profiles Addition of new module ndo_ptp_policy and its child ndo_ptp_policy_profiles (DCNE-68) Dec 11, 2024
@shrsr shrsr force-pushed the ptp branch 3 times, most recently from 9d63e54 to b5b93e2 Compare December 13, 2024 13:28
plugins/modules/ndo_ptp_policy.py Show resolved Hide resolved
plugins/modules/ndo_ptp_policy.py Outdated Show resolved Hide resolved
plugins/modules/ndo_ptp_policy.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 28.46154% with 93 lines in your changes missing coverage. Please review.

Project coverage is 18.15%. Comparing base (f65f3d0) to head (3c3c5de).
Report is 32 commits behind head on master.

Files with missing lines Patch % Lines
plugins/modules/ndo_ptp_policy.py 26.86% 49 Missing ⚠️
plugins/modules/ndo_ptp_policy_profiles.py 29.03% 44 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (f65f3d0) and HEAD (3c3c5de). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (f65f3d0) HEAD (3c3c5de)
integration 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #578       +/-   ##
===========================================
- Coverage   72.58%   18.15%   -54.43%     
===========================================
  Files          55       98       +43     
  Lines        5504     9152     +3648     
  Branches     1462     2384      +922     
===========================================
- Hits         3995     1662     -2333     
- Misses       1174     7489     +6315     
+ Partials      335        1      -334     
Flag Coverage Δ
integration ?
sanity 18.15% <28.46%> (?)

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.

plugins/modules/ndo_ptp_policy.py Outdated Show resolved Hide resolved
plugins/modules/ndo_ptp_policy.py Show resolved Hide resolved
plugins/modules/ndo_ptp_policy.py Show resolved Hide resolved
plugins/modules/ndo_ptp_policy_profiles.py Outdated Show resolved Hide resolved
plugins/modules/ndo_ptp_policy_profiles.py Show resolved Hide resolved
plugins/modules/ndo_ptp_policy_profiles.py Outdated Show resolved Hide resolved
state: absent

- name: Delete a PTP policy using UUID
cisco.mso.ndo_ptp_policy_profiles:
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
cisco.mso.ndo_ptp_policy_profiles:
cisco.mso.ndo_ptp_policy:

mso.existing = mso.previous = existing_ptp_policies

if state == "present":
mso_values_update = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use dict() instead of {} and move it under if match:.

append_update_ops_data(ops, match.details, path, mso_values_update)
mso.sanitize(match.details, collate=True)
else:
mso_values = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use dict() instead of {}.

@@ -211,3 +211,5 @@

ORIGINATE_DEFAULT_ROUTE = {"only": "only", "in_addition": "inAddition", "": ""}
L3OUT_ROUTING_PROTOCOLS = {"bgp": ["bgp"], "ospf": ["ospf"], "bgpOspf": ["bgp", "ospf"], None: [None], "": None, "bgpospf": "bgpOspf", "ospfbgp": "bgpOspf"}

PROFILE_TEMPLATE = {"aes67-2015": "aes67", "default": "default", "smpte-2059-2": "smpte", "telecom-8275-1": "telecomFullPath"}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we use _ instead of -?

ptp_policy_profile_name=dict(type="str", aliases=["name"]),
ptp_policy_profile_uuid=dict(type="str", aliases=["uuid"]),
delay_interval=dict(type="int"),
profile_template=dict(type="str", choices=["aes67-2015", "default", "telecom-8275-1", "smpte-2059-2"]),
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
profile_template=dict(type="str", choices=["aes67-2015", "default", "telecom-8275-1", "smpte-2059-2"]),
profile_template=dict(type="str", choices=list(PROFILE_TEMPLATE)),

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.

Enhancement: New module for PTP Policy in Fabric Fabric Policies Template (DCNE-68)
5 participants