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

Size param #944

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/changelog.yaml
Copy link
Member

Choose a reason for hiding this comment

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

Hey @Vovilla, thanks for the PR, as for the changelog, we generally don't edit this file, what we would usually do is add a yml file in the fragments folder which describes the change. Could you change this

Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,7 @@ releases:
- Update examples for ospfv3
- ios_acls - update examples and use YAML output in them for better readibility.
- ios_command - Fix formatting of examples.
- ios_ping - size option added.
minor_changes:
- Fixe an issue with some files that doesn't pass the PEP8 sanity check because
`type(<obj>) == <type>` is not allowed. We need to use `isinstance(<obj>,<type>)`
Expand All @@ -983,6 +984,7 @@ releases:
- ospfv2 - fix passive interfaces rendering
- ospfv2 - optimized all the regex to perform better
- ospfv2 - optimized the config side code for quicker comparison and execution
- ios_ping - size option added to ping command template.
fragments:
- bgp_add_fam_route_maps.yaml
- bgp_address_family_bug.yml
Expand Down
15 changes: 15 additions & 0 deletions docs/cisco.ios.ios_ping_module.rst
Copy link
Member

Choose a reason for hiding this comment

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

This is automatically generated. Please don't edit this file manually.

Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,21 @@ Parameters
<div>LAN source interface for Ingress.</div>
</td>
</tr>
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>size</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
</td>
<td>
<div>The size of packet.</div>
</td>
</tr>
<tr>
<td colspan="1">
<div class="ansibleOptionAnchor" id="parameter-"></div>
Expand Down
3 changes: 2 additions & 1 deletion plugins/module_utils/network/ios/rm_templates/ping.py
Copy link
Member

Choose a reason for hiding this comment

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

I can see that there are no changes to the argspec, could you also add this attribute to the argspec file and also i can see that the regex and facts have not been updated accordingly, could you please do that as well.

Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def __init__(self, lines=None):
"{{ (' timeout ' + timeout|string) if timeout is defined else '' }}"
"{{ (' ingress ' + ingress) if ingress is defined else '' }}"
"{{ (' egress ' + egress) if egress is defined else '' }}"
"{{ (' source ' + source) if source is defined else '' }}",
"{{ (' source ' + source) if source is defined else '' }}"
"{{ (' size ' + size|string) if size is defined else '' }}",
'result': {
"ping": {
'loss_percentage': '{{ 100 - pct|int }}%',
Expand Down
4 changes: 4 additions & 0 deletions plugins/modules/ios_ping.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@
description:
- The VRF to use for forwarding.
type: str
size:
description:
- The size of packet.
type: int
notes:
- Tested against Cisco IOSXE Version 17.3 on CML.
- For a general purpose network module, see the L(net_ping,https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/net_ping_module.html)
Expand Down
Loading