ansible-viptela
** Note: The current version of the Ansible Viptela modules can be found here: https://github.com/ciscodevnet/python-viptela **
License
CISCO SAMPLE CODE LICENSE
An Ansible Role for automating a Viptela Overlay Network
License: Other
** Note: The current version of the Ansible Viptela modules can be found here: https://github.com/ciscodevnet/python-viptela **
CISCO SAMPLE CODE LICENSE
Hi,
Thanks for the code. But when I try to use vmanage_central_policy_facts in playbook it shoots error.
fatal: [localhost]: FAILED! => {
"changed": false,
"module_stderr": "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made to host .... Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning,\n/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made to host '...'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning,\n/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made to host '...'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning,\nTraceback (most recent call last):\n File "/root/.ansible/tmp/ansible-tmp-1594810769.693978-23372-142208380288382/AnsiballZ_vmanage_central_policy_facts.py", line 102, in \n _ansiballz_main()\n File "/root/.ansible/tmp/ansible-tmp-1594810769.693978-23372-142208380288382/AnsiballZ_vmanage_central_policy_facts.py", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/root/.ansible/tmp/ansible-tmp-1594810769.693978-23372-142208380288382/AnsiballZ_vmanage_central_policy_facts.py", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.vmanage_central_policy_facts', init_globals=None, run_name='main', alter_sys=True)\n File "/usr/lib64/python3.6/runpy.py", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code\n exec(code, run_globals)\n File "/tmp/ansible_vmanage_central_policy_facts_payload_8cudxles/ansible_vmanage_central_policy_facts_payload.zip/ansible/modules/vmanage_central_policy_facts.py", line 44, in \n File "/tmp/ansible_vmanage_central_policy_facts_payload_8cudxles/ansible_vmanage_central_policy_facts_payload.zip/ansible/modules/vmanage_central_policy_facts.py", line 41, in main\n File "/tmp/ansible_vmanage_central_policy_facts_payload_8cudxles/ansible_vmanage_central_policy_facts_payload.zip/ansible/modules/vmanage_central_policy_facts.py", line 36, in run_module\n File "/tmp/ansible_vmanage_central_policy_facts_payload_8cudxles/ansible_vmanage_central_policy_facts_payload.zip/ansible/module_utils/viptela.py", line 408, in get_central_policy_list\n File "/usr/lib64/python3.6/json/init.py", line 354, in loads\n return _default_decoder.decode(s)\n File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode\n obj, end = self.raw_decode(s, idx=_w(s, 0).end())\n File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode\n raise JSONDecodeError("Expecting value", s, err.value) from None\njson.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
Moreover, other libraries working fine.
Any help really appreciate.
Can you give me a hand with the issue below please?
I'm having an issue with function "vmanage_device_attachment". When I run the playbook the result is failed=1, and throws the error below, but in vManage it actually completes the job successfully as expected. I'm trying to find out why it's giving me this error in Ansible and complete the task with ok=1 instead of a failure. Please see error attached. and Thank you for any help you can provide with this.
In argument_spec the type of definition should be dict instead of string
Sometimes it might happen that URLs become invalid due to changes in the APIs.
For example refer to: CiscoDevNet/sdwan-ops#2
Here what happens is that a previously valid url (/dataservice/template/policy/list/localdomain) become invalid.
This now leads to a module failure.
I am suggesting to avoid failing in the module and to offload the responsibility of checking for the right content to other methods.
As example consider the following ones:
get_policy_list_list
get_policy_list_dict
get_policy_definition_list
get_policy_definition_dict
The module name(vmanage_device_action_status) on the README file has a typo on it. It has an extra "n" on it.
It looks like this: vmanange_device_action_status
https://github.com/CiscoDevNet/ansible-viptela#get-status-of-a-device-action
It took me a little bit to figure out there was an extra n in there ;-) and why Ansible could not find the module.
The feature templates require the payload to be in a specific order. I've added a work-around for vpn-id, but there will be others and we need a more permanent solution.
I would like to use the playbook to control the vManage ,but I can't find the template and policy, could you share your sdn-templates for me ? thanks a lot
The current implementation for ping-*.yml tasks that are broken in the following ways:
actual_result
in ping-test.yml always returns true, even if ping_rx
is 0. This appears to be because ping_rx is the string '0' and not a numberping_rx
and ping_tx
are swapped in ping-vedge.yml, making the comparison of ping_rx in ping-test.yml invalidThe following output is from vManage without "Rapid" enabled:
Output:
Nping in VPN 1
Starting Nping 0.7.60 ( https://nmap.org/nping ) at 2020-02-20 21:39 UTC
SENT (0.0154s) ICMP [192.168.1.1 > 192.168.2.1 Echo request (type=8/code=0) id=27995 seq=1] IP [ttl=64 id=61444 iplen=28 ]
SENT (1.0155s) ICMP [192.168.1.1 > 192.168.2.1 Echo request (type=8/code=0) id=27995 seq=2] IP [ttl=64 id=61444 iplen=28 ]
RCVD (1.0155s) ICMP [127.1.0.2 > 192.168.1.1 Network 192.168.2.1 unreachable (type=3/code=0) ] IP [ttl=64 id=0 iplen=56 ]
SENT (2.0162s) ICMP [192.168.1.1 > 192.168.2.1 Echo request (type=8/code=0) id=27995 seq=3] IP [ttl=64 id=61444 iplen=28 ]
RCVD (2.0163s) ICMP [127.1.0.2 > 192.168.1.1 Network 192.168.2.1 unreachable (type=3/code=0) ] IP [ttl=64 id=0 iplen=56 ]
SENT (3.0172s) ICMP [192.168.1.1 > 192.168.2.1 Echo request (type=8/code=0) id=27995 seq=4] IP [ttl=64 id=61444 iplen=28 ]
RCVD (3.0173s) ICMP [127.1.0.2 > 192.168.1.1 Network 192.168.2.1 unreachable (type=3/code=0) ] IP [ttl=64 id=0 iplen=56 ]
SENT (4.0182s) ICMP [192.168.1.1 > 192.168.2.1 Echo request (type=8/code=0) id=27995 seq=5] IP [ttl=64 id=61444 iplen=28 ]
RCVD (4.0183s) ICMP [127.1.0.2 > 192.168.1.1 Network 192.168.2.1 unreachable (type=3/code=0) ] IP [ttl=64 id=0 iplen=56 ]
Max rtt: 0.042ms | Min rtt: 0.018ms | Avg rtt: 0.026ms
Raw packets sent: 5 (140B) | Rcvd: 4 (224B) | Lost: 1 (20.00%)
Nping done: 1 IP address pinged in 4.03 seconds
And this is with "Rapid" enabled:
Output:
Nping in VPN 1
!!!!!
Raw packets sent: 5 (0B) | Rcvd: 5 (0B) | Lost: 0 (0%)
For this to be an effective test of an SD-WAN topology, we need the packets received and loss % to disregard network unreachables or host unreachables. Propose we fix this by only counting "Echo reply" packets.
We have a misspelled variable name in argument_spec.update(). It should be 'template_type' while it is 'type'.
For the state 'present' we have a try/except block to verify that all the required parameters are passed to the module.
In case of 'absent' the only required parameter is 'name'. We are missing a try/except block to verify that is passed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.