# Submitting PR for vyos.vyos module

**URL:** <https://forum.ansible.com/t/submitting-pr-for-vyos-vyos-module/35649>\
**Category:** Ansible Developer\
**Created:** [August 20, 2021, 3:27am UTC](https://forum.ansible.com/t/submitting-pr-for-vyos-vyos-module/35649 "2021-08-20T03:27:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pigriffin](https://avatars.discourse-cdn.com/v4/letter/p/e95f7d/32.png) [@pigriffin](https://forum.ansible.com/u/pigriffin)\
**Post date:** [August 20, 2021, 3:27am UTC](https://forum.ansible.com/t/submitting-pr-for-vyos-vyos-module/35649/1 "2021-08-20T03:27:40Z")

</div>

Hi all. I haven’t submitted to ansible before and need a bit of guidance if anyone’s got time!  
My actual change is to add a single parameter in the vyos.vyos collection, and is only a few lines. But to get to the point, for updates to the vyos.vyos collection:

1. should I use ‘Resource module builder’ or CLI\_RM\_BUILDER; and
2. If it’s CLI\_RM\_BUILDER, does it still use the models repository, or something else?

Thanks for your time.

---

<div class="post-metadata">

**Author:** ![David\_Moreau\_Simard1](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@David\_Moreau\_Simard1](https://forum.ansible.com/u/David_Moreau_Simard1)\
**Post date:** [August 21, 2021, 3:23am UTC](https://forum.ansible.com/t/submitting-pr-for-vyos-vyos-module/35649/2 "2021-08-21T03:23:49Z")

</div>

Hi o/

I do not have the answer but will ask around.

In the meantime, looking at the existing (or closed!) PRs for the collection might help understanding how it works ?

Let us know if you find the answer.

---

<div class="post-metadata">

**Author:** ![Gomathi\_Selvi\_Sriniv](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/gomathi_selvi_sriniv/32/11149_2.png) [@Gomathi\_Selvi\_Sriniv](https://forum.ansible.com/u/Gomathi_Selvi_Sriniv)\
**Post date:** [August 24, 2021, 3:01pm UTC](https://forum.ansible.com/t/submitting-pr-for-vyos-vyos-module/35649/3 "2021-08-24T15:01:18Z")

</div>

Hi,

CLI\_RM\_BUILDER is the right tool to use to build a model or add keys or delete keys.  
Please refer to [this doc](https://github.com/ansible-network/cli_rm_builder/pull/21/files). The documentation work for cli\_rm\_builder tool is still in progress.  
Let me know if anything is not clear with respect to cli\_rm\_builder tool usage.

Thanks,  
Gomathi

---

<div class="post-metadata">

**Author:** ![pigriffin](https://avatars.discourse-cdn.com/v4/letter/p/e95f7d/32.png) [@pigriffin](https://forum.ansible.com/u/pigriffin)\
**Post date:** [January 11, 2022, 7:40am UTC](https://forum.ansible.com/t/submitting-pr-for-vyos-vyos-module/35649/4 "2022-01-11T07:40:11Z")

</div>

Hi Gomathi. I’ve finally got back to this! when I run cli\_rm\_builder against the existing vyos.firewall\_rules module (or my modified version), it fails with an error. The problem is when ‘convert\_doc\_to\_ansible\_module\_kwargs’ calls ‘extract\_argspec(doc\_obj, argpsec)’, ‘extract\_argspec’ tries to access the ‘options’ key, which doesn’t exist. ‘doc\_obj’ contains a dictionary which has the ‘DOCUMENTATION’ key at its top level. The value of the ‘DOCUMENTATION’ key is a string containing the doc yaml. If I replace the ‘extract\_argspec’ function with a version starting with the following (ie. decoding the ‘DOCUMENTATION’ string), and modify ‘convert\_doc\_to\_ansible\_module\_kwargs’ to call this version, it seems to work:

def extract\_argspecX(doc\_obj, argpsec):  
d\_obj = yaml.load(doc\_obj[‘DOCUMENTATION’], SafeLoader)  
options\_obj = d\_obj.get(“options”)  
…

So my question is, is this a bug in CLI\_RM\_BUILDER, or could it be something in the way that I’m calling it that is causing it to fail?

Thanks for your time…

---

<div class="post-metadata">

**Author:** ![Gomathi\_Selvi\_Sriniv](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/gomathi_selvi_sriniv/32/11149_2.png) [@Gomathi\_Selvi\_Sriniv](https://forum.ansible.com/u/Gomathi_Selvi_Sriniv)\
**Post date:** [January 11, 2022, 2:41pm UTC](https://forum.ansible.com/t/submitting-pr-for-vyos-vyos-module/35649/5 "2022-01-11T14:41:34Z")

</div>

Hi,  
Can you please share the model you are using with cli\_rm\_builder?

---

<div class="post-metadata">

**Author:** ![pigriffin](https://avatars.discourse-cdn.com/v4/letter/p/e95f7d/32.png) [@pigriffin](https://forum.ansible.com/u/pigriffin)\
**Post date:** [January 11, 2022, 11:22pm UTC](https://forum.ansible.com/t/submitting-pr-for-vyos-vyos-module/35649/6 "2022-01-11T23:22:15Z")

</div>

Yes, its the master branch from [https://github.com/pigriffin/resource\_module\_models/tree/master](https://github.com/pigriffin/resource_module_models/tree/master), which is the same as the upstream master.

I’m just testing with none of my changes, to make sure that I’ve got the tools setup properly, but not having any luck.
