Debian Codegraph @

lib/ansible/galaxy/data/network/library/example_command.py.j2

raw
1 #SPDX-License-Identifier: MIT-0
2 #
3 # (c) 2018 Red Hat Inc.
4 #
5 # This file is part of Ansible
6 #
7 # Ansible is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
11 #
12 # Ansible is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
19 #
20 from __future__ import annotations
21 from ansible.errors import AnsibleError
22
23
24 ### Documentation
25 DOCUMENTATION = """
26 Examples:
27 https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/iosxr/iosxr_command.py
28 https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/junos/junos_command.py
29 """
30
31 EXAMPLES = """
32 Examples:
33 https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/iosxr/iosxr_command.py
34 https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/junos/junos_command.py
35 """
36
37
38 RETURN = """
39 Examples:
40 https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/iosxr/iosxr_command.py
41 https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/junos/junos_command.py
42 """
43
44 #### Imports
45 try:
46 from ansible.module_utils.basic import AnsibleModule
47 """
48 Examples:
49 https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/iosxr/iosxr_command.py
50 https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/junos/junos_command.py
51 """
52 except ImportError:
53 raise AnsibleError("[ {{ role_name }}_command ]: Dependency not satisfied")
54
55 #### Implementation
56 def main():
57 """
58 Examples:
59 https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/iosxr/iosxr_command.py
60 https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/network/junos/junos_command.py
61 """
62 raise AnsibleError(" [ {{ role_name }}_command ]: Not Implemented")
63
64 #### Entrypoint
65 if __name__ == '__main__':
66 main()