| 1 |
|
| 2 |
from __future__ import absolute_import, division, print_function |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
__metaclass__ = type |
| 7 |
|
| 8 |
ANSIBLE_METADATA = {'status': ['preview'], |
| 9 |
'supported_by': 'community', |
| 10 |
'metadata_version': '1.1'} |
| 11 |
|
| 12 |
DOCUMENTATION = ''' |
| 13 |
--- |
| 14 |
module: fmgr_extendercontroller_extenderprofile |
| 15 |
short_description: FortiExtender extender profile configuration. |
| 16 |
version_added: "2.1.0" |
| 17 |
extends_documentation_fragment: |
| 18 |
- fortinet.fortimanager.general |
| 19 |
- fortinet.fortimanager.general.full_crud |
| 20 |
options: |
| 21 |
revision_note: |
| 22 |
description: The change note that can be specified when an object is created or updated. |
| 23 |
type: str |
| 24 |
adom: |
| 25 |
description: The parameter (adom) in requested url. |
| 26 |
type: str |
| 27 |
required: true |
| 28 |
extendercontroller_extenderprofile: |
| 29 |
description: The top level parameters set. |
| 30 |
required: false |
| 31 |
type: dict |
| 32 |
suboptions: |
| 33 |
allowaccess: |
| 34 |
type: list |
| 35 |
elements: str |
| 36 |
description: Control management access to the managed extender. |
| 37 |
choices: ['https', 'ping', 'ssh', 'snmp', 'http', 'telnet'] |
| 38 |
bandwidth_limit: |
| 39 |
aliases: ['bandwidth-limit'] |
| 40 |
type: int |
| 41 |
description: FortiExtender LAN extension bandwidth limit |
| 42 |
cellular: |
| 43 |
type: dict |
| 44 |
description: Cellular. |
| 45 |
suboptions: |
| 46 |
controller_report: |
| 47 |
aliases: ['controller-report'] |
| 48 |
type: dict |
| 49 |
description: Controller report. |
| 50 |
suboptions: |
| 51 |
interval: |
| 52 |
type: int |
| 53 |
description: Controller report interval. |
| 54 |
signal_threshold: |
| 55 |
aliases: ['signal-threshold'] |
| 56 |
type: int |
| 57 |
description: Controller report signal threshold. |
| 58 |
status: |
| 59 |
type: str |
| 60 |
description: FortiExtender controller report status. |
| 61 |
choices: ['disable', 'enable'] |
| 62 |
dataplan: |
| 63 |
type: raw |
| 64 |
description: (list or str) Dataplan names. |
| 65 |
modem1: |
| 66 |
type: dict |
| 67 |
description: Modem1. |
| 68 |
suboptions: |
| 69 |
auto_switch: |
| 70 |
aliases: ['auto-switch'] |
| 71 |
type: dict |
| 72 |
description: Auto switch. |
| 73 |
suboptions: |
| 74 |
dataplan: |
| 75 |
type: str |
| 76 |
description: Automatically switch based on data usage. |
| 77 |
choices: ['disable', 'enable'] |
| 78 |
disconnect: |
| 79 |
type: str |
| 80 |
description: Auto switch by disconnect. |
| 81 |
choices: ['disable', 'enable'] |
| 82 |
disconnect_period: |
| 83 |
aliases: ['disconnect-period'] |
| 84 |
type: int |
| 85 |
description: Automatically switch based on disconnect period. |
| 86 |
disconnect_threshold: |
| 87 |
aliases: ['disconnect-threshold'] |
| 88 |
type: int |
| 89 |
description: Automatically switch based on disconnect threshold. |
| 90 |
signal: |
| 91 |
type: str |
| 92 |
description: Automatically switch based on signal strength. |
| 93 |
choices: ['disable', 'enable'] |
| 94 |
switch_back: |
| 95 |
aliases: ['switch-back'] |
| 96 |
type: list |
| 97 |
elements: str |
| 98 |
description: Auto switch with switch back multi-options. |
| 99 |
choices: ['time', 'timer'] |
| 100 |
switch_back_time: |
| 101 |
aliases: ['switch-back-time'] |
| 102 |
type: str |
| 103 |
description: Automatically switch over to preferred SIM/carrier at a specified time in UTC |
| 104 |
switch_back_timer: |
| 105 |
aliases: ['switch-back-timer'] |
| 106 |
type: int |
| 107 |
description: Automatically switch over to preferred SIM/carrier after the given time |
| 108 |
conn_status: |
| 109 |
aliases: ['conn-status'] |
| 110 |
type: int |
| 111 |
description: Conn status. |
| 112 |
default_sim: |
| 113 |
aliases: ['default-sim'] |
| 114 |
type: str |
| 115 |
description: Default SIM selection. |
| 116 |
choices: ['sim1', 'sim2', 'carrier', 'cost'] |
| 117 |
gps: |
| 118 |
type: str |
| 119 |
description: FortiExtender GPS enable/disable. |
| 120 |
choices: ['disable', 'enable'] |
| 121 |
modem_id: |
| 122 |
aliases: ['modem-id'] |
| 123 |
type: int |
| 124 |
description: Modem ID. |
| 125 |
preferred_carrier: |
| 126 |
aliases: ['preferred-carrier'] |
| 127 |
type: str |
| 128 |
description: Preferred carrier. |
| 129 |
redundant_intf: |
| 130 |
aliases: ['redundant-intf'] |
| 131 |
type: str |
| 132 |
description: Redundant interface. |
| 133 |
redundant_mode: |
| 134 |
aliases: ['redundant-mode'] |
| 135 |
type: str |
| 136 |
description: FortiExtender mode. |
| 137 |
choices: ['disable', 'enable'] |
| 138 |
sim1_pin: |
| 139 |
aliases: ['sim1-pin'] |
| 140 |
type: str |
| 141 |
description: SIM #1 PIN status. |
| 142 |
choices: ['disable', 'enable'] |
| 143 |
sim1_pin_code: |
| 144 |
aliases: ['sim1-pin-code'] |
| 145 |
type: raw |
| 146 |
description: (list) SIM #1 PIN password. |
| 147 |
sim2_pin: |
| 148 |
aliases: ['sim2-pin'] |
| 149 |
type: str |
| 150 |
description: SIM #2 PIN status. |
| 151 |
choices: ['disable', 'enable'] |
| 152 |
sim2_pin_code: |
| 153 |
aliases: ['sim2-pin-code'] |
| 154 |
type: raw |
| 155 |
description: (list) SIM #2 PIN password. |
| 156 |
modem2: |
| 157 |
type: dict |
| 158 |
description: Modem2. |
| 159 |
suboptions: |
| 160 |
auto_switch: |
| 161 |
aliases: ['auto-switch'] |
| 162 |
type: dict |
| 163 |
description: Auto switch. |
| 164 |
suboptions: |
| 165 |
dataplan: |
| 166 |
type: str |
| 167 |
description: Automatically switch based on data usage. |
| 168 |
choices: ['disable', 'enable'] |
| 169 |
disconnect: |
| 170 |
type: str |
| 171 |
description: Auto switch by disconnect. |
| 172 |
choices: ['disable', 'enable'] |
| 173 |
disconnect_period: |
| 174 |
aliases: ['disconnect-period'] |
| 175 |
type: int |
| 176 |
description: Automatically switch based on disconnect period. |
| 177 |
disconnect_threshold: |
| 178 |
aliases: ['disconnect-threshold'] |
| 179 |
type: int |
| 180 |
description: Automatically switch based on disconnect threshold. |
| 181 |
signal: |
| 182 |
type: str |
| 183 |
description: Automatically switch based on signal strength. |
| 184 |
choices: ['disable', 'enable'] |
| 185 |
switch_back: |
| 186 |
aliases: ['switch-back'] |
| 187 |
type: list |
| 188 |
elements: str |
| 189 |
description: Auto switch with switch back multi-options. |
| 190 |
choices: ['time', 'timer'] |
| 191 |
switch_back_time: |
| 192 |
aliases: ['switch-back-time'] |
| 193 |
type: str |
| 194 |
description: Automatically switch over to preferred SIM/carrier at a specified time in UTC |
| 195 |
switch_back_timer: |
| 196 |
aliases: ['switch-back-timer'] |
| 197 |
type: int |
| 198 |
description: Automatically switch over to preferred SIM/carrier after the given time |
| 199 |
conn_status: |
| 200 |
aliases: ['conn-status'] |
| 201 |
type: int |
| 202 |
description: Conn status. |
| 203 |
default_sim: |
| 204 |
aliases: ['default-sim'] |
| 205 |
type: str |
| 206 |
description: Default SIM selection. |
| 207 |
choices: ['sim1', 'sim2', 'carrier', 'cost'] |
| 208 |
gps: |
| 209 |
type: str |
| 210 |
description: FortiExtender GPS enable/disable. |
| 211 |
choices: ['disable', 'enable'] |
| 212 |
modem_id: |
| 213 |
aliases: ['modem-id'] |
| 214 |
type: int |
| 215 |
description: Modem ID. |
| 216 |
preferred_carrier: |
| 217 |
aliases: ['preferred-carrier'] |
| 218 |
type: str |
| 219 |
description: Preferred carrier. |
| 220 |
redundant_intf: |
| 221 |
aliases: ['redundant-intf'] |
| 222 |
type: str |
| 223 |
description: Redundant interface. |
| 224 |
redundant_mode: |
| 225 |
aliases: ['redundant-mode'] |
| 226 |
type: str |
| 227 |
description: FortiExtender mode. |
| 228 |
choices: ['disable', 'enable'] |
| 229 |
sim1_pin: |
| 230 |
aliases: ['sim1-pin'] |
| 231 |
type: str |
| 232 |
description: SIM #1 PIN status. |
| 233 |
choices: ['disable', 'enable'] |
| 234 |
sim1_pin_code: |
| 235 |
aliases: ['sim1-pin-code'] |
| 236 |
type: raw |
| 237 |
description: (list) SIM #1 PIN password. |
| 238 |
sim2_pin: |
| 239 |
aliases: ['sim2-pin'] |
| 240 |
type: str |
| 241 |
description: SIM #2 PIN status. |
| 242 |
choices: ['disable', 'enable'] |
| 243 |
sim2_pin_code: |
| 244 |
aliases: ['sim2-pin-code'] |
| 245 |
type: raw |
| 246 |
description: (list) SIM #2 PIN password. |
| 247 |
sms_notification: |
| 248 |
aliases: ['sms-notification'] |
| 249 |
type: dict |
| 250 |
description: Sms notification. |
| 251 |
suboptions: |
| 252 |
alert: |
| 253 |
type: dict |
| 254 |
description: Alert. |
| 255 |
suboptions: |
| 256 |
data_exhausted: |
| 257 |
aliases: ['data-exhausted'] |
| 258 |
type: str |
| 259 |
description: Display string when data exhausted. |
| 260 |
fgt_backup_mode_switch: |
| 261 |
aliases: ['fgt-backup-mode-switch'] |
| 262 |
type: str |
| 263 |
description: Display string when FortiGate backup mode switched. |
| 264 |
low_signal_strength: |
| 265 |
aliases: ['low-signal-strength'] |
| 266 |
type: str |
| 267 |
description: Display string when signal strength is low. |
| 268 |
mode_switch: |
| 269 |
aliases: ['mode-switch'] |
| 270 |
type: str |
| 271 |
description: Display string when mode is switched. |
| 272 |
os_image_fallback: |
| 273 |
aliases: ['os-image-fallback'] |
| 274 |
type: str |
| 275 |
description: Display string when falling back to a previous OS image. |
| 276 |
session_disconnect: |
| 277 |
aliases: ['session-disconnect'] |
| 278 |
type: str |
| 279 |
description: Display string when session disconnected. |
| 280 |
system_reboot: |
| 281 |
aliases: ['system-reboot'] |
| 282 |
type: str |
| 283 |
description: Display string when system rebooted. |
| 284 |
receiver: |
| 285 |
type: list |
| 286 |
elements: dict |
| 287 |
description: Receiver. |
| 288 |
suboptions: |
| 289 |
alert: |
| 290 |
type: list |
| 291 |
elements: str |
| 292 |
description: Alert multi-options. |
| 293 |
choices: ['system-reboot', 'data-exhausted', |
| 294 |
'session-disconnect', 'low-signal-strength', |
| 295 |
'mode-switch', 'os-image-fallback', |
| 296 |
'fgt-backup-mode-switch'] |
| 297 |
name: |
| 298 |
type: str |
| 299 |
description: FortiExtender SMS notification receiver name. |
| 300 |
phone_number: |
| 301 |
aliases: ['phone-number'] |
| 302 |
type: str |
| 303 |
description: Receiver phone number. |
| 304 |
status: |
| 305 |
type: str |
| 306 |
description: SMS notification receiver status. |
| 307 |
choices: ['disable', 'enable'] |
| 308 |
status: |
| 309 |
type: str |
| 310 |
description: FortiExtender SMS notification status. |
| 311 |
choices: ['disable', 'enable'] |
| 312 |
enforce_bandwidth: |
| 313 |
aliases: ['enforce-bandwidth'] |
| 314 |
type: str |
| 315 |
description: Enable/disable enforcement of bandwidth on LAN extension interface. |
| 316 |
choices: ['disable', 'enable'] |
| 317 |
extension: |
| 318 |
type: str |
| 319 |
description: Extension option. |
| 320 |
choices: ['wan-extension', 'lan-extension'] |
| 321 |
id: |
| 322 |
type: int |
| 323 |
description: ID. |
| 324 |
required: true |
| 325 |
lan_extension: |
| 326 |
aliases: ['lan-extension'] |
| 327 |
type: dict |
| 328 |
description: Lan extension. |
| 329 |
suboptions: |
| 330 |
backhaul: |
| 331 |
type: list |
| 332 |
elements: dict |
| 333 |
description: Backhaul. |
| 334 |
suboptions: |
| 335 |
name: |
| 336 |
type: str |
| 337 |
description: FortiExtender LAN extension backhaul name. |
| 338 |
port: |
| 339 |
type: str |
| 340 |
description: FortiExtender uplink port. |
| 341 |
choices: ['wan', 'lte1', 'lte2', 'port1', 'port2', 'port3', |
| 342 |
'port4', 'port5', 'sfp'] |
| 343 |
role: |
| 344 |
type: str |
| 345 |
description: FortiExtender uplink port. |
| 346 |
choices: ['primary', 'secondary'] |
| 347 |
weight: |
| 348 |
type: int |
| 349 |
description: WRR weight parameter. |
| 350 |
backhaul_interface: |
| 351 |
aliases: ['backhaul-interface'] |
| 352 |
type: str |
| 353 |
description: IPsec phase1 interface. |
| 354 |
backhaul_ip: |
| 355 |
aliases: ['backhaul-ip'] |
| 356 |
type: str |
| 357 |
description: IPsec phase1 IPv4/FQDN. |
| 358 |
ipsec_tunnel: |
| 359 |
aliases: ['ipsec-tunnel'] |
| 360 |
type: str |
| 361 |
description: IPsec tunnel name. |
| 362 |
link_loadbalance: |
| 363 |
aliases: ['link-loadbalance'] |
| 364 |
type: str |
| 365 |
description: LAN extension link load balance strategy. |
| 366 |
choices: ['activebackup', 'loadbalance'] |
| 367 |
login_password: |
| 368 |
aliases: ['login-password'] |
| 369 |
type: raw |
| 370 |
description: (list) Set the managed extenders administrator password. |
| 371 |
login_password_change: |
| 372 |
aliases: ['login-password-change'] |
| 373 |
type: str |
| 374 |
description: Change or reset the administrator password of a managed extender |
| 375 |
choices: ['no', 'yes', 'default'] |
| 376 |
model: |
| 377 |
type: str |
| 378 |
description: Model. |
| 379 |
choices: ['FX201E', 'FX211E', 'FX200F', 'FXA11F', 'FXE11F', 'FXA21F', 'FXE21F', |
| 380 |
'FXA22F', 'FXE22F', 'FX212F', 'FX311F', 'FX312F', 'FX511F', 'FVG21F', |
| 381 |
'FVA21F', 'FVG22F', 'FVA22F', 'FX04DA', 'FX04DN', 'FX04DI'] |
| 382 |
name: |
| 383 |
type: str |
| 384 |
description: FortiExtender profile name. |
| 385 |
''' |
| 386 |
|
| 387 |
EXAMPLES = ''' |
| 388 |
- name: Example playbook (generated based on argument schema) |
| 389 |
hosts: fortimanagers |
| 390 |
connection: httpapi |
| 391 |
gather_facts: false |
| 392 |
tasks: |
| 393 |
- name: FortiExtender extender profile configuration. |
| 394 |
fortinet.fortimanager.fmgr_extendercontroller_extenderprofile: |
| 395 |
# workspace_locking_adom: <global or your adom name> |
| 396 |
adom: <your own value> |
| 397 |
state: present # <value in [present, absent]> |
| 398 |
extendercontroller_extenderprofile: |
| 399 |
id: 0 # Required variable, integer |
| 400 |
# allowaccess: ["https", "ping", "ssh", "snmp", "http", "telnet"] |
| 401 |
# bandwidth_limit: <integer> |
| 402 |
# cellular: |
| 403 |
# controller_report: |
| 404 |
# interval: <integer> |
| 405 |
# signal_threshold: <integer> |
| 406 |
# status: <value in [disable, enable]> |
| 407 |
# dataplan: <list or string> |
| 408 |
# modem1: |
| 409 |
# auto_switch: |
| 410 |
# dataplan: <value in [disable, enable]> |
| 411 |
# disconnect: <value in [disable, enable]> |
| 412 |
# disconnect_period: <integer> |
| 413 |
# disconnect_threshold: <integer> |
| 414 |
# signal: <value in [disable, enable]> |
| 415 |
# switch_back: ["time", "timer"] |
| 416 |
# switch_back_time: <string> |
| 417 |
# switch_back_timer: <integer> |
| 418 |
# conn_status: <integer> |
| 419 |
# default_sim: <value in [sim1, sim2, carrier, ...]> |
| 420 |
# gps: <value in [disable, enable]> |
| 421 |
# modem_id: <integer> |
| 422 |
# preferred_carrier: <string> |
| 423 |
# redundant_intf: <string> |
| 424 |
# redundant_mode: <value in [disable, enable]> |
| 425 |
# sim1_pin: <value in [disable, enable]> |
| 426 |
# sim1_pin_code: <list or string> |
| 427 |
# sim2_pin: <value in [disable, enable]> |
| 428 |
# sim2_pin_code: <list or string> |
| 429 |
# modem2: |
| 430 |
# auto_switch: |
| 431 |
# dataplan: <value in [disable, enable]> |
| 432 |
# disconnect: <value in [disable, enable]> |
| 433 |
# disconnect_period: <integer> |
| 434 |
# disconnect_threshold: <integer> |
| 435 |
# signal: <value in [disable, enable]> |
| 436 |
# switch_back: ["time", "timer"] |
| 437 |
# switch_back_time: <string> |
| 438 |
# switch_back_timer: <integer> |
| 439 |
# conn_status: <integer> |
| 440 |
# default_sim: <value in [sim1, sim2, carrier, ...]> |
| 441 |
# gps: <value in [disable, enable]> |
| 442 |
# modem_id: <integer> |
| 443 |
# preferred_carrier: <string> |
| 444 |
# redundant_intf: <string> |
| 445 |
# redundant_mode: <value in [disable, enable]> |
| 446 |
# sim1_pin: <value in [disable, enable]> |
| 447 |
# sim1_pin_code: <list or string> |
| 448 |
# sim2_pin: <value in [disable, enable]> |
| 449 |
# sim2_pin_code: <list or string> |
| 450 |
# sms_notification: |
| 451 |
# alert: |
| 452 |
# data_exhausted: <string> |
| 453 |
# fgt_backup_mode_switch: <string> |
| 454 |
# low_signal_strength: <string> |
| 455 |
# mode_switch: <string> |
| 456 |
# os_image_fallback: <string> |
| 457 |
# session_disconnect: <string> |
| 458 |
# system_reboot: <string> |
| 459 |
# receiver: |
| 460 |
# - alert: ["system-reboot", "data-exhausted", "session-disconnect", |
| 461 |
# "low-signal-strength", "mode-switch", "os-image-fallback", |
| 462 |
# "fgt-backup-mode-switch"] |
| 463 |
# name: <string> |
| 464 |
# phone_number: <string> |
| 465 |
# status: <value in [disable, enable]> |
| 466 |
# status: <value in [disable, enable]> |
| 467 |
# enforce_bandwidth: <value in [disable, enable]> |
| 468 |
# extension: <value in [wan-extension, lan-extension]> |
| 469 |
# lan_extension: |
| 470 |
# backhaul: |
| 471 |
# - name: <string> |
| 472 |
# port: <value in [wan, lte1, lte2, ...]> |
| 473 |
# role: <value in [primary, secondary]> |
| 474 |
# weight: <integer> |
| 475 |
# backhaul_interface: <string> |
| 476 |
# backhaul_ip: <string> |
| 477 |
# ipsec_tunnel: <string> |
| 478 |
# link_loadbalance: <value in [activebackup, loadbalance]> |
| 479 |
# login_password: <list or string> |
| 480 |
# login_password_change: <value in [no, yes, default]> |
| 481 |
# model: <value in [FX201E, FX211E, FX200F, ...]> |
| 482 |
# name: <string> |
| 483 |
''' |
| 484 |
|
| 485 |
RETURN = ''' |
| 486 |
meta: |
| 487 |
description: The result of the request. |
| 488 |
type: dict |
| 489 |
returned: always |
| 490 |
contains: |
| 491 |
request_url: |
| 492 |
description: The full url requested. |
| 493 |
returned: always |
| 494 |
type: str |
| 495 |
sample: /sys/login/user |
| 496 |
response_code: |
| 497 |
description: The status of api request. |
| 498 |
returned: always |
| 499 |
type: int |
| 500 |
sample: 0 |
| 501 |
response_data: |
| 502 |
description: The api response. |
| 503 |
type: list |
| 504 |
returned: always |
| 505 |
response_message: |
| 506 |
description: The descriptive message of the api response. |
| 507 |
type: str |
| 508 |
returned: always |
| 509 |
sample: OK. |
| 510 |
system_information: |
| 511 |
description: The information of the target system. |
| 512 |
type: dict |
| 513 |
returned: always |
| 514 |
rc: |
| 515 |
description: The status the request. |
| 516 |
type: int |
| 517 |
returned: always |
| 518 |
sample: 0 |
| 519 |
version_check_warning: |
| 520 |
description: Warning if the parameters used in the playbook are not supported by the current FortiManager version. |
| 521 |
type: list |
| 522 |
returned: complex |
| 523 |
''' |
| 524 |
from ansible.module_utils.basic import AnsibleModule |
| 525 |
from ansible.module_utils.connection import Connection |
| 526 |
from ansible_collections.fortinet.fortimanager.plugins.module_utils.napi import NAPIManager, check_galaxy_version, check_parameter_bypass |
| 527 |
from ansible_collections.fortinet.fortimanager.plugins.module_utils.common import get_module_arg_spec |
| 528 |
|
| 529 |
|
| 530 |
def main(): |
| 531 |
urls_list = [ |
| 532 |
'/pm/config/adom/{adom}/obj/extender-controller/extender-profile', |
| 533 |
'/pm/config/global/obj/extender-controller/extender-profile' |
| 534 |
] |
| 535 |
module_arg_spec = { |
| 536 |
'adom': {'required': True, 'type': 'str'}, |
| 537 |
'revision_note': {'type': 'str'}, |
| 538 |
'extendercontroller_extenderprofile': { |
| 539 |
'type': 'dict', 'v_range': [['7.0.2', '']], |
| 540 |
'options': { |
| 541 |
'allowaccess': { |
| 542 |
'v_range': [['7.0.2', '']], |
| 543 |
'type': 'list', |
| 544 |
'choices': ['https', 'ping', 'ssh', 'snmp', 'http', 'telnet'], |
| 545 |
'elements': 'str' |
| 546 |
}, |
| 547 |
'bandwidth-limit': {'v_range': [['7.0.2', '']], 'type': 'int'}, |
| 548 |
'cellular': { |
| 549 |
'v_range': [['7.0.2', '']], |
| 550 |
'type': 'dict', |
| 551 |
'options': { |
| 552 |
'controller-report': { |
| 553 |
'v_range': [['7.0.2', '']], |
| 554 |
'type': 'dict', |
| 555 |
'options': { |
| 556 |
'interval': {'v_range': [['7.0.2', '']], 'type': 'int'}, |
| 557 |
'signal-threshold': {'v_range': [['7.0.2', '']], 'type': 'int'}, |
| 558 |
'status': {'v_range': [['7.0.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'} |
| 559 |
} |
| 560 |
}, |
| 561 |
'dataplan': {'v_range': [['7.0.2', '']], 'type': 'raw'}, |
| 562 |
'modem1': { |
| 563 |
'v_range': [['7.0.2', '']], |
| 564 |
'type': 'dict', |
| 565 |
'options': { |
| 566 |
'auto-switch': { |
| 567 |
'v_range': [['7.0.2', '']], |
| 568 |
'type': 'dict', |
| 569 |
'options': { |
| 570 |
'dataplan': {'v_range': [['7.0.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 571 |
'disconnect': {'v_range': [['7.0.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 572 |
'disconnect-period': {'v_range': [['7.0.2', '']], 'type': 'int'}, |
| 573 |
'disconnect-threshold': {'v_range': [['7.0.2', '']], 'type': 'int'}, |
| 574 |
'signal': {'v_range': [['7.0.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 575 |
'switch-back': {'v_range': [['7.0.2', '']], 'type': 'list', 'choices': ['time', 'timer'], 'elements': 'str'}, |
| 576 |
'switch-back-time': {'v_range': [['7.0.2', '']], 'type': 'str'}, |
| 577 |
'switch-back-timer': {'v_range': [['7.0.2', '']], 'type': 'int'} |
| 578 |
} |
| 579 |
}, |
| 580 |
'conn-status': {'v_range': [['7.0.2', '']], 'type': 'int'}, |
| 581 |
'default-sim': {'v_range': [['7.0.2', '']], 'choices': ['sim1', 'sim2', 'carrier', 'cost'], 'type': 'str'}, |
| 582 |
'gps': {'v_range': [['7.0.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 583 |
'modem-id': {'v_range': [['7.0.2', '']], 'type': 'int'}, |
| 584 |
'preferred-carrier': {'v_range': [['7.0.2', '']], 'type': 'str'}, |
| 585 |
'redundant-intf': {'v_range': [['7.0.2', '']], 'type': 'str'}, |
| 586 |
'redundant-mode': {'v_range': [['7.0.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 587 |
'sim1-pin': {'v_range': [['7.0.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 588 |
'sim1-pin-code': {'v_range': [['7.0.2', '']], 'type': 'raw'}, |
| 589 |
'sim2-pin': {'v_range': [['7.0.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 590 |
'sim2-pin-code': {'v_range': [['7.0.2', '']], 'type': 'raw'} |
| 591 |
} |
| 592 |
}, |
| 593 |
'modem2': { |
| 594 |
'v_range': [['7.0.2', '']], |
| 595 |
'type': 'dict', |
| 596 |
'options': { |
| 597 |
'auto-switch': { |
| 598 |
'v_range': [['7.0.2', '']], |
| 599 |
'type': 'dict', |
| 600 |
'options': { |
| 601 |
'dataplan': {'v_range': [['7.0.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 602 |
'disconnect': {'v_range': [['7.0.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 603 |
'disconnect-period': {'v_range': [['7.0.2', '']], 'type': 'int'}, |
| 604 |
'disconnect-threshold': {'v_range': [['7.0.2', '']], 'type': 'int'}, |
| 605 |
'signal': {'v_range': [['7.0.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 606 |
'switch-back': {'v_range': [['7.0.2', '']], 'type': 'list', 'choices': ['time', 'timer'], 'elements': 'str'}, |
| 607 |
'switch-back-time': {'v_range': [['7.0.2', '']], 'type': 'str'}, |
| 608 |
'switch-back-timer': {'v_range': [['7.0.2', '']], 'type': 'int'} |
| 609 |
} |
| 610 |
}, |
| 611 |
'conn-status': {'v_range': [['7.0.2', '']], 'type': 'int'}, |
| 612 |
'default-sim': {'v_range': [['7.0.2', '']], 'choices': ['sim1', 'sim2', 'carrier', 'cost'], 'type': 'str'}, |
| 613 |
'gps': {'v_range': [['7.0.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 614 |
'modem-id': {'v_range': [['7.0.2', '']], 'type': 'int'}, |
| 615 |
'preferred-carrier': {'v_range': [['7.0.2', '']], 'type': 'str'}, |
| 616 |
'redundant-intf': {'v_range': [['7.0.2', '']], 'type': 'str'}, |
| 617 |
'redundant-mode': {'v_range': [['7.0.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 618 |
'sim1-pin': {'v_range': [['7.0.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 619 |
'sim1-pin-code': {'v_range': [['7.0.2', '']], 'type': 'raw'}, |
| 620 |
'sim2-pin': {'v_range': [['7.0.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 621 |
'sim2-pin-code': {'v_range': [['7.0.2', '']], 'type': 'raw'} |
| 622 |
} |
| 623 |
}, |
| 624 |
'sms-notification': { |
| 625 |
'v_range': [['7.0.2', '']], |
| 626 |
'type': 'dict', |
| 627 |
'options': { |
| 628 |
'alert': { |
| 629 |
'v_range': [['7.0.2', '']], |
| 630 |
'type': 'dict', |
| 631 |
'options': { |
| 632 |
'data-exhausted': {'v_range': [['7.0.2', '']], 'type': 'str'}, |
| 633 |
'fgt-backup-mode-switch': {'v_range': [['7.0.2', '']], 'type': 'str'}, |
| 634 |
'low-signal-strength': {'v_range': [['7.0.2', '']], 'type': 'str'}, |
| 635 |
'mode-switch': {'v_range': [['7.0.2', '']], 'type': 'str'}, |
| 636 |
'os-image-fallback': {'v_range': [['7.0.2', '']], 'type': 'str'}, |
| 637 |
'session-disconnect': {'v_range': [['7.0.2', '']], 'type': 'str'}, |
| 638 |
'system-reboot': {'v_range': [['7.0.2', '']], 'type': 'str'} |
| 639 |
} |
| 640 |
}, |
| 641 |
'receiver': { |
| 642 |
'v_range': [['7.0.2', '']], |
| 643 |
'type': 'list', |
| 644 |
'options': { |
| 645 |
'alert': { |
| 646 |
'v_range': [['7.0.2', '']], |
| 647 |
'type': 'list', |
| 648 |
'choices': [ |
| 649 |
'system-reboot', 'data-exhausted', 'session-disconnect', 'low-signal-strength', 'mode-switch', |
| 650 |
'os-image-fallback', 'fgt-backup-mode-switch' |
| 651 |
], |
| 652 |
'elements': 'str' |
| 653 |
}, |
| 654 |
'name': {'v_range': [['7.0.2', '']], 'type': 'str'}, |
| 655 |
'phone-number': {'v_range': [['7.0.2', '']], 'type': 'str'}, |
| 656 |
'status': {'v_range': [['7.0.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'} |
| 657 |
}, |
| 658 |
'elements': 'dict' |
| 659 |
}, |
| 660 |
'status': {'v_range': [['7.0.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'} |
| 661 |
} |
| 662 |
} |
| 663 |
} |
| 664 |
}, |
| 665 |
'enforce-bandwidth': {'v_range': [['7.0.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 666 |
'extension': {'v_range': [['7.0.2', '']], 'choices': ['wan-extension', 'lan-extension'], 'type': 'str'}, |
| 667 |
'id': {'v_range': [['7.0.2', '']], 'required': True, 'type': 'int'}, |
| 668 |
'lan-extension': { |
| 669 |
'v_range': [['7.0.2', '']], |
| 670 |
'type': 'dict', |
| 671 |
'options': { |
| 672 |
'backhaul': { |
| 673 |
'v_range': [['7.0.2', '']], |
| 674 |
'type': 'list', |
| 675 |
'options': { |
| 676 |
'name': {'v_range': [['7.0.2', '']], 'type': 'str'}, |
| 677 |
'port': { |
| 678 |
'v_range': [['7.0.2', '']], |
| 679 |
'choices': ['wan', 'lte1', 'lte2', 'port1', 'port2', 'port3', 'port4', 'port5', 'sfp'], |
| 680 |
'type': 'str' |
| 681 |
}, |
| 682 |
'role': {'v_range': [['7.0.2', '']], 'choices': ['primary', 'secondary'], 'type': 'str'}, |
| 683 |
'weight': {'v_range': [['7.0.2', '']], 'type': 'int'} |
| 684 |
}, |
| 685 |
'elements': 'dict' |
| 686 |
}, |
| 687 |
'backhaul-interface': {'v_range': [['7.0.2', '']], 'type': 'str'}, |
| 688 |
'backhaul-ip': {'v_range': [['7.0.2', '']], 'type': 'str'}, |
| 689 |
'ipsec-tunnel': {'v_range': [['7.0.2', '']], 'type': 'str'}, |
| 690 |
'link-loadbalance': {'v_range': [['7.0.2', '']], 'choices': ['activebackup', 'loadbalance'], 'type': 'str'} |
| 691 |
} |
| 692 |
}, |
| 693 |
'login-password': {'v_range': [['7.0.2', '']], 'no_log': True, 'type': 'raw'}, |
| 694 |
'login-password-change': {'v_range': [['7.0.2', '']], 'choices': ['no', 'yes', 'default'], 'type': 'str'}, |
| 695 |
'model': { |
| 696 |
'v_range': [['7.0.2', '']], |
| 697 |
'choices': [ |
| 698 |
'FX201E', 'FX211E', 'FX200F', 'FXA11F', 'FXE11F', 'FXA21F', 'FXE21F', 'FXA22F', 'FXE22F', 'FX212F', 'FX311F', 'FX312F', 'FX511F', |
| 699 |
'FVG21F', 'FVA21F', 'FVG22F', 'FVA22F', 'FX04DA', 'FX04DN', 'FX04DI' |
| 700 |
], |
| 701 |
'type': 'str' |
| 702 |
}, |
| 703 |
'name': {'v_range': [['7.0.2', '']], 'type': 'str'} |
| 704 |
} |
| 705 |
} |
| 706 |
} |
| 707 |
|
| 708 |
module_option_spec = get_module_arg_spec('full crud') |
| 709 |
module_arg_spec.update(module_option_spec) |
| 710 |
check_galaxy_version(module_arg_spec) |
| 711 |
module = AnsibleModule(argument_spec=check_parameter_bypass(module_arg_spec, 'extendercontroller_extenderprofile'), |
| 712 |
supports_check_mode=True) |
| 713 |
if not module._socket_path: |
| 714 |
module.fail_json(msg='MUST RUN IN HTTPAPI MODE') |
| 715 |
connection = Connection(module._socket_path) |
| 716 |
fmgr = NAPIManager('full crud', module_arg_spec, urls_list, |
| 717 |
'id', 'data', module, connection) |
| 718 |
fmgr.process_crud() |
| 719 |
module.exit_json(meta=module.params) |
| 720 |
|
| 721 |
|
| 722 |
if __name__ == '__main__': |
| 723 |
main() |