| 1 |
#!/usr/bin/python |
| 2 |
# -*- coding: utf-8 -*- |
| 3 |
|
| 4 |
# Copyright (c) 2021, Cisco Systems |
| 5 |
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) |
| 6 |
|
| 7 |
DOCUMENTATION = r""" |
| 8 |
module: networks_switch_routing_ospf |
| 9 |
short_description: Resource module for networks _switch _routing _ospf |
| 10 |
description: |
| 11 |
- Manage operation update of the resource networks _switch _routing _ospf. |
| 12 |
- Update layer 3 OSPF routing configuration. |
| 13 |
version_added: '1.0.0' |
| 14 |
extends_documentation_fragment: |
| 15 |
- cisco.meraki.module |
| 16 |
author: Francisco Munoz (@fmunoz) |
| 17 |
options: |
| 18 |
areas: |
| 19 |
description: OSPF areas. |
| 20 |
elements: dict |
| 21 |
suboptions: |
| 22 |
areaId: |
| 23 |
description: OSPF area ID. |
| 24 |
type: str |
| 25 |
areaName: |
| 26 |
description: Name of the OSPF area. |
| 27 |
type: str |
| 28 |
areaType: |
| 29 |
description: Area types in OSPF. Must be one of "normal", "stub", "nssa". |
| 30 |
type: str |
| 31 |
type: list |
| 32 |
deadTimerInSeconds: |
| 33 |
description: Time interval to determine when the peer will be declared inactive/dead. |
| 34 |
Value must be between 1 and 65535. |
| 35 |
type: int |
| 36 |
enabled: |
| 37 |
description: Boolean value to enable or disable OSPF routing. OSPF routing is |
| 38 |
disabled by default. |
| 39 |
type: bool |
| 40 |
helloTimerInSeconds: |
| 41 |
description: Time interval in seconds at which hello packet will be sent to OSPF |
| 42 |
neighbors to maintain connectivity. Value must be between 1 and 255. Default |
| 43 |
is 10 seconds. |
| 44 |
type: int |
| 45 |
md5AuthenticationEnabled: |
| 46 |
description: Boolean value to enable or disable MD5 authentication. MD5 authentication |
| 47 |
is disabled by default. |
| 48 |
type: bool |
| 49 |
md5AuthenticationKey: |
| 50 |
description: MD5 authentication credentials. This param is only relevant if md5AuthenticationEnabled |
| 51 |
is true. |
| 52 |
suboptions: |
| 53 |
id: |
| 54 |
description: MD5 authentication key index. Key index must be between 1 to |
| 55 |
255. |
| 56 |
type: int |
| 57 |
passphrase: |
| 58 |
description: MD5 authentication passphrase. |
| 59 |
type: str |
| 60 |
type: dict |
| 61 |
networkId: |
| 62 |
description: NetworkId path parameter. Network ID. |
| 63 |
type: str |
| 64 |
v3: |
| 65 |
description: OSPF v3 configuration. |
| 66 |
suboptions: |
| 67 |
areas: |
| 68 |
description: OSPF v3 areas. |
| 69 |
elements: dict |
| 70 |
suboptions: |
| 71 |
areaId: |
| 72 |
description: OSPF area ID. |
| 73 |
type: str |
| 74 |
areaName: |
| 75 |
description: Name of the OSPF area. |
| 76 |
type: str |
| 77 |
areaType: |
| 78 |
description: Area types in OSPF. Must be one of "normal", "stub", "nssa". |
| 79 |
type: str |
| 80 |
type: list |
| 81 |
deadTimerInSeconds: |
| 82 |
description: Time interval to determine when the peer will be declared inactive/dead. |
| 83 |
Value must be between 1 and 65535. |
| 84 |
type: int |
| 85 |
enabled: |
| 86 |
description: Boolean value to enable or disable V3 OSPF routing. OSPF V3 routing |
| 87 |
is disabled by default. |
| 88 |
type: bool |
| 89 |
helloTimerInSeconds: |
| 90 |
description: Time interval in seconds at which hello packet will be sent to |
| 91 |
OSPF neighbors to maintain connectivity. Value must be between 1 and 255. |
| 92 |
Default is 10 seconds. |
| 93 |
type: int |
| 94 |
type: dict |
| 95 |
requirements: |
| 96 |
- meraki >= 2.4.9 |
| 97 |
- python >= 3.5 |
| 98 |
seealso: |
| 99 |
- name: Cisco Meraki documentation for switch updateNetworkSwitchRoutingOspf |
| 100 |
description: Complete reference of the updateNetworkSwitchRoutingOspf API. |
| 101 |
link: https://developer.cisco.com/meraki/api-v1/#!update-network-switch-routing-ospf |
| 102 |
notes: |
| 103 |
- SDK Method used are |
| 104 |
switch.Switch.update_network_switch_routing_ospf, |
| 105 |
- Paths used are |
| 106 |
put /networks/{networkId}/switch/routing/ospf, |
| 107 |
""" |
| 108 |
|
| 109 |
EXAMPLES = r""" |
| 110 |
- name: Update all |
| 111 |
cisco.meraki.networks_switch_routing_ospf: |
| 112 |
meraki_api_key: "{{ meraki_api_key }}" |
| 113 |
meraki_base_url: "{{ meraki_base_url }}" |
| 114 |
meraki_single_request_timeout: "{{ meraki_single_request_timeout }}" |
| 115 |
meraki_certificate_path: "{{ meraki_certificate_path }}" |
| 116 |
meraki_requests_proxy: "{{ meraki_requests_proxy }}" |
| 117 |
meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}" |
| 118 |
meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}" |
| 119 |
meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}" |
| 120 |
meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}" |
| 121 |
meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}" |
| 122 |
meraki_maximum_retries: "{{ meraki_maximum_retries }}" |
| 123 |
meraki_output_log: "{{ meraki_output_log }}" |
| 124 |
meraki_log_file_prefix: "{{ meraki_log_file_prefix }}" |
| 125 |
meraki_log_path: "{{ meraki_log_path }}" |
| 126 |
meraki_print_console: "{{ meraki_print_console }}" |
| 127 |
meraki_suppress_logging: "{{ meraki_suppress_logging }}" |
| 128 |
meraki_simulate: "{{ meraki_simulate }}" |
| 129 |
meraki_be_geo_id: "{{ meraki_be_geo_id }}" |
| 130 |
meraki_caller: "{{ meraki_caller }}" |
| 131 |
meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}" |
| 132 |
meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}" |
| 133 |
state: present |
| 134 |
areas: |
| 135 |
- areaId: '1284392014819' |
| 136 |
areaName: Backbone |
| 137 |
areaType: normal |
| 138 |
deadTimerInSeconds: 40 |
| 139 |
enabled: true |
| 140 |
helloTimerInSeconds: 10 |
| 141 |
md5AuthenticationEnabled: true |
| 142 |
md5AuthenticationKey: |
| 143 |
id: 1234 |
| 144 |
passphrase: abc1234 |
| 145 |
networkId: string |
| 146 |
v3: |
| 147 |
areas: |
| 148 |
- areaId: '1284392014819' |
| 149 |
areaName: V3 Backbone |
| 150 |
areaType: normal |
| 151 |
deadTimerInSeconds: 40 |
| 152 |
enabled: true |
| 153 |
helloTimerInSeconds: 10 |
| 154 |
vrf: Blue |
| 155 |
""" |
| 156 |
RETURN = r""" |
| 157 |
meraki_response: |
| 158 |
description: A dictionary or list with the response returned by the Cisco Meraki Python SDK |
| 159 |
returned: always |
| 160 |
type: dict |
| 161 |
sample: > |
| 162 |
{ |
| 163 |
"enabled": true, |
| 164 |
"helloTimerInSeconds": 0, |
| 165 |
"deadTimerInSeconds": 0, |
| 166 |
"areas": [ |
| 167 |
{ |
| 168 |
"areaId": "string", |
| 169 |
"areaName": "string", |
| 170 |
"areaType": "string" |
| 171 |
} |
| 172 |
], |
| 173 |
"v3": { |
| 174 |
"enabled": true, |
| 175 |
"helloTimerInSeconds": 0, |
| 176 |
"deadTimerInSeconds": 0, |
| 177 |
"areas": [ |
| 178 |
{ |
| 179 |
"areaId": "string", |
| 180 |
"areaName": "string", |
| 181 |
"areaType": "string" |
| 182 |
} |
| 183 |
] |
| 184 |
}, |
| 185 |
"md5AuthenticationEnabled": true, |
| 186 |
"md5AuthenticationKey": { |
| 187 |
"id": 0, |
| 188 |
"passphrase": "string" |
| 189 |
}, |
| 190 |
"vrf": { |
| 191 |
"name": "string" |
| 192 |
} |
| 193 |
} |
| 194 |
""" |