| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
from __future__ import absolute_import, division, print_function |
| 9 |
|
| 10 |
__metaclass__ = type |
| 11 |
|
| 12 |
DOCUMENTATION = r''' |
| 13 |
--- |
| 14 |
module: bigip_device_info |
| 15 |
short_description: Collect information from F5 BIG-IP devices |
| 16 |
description: |
| 17 |
- Collect information from F5 BIG-IP devices. |
| 18 |
- This module was called C(bigip_device_facts) before Ansible 2.9. The usage did not change. |
| 19 |
version_added: "1.0.0" |
| 20 |
options: |
| 21 |
partition: |
| 22 |
description: |
| 23 |
- Specifies the partition to gather the resource information from. |
| 24 |
- The default value for the partition is taken as Common. |
| 25 |
type: str |
| 26 |
default: Common |
| 27 |
version_added: "1.14.0" |
| 28 |
data_increment: |
| 29 |
description: |
| 30 |
- Specifies the paging increment at which device data is gathered from the API. |
| 31 |
- Allows for greater control of the pace at which data is queried from the device. |
| 32 |
- This setting is useful for setups with large configurations which may take a long time with the default values. |
| 33 |
- While there is no limit to the value that can be specified, note that putting very large values with |
| 34 |
C(gather_subset) set to meta choices like C(all) might lead to module or device API crash. |
| 35 |
- F5 recommends using C(data_increment) custom values in tandem with C(partition) and a specific C(gather_subset) |
| 36 |
value for best experience. |
| 37 |
type: int |
| 38 |
default: 10 |
| 39 |
version_added: "1.22.0" |
| 40 |
gather_subset: |
| 41 |
description: |
| 42 |
- When supplied, this argument will restrict the information returned to a given subset. |
| 43 |
- You can specify a list of values to include a larger subset. |
| 44 |
- Values can also be used with an initial C(!) to specify that a specific subset |
| 45 |
should not be collected. |
| 46 |
type: list |
| 47 |
elements: str |
| 48 |
required: True |
| 49 |
choices: |
| 50 |
- all |
| 51 |
- monitors |
| 52 |
- profiles |
| 53 |
- apm-access-profiles |
| 54 |
- apm-access-policies |
| 55 |
- as3 |
| 56 |
- asm-policy-stats |
| 57 |
- asm-policies |
| 58 |
- asm-server-technologies |
| 59 |
- asm-signature-sets |
| 60 |
- client-ssl-profiles |
| 61 |
- cfe |
| 62 |
- devices |
| 63 |
- device-groups |
| 64 |
- do |
| 65 |
- external-monitors |
| 66 |
- fasthttp-profiles |
| 67 |
- fastl4-profiles |
| 68 |
- gateway-icmp-monitors |
| 69 |
- gtm-pools |
| 70 |
- gtm-servers |
| 71 |
- gtm-wide-ips |
| 72 |
- gtm-a-pools |
| 73 |
- gtm-a-wide-ips |
| 74 |
- gtm-aaaa-pools |
| 75 |
- gtm-aaaa-wide-ips |
| 76 |
- gtm-cname-pools |
| 77 |
- gtm-cname-wide-ips |
| 78 |
- gtm-mx-pools |
| 79 |
- gtm-mx-wide-ips |
| 80 |
- gtm-naptr-pools |
| 81 |
- gtm-naptr-wide-ips |
| 82 |
- gtm-srv-pools |
| 83 |
- gtm-srv-wide-ips |
| 84 |
- gtm-topology-regions |
| 85 |
- http-monitors |
| 86 |
- https-monitors |
| 87 |
- http-profiles |
| 88 |
- iapp-services |
| 89 |
- iapplx-packages |
| 90 |
- icmp-monitors |
| 91 |
- interfaces |
| 92 |
- internal-data-groups |
| 93 |
- irules |
| 94 |
- license |
| 95 |
- ltm-pools |
| 96 |
- snat-pools |
| 97 |
- ltm-policies |
| 98 |
- management-routes |
| 99 |
- nodes |
| 100 |
- oneconnect-profiles |
| 101 |
- packages |
| 102 |
- partitions |
| 103 |
- provision-info |
| 104 |
- remote-syslog |
| 105 |
- route-domains |
| 106 |
- self-ips |
| 107 |
- server-ssl-profiles |
| 108 |
- software-volumes |
| 109 |
- software-images |
| 110 |
- software-hotfixes |
| 111 |
- ssl-certs |
| 112 |
- ssl-keys |
| 113 |
- sync-status |
| 114 |
- system-db |
| 115 |
- system-info |
| 116 |
- ts |
| 117 |
- tcp-monitors |
| 118 |
- tcp-half-open-monitors |
| 119 |
- tcp-profiles |
| 120 |
- traffic-groups |
| 121 |
- trunks |
| 122 |
- udp-profiles |
| 123 |
- users |
| 124 |
- ucs |
| 125 |
- vcmp-guests |
| 126 |
- virtual-addresses |
| 127 |
- virtual-servers |
| 128 |
- vlans |
| 129 |
- "!all" |
| 130 |
- "!as3" |
| 131 |
- "!do" |
| 132 |
- "!ts" |
| 133 |
- "!cfe" |
| 134 |
- "!monitors" |
| 135 |
- "!profiles" |
| 136 |
- "!apm-access-profiles" |
| 137 |
- "!apm-access-policies" |
| 138 |
- "!asm-policy-stats" |
| 139 |
- "!asm-policies" |
| 140 |
- "!asm-server-technologies" |
| 141 |
- "!asm-signature-sets" |
| 142 |
- "!client-ssl-profiles" |
| 143 |
- "!devices" |
| 144 |
- "!device-groups" |
| 145 |
- "!external-monitors" |
| 146 |
- "!fasthttp-profiles" |
| 147 |
- "!fastl4-profiles" |
| 148 |
- "!gateway-icmp-monitors" |
| 149 |
- "!gtm-pools" |
| 150 |
- "!gtm-servers" |
| 151 |
- "!gtm-wide-ips" |
| 152 |
- "!gtm-a-pools" |
| 153 |
- "!gtm-a-wide-ips" |
| 154 |
- "!gtm-aaaa-pools" |
| 155 |
- "!gtm-aaaa-wide-ips" |
| 156 |
- "!gtm-cname-pools" |
| 157 |
- "!gtm-cname-wide-ips" |
| 158 |
- "!gtm-mx-pools" |
| 159 |
- "!gtm-mx-wide-ips" |
| 160 |
- "!gtm-naptr-pools" |
| 161 |
- "!gtm-naptr-wide-ips" |
| 162 |
- "!gtm-srv-pools" |
| 163 |
- "!gtm-srv-wide-ips" |
| 164 |
- "!gtm-topology-regions" |
| 165 |
- "!http-monitors" |
| 166 |
- "!https-monitors" |
| 167 |
- "!http-profiles" |
| 168 |
- "!iapp-services" |
| 169 |
- "!iapplx-packages" |
| 170 |
- "!icmp-monitors" |
| 171 |
- "!interfaces" |
| 172 |
- "!internal-data-groups" |
| 173 |
- "!irules" |
| 174 |
- "!license" |
| 175 |
- "!ltm-pools" |
| 176 |
- "!snat-pools" |
| 177 |
- "!ltm-policies" |
| 178 |
- "!management-routes" |
| 179 |
- "!nodes" |
| 180 |
- "!oneconnect-profiles" |
| 181 |
- "!packages" |
| 182 |
- "!partitions" |
| 183 |
- "!provision-info" |
| 184 |
- "!remote-syslog" |
| 185 |
- "!route-domains" |
| 186 |
- "!self-ips" |
| 187 |
- "!server-ssl-profiles" |
| 188 |
- "!software-volumes" |
| 189 |
- "!software-images" |
| 190 |
- "!software-hotfixes" |
| 191 |
- "!ssl-certs" |
| 192 |
- "!ssl-keys" |
| 193 |
- "!sync-status" |
| 194 |
- "!system-db" |
| 195 |
- "!system-info" |
| 196 |
- "!tcp-monitors" |
| 197 |
- "!tcp-half-open-monitors" |
| 198 |
- "!tcp-profiles" |
| 199 |
- "!traffic-groups" |
| 200 |
- "!trunks" |
| 201 |
- "!udp-profiles" |
| 202 |
- "!users" |
| 203 |
- "!ucs" |
| 204 |
- "!vcmp-guests" |
| 205 |
- "!virtual-addresses" |
| 206 |
- "!virtual-servers" |
| 207 |
- "!vlans" |
| 208 |
aliases: ['include'] |
| 209 |
extends_documentation_fragment: f5networks.f5_modules.f5 |
| 210 |
author: |
| 211 |
- Tim Rupp (@caphrim007) |
| 212 |
- Wojciech Wypior (@wojtek0806) |
| 213 |
''' |
| 214 |
|
| 215 |
EXAMPLES = r''' |
| 216 |
- name: Collect BIG-IP information |
| 217 |
bigip_device_info: |
| 218 |
gather_subset: |
| 219 |
- interfaces |
| 220 |
- vlans |
| 221 |
provider: |
| 222 |
server: lb.mydomain.com |
| 223 |
user: admin |
| 224 |
password: secret |
| 225 |
delegate_to: localhost |
| 226 |
|
| 227 |
- name: Collect all BIG-IP information |
| 228 |
bigip_device_info: |
| 229 |
gather_subset: |
| 230 |
- all |
| 231 |
provider: |
| 232 |
server: lb.mydomain.com |
| 233 |
user: admin |
| 234 |
password: secret |
| 235 |
delegate_to: localhost |
| 236 |
|
| 237 |
- name: Collect all BIG-IP information except trunks |
| 238 |
bigip_device_info: |
| 239 |
gather_subset: |
| 240 |
- all |
| 241 |
- "!trunks" |
| 242 |
provider: |
| 243 |
server: lb.mydomain.com |
| 244 |
user: admin |
| 245 |
password: secret |
| 246 |
delegate_to: localhost |
| 247 |
|
| 248 |
- name: Collect BIG-IP information with custom data_increment and specific partition |
| 249 |
bigip_device_info: |
| 250 |
data_increment: 50 |
| 251 |
partition: Foo |
| 252 |
gather_subset: |
| 253 |
- gtm-a-wide-ips |
| 254 |
provider: |
| 255 |
server: lb.mydomain.com |
| 256 |
user: admin |
| 257 |
password: secret |
| 258 |
delegate_to: localhost |
| 259 |
''' |
| 260 |
|
| 261 |
RETURN = r''' |
| 262 |
apm_access_profiles: |
| 263 |
description: Information about APM Access Profiles. |
| 264 |
returned: When C(apm-access-profiles) is specified in C(gather_subset). |
| 265 |
type: complex |
| 266 |
contains: |
| 267 |
full_path: |
| 268 |
description: |
| 269 |
- Full name of the resource as known to the BIG-IP. |
| 270 |
returned: queried |
| 271 |
type: str |
| 272 |
sample: /Common/foo_policy |
| 273 |
name: |
| 274 |
description: |
| 275 |
- Relative name of the resource in the BIG-IP. |
| 276 |
returned: queried |
| 277 |
type: str |
| 278 |
sample: foo_policy |
| 279 |
access_policy: |
| 280 |
description: |
| 281 |
- APM Access Policy attached to this Access Profile. |
| 282 |
returned: queried |
| 283 |
type: str |
| 284 |
sample: foo_policy |
| 285 |
apm_access_policies: |
| 286 |
description: Information about APM Access Policies. |
| 287 |
returned: When C(apm-access-policies) is specified in C(gather_subset). |
| 288 |
type: complex |
| 289 |
contains: |
| 290 |
full_path: |
| 291 |
description: |
| 292 |
- Full name of the resource as known to the BIG-IP. |
| 293 |
returned: queried |
| 294 |
type: str |
| 295 |
sample: /Common/foo_policy |
| 296 |
name: |
| 297 |
description: |
| 298 |
- Relative name of the resource in the BIG-IP. |
| 299 |
returned: queried |
| 300 |
type: str |
| 301 |
sample: foo_policy |
| 302 |
asm_policy_stats: |
| 303 |
description: Miscellaneous ASM policy related information. |
| 304 |
returned: When C(asm-policy-stats) is specified in C(gather_subset). |
| 305 |
type: complex |
| 306 |
contains: |
| 307 |
policies: |
| 308 |
description: |
| 309 |
- The total number of ASM policies on the device. |
| 310 |
returned: queried |
| 311 |
type: int |
| 312 |
sample: 3 |
| 313 |
parent_policies: |
| 314 |
description: |
| 315 |
- The total number of ASM parent policies on the device. |
| 316 |
returned: queried |
| 317 |
type: int |
| 318 |
sample: 2 |
| 319 |
policies_pending_changes: |
| 320 |
description: |
| 321 |
- The total number of ASM policies with pending changes on the device. |
| 322 |
returned: queried |
| 323 |
type: int |
| 324 |
sample: 2 |
| 325 |
policies_active: |
| 326 |
description: |
| 327 |
- The number of ASM policies that are marked as active. From TMOS 13.x and above this setting equals |
| 328 |
to C(policies_attached). |
| 329 |
returned: queried |
| 330 |
type: int |
| 331 |
sample: 3 |
| 332 |
policies_attached: |
| 333 |
description: |
| 334 |
- The number of ASM policies that are attached to virtual servers. |
| 335 |
returned: queried |
| 336 |
type: int |
| 337 |
sample: 1 |
| 338 |
policies_inactive: |
| 339 |
description: |
| 340 |
- The number of ASM policies that are marked as inactive. From TMOS 13.x and above this setting equals |
| 341 |
to C(policies_unattached). |
| 342 |
returned: queried |
| 343 |
type: int |
| 344 |
sample: 0 |
| 345 |
policies_unattached: |
| 346 |
description: |
| 347 |
- The number of ASM policies that are not attached to a virtual server. |
| 348 |
returned: queried |
| 349 |
type: int |
| 350 |
sample: 3 |
| 351 |
sample: hash/dictionary of values |
| 352 |
asm_policies: |
| 353 |
description: Detailed information for ASM policies present on device. |
| 354 |
returned: When C(asm-policies) is specified in C(gather_subset). |
| 355 |
type: complex |
| 356 |
contains: |
| 357 |
full_path: |
| 358 |
description: |
| 359 |
- Full name of the resource as known to the BIG-IP. |
| 360 |
returned: queried |
| 361 |
type: str |
| 362 |
sample: /Common/foo_policy |
| 363 |
name: |
| 364 |
description: |
| 365 |
- Relative name of the resource in the BIG-IP. |
| 366 |
returned: queried |
| 367 |
type: str |
| 368 |
sample: foo_policy |
| 369 |
policy_id: |
| 370 |
description: |
| 371 |
- Generated ID of the ASM policy resource. |
| 372 |
returned: queried |
| 373 |
type: str |
| 374 |
sample: l0Ckxe-7yHsXp8U5tTgbFQ |
| 375 |
active: |
| 376 |
description: |
| 377 |
- Indicates if an ASM policy is active. In TMOS 13.x and above, |
| 378 |
this setting indicates if the policy is bound to any Virtual Server. |
| 379 |
returned: queried |
| 380 |
type: bool |
| 381 |
sample: true |
| 382 |
apply: |
| 383 |
description: |
| 384 |
- In TMOS 13.x and above, this setting indicates if an ASM policy has pending changes that need to be applied. |
| 385 |
returned: queried |
| 386 |
type: bool |
| 387 |
sample: true |
| 388 |
protocol_independent: |
| 389 |
description: |
| 390 |
- Indicates if the ASM policy differentiates between HTTP/WS and HTTPS/WSS URLs. |
| 391 |
returned: queried |
| 392 |
type: bool |
| 393 |
sample: false |
| 394 |
has_parent: |
| 395 |
description: |
| 396 |
- Indicates if the ASM policy is a child of another ASM policy. |
| 397 |
returned: queried |
| 398 |
type: bool |
| 399 |
sample: false |
| 400 |
type: |
| 401 |
description: |
| 402 |
- The type of policy, can be C(Security) or C(Parent). |
| 403 |
returned: queried |
| 404 |
type: str |
| 405 |
sample: security |
| 406 |
virtual_servers: |
| 407 |
description: |
| 408 |
- Virtual server or servers which have this policy assigned to them. |
| 409 |
returned: queried |
| 410 |
type: list |
| 411 |
sample: ['/Common/foo_VS/'] |
| 412 |
manual_virtual_servers: |
| 413 |
description: |
| 414 |
- The virtual servers that have Advanced LTM policy configuration which, in turn, have rule(s) built |
| 415 |
with ASM control actions enabled. |
| 416 |
returned: queried |
| 417 |
type: list |
| 418 |
sample: ['/Common/test_VS/'] |
| 419 |
allowed_response_codes: |
| 420 |
description: |
| 421 |
- Lists the response status codes between 400 and 599 that the security profile considers legal. |
| 422 |
returned: queried |
| 423 |
type: list |
| 424 |
sample: ['400', '404'] |
| 425 |
description: |
| 426 |
description: |
| 427 |
- Description of the resource. |
| 428 |
returned: queried |
| 429 |
type: str |
| 430 |
sample: Significant Policy Description |
| 431 |
learning_mode: |
| 432 |
description: |
| 433 |
- Determine how the policy is built. |
| 434 |
returned: queried |
| 435 |
type: str |
| 436 |
sample: manual |
| 437 |
enforcement_mode: |
| 438 |
description: |
| 439 |
- Specifies whether blocking is active or inactive for the ASM policy. |
| 440 |
returned: queried |
| 441 |
type: str |
| 442 |
sample: blocking |
| 443 |
trust_xff: |
| 444 |
description: |
| 445 |
- Indicates the system has confidence in an XFF (X-Forwarded-For) header in the request. |
| 446 |
returned: queried |
| 447 |
type: bool |
| 448 |
sample: true |
| 449 |
custom_xff_headers: |
| 450 |
description: |
| 451 |
- List of custom XFF headers trusted by the system. |
| 452 |
returned: queried |
| 453 |
type: str |
| 454 |
sample: asm-proxy1 |
| 455 |
case_insensitive: |
| 456 |
description: |
| 457 |
- Indicates if the ASM policy treats file types, URLs, and parameters as case sensitive. |
| 458 |
returned: queried |
| 459 |
type: bool |
| 460 |
sample: true |
| 461 |
signature_staging: |
| 462 |
description: |
| 463 |
- Specifies if the staging feature is active on the ASM policy. |
| 464 |
returned: queried |
| 465 |
type: bool |
| 466 |
sample: true |
| 467 |
place_signatures_in_staging: |
| 468 |
description: |
| 469 |
- Specifies if the system places new or updated signatures in staging |
| 470 |
for the number of days specified in the enforcement readiness period. |
| 471 |
returned: queried |
| 472 |
type: bool |
| 473 |
sample: false |
| 474 |
enforcement_readiness_period: |
| 475 |
description: |
| 476 |
- Period in days both security policy entities and attack signatures |
| 477 |
remain in staging mode before the system suggests to enforce them. |
| 478 |
returned: queried |
| 479 |
type: int |
| 480 |
sample: 8 |
| 481 |
path_parameter_handling: |
| 482 |
description: |
| 483 |
- Specifies how the system handles path parameters that are attached to path segments in URIs. |
| 484 |
returned: queried |
| 485 |
type: str |
| 486 |
sample: ignore |
| 487 |
trigger_asm_irule_event: |
| 488 |
description: |
| 489 |
- Indicates if iRule event is enabled. |
| 490 |
returned: queried |
| 491 |
type: str |
| 492 |
sample: disabled |
| 493 |
inspect_http_uploads: |
| 494 |
description: |
| 495 |
- Specifies whether the system should inspect all HTTP uploads. |
| 496 |
returned: queried |
| 497 |
type: bool |
| 498 |
sample: true |
| 499 |
mask_credit_card_numbers_in_request: |
| 500 |
description: |
| 501 |
- Indicates if the system masks credit card numbers. |
| 502 |
returned: queried |
| 503 |
type: bool |
| 504 |
sample: false |
| 505 |
maximum_http_header_length: |
| 506 |
description: |
| 507 |
- Maximum length of an HTTP header name and value that the system processes. |
| 508 |
returned: queried |
| 509 |
type: int |
| 510 |
sample: 8192 |
| 511 |
use_dynamic_session_id_in_url: |
| 512 |
description: |
| 513 |
- Specifies how the security policy processes URLs that use dynamic sessions. |
| 514 |
returned: queried |
| 515 |
type: bool |
| 516 |
sample: false |
| 517 |
maximum_cookie_header_length: |
| 518 |
description: |
| 519 |
- Maximum length of a cookie header name and value that the system processes. |
| 520 |
returned: queried |
| 521 |
type: int |
| 522 |
sample: 8192 |
| 523 |
application_language: |
| 524 |
description: |
| 525 |
- The language encoding for the web application. |
| 526 |
returned: queried |
| 527 |
type: str |
| 528 |
sample: utf-8 |
| 529 |
disallowed_geolocations: |
| 530 |
description: |
| 531 |
- Displays countries that may not access the web application. |
| 532 |
returned: queried |
| 533 |
type: str |
| 534 |
sample: Argentina |
| 535 |
csrf_protection_enabled: |
| 536 |
description: |
| 537 |
- Specifies if CSRF protection is active on the ASM policy. |
| 538 |
returned: queried |
| 539 |
type: bool |
| 540 |
sample: true |
| 541 |
csrf_protection_ssl_only: |
| 542 |
description: |
| 543 |
- Specifies that only HTTPS URLs will be checked for CSRF protection. |
| 544 |
returned: queried |
| 545 |
type: bool |
| 546 |
sample: true |
| 547 |
csrf_protection_expiration_time_in_seconds: |
| 548 |
description: |
| 549 |
- Specifies how long, in seconds, a configured CSRF token is valid before it expires. |
| 550 |
returned: queried |
| 551 |
type: int |
| 552 |
sample: 600 |
| 553 |
csrf_urls: |
| 554 |
description: |
| 555 |
- Specifies a list of URLs for CSRF token verification. |
| 556 |
- In version 13.0.0 and later, this has become a sub-collection and a list of dictionaries. |
| 557 |
- In version 12.x, this is a list of simple strings. |
| 558 |
returned: queried |
| 559 |
type: complex |
| 560 |
contains: |
| 561 |
csrf_url_required_parameters: |
| 562 |
description: |
| 563 |
- Indicates whether to ignore or require one of the specified parameters is present |
| 564 |
in a request when checking if the URL entry matches the request. |
| 565 |
returned: queried |
| 566 |
type: str |
| 567 |
sample: ignore |
| 568 |
csrf_url_parameters_list: |
| 569 |
description: |
| 570 |
- List of parameters to look for in a request when checking if the URL entry matches the request. |
| 571 |
returned: queried |
| 572 |
type: list |
| 573 |
sample: ['fooparam'] |
| 574 |
csrf_url: |
| 575 |
description: |
| 576 |
- Specifies an URL to protect. |
| 577 |
returned: queried |
| 578 |
type: str |
| 579 |
sample: ['/foo.html'] |
| 580 |
csrf_url_method: |
| 581 |
description: |
| 582 |
- Method for the specified URL. |
| 583 |
returned: queried |
| 584 |
type: str |
| 585 |
sample: POST |
| 586 |
csrf_url_enforcement_action: |
| 587 |
description: |
| 588 |
- Indicates the action specified for the system to take when the URL entry matches. |
| 589 |
returned: queried |
| 590 |
type: str |
| 591 |
sample: none |
| 592 |
csrf_url_id: |
| 593 |
description: |
| 594 |
- Specifies the generated ID for the configured CSRF URL resource. |
| 595 |
returned: queried |
| 596 |
type: str |
| 597 |
sample: l0Ckxe-7yHsXp8U5tTgbFQ |
| 598 |
csrf_url_wildcard_order: |
| 599 |
description: |
| 600 |
- Specifies the order in which the wildcard URLs are enforced. |
| 601 |
returned: queried |
| 602 |
type: str |
| 603 |
sample: 1 |
| 604 |
sample: hash/dictionary of values |
| 605 |
asm_server_technologies: |
| 606 |
description: Detailed information for ASM server technologies present on the device. |
| 607 |
returned: When C(asm-server-technologies) is specified in C(gather_subset). |
| 608 |
type: complex |
| 609 |
contains: |
| 610 |
id: |
| 611 |
description: |
| 612 |
- Displays the generated ID for the server technology resource. |
| 613 |
returned: queried |
| 614 |
type: str |
| 615 |
sample: l0Ckxe-7yHsXp8U5tTgbFQ |
| 616 |
server_technology_name: |
| 617 |
description: |
| 618 |
- Friendly name of the server technology resource. |
| 619 |
returned: queried |
| 620 |
type: str |
| 621 |
sample: Wordpress |
| 622 |
server_technology_references: |
| 623 |
description: |
| 624 |
- List of dictionaries containing API self links of the associated technology resources. |
| 625 |
returned: queried |
| 626 |
type: complex |
| 627 |
contains: |
| 628 |
link: |
| 629 |
description: |
| 630 |
- A self link to an associated server technology. |
| 631 |
returned: queried |
| 632 |
type: str |
| 633 |
sample: https://localhost/mgmt/tm/asm/server-technologies/NQG7CT02OBC2cQWbnP7T-A?ver=13.1.0 |
| 634 |
sample: hash/dictionary of values |
| 635 |
asm_signature_sets: |
| 636 |
description: Detailed information for ASM signature sets present on device. |
| 637 |
returned: When C(asm-signature-sets) is specified in C(gather_subset). |
| 638 |
type: complex |
| 639 |
contains: |
| 640 |
name: |
| 641 |
description: |
| 642 |
- Name of the signature set. |
| 643 |
returned: queried |
| 644 |
type: str |
| 645 |
sample: WebSphere signatures |
| 646 |
id: |
| 647 |
description: |
| 648 |
- Displays the generated ID for the signature set resource. |
| 649 |
returned: queried |
| 650 |
type: str |
| 651 |
sample: l0Ckxe-7yHsXp8U5tTgbFQ |
| 652 |
type: |
| 653 |
description: |
| 654 |
- The method used to select signatures to be a part of the signature set. |
| 655 |
returned: queried |
| 656 |
type: str |
| 657 |
sample: filter-based |
| 658 |
category: |
| 659 |
description: |
| 660 |
- Displays the category of the signature set. |
| 661 |
returned: queried |
| 662 |
type: str |
| 663 |
sample: filter-based |
| 664 |
is_user_defined: |
| 665 |
description: |
| 666 |
- Specifies this signature set was added by a user. |
| 667 |
returned: queried |
| 668 |
type: bool |
| 669 |
sample: false |
| 670 |
assign_to_policy_by_default: |
| 671 |
description: |
| 672 |
- Indicates whether the system assigns this signature set to a new created security policy by default. |
| 673 |
returned: queried |
| 674 |
type: bool |
| 675 |
sample: true |
| 676 |
default_alarm: |
| 677 |
description: |
| 678 |
- Displays whether the security policy logs the request data in the Statistics |
| 679 |
screen if a request matches a signature that is included in the signature set. |
| 680 |
returned: queried |
| 681 |
type: bool |
| 682 |
sample: true |
| 683 |
default_block: |
| 684 |
description: |
| 685 |
- When the security policy enforcement mode is Blocking, displays |
| 686 |
how the system treats requests that match a signature included in the signature set. |
| 687 |
returned: queried |
| 688 |
type: bool |
| 689 |
sample: true |
| 690 |
default_learn: |
| 691 |
description: |
| 692 |
- Displays whether the security policy learns all requests that match a signature |
| 693 |
that is included in the signature set. |
| 694 |
returned: queried |
| 695 |
type: bool |
| 696 |
sample: true |
| 697 |
sample: hash/dictionary of values |
| 698 |
client_ssl_profiles: |
| 699 |
description: Client SSL Profile related information. |
| 700 |
returned: When C(client-ssl-profiles) is specified in C(gather_subset). |
| 701 |
type: complex |
| 702 |
contains: |
| 703 |
full_path: |
| 704 |
description: |
| 705 |
- Full name of the resource as known to the BIG-IP. |
| 706 |
returned: queried |
| 707 |
type: str |
| 708 |
sample: /Common/bigip02.internal |
| 709 |
name: |
| 710 |
description: |
| 711 |
- Relative name of the resource in the BIG-IP. |
| 712 |
returned: queried |
| 713 |
type: str |
| 714 |
sample: bigip02.internal |
| 715 |
alert_timeout: |
| 716 |
description: |
| 717 |
- Maximum time period, in seconds, to keep the SSL session active after an alert |
| 718 |
message is sent, or indefinite. |
| 719 |
returned: queried |
| 720 |
type: int |
| 721 |
sample: 0 |
| 722 |
allow_non_ssl: |
| 723 |
description: |
| 724 |
- Enables or disables non-SSL connections. |
| 725 |
returned: queried |
| 726 |
type: bool |
| 727 |
sample: true |
| 728 |
authenticate_depth: |
| 729 |
description: |
| 730 |
- Specifies the authenticate depth. This is the client certificate chain maximum traversal depth. |
| 731 |
returned: queried |
| 732 |
type: int |
| 733 |
sample: 9 |
| 734 |
authenticate_frequency: |
| 735 |
description: |
| 736 |
- Specifies how often the system authenticates a user. |
| 737 |
returned: queried |
| 738 |
type: str |
| 739 |
sample: once |
| 740 |
ca_file: |
| 741 |
description: |
| 742 |
- Specifies the certificate authority (CA) file name. |
| 743 |
returned: queried |
| 744 |
type: str |
| 745 |
sample: /Common/default-ca.crt |
| 746 |
cache_size: |
| 747 |
description: |
| 748 |
- Specifies the SSL session cache size. |
| 749 |
returned: queried |
| 750 |
type: int |
| 751 |
sample: 262144 |
| 752 |
cache_timeout: |
| 753 |
description: |
| 754 |
- Specifies the SSL session cache timeout value. |
| 755 |
returned: queried |
| 756 |
type: int |
| 757 |
sample: 3600 |
| 758 |
certificate_file: |
| 759 |
description: |
| 760 |
- Specifies the name of the certificate installed on the traffic |
| 761 |
management system for the purpose of terminating or initiating |
| 762 |
an SSL connection. |
| 763 |
returned: queried |
| 764 |
type: str |
| 765 |
sample: /Common/default.crt |
| 766 |
key_file: |
| 767 |
description: |
| 768 |
- Specifies the name of the key installed on the traffic |
| 769 |
management system for the purpose of terminating or initiating |
| 770 |
an SSL connection. |
| 771 |
returned: queried |
| 772 |
type: str |
| 773 |
sample: /Common/default.key |
| 774 |
chain_file: |
| 775 |
description: |
| 776 |
- Specifies or builds a certificate chain file that a client can |
| 777 |
use to authenticate the profile. |
| 778 |
returned: queried |
| 779 |
type: str |
| 780 |
sample: /Common/ca-chain.crt |
| 781 |
ciphers: |
| 782 |
description: |
| 783 |
- Specifies a list of cipher names. |
| 784 |
returned: queried |
| 785 |
type: str |
| 786 |
sample: ['DEFAULT'] |
| 787 |
crl_file: |
| 788 |
description: |
| 789 |
- Specifies the certificate revocation list file name. |
| 790 |
returned: queried |
| 791 |
type: str |
| 792 |
sample: /Common/default.crl |
| 793 |
parent: |
| 794 |
description: |
| 795 |
- Parent of the profile |
| 796 |
returned: queried |
| 797 |
type: str |
| 798 |
sample: /Common/clientssl |
| 799 |
description: |
| 800 |
description: |
| 801 |
- Description of the profile. |
| 802 |
returned: queried |
| 803 |
type: str |
| 804 |
sample: My profile |
| 805 |
modssl_methods: |
| 806 |
description: |
| 807 |
- Enables or disables ModSSL method emulation. |
| 808 |
returned: queried |
| 809 |
type: bool |
| 810 |
sample: false |
| 811 |
peer_certification_mode: |
| 812 |
description: |
| 813 |
- Specifies the peer certificate mode. |
| 814 |
returned: queried |
| 815 |
type: str |
| 816 |
sample: ignore |
| 817 |
sni_require: |
| 818 |
description: |
| 819 |
- When this option is C(true), a client connection that does not |
| 820 |
specify a known server name or does not support SNI extension will |
| 821 |
be rejected. |
| 822 |
returned: queried |
| 823 |
type: bool |
| 824 |
sample: false |
| 825 |
sni_default: |
| 826 |
description: |
| 827 |
- When C(true), this profile is the default SSL profile when the server |
| 828 |
name in a client connection does not match any configured server |
| 829 |
names, or a client connection does not specify any server name at |
| 830 |
all. |
| 831 |
returned: queried |
| 832 |
type: bool |
| 833 |
sample: true |
| 834 |
strict_resume: |
| 835 |
description: |
| 836 |
- Enables or disables strict-resume. |
| 837 |
returned: queried |
| 838 |
type: bool |
| 839 |
sample: true |
| 840 |
profile_mode_enabled: |
| 841 |
description: |
| 842 |
- Specifies the profile mode, which enables or disables SSL |
| 843 |
processing. |
| 844 |
returned: queried |
| 845 |
type: bool |
| 846 |
sample: true |
| 847 |
renegotiation_maximum_record_delay: |
| 848 |
description: |
| 849 |
- Maximum number of SSL records that the traffic |
| 850 |
management system can receive before it renegotiates an SSL |
| 851 |
session. |
| 852 |
returned: queried |
| 853 |
type: int |
| 854 |
sample: 0 |
| 855 |
renegotiation_period: |
| 856 |
description: |
| 857 |
- Number of seconds required to renegotiate an SSL |
| 858 |
session. |
| 859 |
returned: queried |
| 860 |
type: int |
| 861 |
sample: 0 |
| 862 |
renegotiation: |
| 863 |
description: |
| 864 |
- Specifies whether renegotiations are enabled. |
| 865 |
returned: queried |
| 866 |
type: bool |
| 867 |
sample: true |
| 868 |
server_name: |
| 869 |
description: |
| 870 |
- Specifies the server names to be matched with SNI (server name |
| 871 |
indication) extension information in ClientHello from a client |
| 872 |
connection. |
| 873 |
returned: queried |
| 874 |
type: str |
| 875 |
sample: bigip01 |
| 876 |
session_ticket: |
| 877 |
description: |
| 878 |
- Enables or disables session-ticket. |
| 879 |
returned: queried |
| 880 |
type: bool |
| 881 |
sample: false |
| 882 |
unclean_shutdown: |
| 883 |
description: |
| 884 |
- Whether to force the SSL profile to perform a clean shutdown of all SSL |
| 885 |
connections or not |
| 886 |
returned: queried |
| 887 |
type: bool |
| 888 |
sample: false |
| 889 |
retain_certificate: |
| 890 |
description: |
| 891 |
- APM module requires storing certificate in SSL session. When |
| 892 |
C(false), certificate will not be stored in SSL session. |
| 893 |
returned: queried |
| 894 |
type: bool |
| 895 |
sample: true |
| 896 |
secure_renegotiation_mode: |
| 897 |
description: |
| 898 |
- Specifies the secure renegotiation mode. |
| 899 |
returned: queried |
| 900 |
type: str |
| 901 |
sample: require |
| 902 |
handshake_timeout: |
| 903 |
description: |
| 904 |
- Specifies the handshake timeout in seconds. |
| 905 |
returned: queried |
| 906 |
type: int |
| 907 |
sample: 10 |
| 908 |
forward_proxy_certificate_extension_include: |
| 909 |
description: |
| 910 |
- Specifies the extensions of the web server certificates to be |
| 911 |
included in the generated certificates using SSL Forward Proxy. |
| 912 |
returned: queried |
| 913 |
type: list |
| 914 |
sample: ["basic-constraints", "subject-alternative-name"] |
| 915 |
forward_proxy_certificate_lifespan: |
| 916 |
description: |
| 917 |
- Specifies the lifespan of the certificate generated using the SSL |
| 918 |
forward proxy feature. |
| 919 |
returned: queried |
| 920 |
type: int |
| 921 |
sample: 30 |
| 922 |
forward_proxy_lookup_by_ipaddr_port: |
| 923 |
description: |
| 924 |
- Specifies whether to perform certificate look up by IP address and |
| 925 |
port number. |
| 926 |
returned: queried |
| 927 |
type: bool |
| 928 |
sample: false |
| 929 |
forward_proxy_enabled: |
| 930 |
description: |
| 931 |
- Enables or disables SSL forward proxy feature. |
| 932 |
returned: queried |
| 933 |
type: bool |
| 934 |
sample: true |
| 935 |
forward_proxy_ca_passphrase: |
| 936 |
description: |
| 937 |
- Specifies the passphrase of the key file that is used as the |
| 938 |
certification authority key when SSL forward proxy feature is |
| 939 |
enabled. |
| 940 |
returned: queried |
| 941 |
type: str |
| 942 |
forward_proxy_ca_certificate_file: |
| 943 |
description: |
| 944 |
- Specifies the name of the certificate file that is used as the |
| 945 |
certification authority certificate when SSL forward proxy feature |
| 946 |
is enabled. |
| 947 |
returned: queried |
| 948 |
type: str |
| 949 |
forward_proxy_ca_key_file: |
| 950 |
description: |
| 951 |
- Specifies the name of the key file that is used as the |
| 952 |
certification authority key when SSL forward proxy feature is |
| 953 |
enabled. |
| 954 |
returned: queried |
| 955 |
type: str |
| 956 |
sample: hash/dictionary of values |
| 957 |
devices: |
| 958 |
description: Device related information. |
| 959 |
returned: When C(devices) is specified in C(gather_subset). |
| 960 |
type: complex |
| 961 |
contains: |
| 962 |
full_path: |
| 963 |
description: |
| 964 |
- Full name of the resource as known to the BIG-IP. |
| 965 |
returned: queried |
| 966 |
type: str |
| 967 |
sample: /Common/bigip02.internal |
| 968 |
name: |
| 969 |
description: |
| 970 |
- Relative name of the resource in the BIG-IP. |
| 971 |
returned: queried |
| 972 |
type: str |
| 973 |
sample: bigip02.internal |
| 974 |
active_modules: |
| 975 |
description: |
| 976 |
- The currently licensed and provisioned modules on the device. |
| 977 |
returned: queried |
| 978 |
type: list |
| 979 |
sample: ["DNS Services (LAB)", "PSM, VE"] |
| 980 |
base_mac_address: |
| 981 |
description: |
| 982 |
- Media Access Control address (MAC address) of the device. |
| 983 |
returned: queried |
| 984 |
type: str |
| 985 |
sample: "fa:16:3e:c3:42:6f" |
| 986 |
build: |
| 987 |
description: |
| 988 |
- The minor version information of the total product version. |
| 989 |
returned: queried |
| 990 |
type: str |
| 991 |
sample: 0.0.1 |
| 992 |
chassis_id: |
| 993 |
description: |
| 994 |
- Serial number of the device. |
| 995 |
returned: queried |
| 996 |
type: str |
| 997 |
sample: 11111111-2222-3333-444444444444 |
| 998 |
chassis_type: |
| 999 |
description: |
| 1000 |
- Displays the chassis type. The possible values are C(individual) and C(viprion). |
| 1001 |
returned: queried |
| 1002 |
type: str |
| 1003 |
sample: individual |
| 1004 |
comment: |
| 1005 |
description: |
| 1006 |
- User comments about the device. |
| 1007 |
returned: queried |
| 1008 |
type: str |
| 1009 |
sample: My device |
| 1010 |
configsync_address: |
| 1011 |
description: |
| 1012 |
- IP address used for configuration synchronization. |
| 1013 |
returned: queried |
| 1014 |
type: str |
| 1015 |
sample: 10.10.10.10 |
| 1016 |
contact: |
| 1017 |
description: |
| 1018 |
- Administrator contact information. |
| 1019 |
returned: queried |
| 1020 |
type: str |
| 1021 |
sample: The User |
| 1022 |
description: |
| 1023 |
description: |
| 1024 |
- Description of the device. |
| 1025 |
returned: queried |
| 1026 |
type: str |
| 1027 |
sample: My device |
| 1028 |
edition: |
| 1029 |
description: |
| 1030 |
- Displays the software edition. |
| 1031 |
returned: queried |
| 1032 |
type: str |
| 1033 |
sample: Point Release 7 |
| 1034 |
failover_state: |
| 1035 |
description: |
| 1036 |
- Device failover state. |
| 1037 |
returned: queried |
| 1038 |
type: str |
| 1039 |
sample: active |
| 1040 |
hostname: |
| 1041 |
description: |
| 1042 |
- Device hostname |
| 1043 |
returned: queried |
| 1044 |
type: str |
| 1045 |
sample: bigip02.internal |
| 1046 |
location: |
| 1047 |
description: |
| 1048 |
- Specifies the physical location of the device. |
| 1049 |
returned: queried |
| 1050 |
type: str |
| 1051 |
sample: London |
| 1052 |
management_address: |
| 1053 |
description: |
| 1054 |
- IP address of the management interface. |
| 1055 |
returned: queried |
| 1056 |
type: str |
| 1057 |
sample: 3.3.3.3 |
| 1058 |
marketing_name: |
| 1059 |
description: |
| 1060 |
- Marketing name of the device platform. |
| 1061 |
returned: queried |
| 1062 |
type: str |
| 1063 |
sample: BIG-IP Virtual Edition |
| 1064 |
multicast_address: |
| 1065 |
description: |
| 1066 |
- Specifies the multicast IP address used for failover. |
| 1067 |
returned: queried |
| 1068 |
type: str |
| 1069 |
sample: 4.4.4.4 |
| 1070 |
optional_modules: |
| 1071 |
description: |
| 1072 |
- Modules that are available for the current platform, but are not currently licensed. |
| 1073 |
returned: queried |
| 1074 |
type: list |
| 1075 |
sample: ["App Mode (TMSH Only, No Root/Bash)", "BIG-IP VE, Multicast Routing"] |
| 1076 |
platform_id: |
| 1077 |
description: |
| 1078 |
- Displays the device platform identifier. |
| 1079 |
returned: queried |
| 1080 |
type: str |
| 1081 |
sample: Z100 |
| 1082 |
primary_mirror_address: |
| 1083 |
description: |
| 1084 |
- Specifies the IP address used for state mirroring. |
| 1085 |
returned: queried |
| 1086 |
type: str |
| 1087 |
sample: 5.5.5.5 |
| 1088 |
product: |
| 1089 |
description: |
| 1090 |
- Displays the software product name. |
| 1091 |
returned: queried |
| 1092 |
type: str |
| 1093 |
sample: BIG-IP |
| 1094 |
secondary_mirror_address: |
| 1095 |
description: |
| 1096 |
- Secondary IP address used for state mirroring. |
| 1097 |
returned: queried |
| 1098 |
type: str |
| 1099 |
sample: 2.2.2.2 |
| 1100 |
self: |
| 1101 |
description: |
| 1102 |
- Whether or not this device is the one that was queried for information. |
| 1103 |
returned: queried |
| 1104 |
type: bool |
| 1105 |
sample: true |
| 1106 |
software_version: |
| 1107 |
description: |
| 1108 |
- Displays the software version number. |
| 1109 |
returned: queried |
| 1110 |
type: str |
| 1111 |
sample: 13.1.0.7 |
| 1112 |
timelimited_modules: |
| 1113 |
description: |
| 1114 |
- Displays the licensed modules that are time-limited. |
| 1115 |
returned: queried |
| 1116 |
type: list |
| 1117 |
sample: ["IP Intelligence, 3Yr, ...", "PEM URL Filtering, 3Yr, ..."] |
| 1118 |
timezone: |
| 1119 |
description: |
| 1120 |
- Displays the time zone configured on the device. |
| 1121 |
returned: queried |
| 1122 |
type: str |
| 1123 |
sample: UTC |
| 1124 |
unicast_addresses: |
| 1125 |
description: |
| 1126 |
- Specifies the entire set of unicast addresses used for failover. |
| 1127 |
returned: queried |
| 1128 |
type: complex |
| 1129 |
contains: |
| 1130 |
effective_ip: |
| 1131 |
description: |
| 1132 |
- The IP address that peers can use to reach this unicast address IP. |
| 1133 |
returned: queried |
| 1134 |
type: str |
| 1135 |
sample: 5.4.3.5 |
| 1136 |
effective_port: |
| 1137 |
description: |
| 1138 |
- The port that peers can use to reach this unicast address. |
| 1139 |
returned: queried |
| 1140 |
type: int |
| 1141 |
sample: 1026 |
| 1142 |
ip: |
| 1143 |
description: |
| 1144 |
- The IP address the failover daemon will listen on for packets from its peers. |
| 1145 |
returned: queried |
| 1146 |
type: str |
| 1147 |
sample: 5.4.3.5 |
| 1148 |
port: |
| 1149 |
description: |
| 1150 |
- The IP port the failover daemon uses to accept packets from its peers. |
| 1151 |
returned: queried |
| 1152 |
type: int |
| 1153 |
sample: 1026 |
| 1154 |
sample: hash/dictionary of values |
| 1155 |
device_groups: |
| 1156 |
description: Device group related information. |
| 1157 |
returned: When C(device-groups) is specified in C(gather_subset). |
| 1158 |
type: complex |
| 1159 |
contains: |
| 1160 |
full_path: |
| 1161 |
description: |
| 1162 |
- Full name of the resource as known to the BIG-IP. |
| 1163 |
returned: queried |
| 1164 |
type: str |
| 1165 |
sample: /Common/fasthttp |
| 1166 |
name: |
| 1167 |
description: |
| 1168 |
- Relative name of the resource in the BIG-IP. |
| 1169 |
returned: queried |
| 1170 |
type: str |
| 1171 |
sample: fasthttp |
| 1172 |
autosync_enabled: |
| 1173 |
description: |
| 1174 |
- Whether the device group automatically synchronizes configuration data to its members. |
| 1175 |
returned: queried |
| 1176 |
type: bool |
| 1177 |
sample: false |
| 1178 |
description: |
| 1179 |
description: |
| 1180 |
- Description of the device group. |
| 1181 |
returned: queried |
| 1182 |
type: str |
| 1183 |
sample: My device group |
| 1184 |
devices: |
| 1185 |
description: |
| 1186 |
- List of devices in the group. Devices are listed by their C(full_path). |
| 1187 |
returned: queried |
| 1188 |
type: list |
| 1189 |
sample: [/Common/bigip02.internal] |
| 1190 |
full_load_on_sync: |
| 1191 |
description: |
| 1192 |
- Specifies the entire configuration for a device group is sent when configuration |
| 1193 |
synchronization is performed. |
| 1194 |
returned: queried |
| 1195 |
type: bool |
| 1196 |
sample: true |
| 1197 |
incremental_config_sync_size_maximum: |
| 1198 |
description: |
| 1199 |
- Specifies the maximum size (in KB) to devote to incremental config sync cached transactions. |
| 1200 |
returned: queried |
| 1201 |
type: int |
| 1202 |
sample: 1024 |
| 1203 |
network_failover_enabled: |
| 1204 |
description: |
| 1205 |
- Specifies whether network failover is used. |
| 1206 |
returned: queried |
| 1207 |
type: bool |
| 1208 |
sample: true |
| 1209 |
type: |
| 1210 |
description: |
| 1211 |
- Specifies the type of device group. |
| 1212 |
returned: queried |
| 1213 |
type: str |
| 1214 |
sample: sync-only |
| 1215 |
asm_sync_enabled: |
| 1216 |
description: |
| 1217 |
- Specifies whether to synchronize ASM configurations of device group members. |
| 1218 |
returned: queried |
| 1219 |
type: bool |
| 1220 |
sample: true |
| 1221 |
sample: hash/dictionary of values |
| 1222 |
external_monitors: |
| 1223 |
description: External monitor related information. |
| 1224 |
returned: When C(external-monitors) is specified in C(gather_subset). |
| 1225 |
type: complex |
| 1226 |
contains: |
| 1227 |
full_path: |
| 1228 |
description: |
| 1229 |
- Full name of the resource as known to the BIG-IP. |
| 1230 |
returned: queried |
| 1231 |
type: str |
| 1232 |
sample: /Common/external |
| 1233 |
name: |
| 1234 |
description: |
| 1235 |
- Relative name of the resource in the BIG-IP. |
| 1236 |
returned: queried |
| 1237 |
type: str |
| 1238 |
sample: external |
| 1239 |
parent: |
| 1240 |
description: |
| 1241 |
- Profile from which this profile inherits settings. |
| 1242 |
returned: queried |
| 1243 |
type: str |
| 1244 |
sample: external |
| 1245 |
description: |
| 1246 |
description: |
| 1247 |
- Description of the resource. |
| 1248 |
returned: queried |
| 1249 |
type: str |
| 1250 |
sample: My monitor |
| 1251 |
destination: |
| 1252 |
description: |
| 1253 |
- Specifies the IP address and service port of the resource that is |
| 1254 |
the destination of this monitor. |
| 1255 |
returned: queried |
| 1256 |
type: str |
| 1257 |
sample: "*:*" |
| 1258 |
args: |
| 1259 |
description: |
| 1260 |
- Specifies any command-line arguments the script requires. |
| 1261 |
returned: queried |
| 1262 |
type: str |
| 1263 |
sample: arg1 arg2 arg3 |
| 1264 |
external_program: |
| 1265 |
description: |
| 1266 |
- Specifies the name of the file for the monitor to use. |
| 1267 |
returned: queried |
| 1268 |
type: str |
| 1269 |
sample: /Common/arg_example |
| 1270 |
variables: |
| 1271 |
description: |
| 1272 |
- Specifies any variables the script requires. |
| 1273 |
type: dict |
| 1274 |
sample: { "key1": "val", "key_2": "val 2" } |
| 1275 |
interval: |
| 1276 |
description: |
| 1277 |
- Specifies, in seconds, the frequency at which the system issues |
| 1278 |
the monitor check when either the resource is down or the status |
| 1279 |
of the resource is unknown. |
| 1280 |
returned: queried |
| 1281 |
type: int |
| 1282 |
sample: 5 |
| 1283 |
manual_resume: |
| 1284 |
description: |
| 1285 |
- Specifies whether the system automatically changes the status of a |
| 1286 |
resource to B(up) at the next successful monitor check. |
| 1287 |
returned: queried |
| 1288 |
type: bool |
| 1289 |
sample: true |
| 1290 |
time_until_up: |
| 1291 |
description: |
| 1292 |
- Specifies the amount of time, in seconds, after the first |
| 1293 |
successful response before a node is marked up. |
| 1294 |
returned: queried |
| 1295 |
type: int |
| 1296 |
sample: 0 |
| 1297 |
timeout: |
| 1298 |
description: |
| 1299 |
- Specifies the number of seconds the target has in which to respond |
| 1300 |
to the monitor request. |
| 1301 |
returned: queried |
| 1302 |
type: int |
| 1303 |
sample: 16 |
| 1304 |
up_interval: |
| 1305 |
description: |
| 1306 |
- Specifies, in seconds, the frequency at which the system issues |
| 1307 |
the monitor check when the resource is up. |
| 1308 |
returned: queried |
| 1309 |
type: int |
| 1310 |
sample: 0 |
| 1311 |
sample: hash/dictionary of values |
| 1312 |
fasthttp_profiles: |
| 1313 |
description: FastHTTP profile related information. |
| 1314 |
returned: When C(fasthttp-profiles) is specified in C(gather_subset). |
| 1315 |
type: complex |
| 1316 |
contains: |
| 1317 |
full_path: |
| 1318 |
description: |
| 1319 |
- Full name of the resource as known to the BIG-IP. |
| 1320 |
returned: queried |
| 1321 |
type: str |
| 1322 |
sample: /Common/fasthttp |
| 1323 |
name: |
| 1324 |
description: |
| 1325 |
- Relative name of the resource in the BIG-IP. |
| 1326 |
returned: queried |
| 1327 |
type: str |
| 1328 |
sample: fasthttp |
| 1329 |
client_close_timeout: |
| 1330 |
description: |
| 1331 |
- Number of seconds after which the system closes a client connection, when |
| 1332 |
the system either receives a client FIN packet or sends a FIN packet to the client. |
| 1333 |
returned: queried |
| 1334 |
type: int |
| 1335 |
sample: 5 |
| 1336 |
oneconnect_idle_timeout_override: |
| 1337 |
description: |
| 1338 |
- Number of seconds after which a server-side connection in a OneConnect pool |
| 1339 |
is eligible for deletion, when the connection has no traffic. |
| 1340 |
returned: queried |
| 1341 |
type: int |
| 1342 |
sample: 0 |
| 1343 |
oneconnect_maximum_reuse: |
| 1344 |
description: |
| 1345 |
- Maximum number of times the system can re-use a current connection. |
| 1346 |
returned: queried |
| 1347 |
type: int |
| 1348 |
sample: 0 |
| 1349 |
oneconnect_maximum_pool_size: |
| 1350 |
description: |
| 1351 |
- Maximum number of connections to a load balancing pool. |
| 1352 |
returned: queried |
| 1353 |
type: int |
| 1354 |
sample: 2048 |
| 1355 |
oneconnect_minimum_pool_size: |
| 1356 |
description: |
| 1357 |
- Minimum number of connections to a load balancing pool. |
| 1358 |
returned: queried |
| 1359 |
type: int |
| 1360 |
sample: 0 |
| 1361 |
oneconnect_replenish': |
| 1362 |
description: |
| 1363 |
- When C(true), specifies the system will not keep a steady-state maximum of |
| 1364 |
connections to the back-end, unless the number of connections to the pool have |
| 1365 |
dropped beneath the C(minimum_pool_size) specified in the profile. |
| 1366 |
returned: queried |
| 1367 |
type: bool |
| 1368 |
sample: true |
| 1369 |
oneconnect_ramp_up_increment: |
| 1370 |
description: |
| 1371 |
- The increment in which the system makes additional connections available, when |
| 1372 |
all available connections are in use. |
| 1373 |
returned: queried |
| 1374 |
type: int |
| 1375 |
sample: 4 |
| 1376 |
parent: |
| 1377 |
description: |
| 1378 |
- Profile from which this profile inherits settings. |
| 1379 |
returned: queried |
| 1380 |
type: str |
| 1381 |
sample: fasthttp |
| 1382 |
description: |
| 1383 |
description: |
| 1384 |
- Description of the resource. |
| 1385 |
returned: queried |
| 1386 |
type: str |
| 1387 |
sample: My profile |
| 1388 |
force_http_1_0_response: |
| 1389 |
description: |
| 1390 |
- When C(true), specifies the server sends responses to clients in the HTTP/1.0 |
| 1391 |
format. |
| 1392 |
returned: queried |
| 1393 |
type: bool |
| 1394 |
sample: false |
| 1395 |
request_header_insert: |
| 1396 |
description: |
| 1397 |
- A string the system inserts as a header in an HTTP request. If the header |
| 1398 |
already exists, the system does not replace it. |
| 1399 |
returned: queried |
| 1400 |
type: str |
| 1401 |
sample: "X-F5-Authentication: foo" |
| 1402 |
http_1_1_close_workarounds: |
| 1403 |
description: |
| 1404 |
- When C(true), specifies the server uses workarounds for HTTP 1.1 close issues. |
| 1405 |
returned: queried |
| 1406 |
type: bool |
| 1407 |
sample: false |
| 1408 |
idle_timeout: |
| 1409 |
description: |
| 1410 |
- Length of time that a connection is idle (has no traffic) before the connection |
| 1411 |
is eligible for deletion. |
| 1412 |
returned: queried |
| 1413 |
type: int |
| 1414 |
sample: 300 |
| 1415 |
insert_xforwarded_for: |
| 1416 |
description: |
| 1417 |
- Whether the system inserts the X-Forwarded-For header in an HTTP request with the |
| 1418 |
client IP address, to use with connection pooling. |
| 1419 |
returned: queried |
| 1420 |
type: bool |
| 1421 |
sample: false |
| 1422 |
maximum_header_size: |
| 1423 |
description: |
| 1424 |
- Maximum amount of HTTP header data the system buffers before making a load |
| 1425 |
balancing decision. |
| 1426 |
returned: queried |
| 1427 |
type: int |
| 1428 |
sample: 32768 |
| 1429 |
maximum_requests: |
| 1430 |
description: |
| 1431 |
- Maximum number of requests the system can receive on a client-side connection, |
| 1432 |
before the system closes the connection. |
| 1433 |
returned: queried |
| 1434 |
type: int |
| 1435 |
sample: 0 |
| 1436 |
maximum_segment_size_override: |
| 1437 |
description: |
| 1438 |
- Maximum segment size (MSS) override for server-side connections. |
| 1439 |
returned: queried |
| 1440 |
type: int |
| 1441 |
sample: 0 |
| 1442 |
receive_window_size: |
| 1443 |
description: |
| 1444 |
- Amount of data the BIG-IP system can accept without acknowledging the server. |
| 1445 |
returned: queried |
| 1446 |
type: int |
| 1447 |
sample: 0 |
| 1448 |
reset_on_timeout: |
| 1449 |
description: |
| 1450 |
- When C(true), specifies the system sends a reset packet (RST) in addition to |
| 1451 |
deleting the connection, when a connection exceeds the idle timeout value. |
| 1452 |
returned: queried |
| 1453 |
type: bool |
| 1454 |
sample: true |
| 1455 |
server_close_timeout: |
| 1456 |
description: |
| 1457 |
- Number of seconds after which the system closes a client connection, when the system |
| 1458 |
either receives a server FIN packet or sends a FIN packet to the server. |
| 1459 |
returned: queried |
| 1460 |
type: int |
| 1461 |
sample: 5 |
| 1462 |
server_sack: |
| 1463 |
description: |
| 1464 |
- Whether the BIG-IP system processes Selective ACK (Sack) packets in cookie responses |
| 1465 |
from the server. |
| 1466 |
returned: queried |
| 1467 |
type: bool |
| 1468 |
sample: false |
| 1469 |
server_timestamp: |
| 1470 |
description: |
| 1471 |
- Whether the BIG-IP system processes timestamp request packets in cookie responses |
| 1472 |
from the server. |
| 1473 |
returned: queried |
| 1474 |
type: bool |
| 1475 |
sample: false |
| 1476 |
unclean_shutdown: |
| 1477 |
description: |
| 1478 |
- How the system handles closing connections. Values provided may be C(enabled), C(disabled), |
| 1479 |
or C(fast). |
| 1480 |
returned: queried |
| 1481 |
type: str |
| 1482 |
sample: enabled |
| 1483 |
sample: hash/dictionary of values |
| 1484 |
fastl4_profiles: |
| 1485 |
description: FastL4 profile related information. |
| 1486 |
returned: When C(fastl4-profiles) is specified in C(gather_subset). |
| 1487 |
type: complex |
| 1488 |
contains: |
| 1489 |
full_path: |
| 1490 |
description: |
| 1491 |
- Full name of the resource as known to the BIG-IP. |
| 1492 |
returned: queried |
| 1493 |
type: str |
| 1494 |
sample: /Common/fastl4 |
| 1495 |
name: |
| 1496 |
description: |
| 1497 |
- Relative name of the resource in the BIG-IP. |
| 1498 |
returned: queried |
| 1499 |
type: str |
| 1500 |
sample: fastl4 |
| 1501 |
client_timeout: |
| 1502 |
description: |
| 1503 |
- Specifies late binding client timeout in seconds. |
| 1504 |
- This is the number of seconds allowed for a client to transmit enough data to |
| 1505 |
select a server pool. |
| 1506 |
- If this timeout expires, the timeout-recovery option dictates whether |
| 1507 |
to drop the connection or fallback to the normal FastL4 load balancing method |
| 1508 |
to pick a server pool. |
| 1509 |
returned: queried |
| 1510 |
type: int |
| 1511 |
sample: 30 |
| 1512 |
parent: |
| 1513 |
description: |
| 1514 |
- Profile from which this profile inherits settings. |
| 1515 |
returned: queried |
| 1516 |
type: str |
| 1517 |
sample: fastl4 |
| 1518 |
description: |
| 1519 |
description: |
| 1520 |
- Description of the resource. |
| 1521 |
returned: queried |
| 1522 |
type: str |
| 1523 |
sample: My profile |
| 1524 |
explicit_flow_migration: |
| 1525 |
description: |
| 1526 |
- Specifies whether to have the iRule code determine exactly when |
| 1527 |
the FIX stream drops down to the ePVA hardware. |
| 1528 |
returned: queried |
| 1529 |
type: bool |
| 1530 |
sample: true |
| 1531 |
hardware_syn_cookie: |
| 1532 |
description: |
| 1533 |
- Enables or disables hardware SYN cookie support when PVA10 is present on the system. |
| 1534 |
- This option is deprecated in version 13.0.0 and is replaced by C(syn-cookie-enable). |
| 1535 |
returned: queried |
| 1536 |
type: bool |
| 1537 |
sample: false |
| 1538 |
idle_timeout: |
| 1539 |
description: |
| 1540 |
- Specifies the number of seconds a connection is idle before the connection is |
| 1541 |
eligible for deletion. |
| 1542 |
- Values are in the range of 0 to 4294967295 (inclusive). |
| 1543 |
- C(0) is equivalent to the TMUI value "immediate". |
| 1544 |
- C(4294967295) is equivalent to the TMUI value "indefinite". |
| 1545 |
returned: queried |
| 1546 |
type: int |
| 1547 |
sample: 300 |
| 1548 |
dont_fragment_flag: |
| 1549 |
description: |
| 1550 |
- Describes the Don't Fragment (DF) bit setting in the IP Header of |
| 1551 |
the outgoing TCP packet. |
| 1552 |
- When C(pmtu), sets the outgoing IP Header DF bit based on the IP pmtu |
| 1553 |
setting(tm.pathmtudiscovery). |
| 1554 |
- When C(preserve), sets the outgoing packet's IP Header DF bit to be the same as |
| 1555 |
the incoming IP Header DF bit. |
| 1556 |
- When C(set), sets the outgoing packet's IP Header DF bit. |
| 1557 |
- When C(clear), clears the outgoing packet's IP Header DF bit. |
| 1558 |
returned: queried |
| 1559 |
type: str |
| 1560 |
sample: pmtu |
| 1561 |
ip_tos_to_client: |
| 1562 |
description: |
| 1563 |
- Specifies an IP Type of Service (ToS) number for the client-side. |
| 1564 |
- This option specifies the ToS level the traffic management |
| 1565 |
system assigns to IP packets when sending them to clients. |
| 1566 |
returned: queried |
| 1567 |
type: str |
| 1568 |
sample: 200 |
| 1569 |
ip_tos_to_server: |
| 1570 |
description: |
| 1571 |
- Specifies an IP ToS number for the server side. |
| 1572 |
- This option specifies the ToS level the traffic management system assigns |
| 1573 |
to IP packets when sending them to servers. |
| 1574 |
returned: queried |
| 1575 |
type: str |
| 1576 |
sample: pass-through |
| 1577 |
ttl_mode: |
| 1578 |
description: |
| 1579 |
- Describes the outgoing TCP packet's IP Header TTL mode. |
| 1580 |
- When C(proxy), sets the outgoing IP Header TTL value to 255/64 for IPv4/IPv6 |
| 1581 |
respectively. |
| 1582 |
- When C(preserve), sets the outgoing IP Header TTL value to be same as the |
| 1583 |
incoming IP Header TTL value. |
| 1584 |
- When C(decrement), sets the outgoing IP Header TTL value to be one less than |
| 1585 |
the incoming TTL value. |
| 1586 |
- When C(set), sets the outgoing IP Header TTL value to a specific value (as |
| 1587 |
specified by C(ttl_v4) or C(ttl_v6). |
| 1588 |
returned: queried |
| 1589 |
type: str |
| 1590 |
sample: preserve |
| 1591 |
ttl_v4: |
| 1592 |
description: |
| 1593 |
- Specifies the outgoing packet's IP Header TTL value for IPv4 traffic. |
| 1594 |
- Maximum value is 255. |
| 1595 |
returned: queried |
| 1596 |
type: int |
| 1597 |
sample: 200 |
| 1598 |
ttl_v6: |
| 1599 |
description: |
| 1600 |
- Specify the outgoing packet's IP Header TTL value for IPv6. |
| 1601 |
traffic. |
| 1602 |
- Maximum value is 255. |
| 1603 |
returned: queried |
| 1604 |
type: int |
| 1605 |
sample: 300 |
| 1606 |
keep_alive_interval: |
| 1607 |
description: |
| 1608 |
- Specifies the keep-alive probe interval, in seconds. |
| 1609 |
- A value of 0 indicates keep-alive is disabled. |
| 1610 |
returned: queried |
| 1611 |
type: int |
| 1612 |
sample: 10 |
| 1613 |
late_binding: |
| 1614 |
description: |
| 1615 |
- Specifies whether to enable or disable the intelligent selection of a |
| 1616 |
back-end server pool. |
| 1617 |
returned: queried |
| 1618 |
type: bool |
| 1619 |
sample: true |
| 1620 |
link_qos_to_client: |
| 1621 |
description: |
| 1622 |
- Specifies a Link Quality of Service (QoS) (VLAN priority) number |
| 1623 |
for the client side. |
| 1624 |
- This option specifies the QoS level the system assigns to packets |
| 1625 |
when sending them to clients. |
| 1626 |
returned: queried |
| 1627 |
type: int |
| 1628 |
sample: 7 |
| 1629 |
link_qos_to_server: |
| 1630 |
description: |
| 1631 |
- Specifies a Link QoS (VLAN priority) number for the server side. |
| 1632 |
- This option specifies the QoS level the system assigns to |
| 1633 |
packets when sending them to servers. |
| 1634 |
returned: queried |
| 1635 |
type: int |
| 1636 |
sample: 5 |
| 1637 |
loose_close: |
| 1638 |
description: |
| 1639 |
- Specifies the system closes a loosely-initiated connection |
| 1640 |
when it receives the first FIN packet from either the |
| 1641 |
client or the server. |
| 1642 |
returned: queried |
| 1643 |
type: bool |
| 1644 |
sample: false |
| 1645 |
loose_init: |
| 1646 |
description: |
| 1647 |
- Specifies the system initializes a connection when it |
| 1648 |
receives any Transmission Control Protocol (TCP) packet, rather |
| 1649 |
than requiring a SYN packet for connection initiation. |
| 1650 |
returned: queried |
| 1651 |
type: bool |
| 1652 |
sample: true |
| 1653 |
mss_override: |
| 1654 |
description: |
| 1655 |
- Specifies a maximum segment size (MSS) override for server |
| 1656 |
connections. Note this is also the MSS advertised to a client |
| 1657 |
when a client first connects. |
| 1658 |
- C(0) (zero), means the option is disabled. Otherwise, the value will be |
| 1659 |
between 256 and 9162. |
| 1660 |
returned: queried |
| 1661 |
type: int |
| 1662 |
sample: 500 |
| 1663 |
priority_to_client: |
| 1664 |
description: |
| 1665 |
- Specifies the internal packet priority for the client side. |
| 1666 |
- This option specifies the internal packet priority the system |
| 1667 |
assigns to packets when sending them to clients. |
| 1668 |
returned: queried |
| 1669 |
type: int |
| 1670 |
sample: 300 |
| 1671 |
priority_to_server: |
| 1672 |
description: |
| 1673 |
- Specifies the internal packet priority for the server side. |
| 1674 |
- This option specifies the internal packet priority the system |
| 1675 |
assigns to packets when sending them to servers. |
| 1676 |
returned: queried |
| 1677 |
type: int |
| 1678 |
sample: 200 |
| 1679 |
pva_acceleration: |
| 1680 |
description: |
| 1681 |
- Specifies the Packet Velocity(r) ASIC acceleration policy. |
| 1682 |
returned: queried |
| 1683 |
type: str |
| 1684 |
sample: full |
| 1685 |
pva_dynamic_client_packets: |
| 1686 |
description: |
| 1687 |
- Specifies the number of client packets before dynamic ePVA |
| 1688 |
hardware re-offloading occurs. |
| 1689 |
- Values are between 0 and 10. |
| 1690 |
returned: queried |
| 1691 |
type: int |
| 1692 |
sample: 8 |
| 1693 |
pva_dynamic_server_packets: |
| 1694 |
description: |
| 1695 |
- Specifies the number of server packets before dynamic ePVA |
| 1696 |
hardware re-offloading occurs. |
| 1697 |
- Values are between 0 and 10. |
| 1698 |
returned: queried |
| 1699 |
type: int |
| 1700 |
sample: 5 |
| 1701 |
pva_flow_aging: |
| 1702 |
description: |
| 1703 |
- Specifies if automatic aging from ePVA flow cache is enabled or not. |
| 1704 |
returned: queried |
| 1705 |
type: bool |
| 1706 |
sample: true |
| 1707 |
pva_flow_evict: |
| 1708 |
description: |
| 1709 |
- Specifies if this flow can be evicted upon hash collision with a |
| 1710 |
new flow learn snoop request. |
| 1711 |
returned: queried |
| 1712 |
type: bool |
| 1713 |
sample: false |
| 1714 |
pva_offload_dynamic: |
| 1715 |
description: |
| 1716 |
- Specifies whether PVA flow dynamic offloading is enabled or not. |
| 1717 |
returned: queried |
| 1718 |
type: bool |
| 1719 |
sample: true |
| 1720 |
pva_offload_state: |
| 1721 |
description: |
| 1722 |
- Specifies at what stage the ePVA performs hardware offload. |
| 1723 |
- When C(embryonic), applies at TCP CSYN or the first client UDP packet. |
| 1724 |
- When C(establish), applies TCP 3WAY handshaking or UDP CS round trip are |
| 1725 |
confirmed. |
| 1726 |
returned: queried |
| 1727 |
type: str |
| 1728 |
sample: embryonic |
| 1729 |
reassemble_fragments: |
| 1730 |
description: |
| 1731 |
- Specifies whether to reassemble fragments. |
| 1732 |
returned: queried |
| 1733 |
type: bool |
| 1734 |
sample: true |
| 1735 |
receive_window: |
| 1736 |
description: |
| 1737 |
- Specifies the window size to use, in bytes. |
| 1738 |
- The maximum is 2^31 for window scale enabling. |
| 1739 |
returned: queried |
| 1740 |
type: int |
| 1741 |
sample: 1000 |
| 1742 |
reset_on_timeout: |
| 1743 |
description: |
| 1744 |
- Specifies whether you want to reset connections on timeout. |
| 1745 |
returned: queried |
| 1746 |
type: bool |
| 1747 |
sample: true |
| 1748 |
rtt_from_client: |
| 1749 |
description: |
| 1750 |
- Enables or disables the TCP timestamp options to measure the round |
| 1751 |
trip time to the client. |
| 1752 |
returned: queried |
| 1753 |
type: bool |
| 1754 |
sample: false |
| 1755 |
rtt_from_server: |
| 1756 |
description: |
| 1757 |
- Enables or disables the TCP timestamp options to measure the round |
| 1758 |
trip time to the server. |
| 1759 |
returned: queried |
| 1760 |
type: bool |
| 1761 |
sample: true |
| 1762 |
server_sack: |
| 1763 |
description: |
| 1764 |
- Specifies whether to support the server sack option in cookie responses |
| 1765 |
by default. |
| 1766 |
returned: queried |
| 1767 |
type: bool |
| 1768 |
sample: false |
| 1769 |
server_timestamp: |
| 1770 |
description: |
| 1771 |
- Specifies whether to support the server timestamp option in cookie |
| 1772 |
responses by default. |
| 1773 |
returned: queried |
| 1774 |
type: bool |
| 1775 |
sample: true |
| 1776 |
software_syn_cookie: |
| 1777 |
description: |
| 1778 |
- Enables or disables software SYN cookie support when PVA10 is not present |
| 1779 |
on the system. |
| 1780 |
- This option is deprecated in version 13.0.0 and is replaced by |
| 1781 |
C(syn_cookie_enabled). |
| 1782 |
returned: queried |
| 1783 |
type: bool |
| 1784 |
sample: true |
| 1785 |
syn_cookie_enabled: |
| 1786 |
description: |
| 1787 |
- Enables syn-cookies capability on this virtual server. |
| 1788 |
returned: queried |
| 1789 |
type: bool |
| 1790 |
sample: false |
| 1791 |
syn_cookie_mss: |
| 1792 |
description: |
| 1793 |
- Specifies a maximum segment size (MSS) for server connections when |
| 1794 |
SYN Cookie is enabled. |
| 1795 |
returned: queried |
| 1796 |
type: int |
| 1797 |
sample: 2000 |
| 1798 |
syn_cookie_whitelist: |
| 1799 |
description: |
| 1800 |
- Specifies whether or not to use a SYN Cookie WhiteList when doing |
| 1801 |
software SYN Cookies. |
| 1802 |
returned: queried |
| 1803 |
type: bool |
| 1804 |
sample: false |
| 1805 |
tcp_close_timeout: |
| 1806 |
description: |
| 1807 |
- Specifies a TCP close timeout in seconds. |
| 1808 |
returned: queried |
| 1809 |
type: int |
| 1810 |
sample: 100 |
| 1811 |
generate_init_seq_number: |
| 1812 |
description: |
| 1813 |
- Specifies whether you want to generate TCP sequence numbers on all |
| 1814 |
SYNs that conform with RFC1948, and allow timestamp recycling. |
| 1815 |
returned: queried |
| 1816 |
type: bool |
| 1817 |
sample: true |
| 1818 |
tcp_handshake_timeout: |
| 1819 |
description: |
| 1820 |
- Specifies a TCP handshake timeout in seconds. |
| 1821 |
returned: queried |
| 1822 |
type: int |
| 1823 |
sample: 5 |
| 1824 |
strip_sack: |
| 1825 |
description: |
| 1826 |
- Specifies whether you want to block the TCP SackOK option from |
| 1827 |
passing to the server on an initiating SYN. |
| 1828 |
returned: queried |
| 1829 |
type: bool |
| 1830 |
sample: true |
| 1831 |
tcp_time_wait_timeout: |
| 1832 |
description: |
| 1833 |
- Specifies a TCP time_wait timeout in milliseconds. |
| 1834 |
returned: queried |
| 1835 |
type: int |
| 1836 |
sample: 60 |
| 1837 |
tcp_timestamp_mode: |
| 1838 |
description: |
| 1839 |
- Specifies how you want to handle the TCP timestamp. |
| 1840 |
returned: queried |
| 1841 |
type: str |
| 1842 |
sample: preserve |
| 1843 |
tcp_window_scale_mode: |
| 1844 |
description: |
| 1845 |
- Specifies how you want to handle the TCP window scale. |
| 1846 |
returned: queried |
| 1847 |
type: str |
| 1848 |
sample: preserve |
| 1849 |
timeout_recovery: |
| 1850 |
description: |
| 1851 |
- Specifies late binding timeout recovery mode. This is the action |
| 1852 |
to take when late binding timeout occurs on a connection. |
| 1853 |
- When C(disconnect), only the L7 iRule actions are acceptable to |
| 1854 |
pick a server. |
| 1855 |
- When C(fallback), the normal FastL4 load balancing methods are acceptable |
| 1856 |
to pick a server. |
| 1857 |
returned: queried |
| 1858 |
type: str |
| 1859 |
sample: fallback |
| 1860 |
sample: hash/dictionary of values |
| 1861 |
gateway_icmp_monitors: |
| 1862 |
description: Gateway ICMP monitor related information. |
| 1863 |
returned: When C(gateway-icmp-monitors) is specified in C(gather_subset). |
| 1864 |
type: complex |
| 1865 |
contains: |
| 1866 |
full_path: |
| 1867 |
description: |
| 1868 |
- Full name of the resource as known to the BIG-IP. |
| 1869 |
returned: queried |
| 1870 |
type: str |
| 1871 |
sample: /Common/gateway_icmp |
| 1872 |
name: |
| 1873 |
description: |
| 1874 |
- Relative name of the resource in the BIG-IP. |
| 1875 |
returned: queried |
| 1876 |
type: str |
| 1877 |
sample: gateway_icmp |
| 1878 |
parent: |
| 1879 |
description: |
| 1880 |
- Profile from which this profile inherits settings. |
| 1881 |
returned: queried |
| 1882 |
type: str |
| 1883 |
sample: gateway_icmp |
| 1884 |
description: |
| 1885 |
description: |
| 1886 |
- Description of the resource. |
| 1887 |
returned: queried |
| 1888 |
type: str |
| 1889 |
sample: My monitor |
| 1890 |
adaptive: |
| 1891 |
description: |
| 1892 |
- Whether adaptive response time monitoring is enabled for this monitor. |
| 1893 |
returned: queried |
| 1894 |
type: bool |
| 1895 |
sample: false |
| 1896 |
adaptive_divergence_type: |
| 1897 |
description: |
| 1898 |
- Specifies whether the adaptive-divergence-value is C(relative) or |
| 1899 |
C(absolute). |
| 1900 |
returned: queried |
| 1901 |
type: str |
| 1902 |
sample: relative |
| 1903 |
adaptive_divergence_value: |
| 1904 |
description: |
| 1905 |
- Specifies how far from mean latency each monitor probe is allowed |
| 1906 |
to be. |
| 1907 |
returned: queried |
| 1908 |
type: int |
| 1909 |
sample: 25 |
| 1910 |
adaptive_limit: |
| 1911 |
description: |
| 1912 |
- Specifies the hard limit, in milliseconds, which the probe is not |
| 1913 |
allowed to exceed, regardless of the divergence value. |
| 1914 |
returned: queried |
| 1915 |
type: int |
| 1916 |
sample: 200 |
| 1917 |
adaptive_sampling_timespan: |
| 1918 |
description: |
| 1919 |
- Specifies the size of the sliding window, in seconds, which |
| 1920 |
records probe history. |
| 1921 |
returned: queried |
| 1922 |
type: int |
| 1923 |
sample: 300 |
| 1924 |
destination: |
| 1925 |
description: |
| 1926 |
- Specifies the IP address and service port of the resource that is |
| 1927 |
the destination of this monitor. |
| 1928 |
returned: queried |
| 1929 |
type: str |
| 1930 |
sample: "*:*" |
| 1931 |
interval: |
| 1932 |
description: |
| 1933 |
- Specifies, in seconds, the frequency at which the system issues |
| 1934 |
the monitor check when either the resource is down or the status |
| 1935 |
of the resource is unknown. |
| 1936 |
returned: queried |
| 1937 |
type: int |
| 1938 |
sample: 5 |
| 1939 |
manual_resume: |
| 1940 |
description: |
| 1941 |
- Specifies whether the system automatically changes the status of a |
| 1942 |
resource to (B)up at the next successful monitor check. |
| 1943 |
returned: queried |
| 1944 |
type: bool |
| 1945 |
sample: true |
| 1946 |
time_until_up: |
| 1947 |
description: |
| 1948 |
- Specifies the amount of time, in seconds, after the first |
| 1949 |
successful response before a node is marked up. |
| 1950 |
returned: queried |
| 1951 |
type: int |
| 1952 |
sample: 0 |
| 1953 |
timeout: |
| 1954 |
description: |
| 1955 |
- Specifies the number of seconds the target has in which to respond |
| 1956 |
to the monitor request. |
| 1957 |
returned: queried |
| 1958 |
type: int |
| 1959 |
sample: 16 |
| 1960 |
transparent: |
| 1961 |
description: |
| 1962 |
- Specifies whether the monitor operates in transparent mode. |
| 1963 |
returned: queried |
| 1964 |
type: bool |
| 1965 |
sample: false |
| 1966 |
up_interval: |
| 1967 |
description: |
| 1968 |
- Specifies, in seconds, the frequency at which the system issues |
| 1969 |
the monitor check when the resource is up. |
| 1970 |
returned: queried |
| 1971 |
type: int |
| 1972 |
sample: 0 |
| 1973 |
sample: hash/dictionary of values |
| 1974 |
gtm_pools: |
| 1975 |
description: |
| 1976 |
- GTM pool related information. |
| 1977 |
- Every "type" of pool has the exact same list of possible information. Therefore, |
| 1978 |
the list of information here is presented once instead of 6 times. |
| 1979 |
returned: When any of C(gtm-pools) or C(gtm-*-pools) is specified in C(gather_subset). |
| 1980 |
type: complex |
| 1981 |
contains: |
| 1982 |
full_path: |
| 1983 |
description: |
| 1984 |
- Full name of the resource as known to the BIG-IP. |
| 1985 |
returned: queried |
| 1986 |
type: str |
| 1987 |
sample: /Common/pool1 |
| 1988 |
name: |
| 1989 |
description: |
| 1990 |
- Relative name of the resource in the BIG-IP. |
| 1991 |
returned: queried |
| 1992 |
type: str |
| 1993 |
sample: pool1 |
| 1994 |
alternate_mode: |
| 1995 |
description: |
| 1996 |
- The load balancing mode the system uses to load balance name resolution |
| 1997 |
requests among the members of the pool. |
| 1998 |
returned: queried |
| 1999 |
type: str |
| 2000 |
sample: drop-packet |
| 2001 |
dynamic_ratio: |
| 2002 |
description: |
| 2003 |
- Specifies whether the dynamic ratio load balancing algorithm is enabled for this |
| 2004 |
pool. |
| 2005 |
returned: queried |
| 2006 |
type: bool |
| 2007 |
sample: true |
| 2008 |
enabled: |
| 2009 |
description: |
| 2010 |
- Specifies the pool is enabled. |
| 2011 |
returned: queried |
| 2012 |
type: bool |
| 2013 |
disabled: |
| 2014 |
description: |
| 2015 |
- Specifies the pool is disabled. |
| 2016 |
returned: queried |
| 2017 |
type: bool |
| 2018 |
fallback_mode: |
| 2019 |
description: |
| 2020 |
- Specifies the load balancing mode the system uses to load balance |
| 2021 |
name resolution among the pool members if the preferred and alternate |
| 2022 |
modes are unsuccessful in picking a pool. |
| 2023 |
returned: queried |
| 2024 |
type: str |
| 2025 |
load_balancing_mode: |
| 2026 |
description: |
| 2027 |
- Specifies the preferred load balancing mode the system uses to load |
| 2028 |
balance requests across pool members. |
| 2029 |
returned: queried |
| 2030 |
type: str |
| 2031 |
manual_resume: |
| 2032 |
description: |
| 2033 |
- Whether manual resume is enabled for this pool. |
| 2034 |
returned: queried |
| 2035 |
type: bool |
| 2036 |
max_answers_returned: |
| 2037 |
description: |
| 2038 |
- Maximum number of available virtual servers the system lists in a |
| 2039 |
response. |
| 2040 |
returned: queried |
| 2041 |
type: int |
| 2042 |
members: |
| 2043 |
description: |
| 2044 |
- Lists of members (and their configurations) in the pool. |
| 2045 |
returned: queried |
| 2046 |
type: dict |
| 2047 |
partition: |
| 2048 |
description: |
| 2049 |
- Partition on which the pool exists. |
| 2050 |
returned: queried |
| 2051 |
type: str |
| 2052 |
qos_hit_ratio: |
| 2053 |
description: |
| 2054 |
- Weight of the Hit Ratio performance factor for the QoS dynamic load |
| 2055 |
balancing method. |
| 2056 |
returned: queried |
| 2057 |
type: int |
| 2058 |
qos_hops: |
| 2059 |
description: |
| 2060 |
- Weight of the Hops performance factor when load balancing mode or fallback mode |
| 2061 |
is QoS. |
| 2062 |
returned: queried |
| 2063 |
type: int |
| 2064 |
qos_kilobytes_second: |
| 2065 |
description: |
| 2066 |
- Weight assigned to the Kilobytes per Second performance factor when the load |
| 2067 |
balancing option is QoS. |
| 2068 |
returned: queried |
| 2069 |
type: int |
| 2070 |
qos_lcs: |
| 2071 |
description: |
| 2072 |
- Weight assigned to the Link Capacity performance factor when the load balacing |
| 2073 |
option is QoS. |
| 2074 |
returned: queried |
| 2075 |
type: int |
| 2076 |
qos_packet_rate: |
| 2077 |
description: |
| 2078 |
- Weight assigned to the Packet Rate performance factor when the load balacing |
| 2079 |
option is QoS. |
| 2080 |
returned: queried |
| 2081 |
type: int |
| 2082 |
qos_rtt: |
| 2083 |
description: |
| 2084 |
- Weight assigned to the Round Trip Time performance factor when the load balacing |
| 2085 |
option is QoS. |
| 2086 |
returned: queried |
| 2087 |
type: int |
| 2088 |
qos_topology: |
| 2089 |
description: |
| 2090 |
- Weight assigned to the Topology performance factor when the load balacing option |
| 2091 |
is QoS. |
| 2092 |
returned: queried |
| 2093 |
type: int |
| 2094 |
qos_vs_capacity: |
| 2095 |
description: |
| 2096 |
- Weight assigned to the Virtual Server performance factor when the load balacing |
| 2097 |
option is QoS. |
| 2098 |
returned: queried |
| 2099 |
type: int |
| 2100 |
qos_vs_score: |
| 2101 |
description: |
| 2102 |
- Weight assigned to the Virtual Server Score performance factor when the load balacing |
| 2103 |
option is QoS. |
| 2104 |
returned: queried |
| 2105 |
type: int |
| 2106 |
ttl: |
| 2107 |
description: |
| 2108 |
- Number of seconds the IP address, once found, is valid. |
| 2109 |
returned: queried |
| 2110 |
type: int |
| 2111 |
verify_member_availability: |
| 2112 |
description: |
| 2113 |
- Whether or not the system verifies the availability of the members before |
| 2114 |
sending a connection to them. |
| 2115 |
returned: queried |
| 2116 |
type: bool |
| 2117 |
sample: hash/dictionary of values |
| 2118 |
gtm_servers: |
| 2119 |
description: |
| 2120 |
- GTM server related information. |
| 2121 |
returned: When C(gtm-servers) is specified in C(gather_subset). |
| 2122 |
type: complex |
| 2123 |
contains: |
| 2124 |
full_path: |
| 2125 |
description: |
| 2126 |
- Full name of the resource as known to the BIG-IP. |
| 2127 |
returned: queried |
| 2128 |
type: str |
| 2129 |
sample: /Common/server1 |
| 2130 |
name: |
| 2131 |
description: |
| 2132 |
- Relative name of the resource in the BIG-IP. |
| 2133 |
returned: queried |
| 2134 |
type: str |
| 2135 |
sample: server1 |
| 2136 |
datacenter: |
| 2137 |
description: |
| 2138 |
- Full name of the datacenter to which this server belongs. |
| 2139 |
returned: queried |
| 2140 |
type: str |
| 2141 |
enabled: |
| 2142 |
description: |
| 2143 |
- Specifies the server is enabled. |
| 2144 |
returned: queried |
| 2145 |
type: bool |
| 2146 |
disabled: |
| 2147 |
description: |
| 2148 |
- Specifies the server is disabled. |
| 2149 |
returned: queried |
| 2150 |
type: bool |
| 2151 |
expose_route_domains: |
| 2152 |
description: |
| 2153 |
- Allow the GTM server to auto-discover the LTM virtual servers from all |
| 2154 |
route domains. |
| 2155 |
returned: queried |
| 2156 |
type: bool |
| 2157 |
iq_allow_path: |
| 2158 |
description: |
| 2159 |
- Whether the GTM uses this BIG-IP system to conduct a path probe before |
| 2160 |
delegating traffic to it. |
| 2161 |
returned: queried |
| 2162 |
type: bool |
| 2163 |
iq_allow_service_check: |
| 2164 |
description: |
| 2165 |
- Whether the GTM uses this BIG-IP system to conduct a service check probe |
| 2166 |
before delegating traffic to it. |
| 2167 |
returned: queried |
| 2168 |
type: bool |
| 2169 |
iq_allow_snmp: |
| 2170 |
description: |
| 2171 |
- Whether the GTM uses this BIG-IP system to conduct an SNMP probe |
| 2172 |
before delegating traffic to it. |
| 2173 |
returned: queried |
| 2174 |
type: bool |
| 2175 |
limit_cpu_usage: |
| 2176 |
description: |
| 2177 |
- For a server configured as a generic host, specifies the percent of CPU |
| 2178 |
usage, otherwise this has no effect. |
| 2179 |
returned: queried |
| 2180 |
type: int |
| 2181 |
limit_cpu_usage_status: |
| 2182 |
description: |
| 2183 |
- Whether C(limit_cpu_usage) is enabled for this server. |
| 2184 |
returned: queried |
| 2185 |
type: bool |
| 2186 |
limit_max_bps: |
| 2187 |
description: |
| 2188 |
- Maximum allowable data throughput rate in bits per second for this server. |
| 2189 |
returned: queried |
| 2190 |
type: int |
| 2191 |
limit_max_bps_status: |
| 2192 |
description: |
| 2193 |
- Whether C(limit_max_bps) is enabled for this server. |
| 2194 |
returned: queried |
| 2195 |
type: bool |
| 2196 |
limit_max_connections: |
| 2197 |
description: |
| 2198 |
- Maximum number of concurrent connections, combined, for this server. |
| 2199 |
returned: queried |
| 2200 |
type: int |
| 2201 |
limit_max_connections_status: |
| 2202 |
description: |
| 2203 |
- Whether C(limit_max_connections) is enabled for this server. |
| 2204 |
type: bool |
| 2205 |
limit_max_pps: |
| 2206 |
description: |
| 2207 |
- Maximum allowable data transfer rate for this server, in packets per second. |
| 2208 |
returned: queried |
| 2209 |
type: int |
| 2210 |
limit_max_pps_status: |
| 2211 |
description: |
| 2212 |
- Whether C(limit_max_pps) is enabled for this server. |
| 2213 |
returned: queried |
| 2214 |
type: bool |
| 2215 |
limit_mem_available: |
| 2216 |
description: |
| 2217 |
- For a server configured as a generic host, specifies the available memory |
| 2218 |
required by the virtual servers on the server. |
| 2219 |
- If available memory falls below this limit, the system marks the server as |
| 2220 |
unavailable. |
| 2221 |
returned: queried |
| 2222 |
type: int |
| 2223 |
limit_mem_available_status: |
| 2224 |
description: |
| 2225 |
- Whether C(limit_mem_available) is enabled for this server. |
| 2226 |
returned: queried |
| 2227 |
type: bool |
| 2228 |
link_discovery: |
| 2229 |
description: |
| 2230 |
- Specifies whether the system auto-discovers the links for this server. |
| 2231 |
returned: queried |
| 2232 |
type: str |
| 2233 |
monitors: |
| 2234 |
description: |
| 2235 |
- Specifies health monitors that the system uses to determine whether this |
| 2236 |
server is available for load balancing. |
| 2237 |
returned: queried |
| 2238 |
type: list |
| 2239 |
sample: ['/Common/https_443', '/Common/icmp'] |
| 2240 |
monitor_type: |
| 2241 |
description: |
| 2242 |
- Whether one or more monitors need to pass, or all monitors need to pass. |
| 2243 |
returned: queried |
| 2244 |
type: str |
| 2245 |
sample: and_list |
| 2246 |
product: |
| 2247 |
description: |
| 2248 |
- Specifies the server type. |
| 2249 |
returned: queried |
| 2250 |
type: str |
| 2251 |
prober_fallback: |
| 2252 |
description: |
| 2253 |
- The type of prober to use to monitor this server's resources when the |
| 2254 |
preferred type is not available. |
| 2255 |
returned: queried |
| 2256 |
type: str |
| 2257 |
prober_preference: |
| 2258 |
description: |
| 2259 |
- Specifies the type of prober to use to monitor this server's resources. |
| 2260 |
returned: queried |
| 2261 |
type: str |
| 2262 |
virtual_server_discovery: |
| 2263 |
description: |
| 2264 |
- Whether the system auto-discovers the virtual servers for this server. |
| 2265 |
returned: queried |
| 2266 |
type: str |
| 2267 |
addresses: |
| 2268 |
description: |
| 2269 |
- Specifies the server IP addresses. |
| 2270 |
returned: queried |
| 2271 |
type: dict |
| 2272 |
devices: |
| 2273 |
description: |
| 2274 |
- Specifies the names of the devices that represent this server. |
| 2275 |
returned: queried |
| 2276 |
type: dict |
| 2277 |
virtual_servers: |
| 2278 |
description: |
| 2279 |
- Specifies the virtual servers that are resources for this server. |
| 2280 |
returned: queried |
| 2281 |
type: dict |
| 2282 |
sample: hash/dictionary of values |
| 2283 |
gtm_wide_ips: |
| 2284 |
description: |
| 2285 |
- GTM Wide IP related information. |
| 2286 |
- Every "type" of Wide IP has the exact same list of possible information. Therefore, |
| 2287 |
the list of information here is presented once instead of 6 times. |
| 2288 |
returned: When any of C(gtm-wide-ips) or C(gtm-*-wide-ips) is specified in C(gather_subset). |
| 2289 |
type: complex |
| 2290 |
contains: |
| 2291 |
full_path: |
| 2292 |
description: |
| 2293 |
- Full name of the resource as known to the BIG-IP. |
| 2294 |
returned: queried |
| 2295 |
type: str |
| 2296 |
sample: /Common/wide1 |
| 2297 |
name: |
| 2298 |
description: |
| 2299 |
- Relative name of the resource in the BIG-IP. |
| 2300 |
returned: queried |
| 2301 |
type: str |
| 2302 |
sample: wide1 |
| 2303 |
description: |
| 2304 |
description: |
| 2305 |
- Description of the Wide IP. |
| 2306 |
returned: queried |
| 2307 |
type: str |
| 2308 |
enabled: |
| 2309 |
description: |
| 2310 |
- Whether the Wide IP is enabled. |
| 2311 |
returned: queried |
| 2312 |
type: bool |
| 2313 |
disabled: |
| 2314 |
description: |
| 2315 |
- Whether the Wide IP is disabled. |
| 2316 |
returned: queried |
| 2317 |
type: bool |
| 2318 |
failure_rcode: |
| 2319 |
description: |
| 2320 |
- Specifies the DNS RCODE used when C(failure_rcode_response) is C(true). |
| 2321 |
returned: queried |
| 2322 |
type: int |
| 2323 |
failure_rcode_response: |
| 2324 |
description: |
| 2325 |
- When C(true), specifies the system returns a RCODE response to |
| 2326 |
Wide IP requests after exhausting all load balancing methods. |
| 2327 |
returned: queried |
| 2328 |
type: bool |
| 2329 |
failure_rcode_ttl: |
| 2330 |
description: |
| 2331 |
- Specifies the negative caching TTL of the SOA for the RCODE response. |
| 2332 |
returned: queried |
| 2333 |
type: int |
| 2334 |
last_resort_pool: |
| 2335 |
description: |
| 2336 |
- Specifies which pool, as listed in Pool List, for the system to use as |
| 2337 |
the last resort pool for the Wide IP. |
| 2338 |
returned: queried |
| 2339 |
type: str |
| 2340 |
minimal_response: |
| 2341 |
description: |
| 2342 |
- Specifies the system forms the smallest allowable DNS response to |
| 2343 |
a query. |
| 2344 |
returned: queried |
| 2345 |
type: str |
| 2346 |
persist_cidr_ipv4: |
| 2347 |
description: |
| 2348 |
- Specifies the number of bits the system uses to identify IPv4 addresses |
| 2349 |
when persistence is enabled. |
| 2350 |
returned: queried |
| 2351 |
type: int |
| 2352 |
persist_cidr_ipv6: |
| 2353 |
description: |
| 2354 |
- Specifies the number of bits the system uses to identify IPv6 addresses |
| 2355 |
when persistence is enabled. |
| 2356 |
returned: queried |
| 2357 |
type: int |
| 2358 |
pool_lb_mode: |
| 2359 |
description: |
| 2360 |
- Specifies the load balancing method used to select a pool in this Wide IP. |
| 2361 |
returned: queried |
| 2362 |
type: str |
| 2363 |
ttl_persistence: |
| 2364 |
description: |
| 2365 |
- Specifies, in seconds, the length of time for which the persistence |
| 2366 |
entry is valid. |
| 2367 |
returned: queried |
| 2368 |
type: int |
| 2369 |
pools: |
| 2370 |
description: |
| 2371 |
- Specifies the pools this Wide IP uses for load balancing. |
| 2372 |
returned: queried |
| 2373 |
type: dict |
| 2374 |
sample: hash/dictionary of values |
| 2375 |
gtm_topology_regions: |
| 2376 |
description: GTM regions related information. |
| 2377 |
returned: When C(gtm-topology-regions) is specified in C(gather_subset) |
| 2378 |
type: complex |
| 2379 |
contains: |
| 2380 |
full_path: |
| 2381 |
description: |
| 2382 |
- Full name of the resource as known to the BIG-IP. |
| 2383 |
returned: queried |
| 2384 |
type: str |
| 2385 |
sample: /Common/region1 |
| 2386 |
name: |
| 2387 |
description: |
| 2388 |
- Relative name of the resource in the BIG-IP. |
| 2389 |
returned: queried |
| 2390 |
type: str |
| 2391 |
sample: region1 |
| 2392 |
region_members: |
| 2393 |
description: |
| 2394 |
- The list of region members. |
| 2395 |
type: complex |
| 2396 |
contains: |
| 2397 |
negate: |
| 2398 |
description: |
| 2399 |
- Indicates if the region member is a C(IS-NOT) negative. In a BIG-IP configuration, the |
| 2400 |
region members can be C(IS) or C(IS-NOT). |
| 2401 |
returned: when configured for the region member. |
| 2402 |
type: bool |
| 2403 |
sample: true |
| 2404 |
subnet: |
| 2405 |
description: |
| 2406 |
- An IP address and network mask in the CIDR format. |
| 2407 |
type: str |
| 2408 |
returned: when configured for the region member. |
| 2409 |
sample: 10.10.10.0/24 |
| 2410 |
region: |
| 2411 |
description: |
| 2412 |
- The name of region already defined in the configuration. |
| 2413 |
type: str |
| 2414 |
returned: when configured for the region member. |
| 2415 |
sample: /Common/region1 |
| 2416 |
continent: |
| 2417 |
description: |
| 2418 |
- The name of one of the seven continents in ISO format, along with the C(Unknown) setting. |
| 2419 |
type: str |
| 2420 |
returned: when configured for the region member. |
| 2421 |
sample: AF |
| 2422 |
country: |
| 2423 |
description: |
| 2424 |
- The country name returned as an ISO country code. |
| 2425 |
- Valid country codes can be found here https://countrycode.org/. |
| 2426 |
type: str |
| 2427 |
returned: when configured for the region member. |
| 2428 |
sample: US |
| 2429 |
state: |
| 2430 |
description: |
| 2431 |
- The state in a given country. |
| 2432 |
type: str |
| 2433 |
returned: when configured for the region member. |
| 2434 |
sample: "AD/Sant Julia de Loria" |
| 2435 |
pool: |
| 2436 |
description: |
| 2437 |
- The name of a GTM pool already defined in the configuration. |
| 2438 |
type: str |
| 2439 |
returned: when configured for the region member. |
| 2440 |
sample: /Common/pool1 |
| 2441 |
datacenter: |
| 2442 |
description: |
| 2443 |
- The name of a GTM data center already defined in the configuration. |
| 2444 |
type: str |
| 2445 |
returned: when configured for the region member. |
| 2446 |
sample: /Common/dc1 |
| 2447 |
isp: |
| 2448 |
description: |
| 2449 |
- Specifies an Internet service provider. |
| 2450 |
type: str |
| 2451 |
returned: when configured for the region member. |
| 2452 |
sample: /Common/AOL |
| 2453 |
geo_isp: |
| 2454 |
description: |
| 2455 |
- Specifies a geolocation ISP. |
| 2456 |
type: str |
| 2457 |
returned: when configured for the region member. |
| 2458 |
sample: /Common/FOO_ISP |
| 2459 |
sample: hash/dictionary of values |
| 2460 |
sample: hash/dictionary of values |
| 2461 |
http_monitors: |
| 2462 |
description: HTTP monitor related information. |
| 2463 |
returned: When C(http-monitors) is specified in C(gather_subset). |
| 2464 |
type: complex |
| 2465 |
contains: |
| 2466 |
full_path: |
| 2467 |
description: |
| 2468 |
- Full name of the resource as known to the BIG-IP. |
| 2469 |
returned: queried |
| 2470 |
type: str |
| 2471 |
sample: /Common/http |
| 2472 |
name: |
| 2473 |
description: |
| 2474 |
- Relative name of the resource in the BIG-IP. |
| 2475 |
returned: queried |
| 2476 |
type: str |
| 2477 |
sample: http |
| 2478 |
parent: |
| 2479 |
description: |
| 2480 |
- Profile from which this profile inherits settings. |
| 2481 |
returned: queried |
| 2482 |
type: str |
| 2483 |
sample: http |
| 2484 |
description: |
| 2485 |
description: |
| 2486 |
- Description of the resource. |
| 2487 |
returned: queried |
| 2488 |
type: str |
| 2489 |
sample: My monitor |
| 2490 |
adaptive: |
| 2491 |
description: |
| 2492 |
- Whether adaptive response time monitoring is enabled for this monitor. |
| 2493 |
returned: queried |
| 2494 |
type: bool |
| 2495 |
sample: false |
| 2496 |
adaptive_divergence_type: |
| 2497 |
description: |
| 2498 |
- Specifies whether the adaptive-divergence-value is C(relative) or |
| 2499 |
C(absolute). |
| 2500 |
returned: queried |
| 2501 |
type: str |
| 2502 |
sample: relative |
| 2503 |
adaptive_divergence_value: |
| 2504 |
description: |
| 2505 |
- Specifies how far from mean latency each monitor probe is allowed |
| 2506 |
to be. |
| 2507 |
returned: queried |
| 2508 |
type: int |
| 2509 |
sample: 25 |
| 2510 |
adaptive_limit: |
| 2511 |
description: |
| 2512 |
- Specifies the hard limit, in milliseconds, which the probe is not |
| 2513 |
allowed to exceed, regardless of the divergence value. |
| 2514 |
returned: queried |
| 2515 |
type: int |
| 2516 |
sample: 200 |
| 2517 |
adaptive_sampling_timespan: |
| 2518 |
description: |
| 2519 |
- Specifies the size of the sliding window, in seconds, which |
| 2520 |
records probe history. |
| 2521 |
returned: queried |
| 2522 |
type: int |
| 2523 |
sample: 300 |
| 2524 |
destination: |
| 2525 |
description: |
| 2526 |
- Specifies the IP address and service port of the resource that is |
| 2527 |
the destination of this monitor. |
| 2528 |
returned: queried |
| 2529 |
type: str |
| 2530 |
sample: "*:*" |
| 2531 |
interval: |
| 2532 |
description: |
| 2533 |
- Specifies, in seconds, the frequency at which the system issues |
| 2534 |
the monitor check when either the resource is down or the status |
| 2535 |
of the resource is unknown. |
| 2536 |
returned: queried |
| 2537 |
type: int |
| 2538 |
sample: 5 |
| 2539 |
ip_dscp: |
| 2540 |
description: |
| 2541 |
- Specifies the differentiated services code point (DSCP). |
| 2542 |
returned: queried |
| 2543 |
type: int |
| 2544 |
sample: 0 |
| 2545 |
manual_resume: |
| 2546 |
description: |
| 2547 |
- Specifies whether the system automatically changes the status of a |
| 2548 |
resource to (B)up at the next successful monitor check. |
| 2549 |
returned: queried |
| 2550 |
type: bool |
| 2551 |
sample: true |
| 2552 |
receive_string: |
| 2553 |
description: |
| 2554 |
- Specifies the text string the monitor looks for in the |
| 2555 |
returned resource. |
| 2556 |
returned: queried |
| 2557 |
type: str |
| 2558 |
sample: check string |
| 2559 |
receive_disable_string: |
| 2560 |
description: |
| 2561 |
- Specifies a text string the monitor looks for in the returned |
| 2562 |
resource. If the text string is matched in the returned resource, |
| 2563 |
the corresponding node or pool member is marked session disabled. |
| 2564 |
returned: queried |
| 2565 |
type: str |
| 2566 |
sample: check disable string |
| 2567 |
reverse: |
| 2568 |
description: |
| 2569 |
- Specifies whether the monitor operates in reverse mode. When the |
| 2570 |
monitor is in reverse mode, a successful check marks the monitored |
| 2571 |
object down instead of up. |
| 2572 |
returned: queried |
| 2573 |
type: bool |
| 2574 |
sample: false |
| 2575 |
send_string: |
| 2576 |
description: |
| 2577 |
- Specifies the text string the monitor sends to the target |
| 2578 |
object. |
| 2579 |
returned: queried |
| 2580 |
type: str |
| 2581 |
sample: "GET /\\r\\n" |
| 2582 |
time_until_up: |
| 2583 |
description: |
| 2584 |
- Specifies the amount of time, in seconds, after the first |
| 2585 |
successful response before a node is marked up. |
| 2586 |
returned: queried |
| 2587 |
type: int |
| 2588 |
sample: 0 |
| 2589 |
timeout: |
| 2590 |
description: |
| 2591 |
- Specifies the number of seconds the target has in which to respond |
| 2592 |
to the monitor request. |
| 2593 |
returned: queried |
| 2594 |
type: int |
| 2595 |
sample: 16 |
| 2596 |
transparent: |
| 2597 |
description: |
| 2598 |
- Specifies whether the monitor operates in transparent mode. |
| 2599 |
returned: queried |
| 2600 |
type: bool |
| 2601 |
sample: false |
| 2602 |
up_interval: |
| 2603 |
description: |
| 2604 |
- Specifies, in seconds, the frequency at which the system issues |
| 2605 |
the monitor check when the resource is up. |
| 2606 |
returned: queried |
| 2607 |
type: int |
| 2608 |
sample: 0 |
| 2609 |
username: |
| 2610 |
description: |
| 2611 |
- Specifies the username, if the monitored target requires |
| 2612 |
authentication. |
| 2613 |
returned: queried |
| 2614 |
type: str |
| 2615 |
sample: user1 |
| 2616 |
sample: hash/dictionary of values |
| 2617 |
https_monitors: |
| 2618 |
description: HTTPS monitor related information. |
| 2619 |
returned: When C(https-monitors) is specified in C(gather_subset). |
| 2620 |
type: complex |
| 2621 |
contains: |
| 2622 |
full_path: |
| 2623 |
description: |
| 2624 |
- Full name of the resource as known to the BIG-IP. |
| 2625 |
returned: queried |
| 2626 |
type: str |
| 2627 |
sample: /Common/http |
| 2628 |
name: |
| 2629 |
description: |
| 2630 |
- Relative name of the resource in the BIG-IP. |
| 2631 |
returned: queried |
| 2632 |
type: str |
| 2633 |
sample: http |
| 2634 |
parent: |
| 2635 |
description: |
| 2636 |
- Profile from which this profile inherits settings. |
| 2637 |
returned: queried |
| 2638 |
type: str |
| 2639 |
sample: http |
| 2640 |
description: |
| 2641 |
description: |
| 2642 |
- Description of the resource. |
| 2643 |
returned: queried |
| 2644 |
type: str |
| 2645 |
sample: My monitor |
| 2646 |
adaptive: |
| 2647 |
description: |
| 2648 |
- Whether adaptive response time monitoring is enabled for this monitor. |
| 2649 |
returned: queried |
| 2650 |
type: bool |
| 2651 |
sample: false |
| 2652 |
adaptive_divergence_type: |
| 2653 |
description: |
| 2654 |
- Specifies whether the adaptive-divergence-value is C(relative) or |
| 2655 |
C(absolute). |
| 2656 |
returned: queried |
| 2657 |
type: str |
| 2658 |
sample: relative |
| 2659 |
adaptive_divergence_value: |
| 2660 |
description: |
| 2661 |
- Specifies how far from mean latency each monitor probe is allowed |
| 2662 |
to be. |
| 2663 |
returned: queried |
| 2664 |
type: int |
| 2665 |
sample: 25 |
| 2666 |
adaptive_limit: |
| 2667 |
description: |
| 2668 |
- Specifies the hard limit, in milliseconds, which the probe is not |
| 2669 |
allowed to exceed, regardless of the divergence value. |
| 2670 |
returned: queried |
| 2671 |
type: int |
| 2672 |
sample: 200 |
| 2673 |
adaptive_sampling_timespan: |
| 2674 |
description: |
| 2675 |
- Specifies the size of the sliding window, in seconds, which |
| 2676 |
records probe history. |
| 2677 |
returned: queried |
| 2678 |
type: int |
| 2679 |
sample: 300 |
| 2680 |
destination: |
| 2681 |
description: |
| 2682 |
- Specifies the IP address and service port of the resource that is |
| 2683 |
the destination of this monitor. |
| 2684 |
returned: queried |
| 2685 |
type: str |
| 2686 |
sample: "*:*" |
| 2687 |
interval: |
| 2688 |
description: |
| 2689 |
- Specifies, in seconds, the frequency at which the system issues |
| 2690 |
the monitor check when either the resource is down or the status |
| 2691 |
of the resource is unknown. |
| 2692 |
returned: queried |
| 2693 |
type: int |
| 2694 |
sample: 5 |
| 2695 |
ip_dscp: |
| 2696 |
description: |
| 2697 |
- Specifies the differentiated services code point (DSCP). |
| 2698 |
returned: queried |
| 2699 |
type: int |
| 2700 |
sample: 0 |
| 2701 |
manual_resume: |
| 2702 |
description: |
| 2703 |
- Specifies whether the system automatically changes the status of a |
| 2704 |
resource to up at the next successful monitor check. |
| 2705 |
returned: queried |
| 2706 |
type: bool |
| 2707 |
sample: true |
| 2708 |
receive_string: |
| 2709 |
description: |
| 2710 |
- Specifies the text string the monitor looks for in the |
| 2711 |
returned resource. |
| 2712 |
returned: queried |
| 2713 |
type: str |
| 2714 |
sample: check string |
| 2715 |
receive_disable_string: |
| 2716 |
description: |
| 2717 |
- Specifies a text string the monitor looks for in the returned |
| 2718 |
resource. If the text string is matched in the returned resource, |
| 2719 |
the corresponding node or pool member is marked session disabled. |
| 2720 |
returned: queried |
| 2721 |
type: str |
| 2722 |
sample: check disable string |
| 2723 |
reverse: |
| 2724 |
description: |
| 2725 |
- Specifies whether the monitor operates in reverse mode. When the |
| 2726 |
monitor is in reverse mode, a successful check marks the monitored |
| 2727 |
object down instead of up. |
| 2728 |
returned: queried |
| 2729 |
type: bool |
| 2730 |
sample: false |
| 2731 |
send_string: |
| 2732 |
description: |
| 2733 |
- Specifies the text string the monitor sends to the target |
| 2734 |
object. |
| 2735 |
returned: queried |
| 2736 |
type: str |
| 2737 |
sample: "GET /\\r\\n" |
| 2738 |
ssl_profile: |
| 2739 |
description: |
| 2740 |
- Specifies the SSL profile to use for the HTTPS monitor. |
| 2741 |
returned: queried |
| 2742 |
type: str |
| 2743 |
sample: /Common/serverssl |
| 2744 |
time_until_up: |
| 2745 |
description: |
| 2746 |
- Specifies the amount of time, in seconds, after the first |
| 2747 |
successful response before a node is marked up. |
| 2748 |
returned: queried |
| 2749 |
type: int |
| 2750 |
sample: 0 |
| 2751 |
timeout: |
| 2752 |
description: |
| 2753 |
- Specifies the number of seconds the target has in which to respond |
| 2754 |
to the monitor request. |
| 2755 |
returned: queried |
| 2756 |
type: int |
| 2757 |
sample: 16 |
| 2758 |
transparent: |
| 2759 |
description: |
| 2760 |
- Specifies whether the monitor operates in transparent mode. |
| 2761 |
returned: queried |
| 2762 |
type: bool |
| 2763 |
sample: false |
| 2764 |
up_interval: |
| 2765 |
description: |
| 2766 |
- Specifies, in seconds, the frequency at which the system issues |
| 2767 |
the monitor check when the resource is up. |
| 2768 |
returned: queried |
| 2769 |
type: int |
| 2770 |
sample: 0 |
| 2771 |
username: |
| 2772 |
description: |
| 2773 |
- Specifies the username, if the monitored target requires |
| 2774 |
authentication. |
| 2775 |
returned: queried |
| 2776 |
type: str |
| 2777 |
sample: user1 |
| 2778 |
sample: hash/dictionary of values |
| 2779 |
http_profiles: |
| 2780 |
description: HTTP profile related information. |
| 2781 |
returned: When C(http-profiles) is specified in C(gather_subset). |
| 2782 |
type: complex |
| 2783 |
contains: |
| 2784 |
full_path: |
| 2785 |
description: |
| 2786 |
- Full name of the resource as known to the BIG-IP. |
| 2787 |
returned: queried |
| 2788 |
type: str |
| 2789 |
sample: /Common/http |
| 2790 |
name: |
| 2791 |
description: |
| 2792 |
- Relative name of the resource in the BIG-IP. |
| 2793 |
returned: queried |
| 2794 |
type: str |
| 2795 |
sample: http |
| 2796 |
parent: |
| 2797 |
description: |
| 2798 |
- Profile from which this profile inherits settings. |
| 2799 |
returned: queried |
| 2800 |
type: str |
| 2801 |
sample: http |
| 2802 |
description: |
| 2803 |
description: |
| 2804 |
- Description of the resource. |
| 2805 |
returned: queried |
| 2806 |
type: str |
| 2807 |
sample: My profile |
| 2808 |
accept_xff: |
| 2809 |
description: |
| 2810 |
- Enables or disables trusting the client IP address, and statistics |
| 2811 |
from the client IP address, based on the request's X-Forwarded-For |
| 2812 |
(XFF) headers, if they exist. |
| 2813 |
returned: queried |
| 2814 |
type: bool |
| 2815 |
sample: true |
| 2816 |
allow_truncated_redirects: |
| 2817 |
description: |
| 2818 |
- Specifies the pass-through behavior when a redirect lacking the |
| 2819 |
trailing carriage-return and line feed pair at the end of the headers |
| 2820 |
is parsed. |
| 2821 |
- When C(false), the system will silently drop the invalid HTTP. |
| 2822 |
returned: queried |
| 2823 |
type: bool |
| 2824 |
sample: false |
| 2825 |
excess_client_headers: |
| 2826 |
description: |
| 2827 |
- Specifies the pass-through behavior when the C(max_header_count) value is |
| 2828 |
exceeded by the client. |
| 2829 |
- When C(reject), the system rejects the connection. |
| 2830 |
returned: queried |
| 2831 |
type: str |
| 2832 |
sample: reject |
| 2833 |
excess_server_headers: |
| 2834 |
description: |
| 2835 |
- Specifies the pass-through behavior when C(max_header_count) value is |
| 2836 |
exceeded by the server. |
| 2837 |
- When C(reject), the system rejects the connection. |
| 2838 |
returned: queried |
| 2839 |
type: str |
| 2840 |
sample: reject |
| 2841 |
known_methods: |
| 2842 |
description: |
| 2843 |
- Optimizes the behavior of a known HTTP method in the list. |
| 2844 |
- The default methods include the following HTTP/1.1 methods. CONNECT, |
| 2845 |
DELETE, GET, HEAD, LOCK, OPTIONS, POST, PROPFIND, PUT, TRACE, UNLOCK. |
| 2846 |
- If a known method is deleted from the C(known_methods) list, the |
| 2847 |
BIG-IP system applies the C(unknown_method) setting to manage that traffic. |
| 2848 |
returned: queried |
| 2849 |
type: list |
| 2850 |
sample: ['CONNECT', 'DELETE', ...] |
| 2851 |
max_header_count: |
| 2852 |
description: |
| 2853 |
- Specifies the maximum number of headers the system supports. |
| 2854 |
returned: queried |
| 2855 |
type: int |
| 2856 |
sample: 64 |
| 2857 |
max_header_size: |
| 2858 |
description: |
| 2859 |
- Specifies the maximum size, in bytes, the system allows for all HTTP |
| 2860 |
request headers combined, including the request line. |
| 2861 |
returned: queried |
| 2862 |
type: int |
| 2863 |
sample: 32768 |
| 2864 |
max_requests: |
| 2865 |
description: |
| 2866 |
- Specifies the number of requests the system accepts on a per-connection |
| 2867 |
basis. |
| 2868 |
returned: queried |
| 2869 |
type: int |
| 2870 |
sample: 0 |
| 2871 |
oversize_client_headers: |
| 2872 |
description: |
| 2873 |
- Specifies the pass-through behavior when the C(max_header_size) value |
| 2874 |
is exceeded by the client. |
| 2875 |
returned: queried |
| 2876 |
type: str |
| 2877 |
sample: reject |
| 2878 |
oversize_server_headers: |
| 2879 |
description: |
| 2880 |
- Specifies the pass-through behavior when the C(max_header_size) value |
| 2881 |
is exceeded by the server. |
| 2882 |
returned: queried |
| 2883 |
type: str |
| 2884 |
sample: reject |
| 2885 |
pipeline_action: |
| 2886 |
description: |
| 2887 |
- Enables or disables HTTP/1.1 pipelining. |
| 2888 |
returned: queried |
| 2889 |
type: str |
| 2890 |
sample: allow |
| 2891 |
unknown_method: |
| 2892 |
description: |
| 2893 |
- Specifies the behavior (allow, reject, or pass through) when an unknown |
| 2894 |
HTTP method is parsed. |
| 2895 |
returned: queried |
| 2896 |
type: str |
| 2897 |
sample: allow |
| 2898 |
default_connect_handling: |
| 2899 |
description: |
| 2900 |
- Specifies the behavior of the proxy service when handling outbound requests. |
| 2901 |
returned: queried |
| 2902 |
type: str |
| 2903 |
sample: deny |
| 2904 |
hsts_include_subdomains: |
| 2905 |
description: |
| 2906 |
- When C(true), applies the HSTS policy to the HSTS host and its subdomains. |
| 2907 |
returned: queried |
| 2908 |
type: bool |
| 2909 |
sample: true |
| 2910 |
hsts_enabled: |
| 2911 |
description: |
| 2912 |
- When C(true), enables the HTTP Strict Transport Security settings. |
| 2913 |
returned: queried |
| 2914 |
type: bool |
| 2915 |
sample: true |
| 2916 |
insert_xforwarded_for: |
| 2917 |
description: |
| 2918 |
- When C(true), specifies the system inserts an X-Forwarded-For header in |
| 2919 |
an HTTP request with the client IP address, to use with connection pooling. |
| 2920 |
returned: queried |
| 2921 |
type: bool |
| 2922 |
sample: false |
| 2923 |
lws_max_columns: |
| 2924 |
description: |
| 2925 |
- Specifies the maximum column width for any given line, when inserting an HTTP |
| 2926 |
header in an HTTP request. |
| 2927 |
returned: queried |
| 2928 |
type: int |
| 2929 |
sample: 80 |
| 2930 |
onconnect_transformations: |
| 2931 |
description: |
| 2932 |
- When C(true), specifies the system performs HTTP header transformations |
| 2933 |
for the purpose of keeping connections open. |
| 2934 |
returned: queried |
| 2935 |
type: bool |
| 2936 |
sample: true |
| 2937 |
proxy_mode: |
| 2938 |
description: |
| 2939 |
- Specifies the proxy mode for this profile. Either reverse, explicit, or transparent. |
| 2940 |
returned: queried |
| 2941 |
type: str |
| 2942 |
sample: reverse |
| 2943 |
redirect_rewrite: |
| 2944 |
description: |
| 2945 |
- Specifies whether the system rewrites the URIs that are part of HTTP |
| 2946 |
redirect (3XX) responses. |
| 2947 |
returned: queried |
| 2948 |
type: str |
| 2949 |
sample: none |
| 2950 |
request_chunking: |
| 2951 |
description: |
| 2952 |
- Specifies how the system handles HTTP content that is chunked by a client. |
| 2953 |
returned: queried |
| 2954 |
type: str |
| 2955 |
sample: preserve |
| 2956 |
response_chunking: |
| 2957 |
description: |
| 2958 |
- Specifies how the system handles HTTP content that is chunked by a server. |
| 2959 |
returned: queried |
| 2960 |
type: str |
| 2961 |
sample: selective |
| 2962 |
server_agent_name: |
| 2963 |
description: |
| 2964 |
- Specifies the string used as the server name in traffic generated by LTM. |
| 2965 |
returned: queried |
| 2966 |
type: str |
| 2967 |
sample: BigIP |
| 2968 |
sflow_poll_interval: |
| 2969 |
description: |
| 2970 |
- The maximum interval in seconds between two pollings. |
| 2971 |
returned: queried |
| 2972 |
type: int |
| 2973 |
sample: 0 |
| 2974 |
sflow_sampling_rate: |
| 2975 |
description: |
| 2976 |
- Specifies the ratio of packets observed to the samples generated. |
| 2977 |
returned: queried |
| 2978 |
type: int |
| 2979 |
sample: 0 |
| 2980 |
via_request: |
| 2981 |
description: |
| 2982 |
- Specifies whether to Remove, Preserve, or Append Via headers included in |
| 2983 |
a client request to an origin web server. |
| 2984 |
returned: queried |
| 2985 |
type: str |
| 2986 |
sample: preserve |
| 2987 |
via_response: |
| 2988 |
description: |
| 2989 |
- Specifies whether to Remove, Preserve, or Append Via headers included in |
| 2990 |
an origin web server response to a client. |
| 2991 |
returned: queried |
| 2992 |
type: str |
| 2993 |
sample: preserve |
| 2994 |
sample: hash/dictionary of values |
| 2995 |
iapp_services: |
| 2996 |
description: iApp v1 service related information. |
| 2997 |
returned: When C(iapp-services) is specified in C(gather_subset). |
| 2998 |
type: complex |
| 2999 |
contains: |
| 3000 |
full_path: |
| 3001 |
description: |
| 3002 |
- Full name of the resource as known to the BIG-IP. |
| 3003 |
returned: queried |
| 3004 |
type: str |
| 3005 |
sample: /Common/service1 |
| 3006 |
name: |
| 3007 |
description: |
| 3008 |
- Relative name of the resource in the BIG-IP. |
| 3009 |
returned: queried |
| 3010 |
type: str |
| 3011 |
sample: service1 |
| 3012 |
device_group: |
| 3013 |
description: |
| 3014 |
- The device group the iApp service is part of. |
| 3015 |
returned: queried |
| 3016 |
type: str |
| 3017 |
sample: /Common/dg1 |
| 3018 |
inherited_device_group: |
| 3019 |
description: |
| 3020 |
- Whether the device group is inherited or not. |
| 3021 |
returned: queried |
| 3022 |
type: bool |
| 3023 |
sample: true |
| 3024 |
inherited_traffic_group: |
| 3025 |
description: |
| 3026 |
- Whether the traffic group is inherited or not. |
| 3027 |
returned: queried |
| 3028 |
type: bool |
| 3029 |
sample: true |
| 3030 |
strict_updates: |
| 3031 |
description: |
| 3032 |
- Whether strict updates are enabled or not. |
| 3033 |
returned: queried |
| 3034 |
type: bool |
| 3035 |
sample: true |
| 3036 |
template_modified: |
| 3037 |
description: |
| 3038 |
- Whether template the service is based on is modified from its |
| 3039 |
default value, or not. |
| 3040 |
returned: queried |
| 3041 |
type: bool |
| 3042 |
sample: true |
| 3043 |
traffic_group: |
| 3044 |
description: |
| 3045 |
- Traffic group the service is a part of. |
| 3046 |
returned: queried |
| 3047 |
type: str |
| 3048 |
sample: /Common/tg |
| 3049 |
tables: |
| 3050 |
description: |
| 3051 |
- List of the tabular data used to create the service. |
| 3052 |
returned: queried |
| 3053 |
type: list |
| 3054 |
sample: [{"name": "basic__snatpool_members"},...] |
| 3055 |
variables: |
| 3056 |
description: |
| 3057 |
- List of the variable data used to create the service. |
| 3058 |
returned: queried |
| 3059 |
type: list |
| 3060 |
sample: [{"name": "afm__policy"},{"encrypted": "no"},{"value": "/#no_not_use#"},...] |
| 3061 |
metadata: |
| 3062 |
description: |
| 3063 |
- List of the metadata data used to create the service. |
| 3064 |
returned: queried |
| 3065 |
type: list |
| 3066 |
sample: [{"name": "var1"},{"persist": "true"},...] |
| 3067 |
lists: |
| 3068 |
description: |
| 3069 |
- List of the lists data used to create the service. |
| 3070 |
returned: queried |
| 3071 |
type: list |
| 3072 |
sample: [{"name": "irules__irules"},{"value": []},...] |
| 3073 |
description: |
| 3074 |
description: |
| 3075 |
- Description of the service. |
| 3076 |
returned: queried |
| 3077 |
type: str |
| 3078 |
sample: My service |
| 3079 |
sample: hash/dictionary of values |
| 3080 |
icmp_monitors: |
| 3081 |
description: ICMP monitor related information. |
| 3082 |
returned: When C(icmp-monitors) is specified in C(gather_subset). |
| 3083 |
type: complex |
| 3084 |
contains: |
| 3085 |
full_path: |
| 3086 |
description: |
| 3087 |
- Full name of the resource as known to the BIG-IP. |
| 3088 |
returned: queried |
| 3089 |
type: str |
| 3090 |
sample: /Common/icmp |
| 3091 |
name: |
| 3092 |
description: |
| 3093 |
- Relative name of the resource in the BIG-IP. |
| 3094 |
returned: queried |
| 3095 |
type: str |
| 3096 |
sample: icmp |
| 3097 |
parent: |
| 3098 |
description: |
| 3099 |
- Profile from which this profile inherits settings. |
| 3100 |
returned: queried |
| 3101 |
type: str |
| 3102 |
sample: icmp |
| 3103 |
description: |
| 3104 |
description: |
| 3105 |
- Description of the resource. |
| 3106 |
returned: queried |
| 3107 |
type: str |
| 3108 |
sample: My monitor |
| 3109 |
adaptive: |
| 3110 |
description: |
| 3111 |
- Whether adaptive response time monitoring is enabled for this monitor. |
| 3112 |
returned: queried |
| 3113 |
type: bool |
| 3114 |
sample: false |
| 3115 |
adaptive_divergence_type: |
| 3116 |
description: |
| 3117 |
- Specifies whether the adaptive-divergence-value is C(relative) or |
| 3118 |
C(absolute). |
| 3119 |
returned: queried |
| 3120 |
type: str |
| 3121 |
sample: relative |
| 3122 |
adaptive_divergence_value: |
| 3123 |
description: |
| 3124 |
- Specifies how far from mean latency each monitor probe is allowed |
| 3125 |
to be. |
| 3126 |
returned: queried |
| 3127 |
type: int |
| 3128 |
sample: 25 |
| 3129 |
adaptive_limit: |
| 3130 |
description: |
| 3131 |
- Specifies the hard limit, in milliseconds, which the probe is not |
| 3132 |
allowed to exceed, regardless of the divergence value. |
| 3133 |
returned: queried |
| 3134 |
type: int |
| 3135 |
sample: 200 |
| 3136 |
adaptive_sampling_timespan: |
| 3137 |
description: |
| 3138 |
- Specifies the size of the sliding window, in seconds, which |
| 3139 |
records probe history. |
| 3140 |
returned: queried |
| 3141 |
type: int |
| 3142 |
sample: 300 |
| 3143 |
destination: |
| 3144 |
description: |
| 3145 |
- Specifies the IP address and service port of the resource that is |
| 3146 |
the destination of this monitor. |
| 3147 |
returned: queried |
| 3148 |
type: str |
| 3149 |
sample: "*:*" |
| 3150 |
interval: |
| 3151 |
description: |
| 3152 |
- Specifies, in seconds, the frequency at which the system issues |
| 3153 |
the monitor check when either the resource is down or the status |
| 3154 |
of the resource is unknown. |
| 3155 |
returned: queried |
| 3156 |
type: int |
| 3157 |
sample: 5 |
| 3158 |
manual_resume: |
| 3159 |
description: |
| 3160 |
- Specifies whether the system automatically changes the status of a |
| 3161 |
resource to (B)up at the next successful monitor check. |
| 3162 |
type: bool |
| 3163 |
sample: true |
| 3164 |
time_until_up: |
| 3165 |
description: |
| 3166 |
- Specifies the amount of time, in seconds, after the first |
| 3167 |
successful response before a node is marked up. |
| 3168 |
returned: queried |
| 3169 |
type: int |
| 3170 |
sample: 0 |
| 3171 |
timeout: |
| 3172 |
description: |
| 3173 |
- Specifies the number of seconds the target has in which to respond |
| 3174 |
to the monitor request. |
| 3175 |
returned: queried |
| 3176 |
type: int |
| 3177 |
sample: 16 |
| 3178 |
transparent: |
| 3179 |
description: |
| 3180 |
- Specifies whether the monitor operates in transparent mode. |
| 3181 |
returned: queried |
| 3182 |
type: bool |
| 3183 |
sample: false |
| 3184 |
up_interval: |
| 3185 |
description: |
| 3186 |
- Specifies, in seconds, the frequency at which the system issues |
| 3187 |
the monitor check when the resource is up. |
| 3188 |
returned: queried |
| 3189 |
type: int |
| 3190 |
sample: 0 |
| 3191 |
sample: hash/dictionary of values |
| 3192 |
interfaces: |
| 3193 |
description: Interface related information. |
| 3194 |
returned: When C(interfaces) is specified in C(gather_subset). |
| 3195 |
type: complex |
| 3196 |
contains: |
| 3197 |
full_path: |
| 3198 |
description: |
| 3199 |
- Full name of the resource as known to the BIG-IP. |
| 3200 |
returned: queried |
| 3201 |
type: str |
| 3202 |
sample: /Common/interface1 |
| 3203 |
name: |
| 3204 |
description: |
| 3205 |
- Relative name of the resource in the BIG-IP. |
| 3206 |
returned: queried |
| 3207 |
type: str |
| 3208 |
sample: interface1 |
| 3209 |
active_media_type: |
| 3210 |
description: |
| 3211 |
- Displays the current media setting for the interface. |
| 3212 |
returned: queried |
| 3213 |
type: str |
| 3214 |
sample: 100TX-FD |
| 3215 |
flow_control: |
| 3216 |
description: |
| 3217 |
- Specifies how the system controls the sending of PAUSE frames for |
| 3218 |
flow control. |
| 3219 |
returned: queried |
| 3220 |
type: str |
| 3221 |
sample: tx-rx |
| 3222 |
description: |
| 3223 |
description: |
| 3224 |
- Description of the interface. |
| 3225 |
returned: queried |
| 3226 |
type: str |
| 3227 |
sample: My interface |
| 3228 |
bundle: |
| 3229 |
description: |
| 3230 |
- The bundle capability on the port. |
| 3231 |
returned: queried |
| 3232 |
type: str |
| 3233 |
sample: not-supported |
| 3234 |
bundle_speed: |
| 3235 |
description: |
| 3236 |
- The bundle-speed on the port when bundle capability is |
| 3237 |
enabled. |
| 3238 |
returned: queried |
| 3239 |
type: str |
| 3240 |
sample: 100G |
| 3241 |
enabled: |
| 3242 |
description: |
| 3243 |
- Whether the interface is enabled or not. |
| 3244 |
returned: queried |
| 3245 |
type: bool |
| 3246 |
sample: true |
| 3247 |
if_index: |
| 3248 |
description: |
| 3249 |
- The index assigned to this interface. |
| 3250 |
returned: queried |
| 3251 |
type: int |
| 3252 |
sample: 32 |
| 3253 |
mac_address: |
| 3254 |
description: |
| 3255 |
- Displays the 6-byte ethernet address in non-case-sensitive |
| 3256 |
hexadecimal colon notation. |
| 3257 |
returned: queried |
| 3258 |
type: str |
| 3259 |
sample: "00:0b:09:88:00:9a" |
| 3260 |
media_sfp: |
| 3261 |
description: |
| 3262 |
- The settings for an SFP (pluggable) interface. |
| 3263 |
returned: queried |
| 3264 |
type: str |
| 3265 |
sample: auto |
| 3266 |
lldp_admin: |
| 3267 |
description: |
| 3268 |
- Sets the sending or receiving of LLDP packets on that interface. |
| 3269 |
Should be one of C(disable), C(txonly), C(rxonly) or C(txrx). |
| 3270 |
returned: queried |
| 3271 |
type: str |
| 3272 |
sample: txonly |
| 3273 |
mtu: |
| 3274 |
description: |
| 3275 |
- Displays the Maximum Transmission Unit (MTU) of the interface, |
| 3276 |
which is the maximum number of bytes in a frame without IP |
| 3277 |
fragmentation. |
| 3278 |
returned: queried |
| 3279 |
type: int |
| 3280 |
sample: 1500 |
| 3281 |
prefer_port: |
| 3282 |
description: |
| 3283 |
- Indicates which side of a combo port the interface uses, if both |
| 3284 |
sides of the port have the potential for external links. |
| 3285 |
returned: queried |
| 3286 |
type: str |
| 3287 |
sample: sfp |
| 3288 |
sflow_poll_interval: |
| 3289 |
description: |
| 3290 |
- Specifies the maximum interval in seconds between two |
| 3291 |
pollings. |
| 3292 |
returned: queried |
| 3293 |
type: int |
| 3294 |
sample: 0 |
| 3295 |
sflow_poll_interval_global: |
| 3296 |
description: |
| 3297 |
- Specifies whether the global interface poll-interval setting |
| 3298 |
overrides the object-level poll-interval setting. |
| 3299 |
returned: queried |
| 3300 |
type: bool |
| 3301 |
sample: true |
| 3302 |
stp_auto_edge_port: |
| 3303 |
description: |
| 3304 |
- STP edge port detection. |
| 3305 |
returned: queried |
| 3306 |
type: bool |
| 3307 |
sample: true |
| 3308 |
stp_enabled: |
| 3309 |
description: |
| 3310 |
- Whether STP is enabled or not. |
| 3311 |
returned: queried |
| 3312 |
type: bool |
| 3313 |
sample: false |
| 3314 |
stp_link_type: |
| 3315 |
description: |
| 3316 |
- Specifies the STP link type for the interface. |
| 3317 |
returned: queried |
| 3318 |
type: str |
| 3319 |
sample: auto |
| 3320 |
sample: hash/dictionary of values |
| 3321 |
irules: |
| 3322 |
description: iRule related information. |
| 3323 |
returned: When C(irules) is specified in C(gather_subset). |
| 3324 |
type: complex |
| 3325 |
contains: |
| 3326 |
full_path: |
| 3327 |
description: |
| 3328 |
- Full name of the resource as known to the BIG-IP. |
| 3329 |
returned: queried |
| 3330 |
type: str |
| 3331 |
sample: /Common/irule1 |
| 3332 |
name: |
| 3333 |
description: |
| 3334 |
- Relative name of the resource in the BIG-IP. |
| 3335 |
returned: queried |
| 3336 |
type: str |
| 3337 |
sample: irule1 |
| 3338 |
ignore_verification: |
| 3339 |
description: |
| 3340 |
- Whether the verification of the iRule should be ignored or not. |
| 3341 |
returned: queried |
| 3342 |
type: bool |
| 3343 |
sample: false |
| 3344 |
checksum: |
| 3345 |
description: |
| 3346 |
- Checksum of the iRule as calculated by BIG-IP. |
| 3347 |
returned: queried |
| 3348 |
type: str |
| 3349 |
sample: d41d8cd98f00b204e9800998ecf8427e |
| 3350 |
definition: |
| 3351 |
description: |
| 3352 |
- The actual definition of the iRule. |
| 3353 |
returned: queried |
| 3354 |
type: str |
| 3355 |
sample: when HTTP_REQUEST ... |
| 3356 |
signature: |
| 3357 |
description: |
| 3358 |
- The calculated signature of the iRule. |
| 3359 |
returned: queried |
| 3360 |
type: str |
| 3361 |
sample: WsYy2M6xMqvosIKIEH/FSsvhtWMe6xKOA6i7f... |
| 3362 |
sample: hash/dictionary of values |
| 3363 |
license: |
| 3364 |
description: License related info. |
| 3365 |
returned: When C(license) is specified in C(gather_subset). |
| 3366 |
type: complex |
| 3367 |
contains: |
| 3368 |
license_start_date: |
| 3369 |
description: |
| 3370 |
- Specifies the date on whichthe license was issued. |
| 3371 |
returned: queried |
| 3372 |
type: str |
| 3373 |
sample: 2022/11/21 |
| 3374 |
license_end_date: |
| 3375 |
description: |
| 3376 |
- Specifies the date on which the license is no longer valid. |
| 3377 |
returned: queried |
| 3378 |
type: str |
| 3379 |
sample: 2022/12/30 |
| 3380 |
licensed_on_date: |
| 3381 |
description: |
| 3382 |
- Specifies the date on which the license was activated. |
| 3383 |
returned: queried |
| 3384 |
type: str |
| 3385 |
sample: 2022/11/22 |
| 3386 |
licensed_version: |
| 3387 |
description: |
| 3388 |
- Specifies the version of the device that is using this license. |
| 3389 |
returned: queried |
| 3390 |
type: str |
| 3391 |
sample: 15.1.2 |
| 3392 |
max_permitted_version: |
| 3393 |
description: |
| 3394 |
- Specifies the maximum version to which this license can be applied. |
| 3395 |
returned: queried |
| 3396 |
type: str |
| 3397 |
sample: 18.*.* |
| 3398 |
min_permitted_version: |
| 3399 |
description: |
| 3400 |
- Specifies the minimum version to which this license can be applied. |
| 3401 |
returned: queried |
| 3402 |
type: str |
| 3403 |
sample: 5.*.* |
| 3404 |
platform_id: |
| 3405 |
description: |
| 3406 |
- Specifies the platform id for which the license was activated. |
| 3407 |
returned: queried |
| 3408 |
type: str |
| 3409 |
sample: Z100k |
| 3410 |
registration_key: |
| 3411 |
description: |
| 3412 |
- Specifies the registration key associated with the license. |
| 3413 |
returned: queried |
| 3414 |
type: str |
| 3415 |
sample: XXXX-XXXX-XXXX-XXXX-XXXX |
| 3416 |
service_check_date: |
| 3417 |
description: |
| 3418 |
- Specifies the last date the license was last activated. |
| 3419 |
returned: queried |
| 3420 |
type: str |
| 3421 |
sample: 2022/11/30 |
| 3422 |
active_modules: |
| 3423 |
description: |
| 3424 |
- Specifies the modules that are activated by the license. |
| 3425 |
returned: queried |
| 3426 |
type: list |
| 3427 |
sample: [{"key":"A123456-9876543", "featureModules":"{}"}, ...] |
| 3428 |
sample: hash/dictionary of values |
| 3429 |
ltm_pools: |
| 3430 |
description: List of LTM (Local Traffic Manager) pools. |
| 3431 |
returned: When C(ltm-pools) is specified in C(gather_subset). |
| 3432 |
type: complex |
| 3433 |
contains: |
| 3434 |
active_member_count: |
| 3435 |
description: |
| 3436 |
- The number of active pool members in the pool. |
| 3437 |
returned: queried |
| 3438 |
type: int |
| 3439 |
sample: 3 |
| 3440 |
all_avg_queue_entry_age: |
| 3441 |
description: |
| 3442 |
- Average queue entry age, for both the pool and its members. |
| 3443 |
returned: queried |
| 3444 |
type: int |
| 3445 |
sample: 5 |
| 3446 |
all_max_queue_entry_age_ever: |
| 3447 |
description: |
| 3448 |
- Maximum queue entry age ever, for both the pool and its members. |
| 3449 |
returned: queried |
| 3450 |
type: int |
| 3451 |
sample: 2 |
| 3452 |
all_max_queue_entry_age_recently: |
| 3453 |
description: |
| 3454 |
- Maximum queue entry age recently, for both the pool and its members. |
| 3455 |
returned: queried |
| 3456 |
type: int |
| 3457 |
sample: 5 |
| 3458 |
all_num_connections_queued_now: |
| 3459 |
description: |
| 3460 |
- Number of connections queued now, for both the pool and its members. |
| 3461 |
returned: queried |
| 3462 |
type: int |
| 3463 |
sample: 20 |
| 3464 |
all_num_connections_serviced: |
| 3465 |
description: |
| 3466 |
- Number of connections serviced, for both the pool and its members. |
| 3467 |
returned: queried |
| 3468 |
type: int |
| 3469 |
sample: 15 |
| 3470 |
all_queue_head_entry_age: |
| 3471 |
description: |
| 3472 |
- Queue head entry age, for both the pool and its members. |
| 3473 |
returned: queried |
| 3474 |
type: int |
| 3475 |
sample: 4 |
| 3476 |
available_member_count: |
| 3477 |
description: |
| 3478 |
- The number of available pool members in the pool. |
| 3479 |
returned: queried |
| 3480 |
type: int |
| 3481 |
sample: 4 |
| 3482 |
availability_status: |
| 3483 |
description: |
| 3484 |
- The availability of the pool. |
| 3485 |
returned: queried |
| 3486 |
type: str |
| 3487 |
sample: offline |
| 3488 |
allow_nat: |
| 3489 |
description: |
| 3490 |
- Whether NATs are automatically enabled or disabled for any connections using this pool. |
| 3491 |
returned: queried |
| 3492 |
type: bool |
| 3493 |
sample: true |
| 3494 |
allow_snat: |
| 3495 |
description: |
| 3496 |
- Whether SNATs are automatically enabled or disabled for any connections using this pool. |
| 3497 |
returned: queried |
| 3498 |
type: bool |
| 3499 |
sample: true |
| 3500 |
client_ip_tos: |
| 3501 |
description: |
| 3502 |
- Whether the system sets a Type of Service (ToS) level within a packet sent to the client, |
| 3503 |
based on the targeted pool. |
| 3504 |
- Values can range from C(0) to C(255), or be set to C(pass-through) or C(mimic). |
| 3505 |
returned: queried |
| 3506 |
type: str |
| 3507 |
sample: pass-through |
| 3508 |
client_link_qos: |
| 3509 |
description: |
| 3510 |
- Whether the system sets a Quality of Service (QoS) level within a packet sent to the client, |
| 3511 |
based on the targeted pool. |
| 3512 |
- Values can range from C(0) to C(7), or be set to C(pass-through). |
| 3513 |
returned: queried |
| 3514 |
type: str |
| 3515 |
sample: pass-through |
| 3516 |
current_sessions: |
| 3517 |
description: |
| 3518 |
- Current sessions. |
| 3519 |
returned: queried |
| 3520 |
type: int |
| 3521 |
sample: 2 |
| 3522 |
description: |
| 3523 |
description: |
| 3524 |
- Description of the pool. |
| 3525 |
returned: queried |
| 3526 |
type: str |
| 3527 |
sample: my pool |
| 3528 |
enabled_status: |
| 3529 |
description: |
| 3530 |
- The enabled status of the pool. |
| 3531 |
returned: queried |
| 3532 |
type: str |
| 3533 |
sample: enabled |
| 3534 |
full_path: |
| 3535 |
description: |
| 3536 |
- Full name of the resource as known to the BIG-IP. |
| 3537 |
returned: queried |
| 3538 |
type: str |
| 3539 |
sample: /Common/pool1 |
| 3540 |
ignore_persisted_weight: |
| 3541 |
description: |
| 3542 |
- Specifies not to count the weight of persisted connections on pool members when making load balancing decisions. |
| 3543 |
returned: queried |
| 3544 |
type: bool |
| 3545 |
sample: false |
| 3546 |
lb_method: |
| 3547 |
description: |
| 3548 |
- Load balancing method used by the pool. |
| 3549 |
returned: queried |
| 3550 |
type: str |
| 3551 |
sample: round-robin |
| 3552 |
member_count: |
| 3553 |
description: |
| 3554 |
- Total number of members in the pool. |
| 3555 |
returned: queried |
| 3556 |
type: int |
| 3557 |
sample: 50 |
| 3558 |
metadata: |
| 3559 |
description: |
| 3560 |
- Dictionary of arbitrary key/value pairs set on the pool. |
| 3561 |
returned: queried |
| 3562 |
type: dict |
| 3563 |
sample: hash/dictionary of values |
| 3564 |
minimum_active_members: |
| 3565 |
description: |
| 3566 |
- Whether the system load balances traffic according to the priority number assigned to the pool member. |
| 3567 |
- This parameter is identical to C(priority_group_activation) and is just an alias for it. |
| 3568 |
returned: queried |
| 3569 |
type: int |
| 3570 |
sample: 2 |
| 3571 |
minimum_up_members: |
| 3572 |
description: |
| 3573 |
- The minimum number of pool members that must be up. |
| 3574 |
returned: queried |
| 3575 |
type: int |
| 3576 |
sample: 1 |
| 3577 |
minimum_up_members_action: |
| 3578 |
description: |
| 3579 |
- The action to take if the C(minimum_up_members_checking) is enabled and the number of active pool |
| 3580 |
members falls below the number specified in C(minimum_up_members). |
| 3581 |
returned: queried |
| 3582 |
type: str |
| 3583 |
sample: failover |
| 3584 |
minimum_up_members_checking: |
| 3585 |
description: |
| 3586 |
- Enables or disables the C(minimum_up_members) feature. |
| 3587 |
returned: queried |
| 3588 |
type: bool |
| 3589 |
sample: false |
| 3590 |
name: |
| 3591 |
description: |
| 3592 |
- Relative name of the resource in the BIG-IP. |
| 3593 |
returned: queried |
| 3594 |
type: str |
| 3595 |
sample: pool1 |
| 3596 |
pool_avg_queue_entry_age: |
| 3597 |
description: |
| 3598 |
- Average queue entry age, for the pool only. |
| 3599 |
returned: queried |
| 3600 |
type: int |
| 3601 |
sample: 5 |
| 3602 |
pool_max_queue_entry_age_ever: |
| 3603 |
description: |
| 3604 |
- Maximum queue entry age ever, for the pool only. |
| 3605 |
returned: queried |
| 3606 |
type: int |
| 3607 |
sample: 2 |
| 3608 |
pool_max_queue_entry_age_recently: |
| 3609 |
description: |
| 3610 |
- Maximum queue entry age recently, for the pool only. |
| 3611 |
returned: queried |
| 3612 |
type: int |
| 3613 |
sample: 5 |
| 3614 |
pool_num_connections_queued_now: |
| 3615 |
description: |
| 3616 |
- Number of connections queued now, for the pool only. |
| 3617 |
returned: queried |
| 3618 |
type: int |
| 3619 |
sample: 20 |
| 3620 |
pool_num_connections_serviced: |
| 3621 |
description: |
| 3622 |
- Number of connections serviced, for the pool only. |
| 3623 |
returned: queried |
| 3624 |
type: int |
| 3625 |
sample: 15 |
| 3626 |
pool_queue_head_entry_age: |
| 3627 |
description: |
| 3628 |
- Queue head entry age, for the pool only. |
| 3629 |
returned: queried |
| 3630 |
type: int |
| 3631 |
sample: 4 |
| 3632 |
priority_group_activation: |
| 3633 |
description: |
| 3634 |
- Whether the system load balances traffic according to the priority number assigned to the pool member. |
| 3635 |
- This parameter is identical to C(minimum_active_members) and is just an alias for it. |
| 3636 |
returned: queried |
| 3637 |
type: int |
| 3638 |
sample: 2 |
| 3639 |
queue_depth_limit: |
| 3640 |
description: |
| 3641 |
- The maximum number of connections that may simultaneously be queued to go to any member of this pool. |
| 3642 |
returned: queried |
| 3643 |
type: int |
| 3644 |
sample: 3 |
| 3645 |
queue_on_connection_limit: |
| 3646 |
description: |
| 3647 |
- Enable or disable queuing connections when pool member or node connection limits are reached. |
| 3648 |
returned: queried |
| 3649 |
type: bool |
| 3650 |
sample: true |
| 3651 |
queue_time_limit: |
| 3652 |
description: |
| 3653 |
- Specifies the maximum time, in milliseconds, a connection will remain queued. |
| 3654 |
returned: queried |
| 3655 |
type: int |
| 3656 |
sample: 0 |
| 3657 |
real_session: |
| 3658 |
description: |
| 3659 |
- The actual REST API value for the C(session) attribute. |
| 3660 |
- This is different from the C(state) return value, as the return value |
| 3661 |
can be considered a generalization of all available sessions, instead of the |
| 3662 |
specific value of the session. |
| 3663 |
returned: queried |
| 3664 |
type: str |
| 3665 |
sample: monitor-enabled |
| 3666 |
real_state: |
| 3667 |
description: |
| 3668 |
- The actual REST API value for the C(state) attribute. |
| 3669 |
- This is different from the C(state) return value, as the return value |
| 3670 |
can be considered a generalization of all available states, instead of the |
| 3671 |
specific value of the state. |
| 3672 |
returned: queried |
| 3673 |
type: str |
| 3674 |
sample: up |
| 3675 |
reselect_tries: |
| 3676 |
description: |
| 3677 |
- The number of times the system tries to contact a pool member after a passive failure. |
| 3678 |
returned: queried |
| 3679 |
type: int |
| 3680 |
sample: 0 |
| 3681 |
server_ip_tos: |
| 3682 |
description: |
| 3683 |
- The Type of Service (ToS) level to use when sending packets to a server. |
| 3684 |
returned: queried |
| 3685 |
type: str |
| 3686 |
sample: pass-through |
| 3687 |
server_link_qos: |
| 3688 |
description: |
| 3689 |
- The Quality of Service (QoS) level to use when sending packets to a server. |
| 3690 |
returned: queried |
| 3691 |
type: str |
| 3692 |
sample: pass-through |
| 3693 |
service_down_action: |
| 3694 |
description: |
| 3695 |
- The action to take if the service specified in the pool is marked down. |
| 3696 |
returned: queried |
| 3697 |
type: str |
| 3698 |
sample: none |
| 3699 |
server_side_bits_in: |
| 3700 |
description: |
| 3701 |
- Number of server-side ingress bits. |
| 3702 |
returned: queried |
| 3703 |
type: int |
| 3704 |
sample: 1000 |
| 3705 |
server_side_bits_out: |
| 3706 |
description: |
| 3707 |
- Number of server-side egress bits. |
| 3708 |
returned: queried |
| 3709 |
type: int |
| 3710 |
sample: 200 |
| 3711 |
server_side_current_connections: |
| 3712 |
description: |
| 3713 |
- Number of current connections server-side. |
| 3714 |
returned: queried |
| 3715 |
type: int |
| 3716 |
sample: 300 |
| 3717 |
server_side_max_connections: |
| 3718 |
description: |
| 3719 |
- Maximum number of connections server-side. |
| 3720 |
returned: queried |
| 3721 |
type: int |
| 3722 |
sample: 40 |
| 3723 |
server_side_pkts_in: |
| 3724 |
description: |
| 3725 |
- Number of server-side ingress packets. |
| 3726 |
returned: queried |
| 3727 |
type: int |
| 3728 |
sample: 1098384 |
| 3729 |
server_side_pkts_out: |
| 3730 |
description: |
| 3731 |
- Number of server-side egress packets. |
| 3732 |
returned: queried |
| 3733 |
type: int |
| 3734 |
sample: 3484734 |
| 3735 |
server_side_total_connections: |
| 3736 |
description: |
| 3737 |
- Total number of server-side connections. |
| 3738 |
returned: queried |
| 3739 |
type: int |
| 3740 |
sample: 24 |
| 3741 |
slow_ramp_time: |
| 3742 |
description: |
| 3743 |
- The ramp time for the pool. |
| 3744 |
- This provides the ability for a pool member that is newly enabled or marked up |
| 3745 |
to receive proportionally less traffic than other members in the pool. |
| 3746 |
returned: queried |
| 3747 |
type: int |
| 3748 |
sample: 10 |
| 3749 |
status_reason: |
| 3750 |
description: |
| 3751 |
- If there is a problem with the status of the pool, it is reported here. |
| 3752 |
returned: queried |
| 3753 |
type: str |
| 3754 |
sample: The children pool member(s) are down. |
| 3755 |
members: |
| 3756 |
description: List of LTM (Local Traffic Manager) pools. |
| 3757 |
returned: when members exist in the pool. |
| 3758 |
type: complex |
| 3759 |
contains: |
| 3760 |
address: |
| 3761 |
description: IP address of the pool member. |
| 3762 |
returned: queried |
| 3763 |
type: str |
| 3764 |
sample: 1.1.1.1 |
| 3765 |
connection_limit: |
| 3766 |
description: The maximum number of concurrent connections allowed for a pool member. |
| 3767 |
returned: queried |
| 3768 |
type: int |
| 3769 |
sample: 0 |
| 3770 |
description: |
| 3771 |
description: The description of the pool member. |
| 3772 |
returned: queried |
| 3773 |
type: str |
| 3774 |
sample: pool member 1 |
| 3775 |
dynamic_ratio: |
| 3776 |
description: |
| 3777 |
- A range of numbers you want the system to use in conjunction with the ratio load balancing method. |
| 3778 |
returned: queried |
| 3779 |
type: int |
| 3780 |
sample: 1 |
| 3781 |
ephemeral: |
| 3782 |
description: |
| 3783 |
- Whether the node backing the pool member is ephemeral or not. |
| 3784 |
returned: queried |
| 3785 |
type: bool |
| 3786 |
sample: true |
| 3787 |
fqdn_autopopulate: |
| 3788 |
description: |
| 3789 |
- Whether the node should scale to the IP address set returned by DNS. |
| 3790 |
returned: queried |
| 3791 |
type: bool |
| 3792 |
sample: true |
| 3793 |
full_path: |
| 3794 |
description: |
| 3795 |
- Full name of the resource as known to the BIG-IP. |
| 3796 |
- Includes the port in the name. |
| 3797 |
returned: queried |
| 3798 |
type: str |
| 3799 |
sample: "/Common/member:80" |
| 3800 |
inherit_profile: |
| 3801 |
description: |
| 3802 |
- Whether the pool member inherits the encapsulation profile from the parent pool. |
| 3803 |
returned: queried |
| 3804 |
type: bool |
| 3805 |
sample: false |
| 3806 |
logging: |
| 3807 |
description: |
| 3808 |
- Whether the monitor applied should log its actions. |
| 3809 |
returned: queried |
| 3810 |
type: bool |
| 3811 |
sample: false |
| 3812 |
monitors: |
| 3813 |
description: |
| 3814 |
- The Monitors active on the pool member. Monitor names are in their "full_path" form. |
| 3815 |
returned: queried |
| 3816 |
type: list |
| 3817 |
sample: ['/Common/http'] |
| 3818 |
name: |
| 3819 |
description: |
| 3820 |
- Relative name of the resource in the BIG-IP. |
| 3821 |
returned: queried |
| 3822 |
type: str |
| 3823 |
sample: "member:80" |
| 3824 |
partition: |
| 3825 |
description: |
| 3826 |
- Partition the member exists on. |
| 3827 |
returned: queried |
| 3828 |
type: str |
| 3829 |
sample: Common |
| 3830 |
priority_group: |
| 3831 |
description: |
| 3832 |
- The priority group within the pool for this pool member. |
| 3833 |
returned: queried |
| 3834 |
type: int |
| 3835 |
sample: 0 |
| 3836 |
encapsulation_profile: |
| 3837 |
description: |
| 3838 |
- The encapsulation profile to use for the pool member. |
| 3839 |
returned: queried |
| 3840 |
type: str |
| 3841 |
sample: ip4ip4 |
| 3842 |
rate_limit: |
| 3843 |
description: |
| 3844 |
- The maximum number of connections per second allowed for a pool member. |
| 3845 |
returned: queried |
| 3846 |
type: bool |
| 3847 |
sample: false |
| 3848 |
ratio: |
| 3849 |
description: |
| 3850 |
- The weight of the pool for load balancing purposes. |
| 3851 |
returned: queried |
| 3852 |
type: int |
| 3853 |
sample: 1 |
| 3854 |
session: |
| 3855 |
description: |
| 3856 |
- Enables or disables the pool member for new sessions. |
| 3857 |
returned: queried |
| 3858 |
type: str |
| 3859 |
sample: monitor-enabled |
| 3860 |
state: |
| 3861 |
description: |
| 3862 |
- Controls the state of the pool member, overriding any monitors. |
| 3863 |
returned: queried |
| 3864 |
type: str |
| 3865 |
sample: down |
| 3866 |
total_requests: |
| 3867 |
description: |
| 3868 |
- Total requests. |
| 3869 |
returned: queried |
| 3870 |
type: int |
| 3871 |
sample: 8 |
| 3872 |
sample: hash/dictionary of values |
| 3873 |
ltm_policies: |
| 3874 |
description: List of LTM (Local Traffic Manager) policies. |
| 3875 |
returned: When C(ltm-policies) is specified in C(gather_subset). |
| 3876 |
type: complex |
| 3877 |
contains: |
| 3878 |
name: |
| 3879 |
description: |
| 3880 |
- Relative name of the resource in the BIG-IP. |
| 3881 |
returned: queried |
| 3882 |
type: str |
| 3883 |
sample: policy1 |
| 3884 |
full_path: |
| 3885 |
description: |
| 3886 |
- Full name of the resource as known to the BIG-IP. |
| 3887 |
returned: queried |
| 3888 |
type: str |
| 3889 |
sample: /Common/policy1 |
| 3890 |
description: |
| 3891 |
description: |
| 3892 |
- Description of the policy. |
| 3893 |
returned: queried |
| 3894 |
type: str |
| 3895 |
sample: My policy |
| 3896 |
strategy: |
| 3897 |
description: |
| 3898 |
- The match strategy for the policy. |
| 3899 |
returned: queried |
| 3900 |
type: str |
| 3901 |
sample: /Common/first-match |
| 3902 |
requires: |
| 3903 |
description: |
| 3904 |
- Aspects of the system required by this policy. |
| 3905 |
returned: queried |
| 3906 |
type: list |
| 3907 |
sample: ['http'] |
| 3908 |
controls: |
| 3909 |
description: |
| 3910 |
- Aspects of the system controlled by this policy. |
| 3911 |
returned: queried |
| 3912 |
type: list |
| 3913 |
sample: ['forwarding'] |
| 3914 |
status: |
| 3915 |
description: |
| 3916 |
- Indicates published or draft policy status. |
| 3917 |
returned: queried |
| 3918 |
type: str |
| 3919 |
sample: draft |
| 3920 |
rules: |
| 3921 |
description: |
| 3922 |
- List of LTM (Local Traffic Manager) policy rules. |
| 3923 |
returned: when rules are defined in the policy. |
| 3924 |
type: complex |
| 3925 |
contains: |
| 3926 |
actions: |
| 3927 |
description: |
| 3928 |
- The actions the policy will take when a match is encountered. |
| 3929 |
returned: when actions are defined in the rule. |
| 3930 |
type: complex |
| 3931 |
contains: |
| 3932 |
http_reply: |
| 3933 |
description: |
| 3934 |
- Indicates if the action affects a reply to a given HTTP request. |
| 3935 |
returned: when defined in the action. |
| 3936 |
type: bool |
| 3937 |
sample: true |
| 3938 |
redirect: |
| 3939 |
description: |
| 3940 |
- This action will redirect a request. |
| 3941 |
returned: when defined in the action. |
| 3942 |
type: bool |
| 3943 |
sample: false |
| 3944 |
request: |
| 3945 |
description: |
| 3946 |
- This policy action is performed on connection requests. |
| 3947 |
returned: when defined in the action. |
| 3948 |
type: bool |
| 3949 |
sample: false |
| 3950 |
location: |
| 3951 |
description: |
| 3952 |
- This action will come from the given location. |
| 3953 |
returned: when defined in the action. |
| 3954 |
type: str |
| 3955 |
sample: "tcl:https://[getfield [HTTP::host] \\\":\\\" 1][HTTP::uri]" |
| 3956 |
sample: hash/dictionary of values |
| 3957 |
conditions: |
| 3958 |
description: |
| 3959 |
- The conditions a policy will match on. |
| 3960 |
returned: when conditions are defined in the rule. |
| 3961 |
type: complex |
| 3962 |
contains: |
| 3963 |
case_insensitive: |
| 3964 |
description: |
| 3965 |
- Specifies the value matched on is case insensitive. |
| 3966 |
returned: when defined in the condition. |
| 3967 |
type: bool |
| 3968 |
sample: false |
| 3969 |
case_sensitive: |
| 3970 |
description: |
| 3971 |
- Specifies the value matched on is case sensitive. |
| 3972 |
returned: when defined in the condition. |
| 3973 |
type: bool |
| 3974 |
sample: true |
| 3975 |
contains_string: |
| 3976 |
description: |
| 3977 |
- Specifies the value matches if it contains a certain string. |
| 3978 |
returned: when defined in the condition. |
| 3979 |
type: bool |
| 3980 |
sample: true |
| 3981 |
external: |
| 3982 |
description: |
| 3983 |
- Specifies the value matched on is from the external side of a connection. |
| 3984 |
returned: when defined in the condition. |
| 3985 |
type: bool |
| 3986 |
sample: true |
| 3987 |
http_basic_auth: |
| 3988 |
description: |
| 3989 |
- This condition matches on basic HTTP authorization. |
| 3990 |
returned: when defined in the condition. |
| 3991 |
type: bool |
| 3992 |
sample: false |
| 3993 |
http_host: |
| 3994 |
description: |
| 3995 |
- This condition matches on an HTTP host. |
| 3996 |
returned: when defined in the condition. |
| 3997 |
type: bool |
| 3998 |
sample: true |
| 3999 |
http_uri: |
| 4000 |
description: |
| 4001 |
- This condition matches on an HTTP URI. |
| 4002 |
returned: when defined in the condition. |
| 4003 |
type: bool |
| 4004 |
sample: false |
| 4005 |
datagroup: |
| 4006 |
description: |
| 4007 |
- This condition matches on an HTTP URI. |
| 4008 |
returned: when defined in the condition. |
| 4009 |
type: str |
| 4010 |
sample: /Common/policy_using_datagroup |
| 4011 |
tcp: |
| 4012 |
description: |
| 4013 |
- This condition matches on TCP parameters. |
| 4014 |
returned: when defined in the condition. |
| 4015 |
type: bool |
| 4016 |
sample: false |
| 4017 |
address: |
| 4018 |
description: |
| 4019 |
- This condition matches on a TCP address. |
| 4020 |
returned: when defined in the condition. |
| 4021 |
type: bool |
| 4022 |
sample: false |
| 4023 |
matches: |
| 4024 |
description: |
| 4025 |
- This condition matches on an address. |
| 4026 |
returned: when defined in the condition. |
| 4027 |
type: bool |
| 4028 |
sample: false |
| 4029 |
proxy_connect: |
| 4030 |
description: |
| 4031 |
- Specifies the value matched on is proxyConnect. |
| 4032 |
returned: when defined in the condition. |
| 4033 |
type: bool |
| 4034 |
sample: false |
| 4035 |
proxy_request: |
| 4036 |
description: |
| 4037 |
- Specifies the value matched on is proxyRequest. |
| 4038 |
returned: when defined in the condition. |
| 4039 |
type: bool |
| 4040 |
sample: false |
| 4041 |
remote: |
| 4042 |
description: |
| 4043 |
- Specifies the value matched on is remote. |
| 4044 |
returned: when defined in the condition. |
| 4045 |
type: bool |
| 4046 |
sample: false |
| 4047 |
request: |
| 4048 |
description: |
| 4049 |
- This policy matches on a request. |
| 4050 |
returned: when defined in the condition. |
| 4051 |
type: bool |
| 4052 |
sample: true |
| 4053 |
username: |
| 4054 |
description: |
| 4055 |
- Matches on a username. |
| 4056 |
returned: when defined in the condition. |
| 4057 |
type: bool |
| 4058 |
sample: true |
| 4059 |
all: |
| 4060 |
description: |
| 4061 |
- Matches all. |
| 4062 |
returned: when defined in the condition. |
| 4063 |
type: bool |
| 4064 |
sample: true |
| 4065 |
values: |
| 4066 |
description: |
| 4067 |
- The specified values will be matched on. |
| 4068 |
returned: when defined in the condition. |
| 4069 |
type: list |
| 4070 |
sample: ['foo.bar.com', 'baz.cool.com'] |
| 4071 |
sample: hash/dictionary of values |
| 4072 |
sample: hash/dictionary of values |
| 4073 |
sample: hash/dictionary of values |
| 4074 |
management_routes: |
| 4075 |
description: Management route related information. |
| 4076 |
returned: When C(management-routes) is specified in C(gather_subset). |
| 4077 |
type: complex |
| 4078 |
contains: |
| 4079 |
full_path: |
| 4080 |
description: |
| 4081 |
- Full name of the resource as known to the BIG-IP. |
| 4082 |
returned: queried |
| 4083 |
type: str |
| 4084 |
sample: /Common/default |
| 4085 |
name: |
| 4086 |
description: |
| 4087 |
- Relative name of the resource in the BIG-IP. |
| 4088 |
returned: queried |
| 4089 |
type: str |
| 4090 |
sample: default |
| 4091 |
description: |
| 4092 |
description: |
| 4093 |
- User defined description of the route. |
| 4094 |
returned: queried |
| 4095 |
type: str |
| 4096 |
sample: route-1-external |
| 4097 |
gateway: |
| 4098 |
description: |
| 4099 |
- The gateway IP address through which the system forwards packets to the destination. |
| 4100 |
returned: queried |
| 4101 |
type: str |
| 4102 |
sample: 192.168.0.1 |
| 4103 |
mtu: |
| 4104 |
description: |
| 4105 |
- The maximum transmission unit for the management interface. |
| 4106 |
returned: queried |
| 4107 |
type: str |
| 4108 |
sample: 0 |
| 4109 |
network: |
| 4110 |
description: |
| 4111 |
- The destination subnet and netmask, also specified as default or default-inet6. |
| 4112 |
returned: queried |
| 4113 |
type: str |
| 4114 |
sample: default |
| 4115 |
sample: hash/dictionary of values |
| 4116 |
nodes: |
| 4117 |
description: Node related information. |
| 4118 |
returned: When C(nodes) is specified in C(gather_subset). |
| 4119 |
type: complex |
| 4120 |
contains: |
| 4121 |
full_path: |
| 4122 |
description: |
| 4123 |
- Full name of the resource as known to the BIG-IP. |
| 4124 |
returned: queried |
| 4125 |
type: str |
| 4126 |
sample: /Common/5.6.7.8 |
| 4127 |
name: |
| 4128 |
description: |
| 4129 |
- Relative name of the resource in the BIG-IP. |
| 4130 |
returned: queried |
| 4131 |
type: str |
| 4132 |
sample: 5.6.7.8 |
| 4133 |
ratio: |
| 4134 |
description: |
| 4135 |
- Fixed size ratio used for node during C(Ratio) load balancing. |
| 4136 |
returned: queried |
| 4137 |
type: int |
| 4138 |
sample: 10 |
| 4139 |
description: |
| 4140 |
description: |
| 4141 |
- Description of the node. |
| 4142 |
returned: queried |
| 4143 |
type: str |
| 4144 |
sample: My node |
| 4145 |
connection_limit: |
| 4146 |
description: |
| 4147 |
- Maximum number of connections the node can handle. |
| 4148 |
returned: queried |
| 4149 |
type: int |
| 4150 |
sample: 100 |
| 4151 |
address: |
| 4152 |
description: |
| 4153 |
- IP address of the node. |
| 4154 |
returned: queried |
| 4155 |
type: str |
| 4156 |
sample: 2.3.4.5 |
| 4157 |
dynamic_ratio: |
| 4158 |
description: |
| 4159 |
- Dynamic ratio number for the node used when doing C(Dynamic Ratio) load balancing. |
| 4160 |
returned: queried |
| 4161 |
type: int |
| 4162 |
sample: 200 |
| 4163 |
rate_limit: |
| 4164 |
description: |
| 4165 |
- Maximum number of connections per second allowed for the node. |
| 4166 |
returned: queried |
| 4167 |
type: int |
| 4168 |
sample: 1000 |
| 4169 |
monitor_status: |
| 4170 |
description: |
| 4171 |
- Status of the node as reported by the monitor(s) associated with it. |
| 4172 |
- This value is also used in determining node C(state). |
| 4173 |
returned: queried |
| 4174 |
type: str |
| 4175 |
sample: down |
| 4176 |
session_status: |
| 4177 |
description: |
| 4178 |
- This value is also used in determining node C(state). |
| 4179 |
returned: queried |
| 4180 |
type: str |
| 4181 |
sample: enabled |
| 4182 |
availability_status: |
| 4183 |
description: |
| 4184 |
- The availability of the node. |
| 4185 |
returned: queried |
| 4186 |
type: str |
| 4187 |
sample: offline |
| 4188 |
enabled_status: |
| 4189 |
description: |
| 4190 |
- The enabled status of the node. |
| 4191 |
returned: queried |
| 4192 |
type: str |
| 4193 |
sample: enabled |
| 4194 |
status_reason: |
| 4195 |
description: |
| 4196 |
- If there is a problem with the status of the node, it is reported here. |
| 4197 |
returned: queried |
| 4198 |
type: str |
| 4199 |
sample: /Common/https_443 No successful responses received... |
| 4200 |
monitor_rule: |
| 4201 |
description: |
| 4202 |
- A string representation of the full monitor rule. |
| 4203 |
returned: queried |
| 4204 |
type: str |
| 4205 |
sample: /Common/https_443 and /Common/icmp |
| 4206 |
monitors: |
| 4207 |
description: |
| 4208 |
- A list of the monitors identified in the C(monitor_rule). |
| 4209 |
returned: queried |
| 4210 |
type: list |
| 4211 |
sample: ['/Common/https_443', '/Common/icmp'] |
| 4212 |
monitor_type: |
| 4213 |
description: |
| 4214 |
- The C(monitor_type) field related to the C(bigip_node) module, for this nodes |
| 4215 |
monitors. |
| 4216 |
returned: queried |
| 4217 |
type: str |
| 4218 |
sample: and_list |
| 4219 |
fqdn_name: |
| 4220 |
description: |
| 4221 |
- FQDN name of the node. |
| 4222 |
returned: queried |
| 4223 |
type: str |
| 4224 |
sample: sample.host.foo.com |
| 4225 |
fqdn_auto_populate: |
| 4226 |
description: |
| 4227 |
- Indicates if the system automatically creates ephemeral nodes using DNS discovered IPs. |
| 4228 |
returned: queried |
| 4229 |
type: bool |
| 4230 |
sample: true |
| 4231 |
fqdn_address_type: |
| 4232 |
description: |
| 4233 |
- The address family of the automatically created ephemeral nodes. |
| 4234 |
returned: queried |
| 4235 |
type: str |
| 4236 |
sample: ipv4 |
| 4237 |
fqdn_up_interval: |
| 4238 |
description: |
| 4239 |
- The interval at which a query occurs when the DNS server is up. |
| 4240 |
returned: queried |
| 4241 |
type: int |
| 4242 |
sample: 3600 |
| 4243 |
fqdn_down_interval: |
| 4244 |
description: |
| 4245 |
- The interval in which a query occurs when the DNS server is down. |
| 4246 |
returned: queried |
| 4247 |
type: int |
| 4248 |
sample: 15 |
| 4249 |
sample: hash/dictionary of values |
| 4250 |
oneconnect_profiles: |
| 4251 |
description: OneConnect profile related information. |
| 4252 |
returned: When C(oneconnect-profiles) is specified in C(gather_subset). |
| 4253 |
type: complex |
| 4254 |
contains: |
| 4255 |
full_path: |
| 4256 |
description: |
| 4257 |
- Full name of the resource as known to the BIG-IP. |
| 4258 |
returned: queried |
| 4259 |
type: str |
| 4260 |
sample: /Common/oneconnect |
| 4261 |
name: |
| 4262 |
description: |
| 4263 |
- Relative name of the resource in the BIG-IP. |
| 4264 |
returned: queried |
| 4265 |
type: str |
| 4266 |
sample: oneconnect |
| 4267 |
parent: |
| 4268 |
description: |
| 4269 |
- Profile from which this profile inherits settings. |
| 4270 |
returned: queried |
| 4271 |
type: str |
| 4272 |
sample: oneconnect |
| 4273 |
description: |
| 4274 |
description: |
| 4275 |
- Description of the resource. |
| 4276 |
returned: queried |
| 4277 |
type: str |
| 4278 |
sample: My profile |
| 4279 |
idle_timeout_override: |
| 4280 |
description: |
| 4281 |
- Specifies the number of seconds that a connection is idle before |
| 4282 |
the connection flow is eligible for deletion. |
| 4283 |
returned: queried |
| 4284 |
type: int |
| 4285 |
sample: 1000 |
| 4286 |
limit_type: |
| 4287 |
description: |
| 4288 |
- When C(none), simultaneous in-flight requests and responses over TCP |
| 4289 |
connections to a pool member are counted toward the limit. |
| 4290 |
- When C(idle), idle connections will be dropped as the TCP connection |
| 4291 |
limit is reached. |
| 4292 |
- When C(strict), the TCP connection limit is honored with no |
| 4293 |
exceptions. This means idle connections will prevent new TCP |
| 4294 |
connections from being made until they expire, even if they could |
| 4295 |
otherwise be reused. |
| 4296 |
returned: queried |
| 4297 |
type: str |
| 4298 |
sample: idle |
| 4299 |
max_age: |
| 4300 |
description: |
| 4301 |
- Specifies the maximum age, in seconds, of a connection |
| 4302 |
in the connection reuse pool. |
| 4303 |
returned: queried |
| 4304 |
type: int |
| 4305 |
sample: 100 |
| 4306 |
max_reuse: |
| 4307 |
description: |
| 4308 |
- Specifies the maximum number of times a server connection can |
| 4309 |
be reused. |
| 4310 |
returned: queried |
| 4311 |
type: int |
| 4312 |
sample: 1000 |
| 4313 |
max_size: |
| 4314 |
description: |
| 4315 |
- Specifies the maximum number of connections the system holds |
| 4316 |
in the connection reuse pool. |
| 4317 |
- If the pool is already full, then the server connection closes after |
| 4318 |
the response is completed. |
| 4319 |
returned: queried |
| 4320 |
type: int |
| 4321 |
sample: 1000 |
| 4322 |
share_pools: |
| 4323 |
description: |
| 4324 |
- Indicates connections may be shared not only within a virtual |
| 4325 |
server, but also among similar virtual servers. |
| 4326 |
returned: queried |
| 4327 |
type: bool |
| 4328 |
sample: true |
| 4329 |
source_mask: |
| 4330 |
description: |
| 4331 |
- Specifies a source IP mask. |
| 4332 |
- If no mask is provided, the value C(any6) is used. |
| 4333 |
returned: queried |
| 4334 |
type: str |
| 4335 |
sample: 255.255.255.0 |
| 4336 |
sample: hash/dictionary of values |
| 4337 |
partitions: |
| 4338 |
description: Partition related information. |
| 4339 |
returned: When C(partitions) is specified in C(gather_subset). |
| 4340 |
type: complex |
| 4341 |
contains: |
| 4342 |
full_path: |
| 4343 |
description: |
| 4344 |
- Full name of the resource as known to the BIG-IP. |
| 4345 |
returned: queried |
| 4346 |
type: str |
| 4347 |
sample: Common |
| 4348 |
name: |
| 4349 |
description: |
| 4350 |
- Relative name of the resource in the BIG-IP. |
| 4351 |
returned: queried |
| 4352 |
type: str |
| 4353 |
sample: Common |
| 4354 |
description: |
| 4355 |
description: |
| 4356 |
- Description of the partition. |
| 4357 |
returned: queried |
| 4358 |
type: str |
| 4359 |
sample: Tenant 1 |
| 4360 |
default_route_domain: |
| 4361 |
description: |
| 4362 |
- ID of the route domain that is associated with the IP addresses that reside |
| 4363 |
in the partition. |
| 4364 |
returned: queried |
| 4365 |
type: int |
| 4366 |
sample: 0 |
| 4367 |
sample: hash/dictionary of values |
| 4368 |
provision_info: |
| 4369 |
description: Module provisioning related information. |
| 4370 |
returned: When C(provision-info) is specified in C(gather_subset). |
| 4371 |
type: complex |
| 4372 |
contains: |
| 4373 |
full_path: |
| 4374 |
description: |
| 4375 |
- Full name of the resource as known to the BIG-IP. |
| 4376 |
returned: queried |
| 4377 |
type: str |
| 4378 |
sample: asm |
| 4379 |
name: |
| 4380 |
description: |
| 4381 |
- Relative name of the resource in the BIG-IP. |
| 4382 |
returned: queried |
| 4383 |
type: str |
| 4384 |
sample: asm |
| 4385 |
cpu_ratio: |
| 4386 |
description: |
| 4387 |
- Ratio of CPU allocated to this module. |
| 4388 |
- Only relevant if C(level) was specified as C(custom). Otherwise, this value |
| 4389 |
will be reported as C(0). |
| 4390 |
returned: queried |
| 4391 |
type: int |
| 4392 |
sample: 0 |
| 4393 |
disk_ratio: |
| 4394 |
description: |
| 4395 |
- Ratio of disk allocated to this module. |
| 4396 |
- Only relevant if C(level) was specified as C(custom). Otherwise, this value |
| 4397 |
will be reported as C(0). |
| 4398 |
returned: queried |
| 4399 |
type: int |
| 4400 |
sample: 0 |
| 4401 |
memory_ratio: |
| 4402 |
description: |
| 4403 |
- Ratio of memory allocated to this module. |
| 4404 |
- Only relevant if C(level) was specified as C(custom). Otherwise, this value |
| 4405 |
will be reported as C(0). |
| 4406 |
returned: queried |
| 4407 |
type: int |
| 4408 |
sample: 0 |
| 4409 |
level: |
| 4410 |
description: |
| 4411 |
- Provisioned level of the module on BIG-IP. |
| 4412 |
- Valid return values can include C(none), C(minimum), C(nominal), C(dedicated) |
| 4413 |
and C(custom). |
| 4414 |
returned: queried |
| 4415 |
type: int |
| 4416 |
sample: 0 |
| 4417 |
sample: hash/dictionary of values |
| 4418 |
remote_syslog: |
| 4419 |
description: Remote Syslog related information. |
| 4420 |
returned: When C(remote-syslog) is specified in C(gather_subset). |
| 4421 |
type: complex |
| 4422 |
contains: |
| 4423 |
servers: |
| 4424 |
description: Configured remote syslog servers. |
| 4425 |
returned: queried |
| 4426 |
type: complex |
| 4427 |
contains: |
| 4428 |
name: |
| 4429 |
description: Name of remote syslog server as configured on the system. |
| 4430 |
returned: queried |
| 4431 |
type: str |
| 4432 |
sample: /Common/foobar1 |
| 4433 |
remote_port: |
| 4434 |
description: Remote port of the remote syslog server. |
| 4435 |
returned: queried |
| 4436 |
type: int |
| 4437 |
sample: 514 |
| 4438 |
local_ip: |
| 4439 |
description: The local IP address of the remote syslog server. |
| 4440 |
returned: queried |
| 4441 |
type: str |
| 4442 |
sample: 10.10.10.10 |
| 4443 |
remote_host: |
| 4444 |
description: The IP address or hostname of the remote syslog server. |
| 4445 |
returned: queried |
| 4446 |
type: str |
| 4447 |
sample: 192.168.1.1 |
| 4448 |
sample: hash/dictionary of values |
| 4449 |
sample: hash/dictionary of values |
| 4450 |
route_domains: |
| 4451 |
description: Route domain related information. |
| 4452 |
returned: When C(self-ips) is specified in C(gather_subset). |
| 4453 |
type: complex |
| 4454 |
contains: |
| 4455 |
full_path: |
| 4456 |
description: |
| 4457 |
- Full name of the resource as known to the BIG-IP. |
| 4458 |
returned: queried |
| 4459 |
type: str |
| 4460 |
sample: /Common/rd1 |
| 4461 |
name: |
| 4462 |
description: |
| 4463 |
- Relative name of the resource in the BIG-IP. |
| 4464 |
returned: queried |
| 4465 |
type: str |
| 4466 |
sample: rd1 |
| 4467 |
description: |
| 4468 |
description: |
| 4469 |
- Description of the Route Domain. |
| 4470 |
returned: queried |
| 4471 |
type: str |
| 4472 |
sample: My route domain |
| 4473 |
id: |
| 4474 |
description: |
| 4475 |
- The unique identifying integer representing the route domain. |
| 4476 |
returned: queried |
| 4477 |
type: int |
| 4478 |
sample: 10 |
| 4479 |
parent: |
| 4480 |
description: |
| 4481 |
- The route domain the system searches when it cannot find a route in the configured domain. |
| 4482 |
returned: queried |
| 4483 |
type: str |
| 4484 |
sample: 0 |
| 4485 |
bwc_policy: |
| 4486 |
description: |
| 4487 |
- The bandwidth controller for the route domain. |
| 4488 |
returned: queried |
| 4489 |
type: str |
| 4490 |
sample: /Common/foo |
| 4491 |
connection_limit: |
| 4492 |
description: |
| 4493 |
- The new connection limit for the route domain. |
| 4494 |
returned: queried |
| 4495 |
type: int |
| 4496 |
sample: 100 |
| 4497 |
flow_eviction_policy: |
| 4498 |
description: |
| 4499 |
- The new eviction policy to use with this route domain. |
| 4500 |
returned: queried |
| 4501 |
type: str |
| 4502 |
sample: /Common/default-eviction-policy |
| 4503 |
service_policy: |
| 4504 |
description: |
| 4505 |
- The new service policy to use with this route domain. |
| 4506 |
returned: queried |
| 4507 |
type: str |
| 4508 |
sample: /Common-my-service-policy |
| 4509 |
strict: |
| 4510 |
description: |
| 4511 |
- The new strict isolation setting. |
| 4512 |
returned: queried |
| 4513 |
type: str |
| 4514 |
sample: enabled |
| 4515 |
routing_protocol: |
| 4516 |
description: |
| 4517 |
- List of routing protocols applied to the route domain. |
| 4518 |
returned: queried |
| 4519 |
type: list |
| 4520 |
sample: ['bfd', 'bgp'] |
| 4521 |
vlans: |
| 4522 |
description: |
| 4523 |
- List of new VLANs the route domain is applied to. |
| 4524 |
returned: queried |
| 4525 |
type: list |
| 4526 |
sample: ['/Common/http-tunnel', '/Common/socks-tunnel'] |
| 4527 |
sample: hash/dictionary of values |
| 4528 |
self_ips: |
| 4529 |
description: Self IP related information. |
| 4530 |
returned: When C(self-ips) is specified in C(gather_subset). |
| 4531 |
type: complex |
| 4532 |
contains: |
| 4533 |
full_path: |
| 4534 |
description: |
| 4535 |
- Full name of the resource as known to the BIG-IP. |
| 4536 |
returned: queried |
| 4537 |
type: str |
| 4538 |
sample: /Common/self1 |
| 4539 |
name: |
| 4540 |
description: |
| 4541 |
- Relative name of the resource in the BIG-IP. |
| 4542 |
returned: queried |
| 4543 |
type: str |
| 4544 |
sample: self1 |
| 4545 |
description: |
| 4546 |
description: |
| 4547 |
- Description of the Self IP. |
| 4548 |
returned: queried |
| 4549 |
type: str |
| 4550 |
sample: My self-ip |
| 4551 |
netmask: |
| 4552 |
description: |
| 4553 |
- Netmask portion of the IP address, in dotted notation. |
| 4554 |
returned: queried |
| 4555 |
type: str |
| 4556 |
sample: 255.255.255.0 |
| 4557 |
netmask_cidr: |
| 4558 |
description: |
| 4559 |
- Netmask portion of the IP address, in CIDR notation. |
| 4560 |
returned: queried |
| 4561 |
type: int |
| 4562 |
sample: 24 |
| 4563 |
floating: |
| 4564 |
description: |
| 4565 |
- Whether the Self IP is a floating address or not. |
| 4566 |
returned: queried |
| 4567 |
type: bool |
| 4568 |
sample: true |
| 4569 |
traffic_group: |
| 4570 |
description: |
| 4571 |
- Traffic group the Self IP is associated with. |
| 4572 |
returned: queried |
| 4573 |
type: str |
| 4574 |
sample: /Common/traffic-group-local-only |
| 4575 |
service_policy: |
| 4576 |
description: |
| 4577 |
- Service policy assigned to the Self IP. |
| 4578 |
returned: queried |
| 4579 |
type: str |
| 4580 |
sample: /Common/service1 |
| 4581 |
vlan: |
| 4582 |
description: |
| 4583 |
- VLAN associated with the Self IP. |
| 4584 |
returned: queried |
| 4585 |
type: str |
| 4586 |
sample: /Common/vlan1 |
| 4587 |
allow_access_list: |
| 4588 |
description: |
| 4589 |
- List of protocols, and optionally their ports, that are allowed to access the |
| 4590 |
Self IP. Also known as port-lockdown in the web interface. |
| 4591 |
- Items in the list are in the format of "protocol:port". Some items may not |
| 4592 |
have a port associated with them and in those cases the port is C(0). |
| 4593 |
returned: queried |
| 4594 |
type: list |
| 4595 |
sample: ['tcp:80', 'egp:0'] |
| 4596 |
traffic_group_inherited: |
| 4597 |
description: |
| 4598 |
- Whether or not the traffic group is inherited. |
| 4599 |
returned: queried |
| 4600 |
type: bool |
| 4601 |
sample: false |
| 4602 |
sample: hash/dictionary of values |
| 4603 |
server_ssl_profiles: |
| 4604 |
description: Server SSL related information. |
| 4605 |
returned: When C(server-ssl-profiles) is specified in C(gather_subset). |
| 4606 |
type: complex |
| 4607 |
contains: |
| 4608 |
full_path: |
| 4609 |
description: |
| 4610 |
- Full name of the resource as known to the BIG-IP. |
| 4611 |
returned: queried |
| 4612 |
type: str |
| 4613 |
sample: serverssl |
| 4614 |
name: |
| 4615 |
description: |
| 4616 |
- Relative name of the resource in the BIG-IP. |
| 4617 |
returned: queried |
| 4618 |
type: str |
| 4619 |
sample: serverssl |
| 4620 |
description: |
| 4621 |
description: |
| 4622 |
- Description of the resource. |
| 4623 |
returned: queried |
| 4624 |
type: str |
| 4625 |
sample: My profile |
| 4626 |
parent: |
| 4627 |
description: |
| 4628 |
- Profile from which this profile inherits settings. |
| 4629 |
returned: queried |
| 4630 |
type: str |
| 4631 |
sample: serverssl |
| 4632 |
alert_timeout: |
| 4633 |
description: |
| 4634 |
- Maximum time period in seconds to keep the SSL |
| 4635 |
session active after an alert message is sent, or indefinite. |
| 4636 |
returned: queried |
| 4637 |
type: str |
| 4638 |
sample: 100 |
| 4639 |
allow_expired_crl: |
| 4640 |
description: |
| 4641 |
- Use the specified CRL file, even if it has expired. |
| 4642 |
returned: queried |
| 4643 |
type: bool |
| 4644 |
sample: true |
| 4645 |
authentication_frequency: |
| 4646 |
description: |
| 4647 |
- Specifies the frequency of authentication. |
| 4648 |
returned: queried |
| 4649 |
type: str |
| 4650 |
sample: once |
| 4651 |
authenticate_depth: |
| 4652 |
description: |
| 4653 |
- The client certificate chain maximum traversal depth |
| 4654 |
returned: queried |
| 4655 |
type: int |
| 4656 |
sample: 9 |
| 4657 |
authenticate_name: |
| 4658 |
description: |
| 4659 |
- Common Name (CN) embedded in a server certificate. |
| 4660 |
- The system authenticates a server based on the specified CN. |
| 4661 |
returned: queried |
| 4662 |
type: str |
| 4663 |
sample: foo |
| 4664 |
bypass_on_client_cert_fail: |
| 4665 |
description: |
| 4666 |
- Enables or disables SSL forward proxy bypass on failing to get |
| 4667 |
client certificate that the server asks for. |
| 4668 |
returned: queried |
| 4669 |
type: bool |
| 4670 |
sample: true |
| 4671 |
bypass_on_handshake_alert: |
| 4672 |
description: |
| 4673 |
- Enables or disables SSL forward proxy bypass on receiving |
| 4674 |
handshake_failure, protocol_version or unsupported_extension alert |
| 4675 |
message during the serverside SSL handshake. |
| 4676 |
returned: queried |
| 4677 |
type: bool |
| 4678 |
sample: false |
| 4679 |
c3d_ca_cert: |
| 4680 |
description: |
| 4681 |
- Name of the certificate file used as the |
| 4682 |
certification authority certificate when SSL client certificate |
| 4683 |
constrained delegation is enabled. |
| 4684 |
returned: queried |
| 4685 |
type: str |
| 4686 |
sample: /Common/cacert.crt |
| 4687 |
c3d_ca_key: |
| 4688 |
description: |
| 4689 |
- Name of the key file used as the |
| 4690 |
certification authority key when SSL client certificate |
| 4691 |
constrained delegation is enabled. |
| 4692 |
returned: queried |
| 4693 |
type: str |
| 4694 |
sample: /Common/default.key |
| 4695 |
c3d_cert_extension_includes: |
| 4696 |
description: |
| 4697 |
- Extensions of the client certificates to be included |
| 4698 |
in the generated certificates using SSL client certificate |
| 4699 |
constrained delegation. |
| 4700 |
returned: queried |
| 4701 |
type: list |
| 4702 |
sample: [ "basic-constraints", "extended-key-usage", ... ] |
| 4703 |
c3d_cert_lifespan: |
| 4704 |
description: |
| 4705 |
- Lifespan of the certificate generated using the SSL |
| 4706 |
client certificate constrained delegation. |
| 4707 |
returned: queried |
| 4708 |
type: int |
| 4709 |
sample: 24 |
| 4710 |
ca_file: |
| 4711 |
description: |
| 4712 |
- Certificate authority file name. |
| 4713 |
returned: queried |
| 4714 |
type: str |
| 4715 |
sample: default.crt |
| 4716 |
cache_size: |
| 4717 |
description: |
| 4718 |
- The SSL session cache size. |
| 4719 |
returned: queried |
| 4720 |
type: int |
| 4721 |
sample: 262144 |
| 4722 |
cache_timeout: |
| 4723 |
description: |
| 4724 |
- The SSL session cache timeout value, which is the usable |
| 4725 |
lifetime seconds of negotiated SSL session IDs. |
| 4726 |
returned: queried |
| 4727 |
type: int |
| 4728 |
sample: 86400 |
| 4729 |
cert: |
| 4730 |
description: |
| 4731 |
- The name of the certificate installed on the traffic |
| 4732 |
management system for the purpose of terminating or initiating an |
| 4733 |
SSL connection. |
| 4734 |
returned: queried |
| 4735 |
type: str |
| 4736 |
sample: /Common/default.crt |
| 4737 |
chain: |
| 4738 |
description: |
| 4739 |
- Specifies or builds a certificate chain file that a client can use |
| 4740 |
to authenticate the profile. |
| 4741 |
returned: queried |
| 4742 |
type: str |
| 4743 |
sample: /Common/default.crt |
| 4744 |
cipher_group: |
| 4745 |
description: |
| 4746 |
- Specifies a cipher group. |
| 4747 |
returned: queried |
| 4748 |
type: str |
| 4749 |
ciphers: |
| 4750 |
description: |
| 4751 |
- Specifies a cipher name. |
| 4752 |
returned: queried |
| 4753 |
type: str |
| 4754 |
sample: DEFAULT |
| 4755 |
crl_file: |
| 4756 |
description: |
| 4757 |
- Specifies the certificate revocation list file name. |
| 4758 |
returned: queried |
| 4759 |
type: str |
| 4760 |
expire_cert_response_control: |
| 4761 |
description: |
| 4762 |
- Specifies the BIGIP action when the server certificate has |
| 4763 |
expired. |
| 4764 |
returned: queried |
| 4765 |
type: str |
| 4766 |
sample: drop |
| 4767 |
handshake_timeout: |
| 4768 |
description: |
| 4769 |
- Specifies the handshake timeout in seconds. |
| 4770 |
returned: queried |
| 4771 |
type: str |
| 4772 |
sample: 10 |
| 4773 |
key: |
| 4774 |
description: |
| 4775 |
- Specifies the name of the key |
| 4776 |
installed on the traffic management system for the purpose of |
| 4777 |
terminating or initiating an SSL connection. |
| 4778 |
returned: queried |
| 4779 |
type: str |
| 4780 |
sample: /Common/default.key |
| 4781 |
max_active_handshakes: |
| 4782 |
description: |
| 4783 |
- Specifies the maximum number of allowed active SSL handshakes. |
| 4784 |
returned: queried |
| 4785 |
type: str |
| 4786 |
sample: 100 |
| 4787 |
mod_ssl_methods: |
| 4788 |
description: |
| 4789 |
- Enables or disables ModSSL methods. |
| 4790 |
returned: queried |
| 4791 |
type: bool |
| 4792 |
sample: true |
| 4793 |
mode: |
| 4794 |
description: |
| 4795 |
- Enables or disables SSL processing. |
| 4796 |
returned: queried |
| 4797 |
type: bool |
| 4798 |
sample: false |
| 4799 |
ocsp: |
| 4800 |
description: |
| 4801 |
- Specifies the name of the OCSP profile for validating |
| 4802 |
the status of the server certificate. |
| 4803 |
returned: queried |
| 4804 |
type: str |
| 4805 |
options: |
| 4806 |
description: |
| 4807 |
- Enables options, including some industry-related workarounds. |
| 4808 |
returned: queried |
| 4809 |
type: list |
| 4810 |
sample: [ "netscape-reuse-cipher-change-bug", "dont-insert-empty-fragments" ] |
| 4811 |
peer_cert_mode: |
| 4812 |
description: |
| 4813 |
- Specifies the peer certificate mode. |
| 4814 |
returned: queried |
| 4815 |
type: str |
| 4816 |
sample: ignore |
| 4817 |
proxy_ssl: |
| 4818 |
description: |
| 4819 |
- Allows further modification of application traffic within |
| 4820 |
an SSL tunnel while still allowing the server to perform necessary |
| 4821 |
authorization, authentication, auditing steps. |
| 4822 |
returned: queried |
| 4823 |
type: bool |
| 4824 |
sample: true |
| 4825 |
proxy_ssl_passthrough: |
| 4826 |
description: |
| 4827 |
- Allows Proxy SSL to passthrough the traffic when ciphersuite negotiated |
| 4828 |
between the client and server is not supported. |
| 4829 |
returned: queried |
| 4830 |
type: bool |
| 4831 |
sample: true |
| 4832 |
renegotiate_period: |
| 4833 |
description: |
| 4834 |
- Number of seconds from the initial connect time |
| 4835 |
after which the system renegotiates an SSL session. |
| 4836 |
returned: queried |
| 4837 |
type: str |
| 4838 |
sample: indefinite |
| 4839 |
renegotiate_size: |
| 4840 |
description: |
| 4841 |
- Specifies a throughput size of SSL renegotiation, in megabytes. |
| 4842 |
returned: queried |
| 4843 |
type: str |
| 4844 |
sample: indefinite |
| 4845 |
renegotiation: |
| 4846 |
description: |
| 4847 |
- Whether renegotiations are enabled. |
| 4848 |
returned: queried |
| 4849 |
type: bool |
| 4850 |
sample: true |
| 4851 |
retain_certificate: |
| 4852 |
description: |
| 4853 |
- APM module requires storing certificates in the SSL session. When C(false), |
| 4854 |
a certificate will not be stored in the SSL session. |
| 4855 |
returned: queried |
| 4856 |
type: bool |
| 4857 |
sample: false |
| 4858 |
generic_alert: |
| 4859 |
description: |
| 4860 |
- Enables or disables generic-alert. |
| 4861 |
returned: queried |
| 4862 |
type: bool |
| 4863 |
sample: true |
| 4864 |
secure_renegotiation: |
| 4865 |
description: |
| 4866 |
- Specifies the secure renegotiation mode. |
| 4867 |
returned: queried |
| 4868 |
type: str |
| 4869 |
sample: require |
| 4870 |
server_name: |
| 4871 |
description: |
| 4872 |
- Server name to be included in the SNI (server name |
| 4873 |
indication) extension during SSL handshake in ClientHello. |
| 4874 |
returned: queried |
| 4875 |
type: str |
| 4876 |
session_mirroring: |
| 4877 |
description: |
| 4878 |
- Enables or disables the mirroring of sessions to the high availability |
| 4879 |
peer. |
| 4880 |
returned: queried |
| 4881 |
type: bool |
| 4882 |
sample: true |
| 4883 |
session_ticket: |
| 4884 |
description: |
| 4885 |
- Enables or disables session-ticket. |
| 4886 |
returned: queried |
| 4887 |
type: bool |
| 4888 |
sample: false |
| 4889 |
sni_default: |
| 4890 |
description: |
| 4891 |
- When C(true), this profile is the default SSL profile when the server |
| 4892 |
name in a client connection does not match any configured server |
| 4893 |
names, or a client connection does not specify any server name at |
| 4894 |
all. |
| 4895 |
returned: queried |
| 4896 |
type: bool |
| 4897 |
sample: true |
| 4898 |
sni_require: |
| 4899 |
description: |
| 4900 |
- When C(true), connections to a server that do not support SNI |
| 4901 |
extension will be rejected. |
| 4902 |
returned: queried |
| 4903 |
type: bool |
| 4904 |
sample: false |
| 4905 |
ssl_c3d: |
| 4906 |
description: |
| 4907 |
- Enables or disables SSL Client certificate constrained delegation. |
| 4908 |
returned: queried |
| 4909 |
type: bool |
| 4910 |
sample: true |
| 4911 |
ssl_forward_proxy_enabled: |
| 4912 |
description: |
| 4913 |
- Enables or disables the ssl-forward-proxy feature. |
| 4914 |
returned: queried |
| 4915 |
type: bool |
| 4916 |
sample: false |
| 4917 |
ssl_sign_hash: |
| 4918 |
description: |
| 4919 |
- Specifies the SSL sign hash algorithm which is used to sign and verify |
| 4920 |
SSL Server Key Exchange and Certificate Verify messages for the |
| 4921 |
specified SSL profiles. |
| 4922 |
returned: queried |
| 4923 |
type: str |
| 4924 |
sample: sha1 |
| 4925 |
ssl_forward_proxy_bypass: |
| 4926 |
description: |
| 4927 |
- Enables or disables the ssl-forward-proxy-bypass feature. |
| 4928 |
returned: queried |
| 4929 |
type: bool |
| 4930 |
sample: true |
| 4931 |
strict_resume: |
| 4932 |
description: |
| 4933 |
- Enables or disables the resumption of SSL sessions after an |
| 4934 |
unclean shutdown. |
| 4935 |
returned: queried |
| 4936 |
type: bool |
| 4937 |
sample: false |
| 4938 |
unclean_shutdown: |
| 4939 |
description: |
| 4940 |
- Specifies, when C(true), that the SSL profile performs unclean |
| 4941 |
shutdowns of all SSL connections. This means underlying TCP |
| 4942 |
connections are closed without exchanging the required SSL |
| 4943 |
shutdown alerts. |
| 4944 |
returned: queried |
| 4945 |
type: bool |
| 4946 |
sample: true |
| 4947 |
untrusted_cert_response_control: |
| 4948 |
description: |
| 4949 |
- Specifies the BIG-IP action when the server certificate has |
| 4950 |
an untrusted CA. |
| 4951 |
returned: queried |
| 4952 |
type: str |
| 4953 |
sample: drop |
| 4954 |
sample: hash/dictionary of values |
| 4955 |
software_hotfixes: |
| 4956 |
description: List of software hotfixes. |
| 4957 |
returned: When C(software-hotfixes) is specified in C(gather_subset). |
| 4958 |
type: complex |
| 4959 |
contains: |
| 4960 |
name: |
| 4961 |
description: |
| 4962 |
- Name of the image. |
| 4963 |
returned: queried |
| 4964 |
type: str |
| 4965 |
sample: Hotfix-BIGIP-13.0.0.3.0.1679-HF3.iso |
| 4966 |
full_path: |
| 4967 |
description: |
| 4968 |
- Full name of the resource as known to the BIG-IP. |
| 4969 |
returned: queried |
| 4970 |
type: str |
| 4971 |
sample: Hotfix-BIGIP-13.0.0.3.0.1679-HF3.iso |
| 4972 |
build: |
| 4973 |
description: |
| 4974 |
- Build number of the image. |
| 4975 |
- This is usually a sub-string of the C(name). |
| 4976 |
returned: queried |
| 4977 |
type: str |
| 4978 |
sample: 3.0.1679 |
| 4979 |
checksum: |
| 4980 |
description: |
| 4981 |
- MD5 checksum of the image. |
| 4982 |
- Note that this is the checksum stored inside the ISO. It is not |
| 4983 |
the actual checksum of the ISO. |
| 4984 |
returned: queried |
| 4985 |
type: str |
| 4986 |
sample: df1ec715d2089d0fa54c0c4284656a98 |
| 4987 |
product: |
| 4988 |
description: |
| 4989 |
- Product contained in the ISO. |
| 4990 |
returned: queried |
| 4991 |
type: str |
| 4992 |
sample: BIG-IP |
| 4993 |
id: |
| 4994 |
description: |
| 4995 |
- ID component of the image. |
| 4996 |
- This is usually a sub-string of the C(name). |
| 4997 |
returned: queried |
| 4998 |
type: str |
| 4999 |
sample: HF3 |
| 5000 |
title: |
| 5001 |
description: |
| 5002 |
- Human friendly name of the image. |
| 5003 |
returned: queried |
| 5004 |
type: str |
| 5005 |
sample: Hotfix Version 3.0.1679 |
| 5006 |
verified: |
| 5007 |
description: |
| 5008 |
- Specifies whether the system has verified this image. |
| 5009 |
returned: queried |
| 5010 |
type: bool |
| 5011 |
sample: true |
| 5012 |
version: |
| 5013 |
description: |
| 5014 |
- Version of software contained in the image. |
| 5015 |
- This is a sub-string of the C(name). |
| 5016 |
returned: queried |
| 5017 |
type: str |
| 5018 |
sample: 13.0.0 |
| 5019 |
sample: hash/dictionary of values |
| 5020 |
software_images: |
| 5021 |
description: List of software images. |
| 5022 |
returned: When C(software-images) is specified in C(gather_subset). |
| 5023 |
type: complex |
| 5024 |
contains: |
| 5025 |
name: |
| 5026 |
description: |
| 5027 |
- Name of the image. |
| 5028 |
returned: queried |
| 5029 |
type: str |
| 5030 |
sample: BIGIP-13.1.0.7-0.0.1.iso |
| 5031 |
full_path: |
| 5032 |
description: |
| 5033 |
- Full name of the resource as known to the BIG-IP. |
| 5034 |
returned: queried |
| 5035 |
type: str |
| 5036 |
sample: BIGIP-13.1.0.7-0.0.1.iso |
| 5037 |
build: |
| 5038 |
description: |
| 5039 |
- Build number of the image. |
| 5040 |
- This is usually a sub-string of the C(name). |
| 5041 |
returned: queried |
| 5042 |
type: str |
| 5043 |
sample: 0.0.1 |
| 5044 |
build_date: |
| 5045 |
description: |
| 5046 |
- Date of the build. |
| 5047 |
returned: queried |
| 5048 |
type: str |
| 5049 |
sample: "2018-05-05T15:26:30" |
| 5050 |
checksum: |
| 5051 |
description: |
| 5052 |
- MD5 checksum of the image. |
| 5053 |
- Note that this is the checksum stored inside the ISO. It is not |
| 5054 |
the actual checksum of the ISO. |
| 5055 |
returned: queried |
| 5056 |
type: str |
| 5057 |
sample: df1ec715d2089d0fa54c0c4284656a98 |
| 5058 |
file_size: |
| 5059 |
description: |
| 5060 |
- Size of the image, in megabytes. |
| 5061 |
returned: queried |
| 5062 |
type: int |
| 5063 |
sample: 1938 |
| 5064 |
last_modified: |
| 5065 |
description: |
| 5066 |
- Last modified date of the ISO. |
| 5067 |
returned: queried |
| 5068 |
type: str |
| 5069 |
sample: "2018-05-05T15:26:30" |
| 5070 |
product: |
| 5071 |
description: |
| 5072 |
- Product contained in the ISO. |
| 5073 |
returned: queried |
| 5074 |
type: str |
| 5075 |
sample: BIG-IP |
| 5076 |
verified: |
| 5077 |
description: |
| 5078 |
- Whether or not the system has verified this image. |
| 5079 |
returned: queried |
| 5080 |
type: bool |
| 5081 |
sample: true |
| 5082 |
version: |
| 5083 |
description: |
| 5084 |
- Version of software contained in the image. |
| 5085 |
- This is a sub-string of the C(name). |
| 5086 |
returned: queried |
| 5087 |
type: str |
| 5088 |
sample: 13.1.0.7 |
| 5089 |
sample: hash/dictionary of values |
| 5090 |
software_volumes: |
| 5091 |
description: List of software volumes. |
| 5092 |
returned: When C(software-volumes) is specified in C(gather_subset). |
| 5093 |
type: complex |
| 5094 |
contains: |
| 5095 |
active: |
| 5096 |
description: |
| 5097 |
- Whether the volume is currently active or not. |
| 5098 |
- An active volume contains the currently running version of software. |
| 5099 |
returned: queried |
| 5100 |
type: bool |
| 5101 |
sample: true |
| 5102 |
base_build: |
| 5103 |
description: |
| 5104 |
- Base build version of the software installed in the volume. |
| 5105 |
- When a hotfix is installed, this refers to the base version of software |
| 5106 |
that the hotfix requires. |
| 5107 |
returned: queried |
| 5108 |
type: str |
| 5109 |
sample: 0.0.6 |
| 5110 |
build: |
| 5111 |
description: |
| 5112 |
- Build version of the software installed in the volume. |
| 5113 |
returned: queried |
| 5114 |
type: str |
| 5115 |
sample: 0.0.6 |
| 5116 |
full_path: |
| 5117 |
description: |
| 5118 |
- Full name of the resource as known to the BIG-IP. |
| 5119 |
returned: queried |
| 5120 |
type: str |
| 5121 |
sample: HD1.1 |
| 5122 |
default_boot_location: |
| 5123 |
description: |
| 5124 |
- Whether this volume is the default boot location or not. |
| 5125 |
returned: queried |
| 5126 |
type: bool |
| 5127 |
sample: true |
| 5128 |
name: |
| 5129 |
description: |
| 5130 |
- Relative name of the resource in the BIG-IP. |
| 5131 |
- This usually matches the C(full_name). |
| 5132 |
returned: queried |
| 5133 |
type: str |
| 5134 |
sample: HD1.1 |
| 5135 |
product: |
| 5136 |
description: |
| 5137 |
- The F5 product installed in this slot. |
| 5138 |
- This should always be BIG-IP. |
| 5139 |
returned: queried |
| 5140 |
type: str |
| 5141 |
sample: BIG-IP |
| 5142 |
status: |
| 5143 |
description: |
| 5144 |
- Status of the software installed, or being installed, in the volume. |
| 5145 |
- When C(complete), indicates the software has completed installing. |
| 5146 |
returned: queried |
| 5147 |
type: str |
| 5148 |
sample: complete |
| 5149 |
version: |
| 5150 |
description: |
| 5151 |
- Version of software installed in the volume, excluding the C(build) number. |
| 5152 |
returned: queried |
| 5153 |
type: str |
| 5154 |
sample: 13.1.0.4 |
| 5155 |
sample: hash/dictionary of values |
| 5156 |
ssl_certs: |
| 5157 |
description: SSL certificate related information. |
| 5158 |
returned: When C(ssl-certs) is specified in C(gather_subset). |
| 5159 |
type: complex |
| 5160 |
contains: |
| 5161 |
full_path: |
| 5162 |
description: |
| 5163 |
- Full name of the resource as known to the BIG-IP. |
| 5164 |
returned: queried |
| 5165 |
type: str |
| 5166 |
sample: /Common/cert1 |
| 5167 |
name: |
| 5168 |
description: |
| 5169 |
- Relative name of the resource in the BIG-IP. |
| 5170 |
returned: queried |
| 5171 |
type: str |
| 5172 |
sample: cert1 |
| 5173 |
key_type: |
| 5174 |
description: |
| 5175 |
- Specifies the type of cryptographic key associated with this certificate. |
| 5176 |
returned: queried |
| 5177 |
type: str |
| 5178 |
sample: rsa-private |
| 5179 |
key_size: |
| 5180 |
description: |
| 5181 |
- Specifies the size (in bytes) of the file associated with this file object. |
| 5182 |
returned: queried |
| 5183 |
type: int |
| 5184 |
sample: 2048 |
| 5185 |
system_path: |
| 5186 |
description: |
| 5187 |
- Path on the BIG-IP where the cert can be found. |
| 5188 |
returned: queried |
| 5189 |
type: str |
| 5190 |
sample: /config/ssl/ssl.crt/f5-irule.crt |
| 5191 |
sha1_checksum: |
| 5192 |
description: |
| 5193 |
- SHA1 checksum of the certificate. |
| 5194 |
returned: queried |
| 5195 |
type: str |
| 5196 |
sample: 1306e84e1e6a2da53816cefe1f684b80d6be1e3e |
| 5197 |
subject: |
| 5198 |
description: |
| 5199 |
- Specifies X509 information of the certificate's subject. |
| 5200 |
returned: queried |
| 5201 |
type: str |
| 5202 |
sample: "[email protected],CN=..." |
| 5203 |
last_update_time: |
| 5204 |
description: |
| 5205 |
- Specifies the last time the file-object was |
| 5206 |
updated/modified. |
| 5207 |
returned: queried |
| 5208 |
type: str |
| 5209 |
sample: "2018-05-15T21:11:15Z" |
| 5210 |
issuer: |
| 5211 |
description: |
| 5212 |
- Specifies X509 information of the certificate's issuer. |
| 5213 |
returned: queried |
| 5214 |
type: str |
| 5215 |
sample: "[email protected],...CN=support.f5.com," |
| 5216 |
is_bundle: |
| 5217 |
description: |
| 5218 |
- Specifies whether the certificate file is a bundle (that is, |
| 5219 |
whether it contains more than one certificate). |
| 5220 |
returned: queried |
| 5221 |
type: bool |
| 5222 |
sample: false |
| 5223 |
fingerprint: |
| 5224 |
description: |
| 5225 |
- Displays the SHA-256 fingerprint of the certificate. |
| 5226 |
returned: queried |
| 5227 |
type: str |
| 5228 |
sample: "SHA256/88:A3:05:...:59:01:EA:5D:B0" |
| 5229 |
expiration_date: |
| 5230 |
description: |
| 5231 |
- Specifies a string representation of the expiration date of the |
| 5232 |
certificate. |
| 5233 |
returned: queried |
| 5234 |
type: str |
| 5235 |
sample: "Aug 13 21:21:29 2031 GMT" |
| 5236 |
expiration_timestamp: |
| 5237 |
description: |
| 5238 |
- Specifies the date this certificate expires. Stored as a |
| 5239 |
POSIX time. |
| 5240 |
returned: queried |
| 5241 |
type: int |
| 5242 |
sample: 1944422489 |
| 5243 |
create_time: |
| 5244 |
description: |
| 5245 |
- Specifies the time the file-object was created. |
| 5246 |
returned: queried |
| 5247 |
type: str |
| 5248 |
sample: "2018-05-15T21:11:15Z" |
| 5249 |
serial_no: |
| 5250 |
description: |
| 5251 |
- Specifies certificate's serial number |
| 5252 |
returned: queried |
| 5253 |
type: str |
| 5254 |
sample: "1234567890" |
| 5255 |
subject_alternative_name: |
| 5256 |
description: |
| 5257 |
- Displays the Subject Alternative Name for the certificate. |
| 5258 |
- The X509v3 Subject Alternative Name is embedded in the certificate for X509 extension purposes. |
| 5259 |
returned: queried |
| 5260 |
type: str |
| 5261 |
sample: "DNS:www.example.com, DNS:www.example.internal.net" |
| 5262 |
sample: hash/dictionary of values |
| 5263 |
ssl_keys: |
| 5264 |
description: SSL certificate related information. |
| 5265 |
returned: When C(ssl-keys) is specified in C(gather_subset). |
| 5266 |
type: complex |
| 5267 |
contains: |
| 5268 |
full_path: |
| 5269 |
description: |
| 5270 |
- Full name of the resource as known to the BIG-IP. |
| 5271 |
returned: queried |
| 5272 |
type: str |
| 5273 |
sample: /Common/key1 |
| 5274 |
name: |
| 5275 |
description: |
| 5276 |
- Relative name of the resource in the BIG-IP. |
| 5277 |
returned: queried |
| 5278 |
type: str |
| 5279 |
sample: key1 |
| 5280 |
key_type: |
| 5281 |
description: |
| 5282 |
- Specifies the cryptographic type of the key. That is, |
| 5283 |
which algorithm this key is compatible with. |
| 5284 |
returned: queried |
| 5285 |
type: str |
| 5286 |
sample: rsa-private |
| 5287 |
key_size: |
| 5288 |
description: |
| 5289 |
- Specifies the size of the cryptographic key associated with this |
| 5290 |
file object, in bits. |
| 5291 |
returned: queried |
| 5292 |
type: int |
| 5293 |
sample: 2048 |
| 5294 |
security_type: |
| 5295 |
description: |
| 5296 |
- Specifies the type of security used to handle or store the key. |
| 5297 |
returned: queried |
| 5298 |
type: str |
| 5299 |
sample: normal |
| 5300 |
system_path: |
| 5301 |
description: |
| 5302 |
- The path on the filesystem where the key is stored. |
| 5303 |
returned: queried |
| 5304 |
type: str |
| 5305 |
sample: /config/ssl/ssl.key/default.key |
| 5306 |
sha1_checksum: |
| 5307 |
description: |
| 5308 |
- The SHA1 checksum of the key. |
| 5309 |
returned: queried |
| 5310 |
type: str |
| 5311 |
sample: 1fcf7de3dd8e834d613099d8e10b2060cd9ecc9f |
| 5312 |
sample: hash/dictionary of values |
| 5313 |
sync_status: |
| 5314 |
description: |
| 5315 |
- Configuration Synchronization Status across all Device Groups. |
| 5316 |
- Note that the sync-status works across all device groups - a specific device group cannot be queried for its sync-status. |
| 5317 |
- In general the device-group with the 'worst' sync-status will be shown. |
| 5318 |
returned: When C(sync-status) is specified in C(gather_subset). |
| 5319 |
type: complex |
| 5320 |
contains: |
| 5321 |
color: |
| 5322 |
description: |
| 5323 |
- Sync status color. |
| 5324 |
- Eg. red, blue, green, yellow |
| 5325 |
returned: queried |
| 5326 |
type: str |
| 5327 |
sample: red |
| 5328 |
details: |
| 5329 |
description: |
| 5330 |
- A list of all details provided for the current sync-status of the device |
| 5331 |
returned: queried |
| 5332 |
type: list |
| 5333 |
sample: |
| 5334 |
- Optional action: Add a device to the trust domain |
| 5335 |
mode: |
| 5336 |
description: |
| 5337 |
- Device operation mode (high-availability, standalone) |
| 5338 |
returned: queried |
| 5339 |
type: str |
| 5340 |
sample: |
| 5341 |
- high-availability |
| 5342 |
- standalone |
| 5343 |
recommended_action: |
| 5344 |
description: |
| 5345 |
- The next recommended action to take on the current sync-status. |
| 5346 |
- This field might be empty. |
| 5347 |
returned: queried |
| 5348 |
type: str |
| 5349 |
sample: Synchronize bigip-a.example.com to group some-device-group |
| 5350 |
status: |
| 5351 |
description: |
| 5352 |
- Synchronization Status |
| 5353 |
returned: queried |
| 5354 |
type: str |
| 5355 |
sample: |
| 5356 |
- Changes Pending |
| 5357 |
- In Sync |
| 5358 |
- Standalone |
| 5359 |
- Disconnected |
| 5360 |
summary: |
| 5361 |
description: The configuration synchronization status summary |
| 5362 |
returned: queried |
| 5363 |
type: str |
| 5364 |
sample: |
| 5365 |
- The device group is awaiting the initial config sync |
| 5366 |
- There is a possible change conflict between ... |
| 5367 |
sample: hash/dictionary of values |
| 5368 |
system_db: |
| 5369 |
description: System DB related information. |
| 5370 |
returned: When C(system-db) is specified in C(gather_subset). |
| 5371 |
type: complex |
| 5372 |
contains: |
| 5373 |
full_path: |
| 5374 |
description: |
| 5375 |
- Full name of the resource as known to the BIG-IP. |
| 5376 |
returned: queried |
| 5377 |
type: str |
| 5378 |
sample: vendor.wwwurl |
| 5379 |
name: |
| 5380 |
description: |
| 5381 |
- Relative name of the resource in the BIG-IP. |
| 5382 |
returned: queried |
| 5383 |
type: str |
| 5384 |
sample: vendor.wwwurl |
| 5385 |
default: |
| 5386 |
description: |
| 5387 |
- Default value of the key. |
| 5388 |
returned: queried |
| 5389 |
type: str |
| 5390 |
sample: www.f5.com |
| 5391 |
scf_config: |
| 5392 |
description: |
| 5393 |
- Whether the database key would be found in an SCF config or not. |
| 5394 |
returned: queried |
| 5395 |
type: str |
| 5396 |
sample: false |
| 5397 |
value: |
| 5398 |
description: |
| 5399 |
- The value of the key. |
| 5400 |
returned: queried |
| 5401 |
type: str |
| 5402 |
sample: www.f5.com |
| 5403 |
value_range: |
| 5404 |
description: |
| 5405 |
- The accepted range of values for the key. |
| 5406 |
returned: queried |
| 5407 |
type: str |
| 5408 |
sample: string |
| 5409 |
sample: hash/dictionary of values |
| 5410 |
system_info: |
| 5411 |
description: Traffic group related information. |
| 5412 |
returned: When C(traffic-groups) is specified in C(gather_subset). |
| 5413 |
type: complex |
| 5414 |
contains: |
| 5415 |
base_mac_address: |
| 5416 |
description: |
| 5417 |
- Media Access Control address (MAC address) of the device. |
| 5418 |
returned: queried |
| 5419 |
type: str |
| 5420 |
sample: "fa:16:3e:c3:42:6f" |
| 5421 |
marketing_name: |
| 5422 |
description: |
| 5423 |
- Marketing name of the device platform. |
| 5424 |
returned: queried |
| 5425 |
type: str |
| 5426 |
sample: BIG-IP Virtual Edition |
| 5427 |
time: |
| 5428 |
description: |
| 5429 |
- Mapping of the current time information to specific time-named keys. |
| 5430 |
returned: queried |
| 5431 |
type: complex |
| 5432 |
contains: |
| 5433 |
day: |
| 5434 |
description: |
| 5435 |
- The current day of the month, in numeric form. |
| 5436 |
returned: queried |
| 5437 |
type: int |
| 5438 |
sample: 7 |
| 5439 |
hour: |
| 5440 |
description: |
| 5441 |
- The current hour of the day in 24-hour format. |
| 5442 |
returned: queried |
| 5443 |
type: int |
| 5444 |
sample: 18 |
| 5445 |
minute: |
| 5446 |
description: |
| 5447 |
- The current minute of the hour. |
| 5448 |
returned: queried |
| 5449 |
type: int |
| 5450 |
sample: 16 |
| 5451 |
month: |
| 5452 |
description: |
| 5453 |
- The current month, in numeric form. |
| 5454 |
returned: queried |
| 5455 |
type: int |
| 5456 |
sample: 6 |
| 5457 |
second: |
| 5458 |
description: |
| 5459 |
- The current second of the minute. |
| 5460 |
returned: queried |
| 5461 |
type: int |
| 5462 |
sample: 51 |
| 5463 |
year: |
| 5464 |
description: |
| 5465 |
- The current year in 4-digit format. |
| 5466 |
returned: queried |
| 5467 |
type: int |
| 5468 |
sample: 2018 |
| 5469 |
hardware_information: |
| 5470 |
description: |
| 5471 |
- Information related to the hardware (drives and CPUs) of the system. |
| 5472 |
type: complex |
| 5473 |
returned: queried |
| 5474 |
contains: |
| 5475 |
model: |
| 5476 |
description: |
| 5477 |
- The model of the hardware. |
| 5478 |
returned: queried |
| 5479 |
type: str |
| 5480 |
sample: Virtual Disk |
| 5481 |
name: |
| 5482 |
description: |
| 5483 |
- The name of the hardware. |
| 5484 |
returned: queried |
| 5485 |
type: str |
| 5486 |
sample: HD1 |
| 5487 |
type: |
| 5488 |
description: |
| 5489 |
- The type of hardware. |
| 5490 |
returned: queried |
| 5491 |
type: str |
| 5492 |
sample: physical-disk |
| 5493 |
versions: |
| 5494 |
description: |
| 5495 |
- Hardware specific properties. |
| 5496 |
returned: queried |
| 5497 |
type: complex |
| 5498 |
contains: |
| 5499 |
name: |
| 5500 |
description: |
| 5501 |
- Name of the property. |
| 5502 |
returned: queried |
| 5503 |
type: str |
| 5504 |
sample: Size |
| 5505 |
version: |
| 5506 |
description: |
| 5507 |
- Value of the property. |
| 5508 |
returned: queried |
| 5509 |
type: str |
| 5510 |
sample: 154.00G |
| 5511 |
package_edition: |
| 5512 |
description: |
| 5513 |
- Displays the software edition. |
| 5514 |
returned: queried |
| 5515 |
type: str |
| 5516 |
sample: Point Release 7 |
| 5517 |
package_version: |
| 5518 |
description: |
| 5519 |
- A string combining the C(product_build) and C(product_build_date). |
| 5520 |
returned: queried |
| 5521 |
type: str |
| 5522 |
sample: "Build 0.0.1 - Tue May 15 15:26:30 PDT 2018" |
| 5523 |
product_code: |
| 5524 |
description: |
| 5525 |
- Code identifying the product. |
| 5526 |
returned: queried |
| 5527 |
type: str |
| 5528 |
sample: BIG-IP |
| 5529 |
product_build: |
| 5530 |
description: |
| 5531 |
- Build version of the release version. |
| 5532 |
returned: queried |
| 5533 |
type: str |
| 5534 |
sample: 0.0.1 |
| 5535 |
product_version: |
| 5536 |
description: |
| 5537 |
- Major product version of the running software. |
| 5538 |
returned: queried |
| 5539 |
type: str |
| 5540 |
sample: 13.1.0.7 |
| 5541 |
product_built: |
| 5542 |
description: |
| 5543 |
- UNIX timestamp of when the product was built. |
| 5544 |
returned: queried |
| 5545 |
type: int |
| 5546 |
sample: 180515152630 |
| 5547 |
product_build_date: |
| 5548 |
description: |
| 5549 |
- Human readable build date. |
| 5550 |
returned: queried |
| 5551 |
type: str |
| 5552 |
sample: "Tue May 15 15:26:30 PDT 2018" |
| 5553 |
product_changelist: |
| 5554 |
description: |
| 5555 |
- Changelist the product branches from. |
| 5556 |
returned: queried |
| 5557 |
type: int |
| 5558 |
sample: 2557198 |
| 5559 |
product_jobid: |
| 5560 |
description: |
| 5561 |
- ID of the job that built the product version. |
| 5562 |
returned: queried |
| 5563 |
type: int |
| 5564 |
sample: 1012030 |
| 5565 |
chassis_serial: |
| 5566 |
description: |
| 5567 |
- Serial of the chassis. |
| 5568 |
returned: queried |
| 5569 |
type: str |
| 5570 |
sample: 11111111-2222-3333-444444444444 |
| 5571 |
host_board_part_revision: |
| 5572 |
description: |
| 5573 |
- Revision of the host board. |
| 5574 |
returned: queried |
| 5575 |
type: str |
| 5576 |
host_board_serial: |
| 5577 |
description: |
| 5578 |
- Serial of the host board. |
| 5579 |
returned: queried |
| 5580 |
type: str |
| 5581 |
platform: |
| 5582 |
description: |
| 5583 |
- Platform identifier. |
| 5584 |
returned: queried |
| 5585 |
type: str |
| 5586 |
sample: Z100 |
| 5587 |
switch_board_part_revision: |
| 5588 |
description: |
| 5589 |
- Switch board revision. |
| 5590 |
returned: queried |
| 5591 |
type: str |
| 5592 |
switch_board_serial: |
| 5593 |
description: |
| 5594 |
- Serial of the switch board. |
| 5595 |
returned: queried |
| 5596 |
type: str |
| 5597 |
uptime: |
| 5598 |
description: |
| 5599 |
- Time since the system booted, in seconds. |
| 5600 |
returned: queried |
| 5601 |
type: int |
| 5602 |
sample: 603202 |
| 5603 |
sample: hash/dictionary of values |
| 5604 |
tcp_monitors: |
| 5605 |
description: TCP monitor related information. |
| 5606 |
returned: When C(tcp-monitors) is specified in C(gather_subset). |
| 5607 |
type: complex |
| 5608 |
contains: |
| 5609 |
full_path: |
| 5610 |
description: |
| 5611 |
- Full name of the resource as known to the BIG-IP. |
| 5612 |
returned: queried |
| 5613 |
type: str |
| 5614 |
sample: /Common/tcp |
| 5615 |
name: |
| 5616 |
description: |
| 5617 |
- Relative name of the resource in the BIG-IP. |
| 5618 |
returned: queried |
| 5619 |
type: str |
| 5620 |
sample: tcp |
| 5621 |
parent: |
| 5622 |
description: |
| 5623 |
- Profile from which this profile inherits settings. |
| 5624 |
returned: queried |
| 5625 |
type: str |
| 5626 |
sample: tcp |
| 5627 |
description: |
| 5628 |
description: |
| 5629 |
- Description of the resource. |
| 5630 |
returned: queried |
| 5631 |
type: str |
| 5632 |
sample: My monitor |
| 5633 |
adaptive: |
| 5634 |
description: |
| 5635 |
- Whether adaptive response time monitoring is enabled for this monitor. |
| 5636 |
returned: queried |
| 5637 |
type: bool |
| 5638 |
sample: false |
| 5639 |
adaptive_divergence_type: |
| 5640 |
description: |
| 5641 |
- Specifies whether the adaptive-divergence-value is C(relative) or |
| 5642 |
C(absolute). |
| 5643 |
returned: queried |
| 5644 |
type: str |
| 5645 |
sample: relative |
| 5646 |
adaptive_divergence_value: |
| 5647 |
description: |
| 5648 |
- Specifies how far from mean latency each monitor probe is allowed |
| 5649 |
to be. |
| 5650 |
returned: queried |
| 5651 |
type: int |
| 5652 |
sample: 25 |
| 5653 |
adaptive_limit: |
| 5654 |
description: |
| 5655 |
- Specifies the hard limit, in milliseconds, which the probe is not |
| 5656 |
allowed to exceed, regardless of the divergence value. |
| 5657 |
returned: queried |
| 5658 |
type: int |
| 5659 |
sample: 200 |
| 5660 |
adaptive_sampling_timespan: |
| 5661 |
description: |
| 5662 |
- Specifies the size of the sliding window, in seconds, which |
| 5663 |
records probe history. |
| 5664 |
returned: queried |
| 5665 |
type: int |
| 5666 |
sample: 300 |
| 5667 |
destination: |
| 5668 |
description: |
| 5669 |
- Specifies the IP address and service port of the resource that is |
| 5670 |
the destination of this monitor. |
| 5671 |
returned: queried |
| 5672 |
type: str |
| 5673 |
sample: "*:*" |
| 5674 |
interval: |
| 5675 |
description: |
| 5676 |
- Specifies, in seconds, the frequency at which the system issues |
| 5677 |
the monitor check when either the resource is down or the status |
| 5678 |
of the resource is unknown. |
| 5679 |
returned: queried |
| 5680 |
type: int |
| 5681 |
sample: 5 |
| 5682 |
ip_dscp: |
| 5683 |
description: |
| 5684 |
- Specifies the differentiated services code point (DSCP). |
| 5685 |
returned: queried |
| 5686 |
type: int |
| 5687 |
sample: 0 |
| 5688 |
manual_resume: |
| 5689 |
description: |
| 5690 |
- Specifies whether the system automatically changes the status of a |
| 5691 |
resource to up at the next successful monitor check. |
| 5692 |
returned: queried |
| 5693 |
type: bool |
| 5694 |
sample: true |
| 5695 |
reverse: |
| 5696 |
description: |
| 5697 |
- Specifies whether the monitor operates in reverse mode. When the |
| 5698 |
monitor is in reverse mode, a successful check marks the monitored |
| 5699 |
object down instead of up. |
| 5700 |
returned: queried |
| 5701 |
type: bool |
| 5702 |
sample: false |
| 5703 |
time_until_up: |
| 5704 |
description: |
| 5705 |
- Specifies the amount of time, in seconds, after the first |
| 5706 |
successful response before a node is marked up. |
| 5707 |
returned: queried |
| 5708 |
type: int |
| 5709 |
sample: 0 |
| 5710 |
timeout: |
| 5711 |
description: |
| 5712 |
- Specifies the number of seconds the target has in which to respond |
| 5713 |
to the monitor request. |
| 5714 |
returned: queried |
| 5715 |
type: int |
| 5716 |
sample: 16 |
| 5717 |
transparent: |
| 5718 |
description: |
| 5719 |
- Specifies whether the monitor operates in transparent mode. |
| 5720 |
returned: queried |
| 5721 |
type: bool |
| 5722 |
sample: false |
| 5723 |
up_interval: |
| 5724 |
description: |
| 5725 |
- Specifies, in seconds, the frequency at which the system issues |
| 5726 |
the monitor check when the resource is up. |
| 5727 |
returned: queried |
| 5728 |
type: int |
| 5729 |
sample: 0 |
| 5730 |
sample: hash/dictionary of values |
| 5731 |
tcp_half_open_monitors: |
| 5732 |
description: TCP Half-open monitor related information. |
| 5733 |
returned: When C(tcp-half-open-monitors) is specified in C(gather_subset). |
| 5734 |
type: complex |
| 5735 |
contains: |
| 5736 |
full_path: |
| 5737 |
description: |
| 5738 |
- Full name of the resource as known to the BIG-IP. |
| 5739 |
returned: queried |
| 5740 |
type: str |
| 5741 |
sample: /Common/tcp |
| 5742 |
name: |
| 5743 |
description: |
| 5744 |
- Relative name of the resource in the BIG-IP. |
| 5745 |
returned: queried |
| 5746 |
type: str |
| 5747 |
sample: tcp |
| 5748 |
parent: |
| 5749 |
description: |
| 5750 |
- Profile from which this profile inherits settings. |
| 5751 |
returned: queried |
| 5752 |
type: str |
| 5753 |
sample: tcp |
| 5754 |
description: |
| 5755 |
description: |
| 5756 |
- Description of the resource. |
| 5757 |
returned: queried |
| 5758 |
type: str |
| 5759 |
sample: My monitor |
| 5760 |
destination: |
| 5761 |
description: |
| 5762 |
- Specifies the IP address and service port of the resource that is |
| 5763 |
the destination of this monitor. |
| 5764 |
returned: queried |
| 5765 |
type: str |
| 5766 |
sample: "*:*" |
| 5767 |
interval: |
| 5768 |
description: |
| 5769 |
- Specifies, in seconds, the frequency at which the system issues |
| 5770 |
the monitor check when either the resource is down or the status |
| 5771 |
of the resource is unknown. |
| 5772 |
returned: queried |
| 5773 |
type: int |
| 5774 |
sample: 5 |
| 5775 |
manual_resume: |
| 5776 |
description: |
| 5777 |
- Specifies whether the system automatically changes the status of a |
| 5778 |
resource to up at the next successful monitor check. |
| 5779 |
returned: queried |
| 5780 |
type: bool |
| 5781 |
sample: true |
| 5782 |
time_until_up: |
| 5783 |
description: |
| 5784 |
- Specifies the amount of time, in seconds, after the first |
| 5785 |
successful response before a node is marked up. |
| 5786 |
returned: queried |
| 5787 |
type: int |
| 5788 |
sample: 0 |
| 5789 |
timeout: |
| 5790 |
description: |
| 5791 |
- Specifies the number of seconds the target has in which to respond |
| 5792 |
to the monitor request. |
| 5793 |
returned: queried |
| 5794 |
type: int |
| 5795 |
sample: 16 |
| 5796 |
transparent: |
| 5797 |
description: |
| 5798 |
- Specifies whether the monitor operates in transparent mode. |
| 5799 |
returned: queried |
| 5800 |
type: bool |
| 5801 |
sample: false |
| 5802 |
up_interval: |
| 5803 |
description: |
| 5804 |
- Specifies, in seconds, the frequency at which the system issues |
| 5805 |
the monitor check when the resource is up. |
| 5806 |
returned: queried |
| 5807 |
type: int |
| 5808 |
sample: 0 |
| 5809 |
sample: hash/dictionary of values |
| 5810 |
tcp_profiles: |
| 5811 |
description: TCP profile related information. |
| 5812 |
returned: When C(tcp-profiles) is specified in C(gather_subset). |
| 5813 |
type: complex |
| 5814 |
contains: |
| 5815 |
full_path: |
| 5816 |
description: |
| 5817 |
- Full name of the resource as known to the BIG-IP. |
| 5818 |
returned: queried |
| 5819 |
type: str |
| 5820 |
sample: tcp |
| 5821 |
name: |
| 5822 |
description: |
| 5823 |
- Relative name of the resource in the BIG-IP. |
| 5824 |
returned: queried |
| 5825 |
type: str |
| 5826 |
sample: /Common/tcp |
| 5827 |
parent: |
| 5828 |
description: |
| 5829 |
- Profile from which this profile inherits settings. |
| 5830 |
returned: queried |
| 5831 |
type: str |
| 5832 |
sample: tcp |
| 5833 |
description: |
| 5834 |
description: |
| 5835 |
- Description of the resource. |
| 5836 |
returned: queried |
| 5837 |
type: str |
| 5838 |
sample: My profile |
| 5839 |
abc: |
| 5840 |
description: |
| 5841 |
- Appropriate Byte Counting (RFC 3465) |
| 5842 |
- When C(true), increases the congestion window by basing the amount to |
| 5843 |
increase on the number of previously unacknowledged bytes that each ACK covers. |
| 5844 |
returned: queried |
| 5845 |
type: bool |
| 5846 |
sample: true |
| 5847 |
ack_on_push: |
| 5848 |
description: |
| 5849 |
- When C(true), specifies significantly improved performance to Microsoft |
| 5850 |
Windows and MacOS peers who are writing out on a very small send buffer. |
| 5851 |
returned: queried |
| 5852 |
type: bool |
| 5853 |
sample: false |
| 5854 |
auto_proxy_buffer: |
| 5855 |
description: |
| 5856 |
- When C(true), specifies the system uses the network measurements to set |
| 5857 |
the optimal proxy buffer size. |
| 5858 |
returned: queried |
| 5859 |
type: bool |
| 5860 |
sample: true |
| 5861 |
auto_receive_window: |
| 5862 |
description: |
| 5863 |
- When C(true), specifies the system uses the network measurements to |
| 5864 |
set the optimal receive window size. |
| 5865 |
returned: queried |
| 5866 |
type: bool |
| 5867 |
sample: false |
| 5868 |
auto_send_buffer: |
| 5869 |
description: |
| 5870 |
- When C(true), specifies the system uses the network measurements to |
| 5871 |
set the optimal send buffer size. |
| 5872 |
returned: queried |
| 5873 |
type: bool |
| 5874 |
sample: true |
| 5875 |
close_wait: |
| 5876 |
description: |
| 5877 |
- Specifies the length of time a TCP connection remains in the LAST-ACK |
| 5878 |
state before quitting. |
| 5879 |
- In addition to a numeric value, the value of this fact may also be one of |
| 5880 |
C(immediate) or C(indefinite). |
| 5881 |
- When C(immediate), specifies the TCP connection closes immediately |
| 5882 |
after entering the LAST-ACK state. |
| 5883 |
- When C(indefinite), specifies that TCP connections in the LAST-ACK state |
| 5884 |
do not close until they meet the maximum retransmissions timeout. |
| 5885 |
returned: queried |
| 5886 |
type: str |
| 5887 |
sample: indefinite |
| 5888 |
congestion_metrics_cache: |
| 5889 |
description: |
| 5890 |
- When C(true), specifies the system uses a cache for storing congestion |
| 5891 |
metrics. |
| 5892 |
- Subsequently, because these metrics are already known and cached, the initial |
| 5893 |
slow-start ramp for previously-encountered peers improves. |
| 5894 |
returned: queried |
| 5895 |
type: bool |
| 5896 |
sample: true |
| 5897 |
congestion_metrics_cache_timeout: |
| 5898 |
description: |
| 5899 |
- Specifies the number of seconds for which entries in the congestion metrics |
| 5900 |
cache are valid. |
| 5901 |
returned: queried |
| 5902 |
type: int |
| 5903 |
sample: 0 |
| 5904 |
congestion_control: |
| 5905 |
description: |
| 5906 |
- Specifies the algorithm to use to share network resources among competing |
| 5907 |
users to reduce congestion. |
| 5908 |
- Return values may include, C(high-speed), C(cdg), C(chd), C(none), C(cubic), |
| 5909 |
C(illinois), C(new-reno), C(reno), C(scalable), C(vegas), C(westwood), and |
| 5910 |
C(woodside). |
| 5911 |
returned: queried |
| 5912 |
type: str |
| 5913 |
sample: high-speed |
| 5914 |
deferred_accept: |
| 5915 |
description: |
| 5916 |
- When C(true), specifies the system defers allocation of the connection |
| 5917 |
chain context until the system has received the payload from the client. |
| 5918 |
- Enabling this setting is useful in dealing with 3-way handshake denial-of-service |
| 5919 |
attacks. |
| 5920 |
returned: queried |
| 5921 |
type: bool |
| 5922 |
sample: true |
| 5923 |
delay_window_control: |
| 5924 |
description: |
| 5925 |
- Specifies the system uses an estimate of queuing delay as a measure of |
| 5926 |
congestion to control, in addition to the normal loss-based control, the amount |
| 5927 |
of data sent. |
| 5928 |
returned: queried |
| 5929 |
type: bool |
| 5930 |
sample: true |
| 5931 |
delayed_acks: |
| 5932 |
description: |
| 5933 |
- When checked (enabled), specifies the system can send fewer than one ACK |
| 5934 |
(acknowledgment) segment per data segment received. |
| 5935 |
returned: queried |
| 5936 |
type: bool |
| 5937 |
sample: true |
| 5938 |
dsack: |
| 5939 |
description: |
| 5940 |
- D-SACK (RFC 2883) |
| 5941 |
- When C(true), specifies the use of the selective ACK (SACK) option to acknowledge |
| 5942 |
duplicate segments. |
| 5943 |
returned: queried |
| 5944 |
type: bool |
| 5945 |
sample: true |
| 5946 |
early_retransmit: |
| 5947 |
description: |
| 5948 |
- When C(true), specifies the system uses early retransmit (as specified in |
| 5949 |
RFC 5827) to reduce the recovery time for connections that are receive- buffer |
| 5950 |
or user-data limited. |
| 5951 |
returned: queried |
| 5952 |
type: bool |
| 5953 |
sample: true |
| 5954 |
explicit_congestion_notification: |
| 5955 |
description: |
| 5956 |
- When C(true), specifies the system uses the TCP flags CWR (congestion window |
| 5957 |
reduction) and ECE (ECN-Echo) to notify its peer of congestion and congestion |
| 5958 |
counter-measures. |
| 5959 |
returned: queried |
| 5960 |
type: bool |
| 5961 |
sample: true |
| 5962 |
enhanced_loss_recovery: |
| 5963 |
description: |
| 5964 |
- Specifies whether the system uses enhanced loss recovery to recover from random |
| 5965 |
packet losses more effectively. |
| 5966 |
returned: queried |
| 5967 |
type: bool |
| 5968 |
sample: true |
| 5969 |
fast_open: |
| 5970 |
description: |
| 5971 |
- When C(true), specifies, the system supports TCP Fast Open, which reduces |
| 5972 |
latency by allowing a client to include the first packet of data with the SYN |
| 5973 |
returned: queried |
| 5974 |
type: bool |
| 5975 |
sample: true |
| 5976 |
fast_open_cookie_expiration: |
| 5977 |
description: |
| 5978 |
- Specifies the number of seconds that a Fast Open Cookie delivered to a client |
| 5979 |
is valid for SYN packets from that client. |
| 5980 |
returned: queried |
| 5981 |
type: int |
| 5982 |
sample: 1000 |
| 5983 |
fin_wait_1: |
| 5984 |
description: |
| 5985 |
- Specifies the length of time that a TCP connection is in the FIN-WAIT-1 or |
| 5986 |
CLOSING state before quitting. |
| 5987 |
returned: queried |
| 5988 |
type: str |
| 5989 |
sample: indefinite |
| 5990 |
fin_wait_2: |
| 5991 |
description: |
| 5992 |
- Specifies the length of time a TCP connection is in the FIN-WAIT-2 state |
| 5993 |
before quitting. |
| 5994 |
returned: queried |
| 5995 |
type: str |
| 5996 |
sample: 100 |
| 5997 |
idle_timeout: |
| 5998 |
description: |
| 5999 |
- Specifies the length of time a connection is idle (has no traffic) before |
| 6000 |
the connection is eligible for deletion. |
| 6001 |
returned: queried |
| 6002 |
type: str |
| 6003 |
sample: 300 |
| 6004 |
initial_congestion_window_size: |
| 6005 |
description: |
| 6006 |
- Specifies the initial congestion window size for connections to this destination. |
| 6007 |
returned: queried |
| 6008 |
type: int |
| 6009 |
sample: 3 |
| 6010 |
initial_receive_window_size: |
| 6011 |
description: |
| 6012 |
- Specifies the initial receive window size for connections to this destination. |
| 6013 |
returned: queried |
| 6014 |
type: int |
| 6015 |
sample: 5 |
| 6016 |
dont_fragment_flag: |
| 6017 |
description: |
| 6018 |
- Specifies the Don't Fragment (DF) bit setting in the IP Header of the outgoing |
| 6019 |
TCP packet. |
| 6020 |
returned: queried |
| 6021 |
type: str |
| 6022 |
sample: pmtu |
| 6023 |
ip_tos: |
| 6024 |
description: |
| 6025 |
- Specifies the L3 Type of Service (ToS) level the system inserts in TCP |
| 6026 |
packets destined for clients. |
| 6027 |
returned: queried |
| 6028 |
type: str |
| 6029 |
sample: mimic |
| 6030 |
time_to_live: |
| 6031 |
description: |
| 6032 |
- Specifies the outgoing TCP packet's IP Header TTL mode. |
| 6033 |
returned: queried |
| 6034 |
type: str |
| 6035 |
sample: proxy |
| 6036 |
time_to_live_v4: |
| 6037 |
description: |
| 6038 |
- Specifies the outgoing packet's IP Header TTL value for IPv4 traffic. |
| 6039 |
returned: queried |
| 6040 |
type: int |
| 6041 |
sample: 255 |
| 6042 |
time_to_live_v6: |
| 6043 |
description: |
| 6044 |
- Specifies the outgoing packet's IP Header TTL value for IPv6 traffic. |
| 6045 |
returned: queried |
| 6046 |
type: int |
| 6047 |
sample: 64 |
| 6048 |
keep_alive_interval: |
| 6049 |
description: |
| 6050 |
- Specifies how frequently the system sends data over an idle TCP |
| 6051 |
connection, to determine whether the connection is still valid. |
| 6052 |
returned: queried |
| 6053 |
type: str |
| 6054 |
sample: 50 |
| 6055 |
limited_transmit_recovery: |
| 6056 |
description: |
| 6057 |
- When C(true), specifies the system uses limited transmit recovery |
| 6058 |
revisions for fast retransmits (as specified in RFC 3042) to reduce |
| 6059 |
the recovery time for connections on a lossy network. |
| 6060 |
returned: queried |
| 6061 |
type: bool |
| 6062 |
sample: true |
| 6063 |
link_qos: |
| 6064 |
description: |
| 6065 |
- Specifies the L2 Quality of Service (QoS) level the system inserts |
| 6066 |
in TCP packets destined for clients. |
| 6067 |
returned: queried |
| 6068 |
type: str |
| 6069 |
sample: 200 |
| 6070 |
max_segment_retrans: |
| 6071 |
description: |
| 6072 |
- Specifies the maximum number of times that the system resends data segments. |
| 6073 |
returned: queried |
| 6074 |
type: int |
| 6075 |
sample: 8 |
| 6076 |
max_syn_retrans: |
| 6077 |
description: |
| 6078 |
- Specifies the maximum number of times the system resends a SYN |
| 6079 |
packet when it does not receive a corresponding SYN-ACK. |
| 6080 |
returned: queried |
| 6081 |
type: int |
| 6082 |
sample: 3 |
| 6083 |
max_segment_size: |
| 6084 |
description: |
| 6085 |
- Specifies the largest amount of data the system can receive in a |
| 6086 |
single TCP segment, not including the TCP and IP headers. |
| 6087 |
returned: queried |
| 6088 |
type: int |
| 6089 |
sample: 1460 |
| 6090 |
md5_signature: |
| 6091 |
description: |
| 6092 |
- When C(true), specifies to use RFC2385 TCP-MD5 signatures to protect |
| 6093 |
TCP traffic against intermediate tampering. |
| 6094 |
returned: queried |
| 6095 |
type: bool |
| 6096 |
sample: true |
| 6097 |
minimum_rto: |
| 6098 |
description: |
| 6099 |
- Specifies the minimum length of time the system waits for |
| 6100 |
acknowledgements of data sent before resending the data. |
| 6101 |
returned: queried |
| 6102 |
type: int |
| 6103 |
sample: 1000 |
| 6104 |
multipath_tcp: |
| 6105 |
description: |
| 6106 |
- When C(true), specifies the system accepts Multipath TCP (MPTCP) |
| 6107 |
connections, which allow multiple client-side flows to connect to a |
| 6108 |
single server-side flow. |
| 6109 |
returned: queried |
| 6110 |
type: bool |
| 6111 |
sample: true |
| 6112 |
mptcp_checksum: |
| 6113 |
description: |
| 6114 |
- When C(true), specifies the system calculates the checksum for |
| 6115 |
MPTCP connections. |
| 6116 |
returned: queried |
| 6117 |
type: bool |
| 6118 |
sample: false |
| 6119 |
mptcp_checksum_verify: |
| 6120 |
description: |
| 6121 |
- When C(true), specifies the system verifies the checksum for |
| 6122 |
MPTCP connections. |
| 6123 |
returned: queried |
| 6124 |
type: bool |
| 6125 |
sample: false |
| 6126 |
mptcp_fallback: |
| 6127 |
description: |
| 6128 |
- Specifies an action on fallback, that is, when MPTCP transitions |
| 6129 |
to regular TCP, because something prevents MPTCP from working correctly. |
| 6130 |
returned: queried |
| 6131 |
type: str |
| 6132 |
sample: reset |
| 6133 |
mptcp_fast_join: |
| 6134 |
description: |
| 6135 |
- When C(true), specifies a FAST join, allowing data to be sent on the |
| 6136 |
MP_JOIN_SYN, which can allow a server response to occur in parallel |
| 6137 |
with the JOIN. |
| 6138 |
returned: queried |
| 6139 |
type: bool |
| 6140 |
sample: false |
| 6141 |
mptcp_idle_timeout: |
| 6142 |
description: |
| 6143 |
- Specifies the number of seconds that an MPTCP connection is idle |
| 6144 |
before the connection is eligible for deletion. |
| 6145 |
returned: queried |
| 6146 |
type: int |
| 6147 |
sample: 300 |
| 6148 |
mptcp_join_max: |
| 6149 |
description: |
| 6150 |
- Specifies the highest number of MPTCP connections that can join to |
| 6151 |
a given connection. |
| 6152 |
returned: queried |
| 6153 |
type: int |
| 6154 |
sample: 5 |
| 6155 |
mptcp_make_after_break: |
| 6156 |
description: |
| 6157 |
- Specifies make-after-break functionality is supported, allowing |
| 6158 |
for long-lived MPTCP sessions. |
| 6159 |
returned: queried |
| 6160 |
type: bool |
| 6161 |
sample: false |
| 6162 |
mptcp_no_join_dss_ack: |
| 6163 |
description: |
| 6164 |
- When checked (enabled), specifies no DSS option is sent on the |
| 6165 |
JOIN ACK. |
| 6166 |
returned: queried |
| 6167 |
type: bool |
| 6168 |
sample: false |
| 6169 |
mptcp_rto_max: |
| 6170 |
description: |
| 6171 |
- Specifies the number of RTOs (retransmission timeouts) before declaring |
| 6172 |
the subflow dead. |
| 6173 |
returned: queried |
| 6174 |
type: int |
| 6175 |
sample: 5 |
| 6176 |
mptcp_retransmit_min: |
| 6177 |
description: |
| 6178 |
- Specifies the minimum value (in msec) of the retransmission timer for |
| 6179 |
these MPTCP flows. |
| 6180 |
returned: queried |
| 6181 |
type: int |
| 6182 |
sample: 1000 |
| 6183 |
mptcp_subflow_max: |
| 6184 |
description: |
| 6185 |
- Specifies the maximum number of MPTCP subflows for a single flow. |
| 6186 |
returned: queried |
| 6187 |
type: int |
| 6188 |
sample: 6 |
| 6189 |
mptcp_timeout: |
| 6190 |
description: |
| 6191 |
- Specifies, in seconds, the timeout value to discard long-lived sessions |
| 6192 |
that do not have an active flow. |
| 6193 |
returned: queried |
| 6194 |
type: int |
| 6195 |
sample: 3600 |
| 6196 |
nagle_algorithm: |
| 6197 |
description: |
| 6198 |
- Specifies whether the system applies Nagle's algorithm to reduce the |
| 6199 |
number of short segments on the network. |
| 6200 |
returned: queried |
| 6201 |
type: bool |
| 6202 |
sample: false |
| 6203 |
pkt_loss_ignore_burst: |
| 6204 |
description: |
| 6205 |
- Specifies the probability of performing congestion control when |
| 6206 |
multiple packets are lost, even if the Packet Loss Ignore Rate was |
| 6207 |
not exceeded. |
| 6208 |
returned: queried |
| 6209 |
type: int |
| 6210 |
sample: 0 |
| 6211 |
pkt_loss_ignore_rate: |
| 6212 |
description: |
| 6213 |
- Specifies the threshold of packets lost per million at which the |
| 6214 |
system performs congestion control. |
| 6215 |
returned: queried |
| 6216 |
type: int |
| 6217 |
sample: 0 |
| 6218 |
proxy_buffer_high: |
| 6219 |
description: |
| 6220 |
- Specifies the proxy buffer level, in bytes, at which the receive window |
| 6221 |
is closed. |
| 6222 |
returned: queried |
| 6223 |
type: int |
| 6224 |
sample: 49152 |
| 6225 |
proxy_buffer_low: |
| 6226 |
description: |
| 6227 |
- Specifies the proxy buffer level, in bytes, at which the receive window |
| 6228 |
is opened. |
| 6229 |
returned: queried |
| 6230 |
type: int |
| 6231 |
sample: 32768 |
| 6232 |
proxy_max_segment: |
| 6233 |
description: |
| 6234 |
- When C(true), specifies the system attempts to advertise the same |
| 6235 |
maximum segment size (MSS) to the server-side connection as that of the |
| 6236 |
client-side connection. |
| 6237 |
returned: queried |
| 6238 |
type: bool |
| 6239 |
sample: true |
| 6240 |
proxy_options: |
| 6241 |
description: |
| 6242 |
- When C(true), specifies the system advertises an option (such as |
| 6243 |
time stamps) to the server only when the option is negotiated with the |
| 6244 |
client. |
| 6245 |
returned: queried |
| 6246 |
type: bool |
| 6247 |
sample: false |
| 6248 |
push_flag: |
| 6249 |
description: |
| 6250 |
- Specifies how the BIG-IP system receives ACKs. |
| 6251 |
returned: queried |
| 6252 |
type: str |
| 6253 |
sample: default |
| 6254 |
rate_pace: |
| 6255 |
description: |
| 6256 |
- When C(true), specifies the system paces the egress packets to |
| 6257 |
avoid dropping packets, allowing for optimum goodput. |
| 6258 |
returned: queried |
| 6259 |
type: bool |
| 6260 |
sample: true |
| 6261 |
rate_pace_max_rate: |
| 6262 |
description: |
| 6263 |
- Specifies the maximum rate in bytes per second to which the system |
| 6264 |
paces TCP data transmission. |
| 6265 |
returned: queried |
| 6266 |
type: int |
| 6267 |
sample: 0 |
| 6268 |
receive_window: |
| 6269 |
description: |
| 6270 |
- Specifies the maximum advertised RECEIVE window size. |
| 6271 |
returned: queried |
| 6272 |
type: int |
| 6273 |
sample: 65535 |
| 6274 |
reset_on_timeout: |
| 6275 |
description: |
| 6276 |
- When C(true), specifies the system sends a reset packet (RST) |
| 6277 |
in addition to deleting the connection, when a connection exceeds |
| 6278 |
the idle timeout value. |
| 6279 |
returned: queried |
| 6280 |
type: bool |
| 6281 |
sample: true |
| 6282 |
retransmit_threshold: |
| 6283 |
description: |
| 6284 |
- Specifies the number of duplicate ACKs (retransmit threshold) to start |
| 6285 |
fast recovery. |
| 6286 |
returned: queried |
| 6287 |
type: int |
| 6288 |
sample: 3 |
| 6289 |
selective_acks: |
| 6290 |
description: |
| 6291 |
- When C(true), specifies the system processes data using |
| 6292 |
selective ACKs (SACKs) whenever possible, to improve system performance. |
| 6293 |
returned: queried |
| 6294 |
type: bool |
| 6295 |
sample: true |
| 6296 |
selective_nack: |
| 6297 |
description: |
| 6298 |
- When C(true), specifies the system processes data using a selective |
| 6299 |
negative acknowledgment (SNACK) whenever possible, to improve system |
| 6300 |
performance. |
| 6301 |
returned: queried |
| 6302 |
type: bool |
| 6303 |
sample: true |
| 6304 |
send_buffer: |
| 6305 |
description: |
| 6306 |
- Specifies the SEND window size. |
| 6307 |
returned: queried |
| 6308 |
type: int |
| 6309 |
sample: 65535 |
| 6310 |
slow_start: |
| 6311 |
description: |
| 6312 |
- When C(true), specifies the system uses Slow-Start Congestion |
| 6313 |
Avoidance as described in RFC3390 in order to ramp up traffic without |
| 6314 |
causing excessive congestion on the link. |
| 6315 |
returned: queried |
| 6316 |
type: bool |
| 6317 |
sample: true |
| 6318 |
syn_cookie_enable: |
| 6319 |
description: |
| 6320 |
- Specifies the default (if no DoS profile is associated) number of |
| 6321 |
embryonic connections that are allowed on any virtual server, |
| 6322 |
before SYN Cookie challenges are enabled for that virtual server. |
| 6323 |
returned: queried |
| 6324 |
type: bool |
| 6325 |
sample: true |
| 6326 |
syn_cookie_white_list: |
| 6327 |
description: |
| 6328 |
- Specifies whether or not to use a SYN Cookie WhiteList when doing |
| 6329 |
software SYN Cookies. |
| 6330 |
returned: queried |
| 6331 |
type: bool |
| 6332 |
sample: false |
| 6333 |
syn_retrans_to_base: |
| 6334 |
description: |
| 6335 |
- Specifies the initial RTO (Retransmission TimeOut) base multiplier |
| 6336 |
for SYN retransmissions. |
| 6337 |
returned: queried |
| 6338 |
type: int |
| 6339 |
sample: 3000 |
| 6340 |
tail_loss_probe: |
| 6341 |
description: |
| 6342 |
- When C(true), specifies the system uses Tail Loss Probe to |
| 6343 |
reduce the number of retransmission timeouts. |
| 6344 |
returned: queried |
| 6345 |
type: bool |
| 6346 |
sample: true |
| 6347 |
time_wait_recycle: |
| 6348 |
description: |
| 6349 |
- When C(true), specifies that connections in a TIME-WAIT state are |
| 6350 |
reused when the system receives a SYN packet, indicating a request |
| 6351 |
for a new connection. |
| 6352 |
returned: queried |
| 6353 |
type: bool |
| 6354 |
sample: true |
| 6355 |
time_wait: |
| 6356 |
description: |
| 6357 |
- Specifies the length of time that a TCP connection remains in the |
| 6358 |
TIME-WAIT state before entering the CLOSED state. |
| 6359 |
returned: queried |
| 6360 |
type: str |
| 6361 |
sample: 2000 |
| 6362 |
timestamps: |
| 6363 |
description: |
| 6364 |
- When C(true), specifies the system uses the timestamps extension |
| 6365 |
for TCP (as specified in RFC 1323) to enhance high-speed network performance. |
| 6366 |
returned: queried |
| 6367 |
type: bool |
| 6368 |
sample: true |
| 6369 |
verified_accept: |
| 6370 |
description: |
| 6371 |
- When C(true), specifies the system can actually communicate with |
| 6372 |
the server before establishing a client connection. |
| 6373 |
returned: queried |
| 6374 |
type: bool |
| 6375 |
sample: true |
| 6376 |
zero_window_timeout: |
| 6377 |
description: |
| 6378 |
- Specifies the timeout in milliseconds for terminating a connection |
| 6379 |
with an effective zero length TCP transmit window. |
| 6380 |
returned: queried |
| 6381 |
type: str |
| 6382 |
sample: 2000 |
| 6383 |
sample: hash/dictionary of values |
| 6384 |
traffic_groups: |
| 6385 |
description: Traffic group related information. |
| 6386 |
returned: When C(traffic-groups) is specified in C(gather_subset). |
| 6387 |
type: complex |
| 6388 |
contains: |
| 6389 |
full_path: |
| 6390 |
description: |
| 6391 |
- Full name of the resource as known to the BIG-IP. |
| 6392 |
returned: queried |
| 6393 |
type: str |
| 6394 |
sample: /Common/tg1 |
| 6395 |
name: |
| 6396 |
description: |
| 6397 |
- Relative name of the resource in the BIG-IP. |
| 6398 |
returned: queried |
| 6399 |
type: str |
| 6400 |
sample: tg1 |
| 6401 |
description: |
| 6402 |
description: |
| 6403 |
- Description of the traffic group. |
| 6404 |
returned: queried |
| 6405 |
type: str |
| 6406 |
sample: My traffic group |
| 6407 |
auto_failback_enabled: |
| 6408 |
description: |
| 6409 |
- Specifies whether the traffic group fails back to the default |
| 6410 |
device. |
| 6411 |
returned: queried |
| 6412 |
type: bool |
| 6413 |
sample: true |
| 6414 |
auto_failback_time: |
| 6415 |
description: |
| 6416 |
- Specifies the time required to fail back. |
| 6417 |
returned: queried |
| 6418 |
type: int |
| 6419 |
sample: 60 |
| 6420 |
ha_load_factor: |
| 6421 |
description: |
| 6422 |
- Specifies a number for this traffic group that represents the load |
| 6423 |
this traffic group presents to the system relative to other |
| 6424 |
traffic groups. |
| 6425 |
returned: queried |
| 6426 |
type: int |
| 6427 |
sample: 1 |
| 6428 |
ha_order: |
| 6429 |
description: |
| 6430 |
- This list of devices specifies the order in which the devices will |
| 6431 |
become active for the traffic group when a failure occurs. |
| 6432 |
returned: queried |
| 6433 |
type: list |
| 6434 |
sample: ['/Common/device1', '/Common/device2'] |
| 6435 |
is_floating: |
| 6436 |
description: |
| 6437 |
- Indicates whether the traffic group can fail over to other devices |
| 6438 |
in the device group. |
| 6439 |
returned: queried |
| 6440 |
type: bool |
| 6441 |
sample: false |
| 6442 |
mac_masquerade_address: |
| 6443 |
description: |
| 6444 |
- Specifies a MAC address for the traffic group. |
| 6445 |
returned: queried |
| 6446 |
type: str |
| 6447 |
sample: "00:98:76:54:32:10" |
| 6448 |
sample: hash/dictionary of values |
| 6449 |
trunks: |
| 6450 |
description: Trunk related information. |
| 6451 |
returned: When C(trunks) is specified in C(gather_subset). |
| 6452 |
type: complex |
| 6453 |
contains: |
| 6454 |
full_path: |
| 6455 |
description: |
| 6456 |
- Full name of the resource as known to the BIG-IP. |
| 6457 |
returned: queried |
| 6458 |
type: str |
| 6459 |
sample: /Common/trunk1 |
| 6460 |
name: |
| 6461 |
description: |
| 6462 |
- Relative name of the resource in the BIG-IP. |
| 6463 |
returned: queried |
| 6464 |
type: str |
| 6465 |
sample: trunk1 |
| 6466 |
description: |
| 6467 |
description: |
| 6468 |
- Description of the Trunk. |
| 6469 |
returned: queried |
| 6470 |
type: str |
| 6471 |
sample: My trunk |
| 6472 |
media_speed: |
| 6473 |
description: |
| 6474 |
- Speed of the media attached to the trunk. |
| 6475 |
returned: queried |
| 6476 |
type: int |
| 6477 |
sample: 10000 |
| 6478 |
lacp_mode: |
| 6479 |
description: |
| 6480 |
- The operation mode for LACP. |
| 6481 |
returned: queried |
| 6482 |
type: str |
| 6483 |
sample: passive |
| 6484 |
lacp_enabled: |
| 6485 |
description: |
| 6486 |
- Whether LACP is enabled or not. |
| 6487 |
returned: queried |
| 6488 |
type: bool |
| 6489 |
sample: true |
| 6490 |
stp_enabled: |
| 6491 |
description: |
| 6492 |
- Whether Spanning Tree Protocol (STP) is enabled or not. |
| 6493 |
returned: queried |
| 6494 |
type: bool |
| 6495 |
sample: true |
| 6496 |
operational_member_count: |
| 6497 |
description: |
| 6498 |
- Number of working members associated with the trunk. |
| 6499 |
returned: queried |
| 6500 |
type: int |
| 6501 |
sample: 1 |
| 6502 |
media_status: |
| 6503 |
description: |
| 6504 |
- Whether the media that is part of the trunk is up or not. |
| 6505 |
returned: queried |
| 6506 |
type: bool |
| 6507 |
sample: true |
| 6508 |
link_selection_policy: |
| 6509 |
description: |
| 6510 |
- The LACP policy the trunk uses to determine which member link can handle |
| 6511 |
new traffic. |
| 6512 |
returned: queried |
| 6513 |
type: str |
| 6514 |
sample: maximum-bandwidth |
| 6515 |
lacp_timeout: |
| 6516 |
description: |
| 6517 |
- The rate at which the system sends the LACP control packets. |
| 6518 |
returned: queried |
| 6519 |
type: int |
| 6520 |
sample: 10 |
| 6521 |
interfaces: |
| 6522 |
description: |
| 6523 |
- The list of interfaces that are part of the trunk. |
| 6524 |
returned: queried |
| 6525 |
type: list |
| 6526 |
sample: ['1.2', '1.3'] |
| 6527 |
distribution_hash: |
| 6528 |
description: |
| 6529 |
- The basis for the hash that the system uses as the frame distribution algorithm. |
| 6530 |
- The system uses this hash to determine which interface to use for forwarding |
| 6531 |
traffic. |
| 6532 |
returned: queried |
| 6533 |
type: str |
| 6534 |
sample: src-dst-ipport |
| 6535 |
configured_member_count: |
| 6536 |
description: |
| 6537 |
- The number of configured members that are associated with the trunk. |
| 6538 |
returned: queried |
| 6539 |
type: int |
| 6540 |
sample: 1 |
| 6541 |
sample: hash/dictionary of values |
| 6542 |
|
| 6543 |
ucs: |
| 6544 |
description: UCS backup related information |
| 6545 |
returned: When C(ucs) is specified in C(gather_subset) |
| 6546 |
type: complex |
| 6547 |
contains: |
| 6548 |
file_name: |
| 6549 |
description: |
| 6550 |
- Name of the UCS backup file. |
| 6551 |
returned: queried |
| 6552 |
type: str |
| 6553 |
sample: backup.ucs |
| 6554 |
encrypted: |
| 6555 |
description: |
| 6556 |
- Whether the file is encrypted or not. |
| 6557 |
returned: queried |
| 6558 |
type: bool |
| 6559 |
sample: false |
| 6560 |
file_size: |
| 6561 |
description: |
| 6562 |
- Size of the UCS file in bytes. |
| 6563 |
returned: queried |
| 6564 |
type: str |
| 6565 |
sample: "3" |
| 6566 |
file_created_date: |
| 6567 |
description: |
| 6568 |
- Date and time when the ucs file was created. |
| 6569 |
returned: queried |
| 6570 |
type: str |
| 6571 |
sample: "2022-03-10T09:30:19Z" |
| 6572 |
sample: hash/dictionary of values |
| 6573 |
version_added: "1.15.0" |
| 6574 |
|
| 6575 |
udp_profiles: |
| 6576 |
description: UDP profile related information. |
| 6577 |
returned: When C(udp-profiles) is specified in C(gather_subset). |
| 6578 |
type: complex |
| 6579 |
contains: |
| 6580 |
full_path: |
| 6581 |
description: |
| 6582 |
- Full name of the resource as known to the BIG-IP. |
| 6583 |
returned: queried |
| 6584 |
type: str |
| 6585 |
sample: udp |
| 6586 |
name: |
| 6587 |
description: |
| 6588 |
- Relative name of the resource in the BIG-IP. |
| 6589 |
returned: queried |
| 6590 |
type: str |
| 6591 |
sample: /Common/udp |
| 6592 |
parent: |
| 6593 |
description: |
| 6594 |
- Profile from which this profile inherits settings. |
| 6595 |
returned: queried |
| 6596 |
type: str |
| 6597 |
sample: udp |
| 6598 |
description: |
| 6599 |
description: |
| 6600 |
- Description of the resource. |
| 6601 |
returned: queried |
| 6602 |
type: str |
| 6603 |
sample: My profile |
| 6604 |
allow_no_payload: |
| 6605 |
description: |
| 6606 |
- Allow the passage of datagrams that contain header information, but no essential data. |
| 6607 |
returned: queried |
| 6608 |
type: bool |
| 6609 |
sample: true |
| 6610 |
buffer_max_bytes: |
| 6611 |
description: |
| 6612 |
- Ingress buffer byte limit. Maximum allowed value is 16777215. |
| 6613 |
returned: queried |
| 6614 |
type: int |
| 6615 |
sample: 655350 |
| 6616 |
buffer_max_packets: |
| 6617 |
description: |
| 6618 |
- Ingress buffer packet limit. Maximum allowed value is 255. |
| 6619 |
returned: queried |
| 6620 |
type: int |
| 6621 |
sample: 0 |
| 6622 |
datagram_load_balancing: |
| 6623 |
description: |
| 6624 |
- Load balance UDP datagram by datagram |
| 6625 |
returned: queried |
| 6626 |
type: bool |
| 6627 |
sample: true |
| 6628 |
idle_timeout: |
| 6629 |
description: |
| 6630 |
- Number of seconds that a connection is idle before |
| 6631 |
the connection is eligible for deletion. |
| 6632 |
- In addition to a number, may be one of the values C(indefinite) or |
| 6633 |
C(immediate). |
| 6634 |
returned: queried |
| 6635 |
type: bool |
| 6636 |
sample: 200 |
| 6637 |
ip_df_mode: |
| 6638 |
description: |
| 6639 |
- Describes the Don't Fragment (DF) bit setting in the outgoing UDP |
| 6640 |
packet. |
| 6641 |
- May be one of C(pmtu), C(preserve), C(set), or C(clear). |
| 6642 |
- When C(pmtu), sets the outgoing UDP packet DF big based on the ip |
| 6643 |
pmtu setting. |
| 6644 |
- When C(preserve), preserves the incoming UDP packet Don't Fragment bit. |
| 6645 |
- When C(set), sets the outgoing UDP packet DF bit. |
| 6646 |
- When C(clear), clears the outgoing UDP packet DF bit. |
| 6647 |
returned: queried |
| 6648 |
type: str |
| 6649 |
sample: pmtu |
| 6650 |
ip_tos_to_client: |
| 6651 |
description: |
| 6652 |
- The Type of Service level the traffic management |
| 6653 |
system assigns to UDP packets when sending them to clients. |
| 6654 |
- May be numeric, or the values C(pass-through) or C(mimic). |
| 6655 |
returned: queried |
| 6656 |
type: str |
| 6657 |
sample: mimic |
| 6658 |
ip_ttl_mode: |
| 6659 |
description: |
| 6660 |
- The outgoing UDP packet's TTL mode. |
| 6661 |
- Valid modes are C(proxy), C(preserve), C(decrement), and C(set). |
| 6662 |
- When C(proxy), sets the IP TTL of IPv4 to the default value of 255 and |
| 6663 |
IPv6 to the default value of 64. |
| 6664 |
- When C(preserve), sets the IP TTL to the original packet TTL value. |
| 6665 |
- When C(decrement), sets the IP TTL to the original packet TTL value minus 1. |
| 6666 |
- When C(set), sets the IP TTL with the specified values in C(ip_ttl_v4) and |
| 6667 |
C(ip_ttl_v6) values in the same profile. |
| 6668 |
returned: queried |
| 6669 |
type: str |
| 6670 |
sample: proxy |
| 6671 |
ip_ttl_v4: |
| 6672 |
description: |
| 6673 |
- IPv4 TTL. |
| 6674 |
returned: queried |
| 6675 |
type: int |
| 6676 |
sample: 10 |
| 6677 |
ip_ttl_v6: |
| 6678 |
description: |
| 6679 |
- IPv6 TTL. |
| 6680 |
returned: queried |
| 6681 |
type: int |
| 6682 |
sample: 100 |
| 6683 |
link_qos_to_client: |
| 6684 |
description: |
| 6685 |
- The Quality of Service level the system assigns to |
| 6686 |
UDP packets when sending them to clients. |
| 6687 |
- May be either numberic or the value C(pass-through). |
| 6688 |
returned: queried |
| 6689 |
type: str |
| 6690 |
sample: pass-through |
| 6691 |
no_checksum: |
| 6692 |
description: |
| 6693 |
- Whether checksum processing is enabled or disabled. |
| 6694 |
- Note that if the datagram is IPv6, the system always performs |
| 6695 |
checksum processing. |
| 6696 |
returned: queried |
| 6697 |
type: bool |
| 6698 |
sample: true |
| 6699 |
proxy_mss: |
| 6700 |
description: |
| 6701 |
- When C(true), specifies the system advertises the same mss |
| 6702 |
to the server as was negotiated with the client. |
| 6703 |
returned: queried |
| 6704 |
type: bool |
| 6705 |
sample: true |
| 6706 |
sample: hash/dictionary of values |
| 6707 |
users: |
| 6708 |
description: Details of the users on the system. |
| 6709 |
returned: When C(users) is specified in C(gather_subset). |
| 6710 |
type: complex |
| 6711 |
contains: |
| 6712 |
description: |
| 6713 |
description: |
| 6714 |
- Description of the resource. |
| 6715 |
returned: queried |
| 6716 |
type: str |
| 6717 |
sample: Admin user |
| 6718 |
full_path: |
| 6719 |
description: |
| 6720 |
- Full name of the resource as known to the BIG-IP. |
| 6721 |
returned: queried |
| 6722 |
type: str |
| 6723 |
sample: admin |
| 6724 |
name: |
| 6725 |
description: |
| 6726 |
- Relative name of the resource in the BIG-IP. |
| 6727 |
returned: queried |
| 6728 |
type: str |
| 6729 |
sample: admin |
| 6730 |
partition_access: |
| 6731 |
description: |
| 6732 |
- Partition that user has access to, including user role. |
| 6733 |
returned: queried |
| 6734 |
type: complex |
| 6735 |
contains: |
| 6736 |
name: |
| 6737 |
description: |
| 6738 |
- Name of partition. |
| 6739 |
returned: queried |
| 6740 |
type: str |
| 6741 |
sample: all-partitions |
| 6742 |
role: |
| 6743 |
description: |
| 6744 |
- Role allowed to user on partition. |
| 6745 |
returned: queried |
| 6746 |
type: str |
| 6747 |
sample: auditor |
| 6748 |
shell: |
| 6749 |
description: |
| 6750 |
- The shell assigned to the user account. |
| 6751 |
returned: queried |
| 6752 |
type: str |
| 6753 |
sample: tmsh |
| 6754 |
vcmp_guests: |
| 6755 |
description: vCMP related information. |
| 6756 |
returned: When C(vcmp-guests) is specified in C(gather_subset). |
| 6757 |
type: complex |
| 6758 |
contains: |
| 6759 |
full_path: |
| 6760 |
description: |
| 6761 |
- Full name of the resource as known to the BIG-IP. |
| 6762 |
returned: queried |
| 6763 |
type: str |
| 6764 |
sample: guest1 |
| 6765 |
name: |
| 6766 |
description: |
| 6767 |
- Relative name of the resource in the BIG-IP. |
| 6768 |
returned: queried |
| 6769 |
type: str |
| 6770 |
sample: guest1 |
| 6771 |
allowed_slots: |
| 6772 |
description: |
| 6773 |
- List of slots the guest is allowed to be assigned to. |
| 6774 |
returned: queried |
| 6775 |
type: list |
| 6776 |
sample: [0, 1, 3] |
| 6777 |
assigned_slots: |
| 6778 |
description: |
| 6779 |
- Slots the guest is assigned to. |
| 6780 |
returned: queried |
| 6781 |
type: list |
| 6782 |
sample: [0] |
| 6783 |
boot_priority: |
| 6784 |
description: |
| 6785 |
- Specifies the boot priority of the guest. A lower number means earlier to boot. |
| 6786 |
returned: queried |
| 6787 |
type: int |
| 6788 |
sample: 65535 |
| 6789 |
cores_per_slot: |
| 6790 |
description: |
| 6791 |
- Number of cores the system allocates to the guest. |
| 6792 |
returned: queried |
| 6793 |
type: int |
| 6794 |
sample: 2 |
| 6795 |
hostname: |
| 6796 |
description: |
| 6797 |
- FQDN assigned to the guest. |
| 6798 |
returned: queried |
| 6799 |
type: str |
| 6800 |
sample: guest1.localdomain |
| 6801 |
hotfix_image: |
| 6802 |
description: |
| 6803 |
- Hotfix image to install onto any of this guest's newly created virtual disks. |
| 6804 |
returned: queried |
| 6805 |
type: str |
| 6806 |
sample: Hotfix-BIGIP-12.1.3.4-0.0.2-hf1.iso |
| 6807 |
initial_image: |
| 6808 |
description: |
| 6809 |
- Software image to install onto any of this guest's newly created virtual disks. |
| 6810 |
returned: queried |
| 6811 |
type: str |
| 6812 |
sample: BIGIP-12.1.3.4-0.0.2.iso |
| 6813 |
mgmt_route: |
| 6814 |
description: |
| 6815 |
- Management gateway IP address for the guest. |
| 6816 |
returned: queried |
| 6817 |
type: str |
| 6818 |
sample: 2.2.2.1 |
| 6819 |
mgmt_address: |
| 6820 |
description: |
| 6821 |
- Management IP address configuration for the guest. |
| 6822 |
returned: queried |
| 6823 |
type: str |
| 6824 |
sample: 2.3.2.3 |
| 6825 |
mgmt_network: |
| 6826 |
description: |
| 6827 |
- Accessibility of this vCMP guest's management network. |
| 6828 |
returned: queried |
| 6829 |
type: str |
| 6830 |
sample: bridged |
| 6831 |
vlans: |
| 6832 |
description: |
| 6833 |
- List of VLANs on which the guest is either enabled or disabled. |
| 6834 |
returned: queried |
| 6835 |
type: list |
| 6836 |
sample: ['/Common/vlan1', '/Common/vlan2'] |
| 6837 |
min_number_of_slots: |
| 6838 |
description: |
| 6839 |
- Specifies the minimum number of slots the guest must be assigned to. |
| 6840 |
returned: queried |
| 6841 |
type: int |
| 6842 |
sample: 2 |
| 6843 |
number_of_slots: |
| 6844 |
description: |
| 6845 |
- Specifies the number of slots the guest should be assigned to. |
| 6846 |
- This number is always greater than, or equal to, C(min_number_of_slots). |
| 6847 |
returned: queried |
| 6848 |
type: int |
| 6849 |
sample: 2 |
| 6850 |
ssl_mode: |
| 6851 |
description: |
| 6852 |
- The SSL hardware allocation mode for the guest. |
| 6853 |
returned: queried |
| 6854 |
type: str |
| 6855 |
sample: shared |
| 6856 |
state: |
| 6857 |
description: |
| 6858 |
- Specifies the state of the guest. |
| 6859 |
- May be one of C(configured), C(provisioned), or C(deployed). |
| 6860 |
- Each state implies the actions of all states before it. |
| 6861 |
returned: queried |
| 6862 |
type: str |
| 6863 |
sample: provisioned |
| 6864 |
virtual_disk: |
| 6865 |
description: |
| 6866 |
- The filename of the virtual disk to use for this guest. |
| 6867 |
returned: queried |
| 6868 |
type: str |
| 6869 |
sample: guest1.img |
| 6870 |
sample: hash/dictionary of values |
| 6871 |
virtual_addresses: |
| 6872 |
description: Virtual address related information. |
| 6873 |
returned: When C(virtual-addresses) is specified in C(gather_subset). |
| 6874 |
type: complex |
| 6875 |
contains: |
| 6876 |
full_path: |
| 6877 |
description: |
| 6878 |
- Full name of the resource as known to the BIG-IP. |
| 6879 |
returned: queried |
| 6880 |
type: str |
| 6881 |
sample: /Common/2.3.4.5 |
| 6882 |
name: |
| 6883 |
description: |
| 6884 |
- Relative name of the resource in the BIG-IP. |
| 6885 |
returned: queried |
| 6886 |
type: str |
| 6887 |
sample: 2.3.4.5 |
| 6888 |
address: |
| 6889 |
description: |
| 6890 |
- The virtual IP address. |
| 6891 |
returned: queried |
| 6892 |
type: str |
| 6893 |
sample: 2.3.4.5 |
| 6894 |
arp_enabled: |
| 6895 |
description: |
| 6896 |
- Whether or not ARP is enabled for the specified virtual address. |
| 6897 |
returned: queried |
| 6898 |
type: bool |
| 6899 |
sample: true |
| 6900 |
auto_delete_enabled: |
| 6901 |
description: |
| 6902 |
- Indicates if the virtual address will be deleted automatically on |
| 6903 |
deletion of the last associated virtual server or not. |
| 6904 |
returned: queried |
| 6905 |
type: bool |
| 6906 |
sample: false |
| 6907 |
connection_limit: |
| 6908 |
description: |
| 6909 |
- Concurrent connection limit for one or more virtual |
| 6910 |
servers. |
| 6911 |
returned: queried |
| 6912 |
type: int |
| 6913 |
sample: 0 |
| 6914 |
description: |
| 6915 |
description: |
| 6916 |
- The description of the virtual address. |
| 6917 |
returned: queried |
| 6918 |
type: str |
| 6919 |
sample: My virtual address |
| 6920 |
enabled: |
| 6921 |
description: |
| 6922 |
- Whether the virtual address is enabled or not. |
| 6923 |
returned: queried |
| 6924 |
type: bool |
| 6925 |
sample: true |
| 6926 |
icmp_echo: |
| 6927 |
description: |
| 6928 |
- Whether the virtual address should reply to ICMP echo requests. |
| 6929 |
returned: queried |
| 6930 |
type: bool |
| 6931 |
sample: true |
| 6932 |
floating: |
| 6933 |
description: |
| 6934 |
- Property derived from the traffic group. A floating virtual |
| 6935 |
address is a virtual address for a VLAN that serves as a shared |
| 6936 |
address by all devices of a BIG-IP traffic-group. |
| 6937 |
returned: queried |
| 6938 |
type: bool |
| 6939 |
sample: true |
| 6940 |
netmask: |
| 6941 |
description: |
| 6942 |
- Netmask of the virtual address. |
| 6943 |
returned: queried |
| 6944 |
type: str |
| 6945 |
sample: 255.255.255.255 |
| 6946 |
route_advertisement: |
| 6947 |
description: |
| 6948 |
- Specifies the route advertisement setting for the virtual address. |
| 6949 |
returned: queried |
| 6950 |
type: bool |
| 6951 |
sample: false |
| 6952 |
traffic_group: |
| 6953 |
description: |
| 6954 |
- Traffic group on which the virtual address is active. |
| 6955 |
returned: queried |
| 6956 |
type: str |
| 6957 |
sample: /Common/traffic-group-1 |
| 6958 |
spanning: |
| 6959 |
description: |
| 6960 |
- Whether or not spanning is enabled for the specified virtual address. |
| 6961 |
returned: queried |
| 6962 |
type: bool |
| 6963 |
sample: false |
| 6964 |
inherited_traffic_group: |
| 6965 |
description: |
| 6966 |
- Indicates if the traffic group is inherited from the parent folder. |
| 6967 |
returned: queried |
| 6968 |
type: bool |
| 6969 |
sample: false |
| 6970 |
sample: hash/dictionary of values |
| 6971 |
virtual_servers: |
| 6972 |
description: Virtual address related information. |
| 6973 |
returned: When C(virtual-addresses) is specified in C(gather_subset). |
| 6974 |
type: complex |
| 6975 |
contains: |
| 6976 |
availability_status: |
| 6977 |
description: |
| 6978 |
- The availability of the virtual server. |
| 6979 |
returned: queried |
| 6980 |
type: str |
| 6981 |
sample: offline |
| 6982 |
full_path: |
| 6983 |
description: |
| 6984 |
- Full name of the resource as known to the BIG-IP. |
| 6985 |
returned: queried |
| 6986 |
type: str |
| 6987 |
sample: /Common/2.3.4.5 |
| 6988 |
name: |
| 6989 |
description: |
| 6990 |
- Relative name of the resource in the BIG-IP. |
| 6991 |
returned: queried |
| 6992 |
type: str |
| 6993 |
sample: 2.3.4.5 |
| 6994 |
auto_lasthop: |
| 6995 |
description: |
| 6996 |
- When enabled, allows the system to send return traffic to the MAC address |
| 6997 |
that transmitted the request, even if the routing table points to a different |
| 6998 |
network or interface. |
| 6999 |
returned: queried |
| 7000 |
type: str |
| 7001 |
sample: default |
| 7002 |
bw_controller_policy: |
| 7003 |
description: |
| 7004 |
- The bandwidth controller for the system to use to enforce a throughput policy |
| 7005 |
for incoming network traffic. |
| 7006 |
returned: queried |
| 7007 |
type: str |
| 7008 |
sample: /Common/bw1 |
| 7009 |
client_side_bits_in: |
| 7010 |
description: |
| 7011 |
- Number of client-side ingress bits. |
| 7012 |
returned: queried |
| 7013 |
type: int |
| 7014 |
sample: 1000 |
| 7015 |
client_side_bits_out: |
| 7016 |
description: |
| 7017 |
- Number of client-side egress bits. |
| 7018 |
returned: queried |
| 7019 |
type: int |
| 7020 |
sample: 200 |
| 7021 |
client_side_current_connections: |
| 7022 |
description: |
| 7023 |
- Number of current connections client-side. |
| 7024 |
returned: queried |
| 7025 |
type: int |
| 7026 |
sample: 300 |
| 7027 |
client_side_evicted_connections: |
| 7028 |
description: |
| 7029 |
- Number of evicted connections client-side. |
| 7030 |
returned: queried |
| 7031 |
type: int |
| 7032 |
sample: 100 |
| 7033 |
client_side_max_connections: |
| 7034 |
description: |
| 7035 |
- Maximum number of connections client-side. |
| 7036 |
returned: queried |
| 7037 |
type: int |
| 7038 |
sample: 40 |
| 7039 |
client_side_pkts_in: |
| 7040 |
description: |
| 7041 |
- Number of client-side ingress packets. |
| 7042 |
returned: queried |
| 7043 |
type: int |
| 7044 |
sample: 1098384 |
| 7045 |
client_side_pkts_out: |
| 7046 |
description: |
| 7047 |
- Number of client-side egress packets. |
| 7048 |
returned: queried |
| 7049 |
type: int |
| 7050 |
sample: 3484734 |
| 7051 |
client_side_slow_killed: |
| 7052 |
description: |
| 7053 |
- Number of slow connections killed, client-side. |
| 7054 |
returned: queried |
| 7055 |
type: int |
| 7056 |
sample: 234 |
| 7057 |
client_side_total_connections: |
| 7058 |
description: |
| 7059 |
- Total number of connections. |
| 7060 |
returned: queried |
| 7061 |
type: int |
| 7062 |
sample: 24 |
| 7063 |
cmp_enabled: |
| 7064 |
description: |
| 7065 |
- Whether or not clustered multi-processor (CMP) acceleration is enabled. |
| 7066 |
returned: queried |
| 7067 |
type: bool |
| 7068 |
sample: true |
| 7069 |
cmp_mode: |
| 7070 |
description: |
| 7071 |
- The clustered-multiprocessing mode. |
| 7072 |
returned: queried |
| 7073 |
type: str |
| 7074 |
sample: all-cpus |
| 7075 |
connection_limit: |
| 7076 |
description: |
| 7077 |
- Maximum number of concurrent connections you want to allow for the virtual server. |
| 7078 |
returned: queried |
| 7079 |
type: int |
| 7080 |
sample: 100 |
| 7081 |
description: |
| 7082 |
description: |
| 7083 |
- The description of the virtual server. |
| 7084 |
returned: queried |
| 7085 |
type: str |
| 7086 |
sample: My virtual |
| 7087 |
enabled: |
| 7088 |
description: |
| 7089 |
- Whether or not the virtual is enabled. |
| 7090 |
returned: queried |
| 7091 |
type: bool |
| 7092 |
sample: true |
| 7093 |
ephemeral_bits_in: |
| 7094 |
description: |
| 7095 |
- Number of ephemeral ingress bits. |
| 7096 |
returned: queried |
| 7097 |
type: int |
| 7098 |
sample: 1000 |
| 7099 |
ephemeral_bits_out: |
| 7100 |
description: |
| 7101 |
- Number of ephemeral egress bits. |
| 7102 |
returned: queried |
| 7103 |
type: int |
| 7104 |
sample: 200 |
| 7105 |
ephemeral_current_connections: |
| 7106 |
description: |
| 7107 |
- Number of ephemeral current connections. |
| 7108 |
returned: queried |
| 7109 |
type: int |
| 7110 |
sample: 300 |
| 7111 |
ephemeral_evicted_connections: |
| 7112 |
description: |
| 7113 |
- Number of ephemeral evicted connections. |
| 7114 |
returned: queried |
| 7115 |
type: int |
| 7116 |
sample: 100 |
| 7117 |
ephemeral_max_connections: |
| 7118 |
description: |
| 7119 |
- Maximum number of ephemeral connections. |
| 7120 |
returned: queried |
| 7121 |
type: int |
| 7122 |
sample: 40 |
| 7123 |
ephemeral_pkts_in: |
| 7124 |
description: |
| 7125 |
- Number of ephemeral ingress packets. |
| 7126 |
returned: queried |
| 7127 |
type: int |
| 7128 |
sample: 1098384 |
| 7129 |
ephemeral_pkts_out: |
| 7130 |
description: |
| 7131 |
- Number of ephemeral egress packets. |
| 7132 |
returned: queried |
| 7133 |
type: int |
| 7134 |
sample: 3484734 |
| 7135 |
ephemeral_slow_killed: |
| 7136 |
description: |
| 7137 |
- Number of ephemeral slow connections killed. |
| 7138 |
returned: queried |
| 7139 |
type: int |
| 7140 |
sample: 234 |
| 7141 |
ephemeral_total_connections: |
| 7142 |
description: |
| 7143 |
- Total number of ephemeral connections. |
| 7144 |
returned: queried |
| 7145 |
type: int |
| 7146 |
sample: 24 |
| 7147 |
total_software_accepted_syn_cookies: |
| 7148 |
description: |
| 7149 |
- SYN Cookies Total Software Accepted. |
| 7150 |
returned: queried |
| 7151 |
type: int |
| 7152 |
sample: 0 |
| 7153 |
total_hardware_accepted_syn_cookies: |
| 7154 |
description: |
| 7155 |
- SYN Cookies Total Hardware Accepted. |
| 7156 |
returned: queried |
| 7157 |
type: int |
| 7158 |
sample: 0 |
| 7159 |
total_hardware_syn_cookies: |
| 7160 |
description: |
| 7161 |
- SYN Cookies Total Hardware. |
| 7162 |
returned: queried |
| 7163 |
type: int |
| 7164 |
sample: 0 |
| 7165 |
hardware_syn_cookie_instances: |
| 7166 |
description: |
| 7167 |
- Hardware SYN Cookie Instances. |
| 7168 |
returned: queried |
| 7169 |
type: int |
| 7170 |
sample: 0 |
| 7171 |
total_software_rejected_syn_cookies: |
| 7172 |
description: |
| 7173 |
- Total Software Rejected. |
| 7174 |
returned: queried |
| 7175 |
type: int |
| 7176 |
sample: 0 |
| 7177 |
software_syn_cookie_instances: |
| 7178 |
description: |
| 7179 |
- Software SYN Cookie Instances. |
| 7180 |
returned: queried |
| 7181 |
type: int |
| 7182 |
sample: 0 |
| 7183 |
current_syn_cache: |
| 7184 |
description: |
| 7185 |
- Current SYN Cache. |
| 7186 |
returned: queried |
| 7187 |
type: int |
| 7188 |
sample: 0 |
| 7189 |
max_conn_duration: |
| 7190 |
description: |
| 7191 |
- Max Conn Duration/msec. |
| 7192 |
returned: queried |
| 7193 |
type: int |
| 7194 |
sample: 0 |
| 7195 |
mean_conn_duration: |
| 7196 |
description: |
| 7197 |
- Mean Conn Duration/msec. |
| 7198 |
returned: queried |
| 7199 |
type: int |
| 7200 |
sample: 0 |
| 7201 |
min_conn_duration: |
| 7202 |
description: |
| 7203 |
- Min Conn Duration/msec. |
| 7204 |
returned: queried |
| 7205 |
type: int |
| 7206 |
sample: 0 |
| 7207 |
cpu_usage_ratio_last_5_min: |
| 7208 |
description: |
| 7209 |
- CPU Usage Ratio (%) Last 5 Minutes. |
| 7210 |
returned: queried |
| 7211 |
type: int |
| 7212 |
sample: 0 |
| 7213 |
cpu_usage_ratio_last_5_sec: |
| 7214 |
description: |
| 7215 |
- CPU Usage Ratio (%) Last 5 Seconds. |
| 7216 |
returned: queried |
| 7217 |
type: int |
| 7218 |
sample: 0 |
| 7219 |
cpu_usage_ratio_last_1_min: |
| 7220 |
description: |
| 7221 |
- CPU Usage Ratio (%) Last 1 Minute. |
| 7222 |
returned: queried |
| 7223 |
type: int |
| 7224 |
sample: 0 |
| 7225 |
syn_cache_overflow: |
| 7226 |
description: |
| 7227 |
- SYN Cache Overflow. |
| 7228 |
returned: queried |
| 7229 |
type: int |
| 7230 |
sample: 0 |
| 7231 |
total_software_syn_cookies: |
| 7232 |
description: |
| 7233 |
- Total Software SYN Cookies |
| 7234 |
returned: queried |
| 7235 |
type: int |
| 7236 |
sample: 0 |
| 7237 |
syn_cookies_status: |
| 7238 |
description: |
| 7239 |
- SYN Cookies Status. |
| 7240 |
returned: queried |
| 7241 |
type: str |
| 7242 |
sample: not-activated |
| 7243 |
fallback_persistence_profile: |
| 7244 |
description: |
| 7245 |
- Fallback persistence profile for the virtual server to use |
| 7246 |
when the default persistence profile is not available. |
| 7247 |
returned: queried |
| 7248 |
type: str |
| 7249 |
sample: /Common/fallback1 |
| 7250 |
persistence_profile: |
| 7251 |
description: |
| 7252 |
- The persistence profile you want the system to use as the default |
| 7253 |
for this virtual server. |
| 7254 |
returned: queried |
| 7255 |
type: str |
| 7256 |
sample: /Common/persist1 |
| 7257 |
translate_port: |
| 7258 |
description: |
| 7259 |
- Enables or disables port translation. |
| 7260 |
returned: queried |
| 7261 |
type: bool |
| 7262 |
sample: true |
| 7263 |
translate_address: |
| 7264 |
description: |
| 7265 |
- Enables or disables address translation for the virtual server. |
| 7266 |
returned: queried |
| 7267 |
type: bool |
| 7268 |
sample: true |
| 7269 |
vlans: |
| 7270 |
description: |
| 7271 |
- List of VLANs on which the virtual server is either enabled or disabled. |
| 7272 |
returned: queried |
| 7273 |
type: list |
| 7274 |
sample: ['/Common/vlan1', '/Common/vlan2'] |
| 7275 |
destination: |
| 7276 |
description: |
| 7277 |
- Name of the virtual address and service on which the virtual server |
| 7278 |
listens for connections. |
| 7279 |
returned: queried |
| 7280 |
type: str |
| 7281 |
sample: /Common/2.2.3.3%1:76 |
| 7282 |
last_hop_pool: |
| 7283 |
description: |
| 7284 |
- Name of the last hop pool you want the virtual |
| 7285 |
server to use to direct reply traffic to the last hop router. |
| 7286 |
returned: queried |
| 7287 |
type: str |
| 7288 |
sample: /Common/pool1 |
| 7289 |
nat64_enabled: |
| 7290 |
description: |
| 7291 |
- Whether or not NAT64 is enabled. |
| 7292 |
returned: queried |
| 7293 |
type: bool |
| 7294 |
sample: true |
| 7295 |
source_port_behavior: |
| 7296 |
description: |
| 7297 |
- Specifies whether the system preserves the source port of the connection. |
| 7298 |
returned: queried |
| 7299 |
type: str |
| 7300 |
sample: preserve |
| 7301 |
ip_intelligence_policy: |
| 7302 |
description: |
| 7303 |
- IP Intelligence policy assigned to the virtual. |
| 7304 |
returned: queried |
| 7305 |
type: str |
| 7306 |
sample: /Common/ip1 |
| 7307 |
protocol: |
| 7308 |
description: |
| 7309 |
- IP protocol for which you want the virtual server to direct traffic. |
| 7310 |
returned: queried |
| 7311 |
type: str |
| 7312 |
sample: tcp |
| 7313 |
default_pool: |
| 7314 |
description: |
| 7315 |
- Pool name you want the virtual server to use as the default pool. |
| 7316 |
returned: queried |
| 7317 |
type: str |
| 7318 |
sample: /Common/pool1 |
| 7319 |
rate_limit_mode: |
| 7320 |
description: |
| 7321 |
- Indicates whether the rate limit is applied per virtual object, |
| 7322 |
per source address, per destination address, or some combination |
| 7323 |
thereof. |
| 7324 |
returned: queried |
| 7325 |
type: str |
| 7326 |
sample: object |
| 7327 |
rate_limit_source_mask: |
| 7328 |
description: |
| 7329 |
- Specifies a mask, in bits, to be applied to the source address as |
| 7330 |
part of the rate limiting. |
| 7331 |
returned: queried |
| 7332 |
type: int |
| 7333 |
sample: 0 |
| 7334 |
rate_limit: |
| 7335 |
description: |
| 7336 |
- Maximum number of connections per second allowed for a virtual server. |
| 7337 |
returned: queried |
| 7338 |
type: int |
| 7339 |
sample: 34 |
| 7340 |
snat_type: |
| 7341 |
description: |
| 7342 |
- Specifies the type of source address translation associated |
| 7343 |
with the specified virtual server. |
| 7344 |
returned: queried |
| 7345 |
type: str |
| 7346 |
sample: none |
| 7347 |
snat_pool: |
| 7348 |
description: |
| 7349 |
- Specifies the name of a LSN or SNAT pool used by the specified virtual server. |
| 7350 |
returned: queried |
| 7351 |
type: str |
| 7352 |
sample: /Common/pool1 |
| 7353 |
serverssl_use_sni: |
| 7354 |
description: |
| 7355 |
- Specifies whether SNI is enabled or disabled on the server-side SSL connection. |
| 7356 |
returned: queried |
| 7357 |
type: bool |
| 7358 |
sample: true |
| 7359 |
status_reason: |
| 7360 |
description: |
| 7361 |
- If there is a problem with the status of the virtual, it is reported here. |
| 7362 |
returned: queried |
| 7363 |
type: str |
| 7364 |
sample: The children pool member(s) either don't have service checking... |
| 7365 |
gtm_score: |
| 7366 |
description: |
| 7367 |
- Specifies a score that is associated with the virtual server. |
| 7368 |
returned: queried |
| 7369 |
type: int |
| 7370 |
sample: 0 |
| 7371 |
rate_class: |
| 7372 |
description: |
| 7373 |
- Name of an existing rate class you want the |
| 7374 |
virtual server to use to enforce a throughput policy for incoming |
| 7375 |
network traffic. |
| 7376 |
returned: queried |
| 7377 |
type: str |
| 7378 |
rate_limit_destination_mask: |
| 7379 |
description: |
| 7380 |
- Specifies a mask, in bits, to be applied to the destination |
| 7381 |
address as part of the rate limiting. |
| 7382 |
returned: queried |
| 7383 |
type: int |
| 7384 |
sample: 32 |
| 7385 |
source_address: |
| 7386 |
description: |
| 7387 |
- Specifies an IP address or network from which the virtual server |
| 7388 |
will accept traffic. |
| 7389 |
returned: queried |
| 7390 |
type: str |
| 7391 |
sample: 0.0.0./0 |
| 7392 |
authentication_profile: |
| 7393 |
description: |
| 7394 |
- Specifies a list of authentication profile names, separated by |
| 7395 |
spaces, that the virtual server uses to manage authentication. |
| 7396 |
returned: queried |
| 7397 |
type: list |
| 7398 |
sample: ['/Common/ssl_drldp'] |
| 7399 |
connection_mirror_enabled: |
| 7400 |
description: |
| 7401 |
- Whether or not connection mirroring is enabled. |
| 7402 |
returned: queried |
| 7403 |
type: bool |
| 7404 |
sample: true |
| 7405 |
irules: |
| 7406 |
description: |
| 7407 |
- List of iRules that customize the virtual server to direct and manage traffic. |
| 7408 |
returned: queried |
| 7409 |
type: list |
| 7410 |
sample: ['/Common/rule1', /Common/rule2'] |
| 7411 |
policies: |
| 7412 |
description: |
| 7413 |
- List of LTM policies attached to the virtual server. |
| 7414 |
returned: queried |
| 7415 |
type: list |
| 7416 |
sample: ['/Common/policy1', /Common/policy2'] |
| 7417 |
security_log_profiles: |
| 7418 |
description: |
| 7419 |
- Specifies the log profile applied to the virtual server. |
| 7420 |
returned: queried |
| 7421 |
type: list |
| 7422 |
sample: ['/Common/global-network', '/Common/local-dos'] |
| 7423 |
type: |
| 7424 |
description: |
| 7425 |
- Virtual server type. |
| 7426 |
returned: queried |
| 7427 |
type: str |
| 7428 |
sample: standard |
| 7429 |
destination_address: |
| 7430 |
description: |
| 7431 |
- Address portion of the C(destination). |
| 7432 |
returned: queried |
| 7433 |
type: str |
| 7434 |
sample: 2.3.3.2 |
| 7435 |
destination_port: |
| 7436 |
description: |
| 7437 |
- Port potion of the C(destination). |
| 7438 |
returned: queried |
| 7439 |
type: int |
| 7440 |
sample: 80 |
| 7441 |
profiles: |
| 7442 |
description: |
| 7443 |
- List of the profiles attached to the virtual. |
| 7444 |
type: complex |
| 7445 |
contains: |
| 7446 |
context: |
| 7447 |
description: |
| 7448 |
- Which side of the connection the profile affects; either C(all), |
| 7449 |
C(client-side) or C(server-side). |
| 7450 |
returned: queried |
| 7451 |
type: str |
| 7452 |
sample: client-side |
| 7453 |
full_path: |
| 7454 |
description: |
| 7455 |
- Full name of the resource as known to the BIG-IP. |
| 7456 |
returned: queried |
| 7457 |
type: str |
| 7458 |
sample: /Common/tcp |
| 7459 |
name: |
| 7460 |
description: |
| 7461 |
- Relative name of the resource in the BIG-IP. |
| 7462 |
returned: queried |
| 7463 |
type: str |
| 7464 |
sample: tcp |
| 7465 |
per_flow_request_access_policy: |
| 7466 |
description: |
| 7467 |
- per request policy. |
| 7468 |
returned: queried |
| 7469 |
type: str |
| 7470 |
sample: /Common/my-custom-per-request-policy |
| 7471 |
total_requests: |
| 7472 |
description: |
| 7473 |
- Total requests. |
| 7474 |
returned: queried |
| 7475 |
type: int |
| 7476 |
sample: 8 |
| 7477 |
sample: hash/dictionary of values |
| 7478 |
vlans: |
| 7479 |
description: List of VLAN information. |
| 7480 |
returned: When C(vlans) is specified in C(gather_subset). |
| 7481 |
type: complex |
| 7482 |
contains: |
| 7483 |
auto_lasthop: |
| 7484 |
description: |
| 7485 |
- Allows the system to send return traffic to the MAC address that transmitted the |
| 7486 |
request, even if the routing table points to a different network or interface. |
| 7487 |
returned: queried |
| 7488 |
type: str |
| 7489 |
sample: enabled |
| 7490 |
cmp_hash_algorithm: |
| 7491 |
description: |
| 7492 |
- Specifies how the traffic on the VLAN will be disaggregated. |
| 7493 |
returned: queried |
| 7494 |
type: str |
| 7495 |
sample: default |
| 7496 |
description: |
| 7497 |
description: |
| 7498 |
- Description of the VLAN. |
| 7499 |
returned: queried |
| 7500 |
type: str |
| 7501 |
sample: My vlan |
| 7502 |
failsafe_action: |
| 7503 |
description: |
| 7504 |
- Action for the system to take when the fail-safe mechanism is triggered. |
| 7505 |
returned: queried |
| 7506 |
type: str |
| 7507 |
sample: reboot |
| 7508 |
failsafe_enabled: |
| 7509 |
description: |
| 7510 |
- Whether failsafe is enabled or not. |
| 7511 |
returned: queried |
| 7512 |
type: bool |
| 7513 |
sample: true |
| 7514 |
failsafe_timeout: |
| 7515 |
description: |
| 7516 |
- Number of seconds that an active unit can run without detecting network traffic |
| 7517 |
on this VLAN before it starts a failover. |
| 7518 |
returned: queried |
| 7519 |
type: int |
| 7520 |
sample: 90 |
| 7521 |
if_index: |
| 7522 |
description: |
| 7523 |
- Index assigned to this VLAN. It is a unique identifier assigned for all objects |
| 7524 |
displayed in the SNMP IF-MIB. |
| 7525 |
returned: queried |
| 7526 |
type: int |
| 7527 |
sample: 176 |
| 7528 |
learning_mode: |
| 7529 |
description: |
| 7530 |
- Whether switch ports placed in the VLAN are configured for switch learning, |
| 7531 |
forwarding only, or dropped. |
| 7532 |
returned: queried |
| 7533 |
type: str |
| 7534 |
sample: enable-forward |
| 7535 |
interfaces: |
| 7536 |
description: |
| 7537 |
- List of tagged or untagged interfaces and trunks that you want to configure for the VLAN. |
| 7538 |
returned: queried |
| 7539 |
type: complex |
| 7540 |
contains: |
| 7541 |
full_path: |
| 7542 |
description: |
| 7543 |
- Full name of the resource as known to the BIG-IP. |
| 7544 |
returned: queried |
| 7545 |
type: str |
| 7546 |
sample: 1.3 |
| 7547 |
name: |
| 7548 |
description: |
| 7549 |
- Relative name of the resource in the BIG-IP. |
| 7550 |
returned: queried |
| 7551 |
type: str |
| 7552 |
sample: 1.3 |
| 7553 |
tagged: |
| 7554 |
description: |
| 7555 |
- Whether the interface is tagged or not. |
| 7556 |
returned: queried |
| 7557 |
type: bool |
| 7558 |
sample: false |
| 7559 |
mtu: |
| 7560 |
description: |
| 7561 |
- Specific maximum transition unit (MTU) for the VLAN. |
| 7562 |
returned: queried |
| 7563 |
type: int |
| 7564 |
sample: 1500 |
| 7565 |
sflow_poll_interval: |
| 7566 |
description: |
| 7567 |
- Maximum interval in seconds between two pollings. |
| 7568 |
returned: queried |
| 7569 |
type: int |
| 7570 |
sample: 0 |
| 7571 |
sflow_poll_interval_global: |
| 7572 |
description: |
| 7573 |
- Whether the global VLAN poll-interval setting overrides the object-level |
| 7574 |
poll-interval setting. |
| 7575 |
returned: queried |
| 7576 |
type: bool |
| 7577 |
sample: false |
| 7578 |
sflow_sampling_rate: |
| 7579 |
description: |
| 7580 |
- Ratio of packets observed to the samples generated. |
| 7581 |
returned: queried |
| 7582 |
type: int |
| 7583 |
sample: 0 |
| 7584 |
sflow_sampling_rate_global: |
| 7585 |
description: |
| 7586 |
- Whether the global VLAN sampling-rate setting overrides the object-level |
| 7587 |
sampling-rate setting. |
| 7588 |
returned: queried |
| 7589 |
type: bool |
| 7590 |
sample: true |
| 7591 |
source_check_enabled: |
| 7592 |
description: |
| 7593 |
- Specifies that only connections that have a return route in the routing table are accepted. |
| 7594 |
returned: queried |
| 7595 |
type: bool |
| 7596 |
sample: true |
| 7597 |
true_mac_address: |
| 7598 |
description: |
| 7599 |
- Media access control (MAC) address for the lowest-numbered interface assigned to this VLAN. |
| 7600 |
returned: queried |
| 7601 |
type: str |
| 7602 |
sample: "fa:16:3e:10:da:ff" |
| 7603 |
tag: |
| 7604 |
description: |
| 7605 |
- Tag number for the VLAN. |
| 7606 |
returned: queried |
| 7607 |
type: int |
| 7608 |
sample: 30 |
| 7609 |
sample: hash/dictionary of values |
| 7610 |
''' |
| 7611 |
|
| 7612 |
import datetime |
| 7613 |
import math |
| 7614 |
import re |
| 7615 |
import time |
| 7616 |
import traceback |
| 7617 |
from collections import namedtuple |
| 7618 |
try: |
| 7619 |
from packaging.version import Version |
| 7620 |
except ImportError: |
| 7621 |
HAS_PACKAGING = False |
| 7622 |
Version = None |
| 7623 |
PACKAGING_IMPORT_ERROR = traceback.format_exc() |
| 7624 |
else: |
| 7625 |
HAS_PACKAGING = True |
| 7626 |
PACKAGING_IMPORT_ERROR = None |
| 7627 |
|
| 7628 |
from ansible.module_utils.basic import ( |
| 7629 |
AnsibleModule, missing_required_lib, env_fallback |
| 7630 |
) |
| 7631 |
from ansible.module_utils.parsing.convert_bool import BOOLEANS_TRUE |
| 7632 |
from ansible.module_utils.six import ( |
| 7633 |
iteritems, string_types |
| 7634 |
) |
| 7635 |
from ansible.module_utils.urls import urlparse |
| 7636 |
|
| 7637 |
from ipaddress import ip_interface |
| 7638 |
|
| 7639 |
from ..module_utils.bigip import F5RestClient |
| 7640 |
from ..module_utils.common import ( |
| 7641 |
F5ModuleError, AnsibleF5Parameters, transform_name, f5_argument_spec, flatten_boolean, fq_name |
| 7642 |
) |
| 7643 |
from ..module_utils.urls import parseStats |
| 7644 |
from ..module_utils.icontrol import ( |
| 7645 |
tmos_version, modules_provisioned, packages_installed |
| 7646 |
) |
| 7647 |
from ..module_utils.ipaddress import is_valid_ip |
| 7648 |
from ..module_utils.teem import send_teem |
| 7649 |
|
| 7650 |
from concurrent.futures import ThreadPoolExecutor, as_completed |
| 7651 |
|
| 7652 |
|
| 7653 |
class BaseManager(object): |
| 7654 |
def __init__(self, *args, **kwargs): |
| 7655 |
self.module = kwargs.get('module', None) |
| 7656 |
self.client = kwargs.get('client', None) |
| 7657 |
self.kwargs = kwargs |
| 7658 |
|
| 7659 |
|
| 7660 |
|
| 7661 |
|
| 7662 |
|
| 7663 |
|
| 7664 |
|
| 7665 |
|
| 7666 |
|
| 7667 |
|
| 7668 |
|
| 7669 |
|
| 7670 |
|
| 7671 |
|
| 7672 |
|
| 7673 |
|
| 7674 |
|
| 7675 |
|
| 7676 |
|
| 7677 |
|
| 7678 |
|
| 7679 |
|
| 7680 |
self.provisioned_modules = [] |
| 7681 |
|
| 7682 |
|
| 7683 |
|
| 7684 |
|
| 7685 |
|
| 7686 |
|
| 7687 |
|
| 7688 |
|
| 7689 |
|
| 7690 |
|
| 7691 |
self.installed_packages = [] |
| 7692 |
|
| 7693 |
def exec_module(self): |
| 7694 |
results = [] |
| 7695 |
facts = self.read_facts() |
| 7696 |
for item in facts: |
| 7697 |
attrs = item.to_return() |
| 7698 |
results.append(attrs) |
| 7699 |
return results |
| 7700 |
|
| 7701 |
|
| 7702 |
class Parameters(AnsibleF5Parameters): |
| 7703 |
@property |
| 7704 |
def gather_subset(self): |
| 7705 |
if isinstance(self._values['gather_subset'], string_types): |
| 7706 |
self._values['gather_subset'] = [self._values['gather_subset']] |
| 7707 |
elif not isinstance(self._values['gather_subset'], list): |
| 7708 |
raise F5ModuleError( |
| 7709 |
"The specified gather_subset must be a list." |
| 7710 |
) |
| 7711 |
tmp = list(set(self._values['gather_subset'])) |
| 7712 |
tmp.sort() |
| 7713 |
self._values['gather_subset'] = tmp |
| 7714 |
|
| 7715 |
return self._values['gather_subset'] |
| 7716 |
|
| 7717 |
|
| 7718 |
class BaseParameters(Parameters): |
| 7719 |
@property |
| 7720 |
def enabled(self): |
| 7721 |
return flatten_boolean(self._values['enabled']) |
| 7722 |
|
| 7723 |
@property |
| 7724 |
def disabled(self): |
| 7725 |
return flatten_boolean(self._values['disabled']) |
| 7726 |
|
| 7727 |
def _remove_internal_keywords(self, resource): |
| 7728 |
resource.pop('kind', None) |
| 7729 |
resource.pop('generation', None) |
| 7730 |
resource.pop('selfLink', None) |
| 7731 |
resource.pop('isSubcollection', None) |
| 7732 |
|
| 7733 |
|
| 7734 |
def to_return(self): |
| 7735 |
result = {} |
| 7736 |
for returnable in self.returnables: |
| 7737 |
result[returnable] = getattr(self, returnable) |
| 7738 |
result = self._filter_params(result) |
| 7739 |
return result |
| 7740 |
|
| 7741 |
|
| 7742 |
class ApmAccessProfileFactParameters(BaseParameters): |
| 7743 |
api_map = { |
| 7744 |
'accessPolicy': 'access_policy', |
| 7745 |
'fullPath': 'full_path', |
| 7746 |
} |
| 7747 |
|
| 7748 |
returnables = [ |
| 7749 |
'access_policy', |
| 7750 |
'full_path', |
| 7751 |
'name', |
| 7752 |
] |
| 7753 |
|
| 7754 |
|
| 7755 |
class ApmAccessProfileFactManager(BaseManager): |
| 7756 |
def __init__(self, *args, **kwargs): |
| 7757 |
self.client = kwargs.get('client', None) |
| 7758 |
self.module = kwargs.get('module', None) |
| 7759 |
super(ApmAccessProfileFactManager, self).__init__(**kwargs) |
| 7760 |
|
| 7761 |
def exec_module(self): |
| 7762 |
facts = self._exec_module() |
| 7763 |
result = dict(apm_access_profiles=facts) |
| 7764 |
return result |
| 7765 |
|
| 7766 |
def _exec_module(self): |
| 7767 |
if 'apm' not in self.provisioned_modules: |
| 7768 |
return [] |
| 7769 |
results = [] |
| 7770 |
facts = self.read_facts() |
| 7771 |
for item in facts: |
| 7772 |
attrs = item.to_return() |
| 7773 |
results.append(attrs) |
| 7774 |
results = sorted(results, key=lambda k: k['full_path']) |
| 7775 |
return results |
| 7776 |
|
| 7777 |
def read_facts(self): |
| 7778 |
results = [] |
| 7779 |
collection = self.read_collection_from_device() |
| 7780 |
for resource in collection: |
| 7781 |
params = ApmAccessProfileFactParameters(params=resource) |
| 7782 |
results.append(params) |
| 7783 |
return results |
| 7784 |
|
| 7785 |
def read_collection_from_device(self): |
| 7786 |
uri = "https://{0}:{1}/mgmt/tm/apm/profile/access".format( |
| 7787 |
self.client.provider['server'], |
| 7788 |
self.client.provider['server_port'], |
| 7789 |
) |
| 7790 |
resp = self.client.api.get(uri) |
| 7791 |
try: |
| 7792 |
response = resp.json() |
| 7793 |
except ValueError as ex: |
| 7794 |
raise F5ModuleError(str(ex)) |
| 7795 |
|
| 7796 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 7797 |
raise F5ModuleError(resp.content) |
| 7798 |
|
| 7799 |
if 'items' not in response: |
| 7800 |
return [] |
| 7801 |
result = response['items'] |
| 7802 |
return result |
| 7803 |
|
| 7804 |
|
| 7805 |
class ApmAccessPolicyFactParameters(BaseParameters): |
| 7806 |
api_map = { |
| 7807 |
'fullPath': 'full_path', |
| 7808 |
} |
| 7809 |
|
| 7810 |
returnables = [ |
| 7811 |
'full_path', |
| 7812 |
'name', |
| 7813 |
] |
| 7814 |
|
| 7815 |
|
| 7816 |
class ApmAccessPolicyFactManager(BaseManager): |
| 7817 |
def __init__(self, *args, **kwargs): |
| 7818 |
self.client = kwargs.get('client', None) |
| 7819 |
self.module = kwargs.get('module', None) |
| 7820 |
super(ApmAccessPolicyFactManager, self).__init__(**kwargs) |
| 7821 |
|
| 7822 |
def exec_module(self): |
| 7823 |
facts = self._exec_module() |
| 7824 |
result = dict(apm_access_policies=facts) |
| 7825 |
return result |
| 7826 |
|
| 7827 |
def _exec_module(self): |
| 7828 |
if 'apm' not in self.provisioned_modules: |
| 7829 |
return [] |
| 7830 |
results = [] |
| 7831 |
facts = self.read_facts() |
| 7832 |
for item in facts: |
| 7833 |
attrs = item.to_return() |
| 7834 |
results.append(attrs) |
| 7835 |
results = sorted(results, key=lambda k: k['full_path']) |
| 7836 |
return results |
| 7837 |
|
| 7838 |
def read_facts(self): |
| 7839 |
results = [] |
| 7840 |
collection = self.increment_read() |
| 7841 |
for resource in collection: |
| 7842 |
params = ApmAccessProfileFactParameters(params=resource) |
| 7843 |
results.append(params) |
| 7844 |
return results |
| 7845 |
|
| 7846 |
def increment_read(self): |
| 7847 |
n = 0 |
| 7848 |
result = [] |
| 7849 |
while True: |
| 7850 |
items = self.read_collection_from_device(skip=n) |
| 7851 |
if not items: |
| 7852 |
break |
| 7853 |
result.extend(items) |
| 7854 |
n = n + self.module.params['data_increment'] |
| 7855 |
return result |
| 7856 |
|
| 7857 |
def read_collection_from_device(self, skip=0): |
| 7858 |
uri = "https://{0}:{1}/mgmt/tm/apm/policy/access-policy".format( |
| 7859 |
self.client.provider['server'], |
| 7860 |
self.client.provider['server_port'], |
| 7861 |
) |
| 7862 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 7863 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 7864 |
) |
| 7865 |
resp = self.client.api.get(uri + query) |
| 7866 |
try: |
| 7867 |
response = resp.json() |
| 7868 |
except ValueError as ex: |
| 7869 |
raise F5ModuleError(str(ex)) |
| 7870 |
|
| 7871 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 7872 |
raise F5ModuleError(resp.content) |
| 7873 |
|
| 7874 |
if 'items' not in response: |
| 7875 |
return [] |
| 7876 |
result = response['items'] |
| 7877 |
return result |
| 7878 |
|
| 7879 |
|
| 7880 |
class As3Parameters(BaseParameters): |
| 7881 |
api_map = { |
| 7882 |
} |
| 7883 |
|
| 7884 |
returnables = [ |
| 7885 |
|
| 7886 |
] |
| 7887 |
|
| 7888 |
|
| 7889 |
class As3FactManager(BaseManager): |
| 7890 |
def __init__(self, *args, **kwargs): |
| 7891 |
self.client = kwargs.get('client', None) |
| 7892 |
self.module = kwargs.get('module', None) |
| 7893 |
self.installed_packages = packages_installed(self.client) |
| 7894 |
super(As3FactManager, self).__init__(**kwargs) |
| 7895 |
|
| 7896 |
def exec_module(self): |
| 7897 |
facts = self._exec_module() |
| 7898 |
result = dict(as3_config=facts) |
| 7899 |
return result |
| 7900 |
|
| 7901 |
def _exec_module(self): |
| 7902 |
if 'as3' not in self.installed_packages: |
| 7903 |
return [] |
| 7904 |
facts = self.read_facts() |
| 7905 |
return facts |
| 7906 |
|
| 7907 |
def read_facts(self): |
| 7908 |
collection = self.read_collection_from_device() |
| 7909 |
return collection |
| 7910 |
|
| 7911 |
def read_collection_from_device(self): |
| 7912 |
uri = "https://{0}:{1}/mgmt/shared/appsvcs/declare".format( |
| 7913 |
self.client.provider['server'], |
| 7914 |
self.client.provider['server_port'], |
| 7915 |
) |
| 7916 |
resp = self.client.api.get(uri) |
| 7917 |
try: |
| 7918 |
response = resp.json() |
| 7919 |
except ValueError as ex: |
| 7920 |
raise F5ModuleError(str(ex)) |
| 7921 |
|
| 7922 |
if resp.status == 204 or 'code' in response and response['code'] == 204: |
| 7923 |
return [] |
| 7924 |
|
| 7925 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 7926 |
raise F5ModuleError(resp.content) |
| 7927 |
|
| 7928 |
if 'class' not in response: |
| 7929 |
return [] |
| 7930 |
result = dict() |
| 7931 |
result['declaration'] = response |
| 7932 |
return result |
| 7933 |
|
| 7934 |
|
| 7935 |
class AsmPolicyStatsParameters(BaseParameters): |
| 7936 |
api_map = { |
| 7937 |
|
| 7938 |
} |
| 7939 |
|
| 7940 |
returnables = [ |
| 7941 |
'policies', |
| 7942 |
'parent_policies', |
| 7943 |
'policies_pending_changes', |
| 7944 |
'policies_active', |
| 7945 |
'policies_attached', |
| 7946 |
'policies_inactive', |
| 7947 |
'policies_unattached', |
| 7948 |
] |
| 7949 |
|
| 7950 |
@property |
| 7951 |
def policies(self): |
| 7952 |
if self._values['policies'] is None or len(self._values['policies']) == 0: |
| 7953 |
return None |
| 7954 |
return len(self._values['policies']) |
| 7955 |
|
| 7956 |
@property |
| 7957 |
def parent_policies(self): |
| 7958 |
if self._values['policies'] is None or len(self._values['policies']) == 0: |
| 7959 |
return None |
| 7960 |
return len([x for x in self._values['policies'] if 'type' in x and x['type'] == "parent"]) |
| 7961 |
|
| 7962 |
@property |
| 7963 |
def policies_pending_changes(self): |
| 7964 |
if self._values['policies'] is None or len(self._values['policies']) == 0: |
| 7965 |
return None |
| 7966 |
return len([x for x in self._values['policies'] if x['isModified'] is True]) |
| 7967 |
|
| 7968 |
|
| 7969 |
class AsmPolicyStatsParametersv13(AsmPolicyStatsParameters): |
| 7970 |
@property |
| 7971 |
def policies_active(self): |
| 7972 |
if self._values['policies'] is None or len(self._values['policies']) == 0: |
| 7973 |
return None |
| 7974 |
return len([x for x in self._values['policies'] if 'active' in x and x['active']]) |
| 7975 |
|
| 7976 |
@property |
| 7977 |
def policies_inactive(self): |
| 7978 |
if self._values['policies'] is None or len(self._values['policies']) == 0: |
| 7979 |
return None |
| 7980 |
return len([x for x in self._values['policies'] if 'active' in x and x['active'] is not True]) |
| 7981 |
|
| 7982 |
@property |
| 7983 |
def policies_attached(self): |
| 7984 |
return self.policies_active |
| 7985 |
|
| 7986 |
@property |
| 7987 |
def policies_unattached(self): |
| 7988 |
return self.policies_inactive |
| 7989 |
|
| 7990 |
|
| 7991 |
class AsmPolicyStatsParametersv12(AsmPolicyStatsParameters): |
| 7992 |
@property |
| 7993 |
def policies_active(self): |
| 7994 |
if self._values['policies'] is None or len(self._values['policies']) == 0: |
| 7995 |
return None |
| 7996 |
return len([x for x in self._values['policies'] if x['active'] is True]) |
| 7997 |
|
| 7998 |
@property |
| 7999 |
def policies_inactive(self): |
| 8000 |
if self._values['policies'] is None or len(self._values['policies']) == 0: |
| 8001 |
return None |
| 8002 |
return len([x for x in self._values['policies'] if x['active'] is not True]) |
| 8003 |
|
| 8004 |
@property |
| 8005 |
def policies_attached(self): |
| 8006 |
if self._values['policies'] is None or len(self._values['policies']) == 0: |
| 8007 |
return None |
| 8008 |
return len([x for x in self._values['policies'] |
| 8009 |
if x['active'] is True and len(x['virtualServers']) > 0]) |
| 8010 |
|
| 8011 |
@property |
| 8012 |
def policies_unattached(self): |
| 8013 |
if self._values['policies'] is None or len(self._values['policies']) == 0: |
| 8014 |
return None |
| 8015 |
return len([x for x in self._values['policies'] |
| 8016 |
if x['active'] is False and len(x['virtualServers']) == 0]) |
| 8017 |
|
| 8018 |
|
| 8019 |
class AsmPolicyStatsFactManager(BaseManager): |
| 8020 |
def __init__(self, *args, **kwargs): |
| 8021 |
self.client = kwargs.get('client', None) |
| 8022 |
self.module = kwargs.get('module', None) |
| 8023 |
super(AsmPolicyStatsFactManager, self).__init__(**kwargs) |
| 8024 |
|
| 8025 |
def exec_module(self): |
| 8026 |
facts = self._exec_module() |
| 8027 |
result = dict(asm_policy_stats=facts) |
| 8028 |
return result |
| 8029 |
|
| 8030 |
def _exec_module(self): |
| 8031 |
if 'asm' not in self.provisioned_modules: |
| 8032 |
return [] |
| 8033 |
facts = self.read_facts() |
| 8034 |
results = facts.to_return() |
| 8035 |
return results |
| 8036 |
|
| 8037 |
def version_is_less_than_13(self): |
| 8038 |
version = tmos_version(self.client) |
| 8039 |
if Version(version) < Version('13.0.0'): |
| 8040 |
return True |
| 8041 |
else: |
| 8042 |
return False |
| 8043 |
|
| 8044 |
def read_facts(self): |
| 8045 |
collection = self.read_collection_from_device() |
| 8046 |
if self.version_is_less_than_13(): |
| 8047 |
params = AsmPolicyStatsParametersv12(params=collection) |
| 8048 |
else: |
| 8049 |
params = AsmPolicyStatsParametersv13(params=collection) |
| 8050 |
return params |
| 8051 |
|
| 8052 |
def read_collection_from_device(self): |
| 8053 |
uri = "https://{0}:{1}/mgmt/tm/asm/policies".format( |
| 8054 |
self.client.provider['server'], |
| 8055 |
self.client.provider['server_port'], |
| 8056 |
) |
| 8057 |
resp = self.client.api.get(uri) |
| 8058 |
try: |
| 8059 |
response = resp.json() |
| 8060 |
except ValueError as ex: |
| 8061 |
raise F5ModuleError(str(ex)) |
| 8062 |
|
| 8063 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 8064 |
raise F5ModuleError(resp.content) |
| 8065 |
return dict( |
| 8066 |
policies=response['items'] |
| 8067 |
) |
| 8068 |
|
| 8069 |
|
| 8070 |
class AsmPolicyFactParameters(BaseParameters): |
| 8071 |
api_map = { |
| 8072 |
'hasParent': 'has_parent', |
| 8073 |
'protocolIndependent': 'protocol_independent', |
| 8074 |
'virtualServers': 'virtual_servers', |
| 8075 |
'manualVirtualServers': 'manual_virtual_servers', |
| 8076 |
'allowedResponseCodes': 'allowed_response_codes', |
| 8077 |
'learningMode': 'learning_mode', |
| 8078 |
'enforcementMode': 'enforcement_mode', |
| 8079 |
'customXffHeaders': 'custom_xff_headers', |
| 8080 |
'caseInsensitive': 'case_insensitive', |
| 8081 |
'stagingSettings': 'staging_settings', |
| 8082 |
'applicationLanguage': 'application_language', |
| 8083 |
'trustXff': 'trust_xff', |
| 8084 |
'geolocation-enforcement': 'geolocation_enforcement', |
| 8085 |
'disallowedLocations': 'disallowed_locations', |
| 8086 |
'signature-settings': 'signature_settings', |
| 8087 |
'header-settings': 'header_settings', |
| 8088 |
'cookie-settings': 'cookie_settings', |
| 8089 |
'policy-builder': 'policy_builder', |
| 8090 |
'disallowed-geolocations': 'disallowed_geolocations', |
| 8091 |
'whitelist-ips': 'whitelist_ips', |
| 8092 |
'fullPath': 'full_path', |
| 8093 |
'csrf-protection': 'csrf_protection', |
| 8094 |
'isModified': 'apply', |
| 8095 |
} |
| 8096 |
|
| 8097 |
returnables = [ |
| 8098 |
'full_path', |
| 8099 |
'name', |
| 8100 |
'policy_id', |
| 8101 |
'active', |
| 8102 |
'protocol_independent', |
| 8103 |
'has_parent', |
| 8104 |
'type', |
| 8105 |
'virtual_servers', |
| 8106 |
'allowed_response_codes', |
| 8107 |
'description', |
| 8108 |
'learning_mode', |
| 8109 |
'enforcement_mode', |
| 8110 |
'custom_xff_headers', |
| 8111 |
'case_insensitive', |
| 8112 |
'signature_staging', |
| 8113 |
'place_signatures_in_staging', |
| 8114 |
'enforcement_readiness_period', |
| 8115 |
'path_parameter_handling', |
| 8116 |
'trigger_asm_irule_event', |
| 8117 |
'inspect_http_uploads', |
| 8118 |
'mask_credit_card_numbers_in_request', |
| 8119 |
'maximum_http_header_length', |
| 8120 |
'use_dynamic_session_id_in_url', |
| 8121 |
'maximum_cookie_header_length', |
| 8122 |
'application_language', |
| 8123 |
'trust_xff', |
| 8124 |
'disallowed_geolocations', |
| 8125 |
'csrf_urls', |
| 8126 |
'csrf_protection_enabled', |
| 8127 |
'csrf_protection_ssl_only', |
| 8128 |
'csrf_protection_expiration_time_in_seconds', |
| 8129 |
'apply', |
| 8130 |
] |
| 8131 |
|
| 8132 |
def _morph_keys(self, key_map, item): |
| 8133 |
for k, v in iteritems(key_map): |
| 8134 |
item[v] = item.pop(k, None) |
| 8135 |
result = self._filter_params(item) |
| 8136 |
return result |
| 8137 |
|
| 8138 |
@property |
| 8139 |
def active(self): |
| 8140 |
return flatten_boolean(self._values['active']) |
| 8141 |
|
| 8142 |
@property |
| 8143 |
def apply(self): |
| 8144 |
return flatten_boolean(self._values['apply']) |
| 8145 |
|
| 8146 |
@property |
| 8147 |
def case_insensitive(self): |
| 8148 |
return flatten_boolean(self._values['case_insensitive']) |
| 8149 |
|
| 8150 |
@property |
| 8151 |
def has_parent(self): |
| 8152 |
return flatten_boolean(self._values['has_parent']) |
| 8153 |
|
| 8154 |
@property |
| 8155 |
def policy_id(self): |
| 8156 |
if self._values['id'] is None: |
| 8157 |
return None |
| 8158 |
return self._values['id'] |
| 8159 |
|
| 8160 |
@property |
| 8161 |
def manual_virtual_servers(self): |
| 8162 |
if 'manual_virtual_servers' in self._values: |
| 8163 |
if self._values['manual_virtual_servers'] is None: |
| 8164 |
return None |
| 8165 |
return self._values['manual_virtual_servers'] |
| 8166 |
|
| 8167 |
@property |
| 8168 |
def signature_staging(self): |
| 8169 |
if 'staging_settings' in self._values: |
| 8170 |
if self._values['staging_settings'] is None: |
| 8171 |
return None |
| 8172 |
if 'signatureStaging' in self._values['staging_settings']: |
| 8173 |
return flatten_boolean(self._values['staging_settings']['signatureStaging']) |
| 8174 |
if 'signature_settings' in self._values: |
| 8175 |
if self._values['signature_settings'] is None: |
| 8176 |
return None |
| 8177 |
if 'signatureStaging' in self._values['signature_settings']: |
| 8178 |
return flatten_boolean(self._values['signature_settings']['signatureStaging']) |
| 8179 |
|
| 8180 |
@property |
| 8181 |
def place_signatures_in_staging(self): |
| 8182 |
if 'staging_settings' in self._values: |
| 8183 |
if self._values['staging_settings'] is None: |
| 8184 |
return None |
| 8185 |
if 'placeSignaturesInStaging' in self._values['staging_settings']: |
| 8186 |
return flatten_boolean(self._values['staging_settings']['placeSignaturesInStaging']) |
| 8187 |
if 'signature_settings' in self._values: |
| 8188 |
if self._values['signature_settings'] is None: |
| 8189 |
return None |
| 8190 |
if 'signatureStaging' in self._values['signature_settings']: |
| 8191 |
return flatten_boolean(self._values['signature_settings']['placeSignaturesInStaging']) |
| 8192 |
|
| 8193 |
@property |
| 8194 |
def enforcement_readiness_period(self): |
| 8195 |
if 'staging_settings' in self._values: |
| 8196 |
if self._values['staging_settings'] is None: |
| 8197 |
return None |
| 8198 |
if 'enforcementReadinessPeriod' in self._values['staging_settings']: |
| 8199 |
return self._values['staging_settings']['enforcementReadinessPeriod'] |
| 8200 |
if 'general' in self._values: |
| 8201 |
if self._values['general'] is None: |
| 8202 |
return None |
| 8203 |
if 'signatureStaging' in self._values['general']: |
| 8204 |
return self._values['general']['enforcementReadinessPeriod'] |
| 8205 |
|
| 8206 |
@property |
| 8207 |
def path_parameter_handling(self): |
| 8208 |
if 'attributes' in self._values: |
| 8209 |
if self._values['attributes'] is None: |
| 8210 |
return None |
| 8211 |
if 'pathParameterHandling' in self._values['attributes']: |
| 8212 |
return self._values['attributes']['pathParameterHandling'] |
| 8213 |
if 'general' in self._values: |
| 8214 |
if self._values['general'] is None: |
| 8215 |
return None |
| 8216 |
if 'pathParameterHandling' in self._values['general']: |
| 8217 |
return self._values['general']['pathParameterHandling'] |
| 8218 |
|
| 8219 |
@property |
| 8220 |
def trigger_asm_irule_event(self): |
| 8221 |
if 'attributes' in self._values: |
| 8222 |
if self._values['attributes'] is None: |
| 8223 |
return None |
| 8224 |
if 'triggerAsmIruleEvent' in self._values['attributes']: |
| 8225 |
return self._values['attributes']['triggerAsmIruleEvent'] |
| 8226 |
if 'general' in self._values: |
| 8227 |
if self._values['general'] is None: |
| 8228 |
return None |
| 8229 |
if 'triggerAsmIruleEvent' in self._values['general']: |
| 8230 |
return self._values['general']['triggerAsmIruleEvent'] |
| 8231 |
|
| 8232 |
@property |
| 8233 |
def inspect_http_uploads(self): |
| 8234 |
if 'attributes' in self._values: |
| 8235 |
if self._values['attributes'] is None: |
| 8236 |
return None |
| 8237 |
if 'inspectHttpUploads' in self._values['attributes']: |
| 8238 |
return flatten_boolean(self._values['attributes']['inspectHttpUploads']) |
| 8239 |
if 'antivirus' in self._values: |
| 8240 |
if self._values['antivirus'] is None: |
| 8241 |
return None |
| 8242 |
if 'inspectHttpUploads' in self._values['antivirus']: |
| 8243 |
return flatten_boolean(self._values['antivirus']['inspectHttpUploads']) |
| 8244 |
|
| 8245 |
@property |
| 8246 |
def mask_credit_card_numbers_in_request(self): |
| 8247 |
if 'attributes' in self._values: |
| 8248 |
if self._values['attributes'] is None: |
| 8249 |
return None |
| 8250 |
if 'maskCreditCardNumbersInRequest' in self._values['attributes']: |
| 8251 |
return flatten_boolean(self._values['attributes']['maskCreditCardNumbersInRequest']) |
| 8252 |
if 'general' in self._values: |
| 8253 |
if self._values['general'] is None: |
| 8254 |
return None |
| 8255 |
if 'maskCreditCardNumbersInRequest' in self._values['general']: |
| 8256 |
return flatten_boolean(self._values['general']['maskCreditCardNumbersInRequest']) |
| 8257 |
|
| 8258 |
@property |
| 8259 |
def maximum_http_header_length(self): |
| 8260 |
if 'attributes' in self._values: |
| 8261 |
if self._values['attributes'] is None: |
| 8262 |
return None |
| 8263 |
if 'maximumHttpHeaderLength' in self._values['attributes']: |
| 8264 |
if self._values['attributes']['maximumHttpHeaderLength'] == 'any': |
| 8265 |
return 'any' |
| 8266 |
return int(self._values['attributes']['maximumHttpHeaderLength']) |
| 8267 |
|
| 8268 |
if 'header_settings' in self._values: |
| 8269 |
if self._values['header_settings'] is None: |
| 8270 |
return None |
| 8271 |
if 'maximumHttpHeaderLength' in self._values['header_settings']: |
| 8272 |
if self._values['header_settings']['maximumHttpHeaderLength'] == 'any': |
| 8273 |
return 'any' |
| 8274 |
return int(self._values['header_settings']['maximumHttpHeaderLength']) |
| 8275 |
|
| 8276 |
@property |
| 8277 |
def use_dynamic_session_id_in_url(self): |
| 8278 |
if 'attributes' in self._values: |
| 8279 |
if self._values['attributes'] is None: |
| 8280 |
return None |
| 8281 |
if 'useDynamicSessionIdInUrl' in self._values['attributes']: |
| 8282 |
return flatten_boolean(self._values['attributes']['useDynamicSessionIdInUrl']) |
| 8283 |
if 'general' in self._values: |
| 8284 |
if self._values['general'] is None: |
| 8285 |
return None |
| 8286 |
if 'useDynamicSessionIdInUrl' in self._values['general']: |
| 8287 |
return flatten_boolean(self._values['general']['useDynamicSessionIdInUrl']) |
| 8288 |
|
| 8289 |
@property |
| 8290 |
def maximum_cookie_header_length(self): |
| 8291 |
if 'attributes' in self._values: |
| 8292 |
if self._values['attributes'] is None: |
| 8293 |
return None |
| 8294 |
if 'maximumCookieHeaderLength' in self._values['attributes']: |
| 8295 |
if self._values['attributes']['maximumCookieHeaderLength'] == 'any': |
| 8296 |
return 'any' |
| 8297 |
return int(self._values['attributes']['maximumCookieHeaderLength']) |
| 8298 |
if 'cookie_settings' in self._values: |
| 8299 |
if self._values['cookie_settings'] is None: |
| 8300 |
return None |
| 8301 |
if 'maximumCookieHeaderLength' in self._values['cookie_settings']: |
| 8302 |
if self._values['cookie_settings']['maximumCookieHeaderLength'] == 'any': |
| 8303 |
return 'any' |
| 8304 |
return int(self._values['cookie_settings']['maximumCookieHeaderLength']) |
| 8305 |
|
| 8306 |
@property |
| 8307 |
def trust_xff(self): |
| 8308 |
if 'trust_xff' in self._values: |
| 8309 |
if self._values['trust_xff'] is None: |
| 8310 |
return None |
| 8311 |
return flatten_boolean(self._values['trust_xff']) |
| 8312 |
if 'general' in self._values: |
| 8313 |
if self._values['general'] is None: |
| 8314 |
return None |
| 8315 |
if 'trustXff' in self._values['general']: |
| 8316 |
return flatten_boolean(self._values['general']['trustXff']) |
| 8317 |
|
| 8318 |
@property |
| 8319 |
def custom_xff_headers(self): |
| 8320 |
if 'custom_xff_headers' in self._values: |
| 8321 |
if self._values['custom_xff_headers'] is None: |
| 8322 |
return None |
| 8323 |
return self._values['custom_xff_headers'] |
| 8324 |
if 'general' in self._values: |
| 8325 |
if self._values['general'] is None: |
| 8326 |
return None |
| 8327 |
if 'customXffHeaders' in self._values['general']: |
| 8328 |
return self._values['general']['customXffHeaders'] |
| 8329 |
|
| 8330 |
@property |
| 8331 |
def allowed_response_codes(self): |
| 8332 |
if 'allowed_response_codes' in self._values: |
| 8333 |
if self._values['allowed_response_codes'] is None: |
| 8334 |
return None |
| 8335 |
return self._values['allowed_response_codes'] |
| 8336 |
if 'general' in self._values: |
| 8337 |
if self._values['general'] is None: |
| 8338 |
return None |
| 8339 |
if 'allowedResponseCodes' in self._values['general']: |
| 8340 |
return self._values['general']['allowedResponseCodes'] |
| 8341 |
|
| 8342 |
@property |
| 8343 |
def learning_mode(self): |
| 8344 |
if 'policy_builder' in self._values: |
| 8345 |
if self._values['policy_builder'] is None: |
| 8346 |
return None |
| 8347 |
if 'learningMode' in self._values['policy_builder']: |
| 8348 |
return self._values['policy_builder']['learningMode'] |
| 8349 |
|
| 8350 |
@property |
| 8351 |
def disallowed_locations(self): |
| 8352 |
if 'geolocation_enforcement' in self._values: |
| 8353 |
if self._values['geolocation_enforcement'] is None: |
| 8354 |
return None |
| 8355 |
return self._values['geolocation_enforcement']['disallowedLocations'] |
| 8356 |
|
| 8357 |
@property |
| 8358 |
def disallowed_geolocations(self): |
| 8359 |
if 'disallowed_geolocations' in self._values: |
| 8360 |
if self._values['disallowed_geolocations'] is None: |
| 8361 |
return None |
| 8362 |
return self._values['disallowed_geolocations'] |
| 8363 |
|
| 8364 |
@property |
| 8365 |
def csrf_protection_enabled(self): |
| 8366 |
if 'csrf_protection' in self._values: |
| 8367 |
return flatten_boolean(self._values['csrf_protection']['enabled']) |
| 8368 |
|
| 8369 |
@property |
| 8370 |
def csrf_protection_ssl_only(self): |
| 8371 |
if 'csrf_protection' in self._values: |
| 8372 |
if 'sslOnly' in self._values['csrf_protection']: |
| 8373 |
return flatten_boolean(self._values['csrf_protection']['sslOnly']) |
| 8374 |
|
| 8375 |
@property |
| 8376 |
def csrf_protection_expiration_time_in_seconds(self): |
| 8377 |
if 'csrf_protection' in self._values: |
| 8378 |
if 'expirationTimeInSeconds' in self._values['csrf_protection']: |
| 8379 |
if self._values['csrf_protection']['expirationTimeInSeconds'] is None: |
| 8380 |
return None |
| 8381 |
if self._values['csrf_protection']['expirationTimeInSeconds'] == 'disabled': |
| 8382 |
return 'disabled' |
| 8383 |
return int(self._values['csrf_protection']['expirationTimeInSeconds']) |
| 8384 |
|
| 8385 |
def format_csrf_collection(self, items): |
| 8386 |
result = list() |
| 8387 |
key_map = { |
| 8388 |
'requiredParameters': 'csrf_url_required_parameters', |
| 8389 |
'url': 'csrf_url', |
| 8390 |
'method': 'csrf_url_method', |
| 8391 |
'enforcementAction': 'csrf_url_enforcement_action', |
| 8392 |
'id': 'csrf_url_id', |
| 8393 |
'wildcardOrder': 'csrf_url_wildcard_order', |
| 8394 |
'parametersList': 'csrf_url_parameters_list' |
| 8395 |
} |
| 8396 |
for item in items: |
| 8397 |
self._remove_internal_keywords(item) |
| 8398 |
item.pop('lastUpdateMicros') |
| 8399 |
output = self._morph_keys(key_map, item) |
| 8400 |
result.append(output) |
| 8401 |
return result |
| 8402 |
|
| 8403 |
@property |
| 8404 |
def csrf_urls(self): |
| 8405 |
if 'csrfUrls' in self._values: |
| 8406 |
if self._values['csrfUrls'] is None: |
| 8407 |
return None |
| 8408 |
return self._values['csrfUrls'] |
| 8409 |
if 'csrf-urls' in self._values: |
| 8410 |
if self._values['csrf-urls'] is None: |
| 8411 |
return None |
| 8412 |
return self.format_csrf_collection(self._values['csrf-urls']) |
| 8413 |
|
| 8414 |
@property |
| 8415 |
def protocol_independent(self): |
| 8416 |
return flatten_boolean(self._values['protocol_independent']) |
| 8417 |
|
| 8418 |
|
| 8419 |
|
| 8420 |
|
| 8421 |
|
| 8422 |
|
| 8423 |
class AsmPolicyFactManager(BaseManager): |
| 8424 |
def __init__(self, *args, **kwargs): |
| 8425 |
self.client = kwargs.get('client', None) |
| 8426 |
self.module = kwargs.get('module', None) |
| 8427 |
super(AsmPolicyFactManager, self).__init__(**kwargs) |
| 8428 |
|
| 8429 |
def exec_module(self): |
| 8430 |
facts = self._exec_module() |
| 8431 |
result = dict(asm_policies=facts) |
| 8432 |
return result |
| 8433 |
|
| 8434 |
def _exec_module(self): |
| 8435 |
if 'asm' not in self.provisioned_modules: |
| 8436 |
return [] |
| 8437 |
manager = self.get_manager() |
| 8438 |
return manager._exec_module() |
| 8439 |
|
| 8440 |
def get_manager(self): |
| 8441 |
if self.version_is_less_than_13(): |
| 8442 |
return AsmPolicyFactManagerV12(**self.kwargs) |
| 8443 |
else: |
| 8444 |
return AsmPolicyFactManagerV13(**self.kwargs) |
| 8445 |
|
| 8446 |
def version_is_less_than_13(self): |
| 8447 |
version = tmos_version(self.client) |
| 8448 |
if Version(version) < Version('13.0.0'): |
| 8449 |
return True |
| 8450 |
else: |
| 8451 |
return False |
| 8452 |
|
| 8453 |
def read_facts(self): |
| 8454 |
results = [] |
| 8455 |
collection = self.increment_read() |
| 8456 |
for resource in collection: |
| 8457 |
params = AsmPolicyFactParameters(params=resource) |
| 8458 |
results.append(params) |
| 8459 |
return results |
| 8460 |
|
| 8461 |
def increment_read(self): |
| 8462 |
n = 0 |
| 8463 |
result = [] |
| 8464 |
while True: |
| 8465 |
items = self.read_collection_from_device(skip=n) |
| 8466 |
if not items: |
| 8467 |
break |
| 8468 |
result.extend(items) |
| 8469 |
n = n + 10 |
| 8470 |
return result |
| 8471 |
|
| 8472 |
|
| 8473 |
class AsmPolicyFactManagerV12(AsmPolicyFactManager): |
| 8474 |
def _exec_module(self): |
| 8475 |
results = [] |
| 8476 |
facts = self.read_facts() |
| 8477 |
for item in facts: |
| 8478 |
attrs = item.to_return() |
| 8479 |
results.append(attrs) |
| 8480 |
results = sorted(results, key=lambda k: k['full_path']) |
| 8481 |
return results |
| 8482 |
|
| 8483 |
def read_collection_from_device(self, skip=0): |
| 8484 |
uri = "https://{0}:{1}/mgmt/tm/asm/policies".format( |
| 8485 |
self.client.provider['server'], |
| 8486 |
self.client.provider['server_port'], |
| 8487 |
) |
| 8488 |
|
| 8489 |
to_expand = 'policy-builder,geolocation-enforcement,csrf-protection' |
| 8490 |
query = '?$top=10&$skip={0}&$expand={1}&$filter=partition+eq+{2}'.format( |
| 8491 |
skip, |
| 8492 |
to_expand, |
| 8493 |
self.module.params['partition'] |
| 8494 |
) |
| 8495 |
|
| 8496 |
resp = self.client.api.get(uri + query) |
| 8497 |
|
| 8498 |
try: |
| 8499 |
response = resp.json() |
| 8500 |
except ValueError as ex: |
| 8501 |
raise F5ModuleError(str(ex)) |
| 8502 |
|
| 8503 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 8504 |
raise F5ModuleError(resp.content) |
| 8505 |
|
| 8506 |
if 'items' not in response: |
| 8507 |
return [] |
| 8508 |
return response['items'] |
| 8509 |
|
| 8510 |
|
| 8511 |
class AsmPolicyFactManagerV13(AsmPolicyFactManager): |
| 8512 |
def _exec_module(self): |
| 8513 |
results = [] |
| 8514 |
facts = self.read_facts() |
| 8515 |
for item in facts: |
| 8516 |
attrs = item.to_return() |
| 8517 |
results.append(attrs) |
| 8518 |
results = sorted(results, key=lambda k: k['full_path']) |
| 8519 |
return results |
| 8520 |
|
| 8521 |
def read_collection_from_device(self, skip=0): |
| 8522 |
uri = "https://{0}:{1}/mgmt/tm/asm/policies".format( |
| 8523 |
self.client.provider['server'], |
| 8524 |
self.client.provider['server_port'], |
| 8525 |
) |
| 8526 |
to_expand = 'general,signature-settings,header-settings,cookie-settings,antivirus,' \ |
| 8527 |
'policy-builder,csrf-protection,csrf-urls' |
| 8528 |
query = '?$top=10&$skip={0}&$expand={1}&$filter=partition+eq+{2}'.format( |
| 8529 |
skip, |
| 8530 |
to_expand, |
| 8531 |
self.module.params['partition'] |
| 8532 |
) |
| 8533 |
resp = self.client.api.get(uri + query) |
| 8534 |
|
| 8535 |
try: |
| 8536 |
response = resp.json() |
| 8537 |
except ValueError as ex: |
| 8538 |
raise F5ModuleError(str(ex)) |
| 8539 |
|
| 8540 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 8541 |
raise F5ModuleError(resp.content) |
| 8542 |
|
| 8543 |
if 'items' not in response: |
| 8544 |
return [] |
| 8545 |
return response['items'] |
| 8546 |
|
| 8547 |
|
| 8548 |
class AsmServerTechnologyFactParameters(BaseParameters): |
| 8549 |
api_map = { |
| 8550 |
'serverTechnologyName': 'server_technology_name', |
| 8551 |
'serverTechnologyReferences': 'server_technology_references', |
| 8552 |
} |
| 8553 |
|
| 8554 |
returnables = [ |
| 8555 |
'id', |
| 8556 |
'server_technology_name', |
| 8557 |
'server_technology_references', |
| 8558 |
] |
| 8559 |
|
| 8560 |
|
| 8561 |
class AsmServerTechnologyFactManager(BaseManager): |
| 8562 |
def __init__(self, *args, **kwargs): |
| 8563 |
self.client = kwargs.get('client', None) |
| 8564 |
self.module = kwargs.get('module', None) |
| 8565 |
super(AsmServerTechnologyFactManager, self).__init__(**kwargs) |
| 8566 |
|
| 8567 |
def exec_module(self): |
| 8568 |
facts = self._exec_module() |
| 8569 |
result = dict(asm_server_technologies=facts) |
| 8570 |
return result |
| 8571 |
|
| 8572 |
def _exec_module(self): |
| 8573 |
results = [] |
| 8574 |
if 'asm' not in self.provisioned_modules: |
| 8575 |
return results |
| 8576 |
if self.version_is_less_than_13(): |
| 8577 |
return results |
| 8578 |
facts = self.read_facts() |
| 8579 |
for item in facts: |
| 8580 |
attrs = item.to_return() |
| 8581 |
results.append(attrs) |
| 8582 |
results = sorted(results, key=lambda k: k['server_technology_name']) |
| 8583 |
return results |
| 8584 |
|
| 8585 |
def version_is_less_than_13(self): |
| 8586 |
version = tmos_version(self.client) |
| 8587 |
if Version(version) < Version('13.0.0'): |
| 8588 |
return True |
| 8589 |
else: |
| 8590 |
return False |
| 8591 |
|
| 8592 |
def read_facts(self): |
| 8593 |
results = [] |
| 8594 |
collection = self.read_collection_from_device() |
| 8595 |
for resource in collection: |
| 8596 |
params = AsmServerTechnologyFactParameters(params=resource) |
| 8597 |
results.append(params) |
| 8598 |
return results |
| 8599 |
|
| 8600 |
def read_collection_from_device(self): |
| 8601 |
uri = "https://{0}:{1}/mgmt/tm/asm/server-technologies".format( |
| 8602 |
self.client.provider['server'], |
| 8603 |
self.client.provider['server_port'], |
| 8604 |
) |
| 8605 |
resp = self.client.api.get(uri) |
| 8606 |
try: |
| 8607 |
response = resp.json() |
| 8608 |
except ValueError as ex: |
| 8609 |
raise F5ModuleError(str(ex)) |
| 8610 |
|
| 8611 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 8612 |
raise F5ModuleError(resp.content) |
| 8613 |
|
| 8614 |
if 'items' not in response: |
| 8615 |
return [] |
| 8616 |
result = response['items'] |
| 8617 |
return result |
| 8618 |
|
| 8619 |
|
| 8620 |
class AsmSignatureSetsFactParameters(BaseParameters): |
| 8621 |
api_map = { |
| 8622 |
'isUserDefined': 'is_user_defined', |
| 8623 |
'assignToPolicyByDefault': 'assign_to_policy_by_default', |
| 8624 |
'defaultAlarm': 'default_alarm', |
| 8625 |
'defaultBlock': 'default_block', |
| 8626 |
'defaultLearn': 'default_learn', |
| 8627 |
} |
| 8628 |
|
| 8629 |
returnables = [ |
| 8630 |
'name', |
| 8631 |
'id', |
| 8632 |
'type', |
| 8633 |
'category', |
| 8634 |
'is_user_defined', |
| 8635 |
'assign_to_policy_by_default', |
| 8636 |
'default_alarm', |
| 8637 |
'default_block', |
| 8638 |
'default_learn', |
| 8639 |
] |
| 8640 |
|
| 8641 |
@property |
| 8642 |
def is_user_defined(self): |
| 8643 |
return flatten_boolean(self._values['is_user_defined']) |
| 8644 |
|
| 8645 |
@property |
| 8646 |
def assign_to_policy_by_default(self): |
| 8647 |
return flatten_boolean(self._values['assign_to_policy_by_default']) |
| 8648 |
|
| 8649 |
@property |
| 8650 |
def default_alarm(self): |
| 8651 |
return flatten_boolean(self._values['default_alarm']) |
| 8652 |
|
| 8653 |
@property |
| 8654 |
def default_block(self): |
| 8655 |
return flatten_boolean(self._values['default_block']) |
| 8656 |
|
| 8657 |
@property |
| 8658 |
def default_learn(self): |
| 8659 |
return flatten_boolean(self._values['default_learn']) |
| 8660 |
|
| 8661 |
|
| 8662 |
|
| 8663 |
|
| 8664 |
|
| 8665 |
class AsmSignatureSetsFactManager(BaseManager): |
| 8666 |
def __init__(self, *args, **kwargs): |
| 8667 |
self.client = kwargs.get('client', None) |
| 8668 |
self.module = kwargs.get('module', None) |
| 8669 |
super(AsmSignatureSetsFactManager, self).__init__(**kwargs) |
| 8670 |
|
| 8671 |
def exec_module(self): |
| 8672 |
facts = self._exec_module() |
| 8673 |
result = dict(asm_signature_sets=facts) |
| 8674 |
return result |
| 8675 |
|
| 8676 |
def _exec_module(self): |
| 8677 |
results = [] |
| 8678 |
if 'asm' not in self.provisioned_modules: |
| 8679 |
return results |
| 8680 |
facts = self.read_facts() |
| 8681 |
for item in facts: |
| 8682 |
attrs = item.to_return() |
| 8683 |
results.append(attrs) |
| 8684 |
results = sorted(results, key=lambda k: k['name']) |
| 8685 |
return results |
| 8686 |
|
| 8687 |
def read_facts(self): |
| 8688 |
results = [] |
| 8689 |
collection = self.increment_read() |
| 8690 |
for resource in collection: |
| 8691 |
params = AsmSignatureSetsFactParameters(params=resource) |
| 8692 |
results.append(params) |
| 8693 |
return results |
| 8694 |
|
| 8695 |
def increment_read(self): |
| 8696 |
n = 0 |
| 8697 |
result = [] |
| 8698 |
while True: |
| 8699 |
items = self.read_collection_from_device(skip=n) |
| 8700 |
if not items: |
| 8701 |
break |
| 8702 |
result.extend(items) |
| 8703 |
n = n + self.module.params['data_increment'] |
| 8704 |
return result |
| 8705 |
|
| 8706 |
def read_collection_from_device(self, skip=0): |
| 8707 |
uri = "https://{0}:{1}/mgmt/tm/asm/signature-sets".format( |
| 8708 |
self.client.provider['server'], |
| 8709 |
self.client.provider['server_port'], |
| 8710 |
) |
| 8711 |
query = '?$top={0}&$skip={1}'.format(self.module.params['data_increment'], skip) |
| 8712 |
resp = self.client.api.get(uri + query) |
| 8713 |
|
| 8714 |
try: |
| 8715 |
response = resp.json() |
| 8716 |
except ValueError as ex: |
| 8717 |
raise F5ModuleError(str(ex)) |
| 8718 |
|
| 8719 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 8720 |
raise F5ModuleError(resp.content) |
| 8721 |
|
| 8722 |
if 'items' not in response: |
| 8723 |
return None |
| 8724 |
|
| 8725 |
return response['items'] |
| 8726 |
|
| 8727 |
|
| 8728 |
class ClientSslProfilesParameters(BaseParameters): |
| 8729 |
api_map = { |
| 8730 |
'fullPath': 'full_path', |
| 8731 |
'alertTimeout': 'alert_timeout', |
| 8732 |
'allowNonSsl': 'allow_non_ssl', |
| 8733 |
'authenticateDepth': 'authenticate_depth', |
| 8734 |
'authenticate': 'authenticate_frequency', |
| 8735 |
'caFile': 'ca_file', |
| 8736 |
'cacheSize': 'cache_size', |
| 8737 |
'cacheTimeout': 'cache_timeout', |
| 8738 |
'cert': 'certificate_file', |
| 8739 |
'key': 'key_file', |
| 8740 |
'chain': 'chain_file', |
| 8741 |
'crlFile': 'crl_file', |
| 8742 |
'defaultsFrom': 'parent', |
| 8743 |
'modSslMethods': 'modssl_methods', |
| 8744 |
'peerCertMode': 'peer_certification_mode', |
| 8745 |
'sniRequire': 'sni_require', |
| 8746 |
'strictResume': 'strict_resume', |
| 8747 |
'mode': 'profile_mode_enabled', |
| 8748 |
'renegotiateMaxRecordDelay': 'renegotiation_maximum_record_delay', |
| 8749 |
'renegotiatePeriod': 'renegotiation_period', |
| 8750 |
'serverName': 'server_name', |
| 8751 |
'sessionTicket': 'session_ticket', |
| 8752 |
'sniDefault': 'sni_default', |
| 8753 |
'uncleanShutdown': 'unclean_shutdown', |
| 8754 |
'retainCertificate': 'retain_certificate', |
| 8755 |
'secureRenegotiation': 'secure_renegotiation_mode', |
| 8756 |
'handshakeTimeout': 'handshake_timeout', |
| 8757 |
'certExtensionIncludes': 'forward_proxy_certificate_extension_include', |
| 8758 |
'certLifespan': 'forward_proxy_certificate_lifespan', |
| 8759 |
'certLookupByIpaddrPort': 'forward_proxy_lookup_by_ipaddr_port', |
| 8760 |
'sslForwardProxy': 'forward_proxy_enabled', |
| 8761 |
'proxyCaPassphrase': 'forward_proxy_ca_passphrase', |
| 8762 |
'proxyCaCert': 'forward_proxy_ca_certificate_file', |
| 8763 |
'proxyCaKey': 'forward_proxy_ca_key_file' |
| 8764 |
} |
| 8765 |
|
| 8766 |
returnables = [ |
| 8767 |
'full_path', |
| 8768 |
'name', |
| 8769 |
'alert_timeout', |
| 8770 |
'allow_non_ssl', |
| 8771 |
'authenticate_depth', |
| 8772 |
'authenticate_frequency', |
| 8773 |
'ca_file', |
| 8774 |
'cache_size', |
| 8775 |
'cache_timeout', |
| 8776 |
'certificate_file', |
| 8777 |
'key_file', |
| 8778 |
'chain_file', |
| 8779 |
'ciphers', |
| 8780 |
'crl_file', |
| 8781 |
'parent', |
| 8782 |
'description', |
| 8783 |
'modssl_methods', |
| 8784 |
'peer_certification_mode', |
| 8785 |
'sni_require', |
| 8786 |
'sni_default', |
| 8787 |
'strict_resume', |
| 8788 |
'profile_mode_enabled', |
| 8789 |
'renegotiation_maximum_record_delay', |
| 8790 |
'renegotiation_period', |
| 8791 |
'renegotiation', |
| 8792 |
'server_name', |
| 8793 |
'session_ticket', |
| 8794 |
'unclean_shutdown', |
| 8795 |
'retain_certificate', |
| 8796 |
'secure_renegotiation_mode', |
| 8797 |
'handshake_timeout', |
| 8798 |
'forward_proxy_certificate_extension_include', |
| 8799 |
'forward_proxy_certificate_lifespan', |
| 8800 |
'forward_proxy_lookup_by_ipaddr_port', |
| 8801 |
'forward_proxy_enabled', |
| 8802 |
'forward_proxy_ca_passphrase', |
| 8803 |
'forward_proxy_ca_certificate_file', |
| 8804 |
'forward_proxy_ca_key_file' |
| 8805 |
] |
| 8806 |
|
| 8807 |
@property |
| 8808 |
def alert_timeout(self): |
| 8809 |
if self._values['alert_timeout'] is None: |
| 8810 |
return None |
| 8811 |
if self._values['alert_timeout'] == 'indefinite': |
| 8812 |
return 0 |
| 8813 |
return int(self._values['alert_timeout']) |
| 8814 |
|
| 8815 |
@property |
| 8816 |
def renegotiation_maximum_record_delay(self): |
| 8817 |
if self._values['renegotiation_maximum_record_delay'] is None: |
| 8818 |
return None |
| 8819 |
if self._values['renegotiation_maximum_record_delay'] == 'indefinite': |
| 8820 |
return 0 |
| 8821 |
return int(self._values['renegotiation_maximum_record_delay']) |
| 8822 |
|
| 8823 |
@property |
| 8824 |
def renegotiation_period(self): |
| 8825 |
if self._values['renegotiation_period'] is None: |
| 8826 |
return None |
| 8827 |
if self._values['renegotiation_period'] == 'indefinite': |
| 8828 |
return 0 |
| 8829 |
return int(self._values['renegotiation_period']) |
| 8830 |
|
| 8831 |
@property |
| 8832 |
def handshake_timeout(self): |
| 8833 |
if self._values['handshake_timeout'] is None: |
| 8834 |
return None |
| 8835 |
if self._values['handshake_timeout'] == 'indefinite': |
| 8836 |
return 0 |
| 8837 |
return int(self._values['handshake_timeout']) |
| 8838 |
|
| 8839 |
@property |
| 8840 |
def allow_non_ssl(self): |
| 8841 |
if self._values['allow_non_ssl'] is None: |
| 8842 |
return None |
| 8843 |
if self._values['allow_non_ssl'] == 'disabled': |
| 8844 |
return 'no' |
| 8845 |
return 'yes' |
| 8846 |
|
| 8847 |
@property |
| 8848 |
def forward_proxy_enabled(self): |
| 8849 |
if self._values['forward_proxy_enabled'] is None: |
| 8850 |
return None |
| 8851 |
if self._values['forward_proxy_enabled'] == 'disabled': |
| 8852 |
return 'no' |
| 8853 |
return 'yes' |
| 8854 |
|
| 8855 |
@property |
| 8856 |
def renegotiation(self): |
| 8857 |
if self._values['renegotiation'] is None: |
| 8858 |
return None |
| 8859 |
if self._values['renegotiation'] == 'disabled': |
| 8860 |
return 'no' |
| 8861 |
return 'yes' |
| 8862 |
|
| 8863 |
@property |
| 8864 |
def forward_proxy_lookup_by_ipaddr_port(self): |
| 8865 |
if self._values['forward_proxy_lookup_by_ipaddr_port'] is None: |
| 8866 |
return None |
| 8867 |
if self._values['forward_proxy_lookup_by_ipaddr_port'] == 'disabled': |
| 8868 |
return 'no' |
| 8869 |
return 'yes' |
| 8870 |
|
| 8871 |
@property |
| 8872 |
def unclean_shutdown(self): |
| 8873 |
if self._values['unclean_shutdown'] is None: |
| 8874 |
return None |
| 8875 |
if self._values['unclean_shutdown'] == 'disabled': |
| 8876 |
return 'no' |
| 8877 |
return 'yes' |
| 8878 |
|
| 8879 |
@property |
| 8880 |
def session_ticket(self): |
| 8881 |
if self._values['session_ticket'] is None: |
| 8882 |
return None |
| 8883 |
if self._values['session_ticket'] == 'disabled': |
| 8884 |
return 'no' |
| 8885 |
return 'yes' |
| 8886 |
|
| 8887 |
@property |
| 8888 |
def retain_certificate(self): |
| 8889 |
if self._values['retain_certificate'] is None: |
| 8890 |
return None |
| 8891 |
if self._values['retain_certificate'] == 'true': |
| 8892 |
return 'yes' |
| 8893 |
return 'no' |
| 8894 |
|
| 8895 |
@property |
| 8896 |
def server_name(self): |
| 8897 |
if self._values['server_name'] in [None, 'none']: |
| 8898 |
return None |
| 8899 |
return self._values['server_name'] |
| 8900 |
|
| 8901 |
@property |
| 8902 |
def forward_proxy_ca_certificate_file(self): |
| 8903 |
if self._values['forward_proxy_ca_certificate_file'] in [None, 'none']: |
| 8904 |
return None |
| 8905 |
return self._values['forward_proxy_ca_certificate_file'] |
| 8906 |
|
| 8907 |
@property |
| 8908 |
def forward_proxy_ca_key_file(self): |
| 8909 |
if self._values['forward_proxy_ca_key_file'] in [None, 'none']: |
| 8910 |
return None |
| 8911 |
return self._values['forward_proxy_ca_key_file'] |
| 8912 |
|
| 8913 |
@property |
| 8914 |
def authenticate_frequency(self): |
| 8915 |
if self._values['authenticate_frequency'] is None: |
| 8916 |
return None |
| 8917 |
return self._values['authenticate_frequency'] |
| 8918 |
|
| 8919 |
@property |
| 8920 |
def ca_file(self): |
| 8921 |
if self._values['ca_file'] in [None, 'none']: |
| 8922 |
return None |
| 8923 |
return self._values['ca_file'] |
| 8924 |
|
| 8925 |
@property |
| 8926 |
def certificate_file(self): |
| 8927 |
if self._values['certificate_file'] in [None, 'none']: |
| 8928 |
return None |
| 8929 |
return self._values['certificate_file'] |
| 8930 |
|
| 8931 |
@property |
| 8932 |
def key_file(self): |
| 8933 |
if self._values['key_file'] in [None, 'none']: |
| 8934 |
return None |
| 8935 |
return self._values['key_file'] |
| 8936 |
|
| 8937 |
@property |
| 8938 |
def chain_file(self): |
| 8939 |
if self._values['chain_file'] in [None, 'none']: |
| 8940 |
return None |
| 8941 |
return self._values['chain_file'] |
| 8942 |
|
| 8943 |
@property |
| 8944 |
def crl_file(self): |
| 8945 |
if self._values['crl_file'] in [None, 'none']: |
| 8946 |
return None |
| 8947 |
return self._values['crl_file'] |
| 8948 |
|
| 8949 |
@property |
| 8950 |
def ciphers(self): |
| 8951 |
if self._values['ciphers'] is None: |
| 8952 |
return None |
| 8953 |
if self._values['ciphers'] == 'none': |
| 8954 |
return 'none' |
| 8955 |
return self._values['ciphers'].split(' ') |
| 8956 |
|
| 8957 |
@property |
| 8958 |
def modssl_methods(self): |
| 8959 |
if self._values['modssl_methods'] is None: |
| 8960 |
return None |
| 8961 |
if self._values['modssl_methods'] == 'disabled': |
| 8962 |
return 'no' |
| 8963 |
return 'yes' |
| 8964 |
|
| 8965 |
@property |
| 8966 |
def strict_resume(self): |
| 8967 |
if self._values['strict_resume'] is None: |
| 8968 |
return None |
| 8969 |
if self._values['strict_resume'] == 'disabled': |
| 8970 |
return 'no' |
| 8971 |
return 'yes' |
| 8972 |
|
| 8973 |
@property |
| 8974 |
def profile_mode_enabled(self): |
| 8975 |
if self._values['profile_mode_enabled'] is None: |
| 8976 |
return None |
| 8977 |
if self._values['profile_mode_enabled'] == 'disabled': |
| 8978 |
return 'no' |
| 8979 |
return 'yes' |
| 8980 |
|
| 8981 |
@property |
| 8982 |
def sni_require(self): |
| 8983 |
if self._values['sni_require'] is None: |
| 8984 |
return None |
| 8985 |
if self._values['sni_require'] == 'false': |
| 8986 |
return 'no' |
| 8987 |
return 'yes' |
| 8988 |
|
| 8989 |
@property |
| 8990 |
def sni_default(self): |
| 8991 |
if self._values['sni_default'] is None: |
| 8992 |
return None |
| 8993 |
if self._values['sni_default'] == 'false': |
| 8994 |
return 'no' |
| 8995 |
return 'yes' |
| 8996 |
|
| 8997 |
|
| 8998 |
class ClientSslProfilesFactManager(BaseManager): |
| 8999 |
def __init__(self, *args, **kwargs): |
| 9000 |
self.client = kwargs.get('client', None) |
| 9001 |
self.module = kwargs.get('module', None) |
| 9002 |
super(ClientSslProfilesFactManager, self).__init__(**kwargs) |
| 9003 |
|
| 9004 |
def exec_module(self): |
| 9005 |
facts = self._exec_module() |
| 9006 |
result = dict(client_ssl_profiles=facts) |
| 9007 |
return result |
| 9008 |
|
| 9009 |
def _exec_module(self): |
| 9010 |
results = [] |
| 9011 |
facts = self.read_facts() |
| 9012 |
for item in facts: |
| 9013 |
attrs = item.to_return() |
| 9014 |
results.append(attrs) |
| 9015 |
results = sorted(results, key=lambda k: k['full_path']) |
| 9016 |
return results |
| 9017 |
|
| 9018 |
def read_facts(self): |
| 9019 |
results = [] |
| 9020 |
collection = self.increment_read() |
| 9021 |
for resource in collection: |
| 9022 |
params = ClientSslProfilesParameters(params=resource) |
| 9023 |
results.append(params) |
| 9024 |
return results |
| 9025 |
|
| 9026 |
def increment_read(self): |
| 9027 |
n = 0 |
| 9028 |
result = [] |
| 9029 |
while True: |
| 9030 |
items = self.read_collection_from_device(skip=n) |
| 9031 |
if not items: |
| 9032 |
break |
| 9033 |
result.extend(items) |
| 9034 |
n = n + self.module.params['data_increment'] |
| 9035 |
return result |
| 9036 |
|
| 9037 |
def read_collection_from_device(self, skip=0): |
| 9038 |
uri = "https://{0}:{1}/mgmt/tm/ltm/profile/client-ssl".format( |
| 9039 |
self.client.provider['server'], |
| 9040 |
self.client.provider['server_port'], |
| 9041 |
) |
| 9042 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 9043 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 9044 |
) |
| 9045 |
resp = self.client.api.get(uri + query) |
| 9046 |
try: |
| 9047 |
response = resp.json() |
| 9048 |
except ValueError as ex: |
| 9049 |
raise F5ModuleError(str(ex)) |
| 9050 |
|
| 9051 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 9052 |
raise F5ModuleError(resp.content) |
| 9053 |
|
| 9054 |
if 'items' not in response: |
| 9055 |
return [] |
| 9056 |
result = response['items'] |
| 9057 |
return result |
| 9058 |
|
| 9059 |
|
| 9060 |
class CFEParameters(BaseParameters): |
| 9061 |
api_map = { |
| 9062 |
} |
| 9063 |
|
| 9064 |
returnables = [ |
| 9065 |
|
| 9066 |
] |
| 9067 |
|
| 9068 |
|
| 9069 |
class CFEFactManager(BaseManager): |
| 9070 |
def __init__(self, *args, **kwargs): |
| 9071 |
self.client = kwargs.get('client', None) |
| 9072 |
self.module = kwargs.get('module', None) |
| 9073 |
self.installed_packages = packages_installed(self.client) |
| 9074 |
super(CFEFactManager, self).__init__(**kwargs) |
| 9075 |
|
| 9076 |
def exec_module(self): |
| 9077 |
facts = self._exec_module() |
| 9078 |
result = dict(cfe_config=facts) |
| 9079 |
return result |
| 9080 |
|
| 9081 |
def _exec_module(self): |
| 9082 |
if 'cfe' not in self.installed_packages: |
| 9083 |
return [] |
| 9084 |
facts = self.read_facts() |
| 9085 |
return facts |
| 9086 |
|
| 9087 |
def read_facts(self): |
| 9088 |
collection = self.read_collection_from_device() |
| 9089 |
return collection |
| 9090 |
|
| 9091 |
def read_collection_from_device(self): |
| 9092 |
uri = "https://{0}:{1}/mgmt/shared/cloud-failover/declare".format( |
| 9093 |
self.client.provider['server'], |
| 9094 |
self.client.provider['server_port'], |
| 9095 |
) |
| 9096 |
resp = self.client.api.get(uri) |
| 9097 |
try: |
| 9098 |
response = resp.json() |
| 9099 |
except ValueError as ex: |
| 9100 |
raise F5ModuleError(str(ex)) |
| 9101 |
|
| 9102 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 9103 |
raise F5ModuleError(resp.content) |
| 9104 |
|
| 9105 |
result = {} |
| 9106 |
result['declaration'] = response['declaration'] |
| 9107 |
return result |
| 9108 |
|
| 9109 |
|
| 9110 |
class DeviceGroupsParameters(BaseParameters): |
| 9111 |
api_map = { |
| 9112 |
'fullPath': 'full_path', |
| 9113 |
'autoSync': 'autosync_enabled', |
| 9114 |
'asmSync': 'asm_sync_enabled', |
| 9115 |
'devicesReference': 'devices', |
| 9116 |
'fullLoadOnSync': 'full_load_on_sync', |
| 9117 |
'incrementalConfigSyncSizeMax': 'incremental_config_sync_size_maximum', |
| 9118 |
'networkFailover': 'network_failover_enabled' |
| 9119 |
} |
| 9120 |
|
| 9121 |
returnables = [ |
| 9122 |
'full_path', |
| 9123 |
'name', |
| 9124 |
'autosync_enabled', |
| 9125 |
'description', |
| 9126 |
'devices', |
| 9127 |
'full_load_on_sync', |
| 9128 |
'incremental_config_sync_size_maximum', |
| 9129 |
'network_failover_enabled', |
| 9130 |
'type', |
| 9131 |
'asm_sync_enabled' |
| 9132 |
] |
| 9133 |
|
| 9134 |
@property |
| 9135 |
def network_failover_enabled(self): |
| 9136 |
if self._values['network_failover_enabled'] is None: |
| 9137 |
return None |
| 9138 |
if self._values['network_failover_enabled'] == 'enabled': |
| 9139 |
return 'yes' |
| 9140 |
return 'no' |
| 9141 |
|
| 9142 |
@property |
| 9143 |
def asm_sync_enabled(self): |
| 9144 |
if self._values['asm_sync_enabled'] is None: |
| 9145 |
return None |
| 9146 |
if self._values['asm_sync_enabled'] == 'disabled': |
| 9147 |
return 'no' |
| 9148 |
return 'yes' |
| 9149 |
|
| 9150 |
@property |
| 9151 |
def autosync_enabled(self): |
| 9152 |
if self._values['autosync_enabled'] is None: |
| 9153 |
return None |
| 9154 |
if self._values['autosync_enabled'] == 'disabled': |
| 9155 |
return 'no' |
| 9156 |
return 'yes' |
| 9157 |
|
| 9158 |
@property |
| 9159 |
def full_load_on_sync(self): |
| 9160 |
if self._values['full_load_on_sync'] is None: |
| 9161 |
return None |
| 9162 |
if self._values['full_load_on_sync'] == 'true': |
| 9163 |
return 'yes' |
| 9164 |
return 'no' |
| 9165 |
|
| 9166 |
@property |
| 9167 |
def devices(self): |
| 9168 |
if self._values['devices'] is None or 'items' not in self._values['devices']: |
| 9169 |
return None |
| 9170 |
result = [x['fullPath'] for x in self._values['devices']['items']] |
| 9171 |
result.sort() |
| 9172 |
return result |
| 9173 |
|
| 9174 |
|
| 9175 |
class DeviceGroupsFactManager(BaseManager): |
| 9176 |
def __init__(self, *args, **kwargs): |
| 9177 |
self.client = kwargs.get('client', None) |
| 9178 |
self.module = kwargs.get('module', None) |
| 9179 |
super(DeviceGroupsFactManager, self).__init__(**kwargs) |
| 9180 |
|
| 9181 |
def exec_module(self): |
| 9182 |
facts = self._exec_module() |
| 9183 |
result = dict(device_groups=facts) |
| 9184 |
return result |
| 9185 |
|
| 9186 |
def _exec_module(self): |
| 9187 |
results = [] |
| 9188 |
facts = self.read_facts() |
| 9189 |
for item in facts: |
| 9190 |
attrs = item.to_return() |
| 9191 |
results.append(attrs) |
| 9192 |
results = sorted(results, key=lambda k: k['full_path']) |
| 9193 |
return results |
| 9194 |
|
| 9195 |
def read_facts(self): |
| 9196 |
results = [] |
| 9197 |
collection = self.increment_read() |
| 9198 |
for resource in collection: |
| 9199 |
params = DeviceGroupsParameters(params=resource) |
| 9200 |
results.append(params) |
| 9201 |
return results |
| 9202 |
|
| 9203 |
def increment_read(self): |
| 9204 |
n = 0 |
| 9205 |
result = [] |
| 9206 |
while True: |
| 9207 |
items = self.read_collection_from_device(skip=n) |
| 9208 |
if not items: |
| 9209 |
break |
| 9210 |
result.extend(items) |
| 9211 |
n = n + self.module.params['data_increment'] |
| 9212 |
return result |
| 9213 |
|
| 9214 |
def read_collection_from_device(self, skip=0): |
| 9215 |
uri = "https://{0}:{1}/mgmt/tm/cm/device-group/".format( |
| 9216 |
self.client.provider['server'], |
| 9217 |
self.client.provider['server_port'], |
| 9218 |
) |
| 9219 |
query = "?expandSubcollections=true&$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 9220 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 9221 |
) |
| 9222 |
resp = self.client.api.get(uri + query) |
| 9223 |
try: |
| 9224 |
response = resp.json() |
| 9225 |
except ValueError as ex: |
| 9226 |
raise F5ModuleError(str(ex)) |
| 9227 |
|
| 9228 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 9229 |
raise F5ModuleError(resp.content) |
| 9230 |
|
| 9231 |
if 'items' not in response: |
| 9232 |
return [] |
| 9233 |
result = response['items'] |
| 9234 |
return result |
| 9235 |
|
| 9236 |
|
| 9237 |
class DevicesParameters(BaseParameters): |
| 9238 |
api_map = { |
| 9239 |
'fullPath': 'full_path', |
| 9240 |
'activeModules': 'active_modules', |
| 9241 |
'baseMac': 'base_mac_address', |
| 9242 |
'chassisId': 'chassis_id', |
| 9243 |
'chassisType': 'chassis_type', |
| 9244 |
'configsyncIp': 'configsync_address', |
| 9245 |
'failoverState': 'failover_state', |
| 9246 |
'managementIp': 'management_address', |
| 9247 |
'marketingName': 'marketing_name', |
| 9248 |
'multicastIp': 'multicast_address', |
| 9249 |
'optionalModules': 'optional_modules', |
| 9250 |
'platformId': 'platform_id', |
| 9251 |
'mirrorIp': 'primary_mirror_address', |
| 9252 |
'mirrorSecondaryIp': 'secondary_mirror_address', |
| 9253 |
'version': 'software_version', |
| 9254 |
'timeLimitedModules': 'timelimited_modules', |
| 9255 |
'timeZone': 'timezone', |
| 9256 |
'unicastAddress': 'unicast_addresses', |
| 9257 |
'selfDevice': 'self' |
| 9258 |
} |
| 9259 |
|
| 9260 |
returnables = [ |
| 9261 |
'full_path', |
| 9262 |
'name', |
| 9263 |
'active_modules', |
| 9264 |
'base_mac_address', |
| 9265 |
'build', |
| 9266 |
'chassis_id', |
| 9267 |
'chassis_type', |
| 9268 |
'comment', |
| 9269 |
'configsync_address', |
| 9270 |
'contact', |
| 9271 |
'description', |
| 9272 |
'edition', |
| 9273 |
'failover_state', |
| 9274 |
'hostname', |
| 9275 |
'location', |
| 9276 |
'management_address', |
| 9277 |
'marketing_name', |
| 9278 |
'multicast_address', |
| 9279 |
'optional_modules', |
| 9280 |
'platform_id', |
| 9281 |
'primary_mirror_address', |
| 9282 |
'product', |
| 9283 |
'secondary_mirror_address', |
| 9284 |
'self', |
| 9285 |
'software_version', |
| 9286 |
'timelimited_modules', |
| 9287 |
'timezone', |
| 9288 |
'unicast_addresses', |
| 9289 |
] |
| 9290 |
|
| 9291 |
@property |
| 9292 |
def active_modules(self): |
| 9293 |
if self._values['active_modules'] is None: |
| 9294 |
return None |
| 9295 |
result = [] |
| 9296 |
for x in self._values['active_modules']: |
| 9297 |
parts = x.split('|') |
| 9298 |
result += parts[2:] |
| 9299 |
return list(set(result)) |
| 9300 |
|
| 9301 |
@property |
| 9302 |
def self(self): |
| 9303 |
result = flatten_boolean(self._values['self']) |
| 9304 |
return result |
| 9305 |
|
| 9306 |
@property |
| 9307 |
def configsync_address(self): |
| 9308 |
if self._values['configsync_address'] in [None, 'none']: |
| 9309 |
return None |
| 9310 |
return self._values['configsync_address'] |
| 9311 |
|
| 9312 |
@property |
| 9313 |
def primary_mirror_address(self): |
| 9314 |
if self._values['primary_mirror_address'] in [None, 'any6']: |
| 9315 |
return None |
| 9316 |
return self._values['primary_mirror_address'] |
| 9317 |
|
| 9318 |
@property |
| 9319 |
def secondary_mirror_address(self): |
| 9320 |
if self._values['secondary_mirror_address'] in [None, 'any6']: |
| 9321 |
return None |
| 9322 |
return self._values['secondary_mirror_address'] |
| 9323 |
|
| 9324 |
@property |
| 9325 |
def unicast_addresses(self): |
| 9326 |
if self._values['unicast_addresses'] is None: |
| 9327 |
return None |
| 9328 |
result = [] |
| 9329 |
|
| 9330 |
for addr in self._values['unicast_addresses']: |
| 9331 |
tmp = {} |
| 9332 |
for key in ['effectiveIp', 'effectivePort', 'ip', 'port']: |
| 9333 |
if key in addr: |
| 9334 |
renamed_key = self.convert(key) |
| 9335 |
tmp[renamed_key] = addr.get(key, None) |
| 9336 |
if tmp: |
| 9337 |
result.append(tmp) |
| 9338 |
if result: |
| 9339 |
return result |
| 9340 |
|
| 9341 |
def convert(self, name): |
| 9342 |
s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) |
| 9343 |
return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower() |
| 9344 |
|
| 9345 |
|
| 9346 |
class DevicesFactManager(BaseManager): |
| 9347 |
def __init__(self, *args, **kwargs): |
| 9348 |
self.client = kwargs.get('client', None) |
| 9349 |
self.module = kwargs.get('module', None) |
| 9350 |
super(DevicesFactManager, self).__init__(**kwargs) |
| 9351 |
|
| 9352 |
def exec_module(self): |
| 9353 |
facts = self._exec_module() |
| 9354 |
result = dict(devices=facts) |
| 9355 |
return result |
| 9356 |
|
| 9357 |
def _exec_module(self): |
| 9358 |
results = [] |
| 9359 |
facts = self.read_facts() |
| 9360 |
for item in facts: |
| 9361 |
attrs = item.to_return() |
| 9362 |
results.append(attrs) |
| 9363 |
results = sorted(results, key=lambda k: k['full_path']) |
| 9364 |
return results |
| 9365 |
|
| 9366 |
def read_facts(self): |
| 9367 |
results = [] |
| 9368 |
collection = self.increment_read() |
| 9369 |
for resource in collection: |
| 9370 |
params = DevicesParameters(params=resource) |
| 9371 |
results.append(params) |
| 9372 |
return results |
| 9373 |
|
| 9374 |
def increment_read(self): |
| 9375 |
n = 0 |
| 9376 |
result = [] |
| 9377 |
while True: |
| 9378 |
items = self.read_collection_from_device(skip=n) |
| 9379 |
if not items: |
| 9380 |
break |
| 9381 |
result.extend(items) |
| 9382 |
n = n + self.module.params['data_increment'] |
| 9383 |
return result |
| 9384 |
|
| 9385 |
def read_collection_from_device(self, skip=0): |
| 9386 |
uri = "https://{0}:{1}/mgmt/tm/cm/device".format( |
| 9387 |
self.client.provider['server'], |
| 9388 |
self.client.provider['server_port'], |
| 9389 |
) |
| 9390 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 9391 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 9392 |
) |
| 9393 |
resp = self.client.api.get(uri + query) |
| 9394 |
try: |
| 9395 |
response = resp.json() |
| 9396 |
except ValueError as ex: |
| 9397 |
raise F5ModuleError(str(ex)) |
| 9398 |
|
| 9399 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 9400 |
raise F5ModuleError(resp.content) |
| 9401 |
|
| 9402 |
if 'items' not in response: |
| 9403 |
return [] |
| 9404 |
result = response['items'] |
| 9405 |
return result |
| 9406 |
|
| 9407 |
|
| 9408 |
class DOParameters(BaseParameters): |
| 9409 |
api_map = { |
| 9410 |
} |
| 9411 |
|
| 9412 |
returnables = [ |
| 9413 |
|
| 9414 |
] |
| 9415 |
|
| 9416 |
|
| 9417 |
class DOFactManager(BaseManager): |
| 9418 |
def __init__(self, *args, **kwargs): |
| 9419 |
self.client = kwargs.get('client', None) |
| 9420 |
self.module = kwargs.get('module', None) |
| 9421 |
self.installed_packages = packages_installed(self.client) |
| 9422 |
super(DOFactManager, self).__init__(**kwargs) |
| 9423 |
|
| 9424 |
def exec_module(self): |
| 9425 |
facts = self._exec_module() |
| 9426 |
result = dict(do_config=facts) |
| 9427 |
return result |
| 9428 |
|
| 9429 |
def _exec_module(self): |
| 9430 |
if 'do' not in self.installed_packages: |
| 9431 |
return [] |
| 9432 |
facts = self.read_facts() |
| 9433 |
return facts |
| 9434 |
|
| 9435 |
def read_facts(self): |
| 9436 |
collection = self.read_collection_from_device() |
| 9437 |
return collection |
| 9438 |
|
| 9439 |
def read_collection_from_device(self): |
| 9440 |
uri = "https://{0}:{1}/mgmt/shared/declarative-onboarding/inspect".format( |
| 9441 |
self.client.provider['server'], |
| 9442 |
self.client.provider['server_port'], |
| 9443 |
) |
| 9444 |
resp = self.client.api.get(uri) |
| 9445 |
try: |
| 9446 |
response = resp.json() |
| 9447 |
except ValueError as ex: |
| 9448 |
raise F5ModuleError(str(ex)) |
| 9449 |
|
| 9450 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 9451 |
raise F5ModuleError(resp.content) |
| 9452 |
|
| 9453 |
result = {} |
| 9454 |
result['declaration'] = response[0]['declaration'] |
| 9455 |
return result |
| 9456 |
|
| 9457 |
|
| 9458 |
class ExternalMonitorsParameters(BaseParameters): |
| 9459 |
api_map = { |
| 9460 |
'fullPath': 'full_path', |
| 9461 |
'defaultsFrom': 'parent', |
| 9462 |
'adaptiveDivergenceType': 'adaptive_divergence_type', |
| 9463 |
'adaptiveDivergenceValue': 'adaptive_divergence_value', |
| 9464 |
'adaptiveLimit': 'adaptive_limit', |
| 9465 |
'adaptiveSamplingTimespan': 'adaptive_sampling_timespan', |
| 9466 |
'manualResume': 'manual_resume', |
| 9467 |
'timeUntilUp': 'time_until_up', |
| 9468 |
'upInterval': 'up_interval', |
| 9469 |
'run': 'external_program', |
| 9470 |
'apiRawValues': 'variables', |
| 9471 |
} |
| 9472 |
|
| 9473 |
returnables = [ |
| 9474 |
'full_path', |
| 9475 |
'name', |
| 9476 |
'parent', |
| 9477 |
'description', |
| 9478 |
'args', |
| 9479 |
'destination', |
| 9480 |
'external_program', |
| 9481 |
'interval', |
| 9482 |
'manual_resume', |
| 9483 |
'time_until_up', |
| 9484 |
'timeout', |
| 9485 |
'up_interval', |
| 9486 |
'variables', |
| 9487 |
] |
| 9488 |
|
| 9489 |
@property |
| 9490 |
def description(self): |
| 9491 |
if self._values['description'] in [None, 'none']: |
| 9492 |
return None |
| 9493 |
return self._values['description'] |
| 9494 |
|
| 9495 |
@property |
| 9496 |
def manual_resume(self): |
| 9497 |
return flatten_boolean(self._values['manual_resume']) |
| 9498 |
|
| 9499 |
@property |
| 9500 |
def variables(self): |
| 9501 |
if self._values['variables'] is None: |
| 9502 |
return None |
| 9503 |
result = {} |
| 9504 |
for k, v in iteritems(self._values['variables']): |
| 9505 |
k = k.replace('userDefined ', '').strip() |
| 9506 |
result[k] = v |
| 9507 |
return result |
| 9508 |
|
| 9509 |
|
| 9510 |
class ExternalMonitorsFactManager(BaseManager): |
| 9511 |
def __init__(self, *args, **kwargs): |
| 9512 |
self.client = kwargs.get('client', None) |
| 9513 |
self.module = kwargs.get('module', None) |
| 9514 |
super(ExternalMonitorsFactManager, self).__init__(**kwargs) |
| 9515 |
|
| 9516 |
def exec_module(self): |
| 9517 |
facts = self._exec_module() |
| 9518 |
result = dict(external_monitors=facts) |
| 9519 |
return result |
| 9520 |
|
| 9521 |
def _exec_module(self): |
| 9522 |
results = [] |
| 9523 |
facts = self.read_facts() |
| 9524 |
for item in facts: |
| 9525 |
attrs = item.to_return() |
| 9526 |
results.append(attrs) |
| 9527 |
results = sorted(results, key=lambda k: k['full_path']) |
| 9528 |
return results |
| 9529 |
|
| 9530 |
def read_facts(self): |
| 9531 |
results = [] |
| 9532 |
collection = self.increment_read() |
| 9533 |
for resource in collection: |
| 9534 |
params = ExternalMonitorsParameters(params=resource) |
| 9535 |
results.append(params) |
| 9536 |
return results |
| 9537 |
|
| 9538 |
def increment_read(self): |
| 9539 |
n = 0 |
| 9540 |
result = [] |
| 9541 |
while True: |
| 9542 |
items = self.read_collection_from_device(skip=n) |
| 9543 |
if not items: |
| 9544 |
break |
| 9545 |
result.extend(items) |
| 9546 |
n = n + self.module.params['data_increment'] |
| 9547 |
return result |
| 9548 |
|
| 9549 |
def read_collection_from_device(self, skip=0): |
| 9550 |
uri = "https://{0}:{1}/mgmt/tm/ltm/monitor/external".format( |
| 9551 |
self.client.provider['server'], |
| 9552 |
self.client.provider['server_port'], |
| 9553 |
) |
| 9554 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 9555 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 9556 |
) |
| 9557 |
resp = self.client.api.get(uri + query) |
| 9558 |
try: |
| 9559 |
response = resp.json() |
| 9560 |
except ValueError as ex: |
| 9561 |
raise F5ModuleError(str(ex)) |
| 9562 |
|
| 9563 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 9564 |
raise F5ModuleError(resp.content) |
| 9565 |
|
| 9566 |
if 'items' not in response: |
| 9567 |
return [] |
| 9568 |
result = response['items'] |
| 9569 |
return result |
| 9570 |
|
| 9571 |
|
| 9572 |
class FastHttpProfilesParameters(BaseParameters): |
| 9573 |
api_map = { |
| 9574 |
'fullPath': 'full_path', |
| 9575 |
'clientCloseTimeout': 'client_close_timeout', |
| 9576 |
'connpoolIdleTimeoutOverride': 'oneconnect_idle_timeout_override', |
| 9577 |
'connpoolMaxReuse': 'oneconnect_maximum_reuse', |
| 9578 |
'connpoolMaxSize': 'oneconnect_maximum_pool_size', |
| 9579 |
'connpoolMinSize': 'oneconnect_minimum_pool_size', |
| 9580 |
'connpoolReplenish': 'oneconnect_replenish', |
| 9581 |
'connpoolStep': 'oneconnect_ramp_up_increment', |
| 9582 |
'defaultsFrom': 'parent', |
| 9583 |
'forceHttp_10Response': 'force_http_1_0_response', |
| 9584 |
'headerInsert': 'request_header_insert', |
| 9585 |
'http_11CloseWorkarounds': 'http_1_1_close_workarounds', |
| 9586 |
'idleTimeout': 'idle_timeout', |
| 9587 |
'insertXforwardedFor': 'insert_xforwarded_for', |
| 9588 |
'maxHeaderSize': 'maximum_header_size', |
| 9589 |
'maxRequests': 'maximum_requests', |
| 9590 |
'mssOverride': 'maximum_segment_size_override', |
| 9591 |
'receiveWindowSize': 'receive_window_size', |
| 9592 |
'resetOnTimeout': 'reset_on_timeout', |
| 9593 |
'serverCloseTimeout': 'server_close_timeout', |
| 9594 |
'serverSack': 'server_sack', |
| 9595 |
'serverTimestamp': 'server_timestamp', |
| 9596 |
'uncleanShutdown': 'unclean_shutdown' |
| 9597 |
} |
| 9598 |
|
| 9599 |
returnables = [ |
| 9600 |
'full_path', |
| 9601 |
'name', |
| 9602 |
'client_close_timeout', |
| 9603 |
'oneconnect_idle_timeout_override', |
| 9604 |
'oneconnect_maximum_reuse', |
| 9605 |
'oneconnect_maximum_pool_size', |
| 9606 |
'oneconnect_minimum_pool_size', |
| 9607 |
'oneconnect_replenish', |
| 9608 |
'oneconnect_ramp_up_increment', |
| 9609 |
'parent', |
| 9610 |
'description', |
| 9611 |
'force_http_1_0_response', |
| 9612 |
'request_header_insert', |
| 9613 |
'http_1_1_close_workarounds', |
| 9614 |
'idle_timeout', |
| 9615 |
'insert_xforwarded_for', |
| 9616 |
'maximum_header_size', |
| 9617 |
'maximum_requests', |
| 9618 |
'maximum_segment_size_override', |
| 9619 |
'receive_window_size', |
| 9620 |
'reset_on_timeout', |
| 9621 |
'server_close_timeout', |
| 9622 |
'server_sack', |
| 9623 |
'server_timestamp', |
| 9624 |
'unclean_shutdown' |
| 9625 |
] |
| 9626 |
|
| 9627 |
@property |
| 9628 |
def request_header_insert(self): |
| 9629 |
if self._values['request_header_insert'] in [None, 'none']: |
| 9630 |
return None |
| 9631 |
return self._values['request_header_insert'] |
| 9632 |
|
| 9633 |
@property |
| 9634 |
def server_timestamp(self): |
| 9635 |
return flatten_boolean(self._values['server_timestamp']) |
| 9636 |
|
| 9637 |
@property |
| 9638 |
def server_sack(self): |
| 9639 |
return flatten_boolean(self._values['server_sack']) |
| 9640 |
|
| 9641 |
@property |
| 9642 |
def reset_on_timeout(self): |
| 9643 |
return flatten_boolean(self._values['reset_on_timeout']) |
| 9644 |
|
| 9645 |
@property |
| 9646 |
def insert_xforwarded_for(self): |
| 9647 |
return flatten_boolean(self._values['insert_xforwarded_for']) |
| 9648 |
|
| 9649 |
@property |
| 9650 |
def http_1_1_close_workarounds(self): |
| 9651 |
return flatten_boolean(self._values['http_1_1_close_workarounds']) |
| 9652 |
|
| 9653 |
@property |
| 9654 |
def force_http_1_0_response(self): |
| 9655 |
return flatten_boolean(self._values['force_http_1_0_response']) |
| 9656 |
|
| 9657 |
@property |
| 9658 |
def oneconnect_replenish(self): |
| 9659 |
return flatten_boolean(self._values['oneconnect_replenish']) |
| 9660 |
|
| 9661 |
@property |
| 9662 |
def idle_timeout(self): |
| 9663 |
if self._values['idle_timeout'] is None: |
| 9664 |
return None |
| 9665 |
elif self._values['idle_timeout'] == 'immediate': |
| 9666 |
return 0 |
| 9667 |
elif self._values['idle_timeout'] == 'indefinite': |
| 9668 |
return 4294967295 |
| 9669 |
return int(self._values['idle_timeout']) |
| 9670 |
|
| 9671 |
|
| 9672 |
class FastHttpProfilesFactManager(BaseManager): |
| 9673 |
def __init__(self, *args, **kwargs): |
| 9674 |
self.client = kwargs.get('client', None) |
| 9675 |
self.module = kwargs.get('module', None) |
| 9676 |
super(FastHttpProfilesFactManager, self).__init__(**kwargs) |
| 9677 |
|
| 9678 |
def exec_module(self): |
| 9679 |
facts = self._exec_module() |
| 9680 |
result = dict(fasthttp_profiles=facts) |
| 9681 |
return result |
| 9682 |
|
| 9683 |
def _exec_module(self): |
| 9684 |
results = [] |
| 9685 |
facts = self.read_facts() |
| 9686 |
for item in facts: |
| 9687 |
attrs = item.to_return() |
| 9688 |
results.append(attrs) |
| 9689 |
results = sorted(results, key=lambda k: k['full_path']) |
| 9690 |
return results |
| 9691 |
|
| 9692 |
def read_facts(self): |
| 9693 |
results = [] |
| 9694 |
collection = self.increment_read() |
| 9695 |
for resource in collection: |
| 9696 |
params = FastHttpProfilesParameters(params=resource) |
| 9697 |
results.append(params) |
| 9698 |
return results |
| 9699 |
|
| 9700 |
def increment_read(self): |
| 9701 |
n = 0 |
| 9702 |
result = [] |
| 9703 |
while True: |
| 9704 |
items = self.read_collection_from_device(skip=n) |
| 9705 |
if not items: |
| 9706 |
break |
| 9707 |
result.extend(items) |
| 9708 |
n = n + self.module.params['data_increment'] |
| 9709 |
return result |
| 9710 |
|
| 9711 |
def read_collection_from_device(self, skip=0): |
| 9712 |
uri = "https://{0}:{1}/mgmt/tm/ltm/profile/fasthttp".format( |
| 9713 |
self.client.provider['server'], |
| 9714 |
self.client.provider['server_port'], |
| 9715 |
) |
| 9716 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 9717 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 9718 |
) |
| 9719 |
resp = self.client.api.get(uri + query) |
| 9720 |
try: |
| 9721 |
response = resp.json() |
| 9722 |
except ValueError as ex: |
| 9723 |
raise F5ModuleError(str(ex)) |
| 9724 |
|
| 9725 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 9726 |
raise F5ModuleError(resp.content) |
| 9727 |
|
| 9728 |
if 'items' not in response: |
| 9729 |
return [] |
| 9730 |
result = response['items'] |
| 9731 |
return result |
| 9732 |
|
| 9733 |
|
| 9734 |
class FastL4ProfilesParameters(BaseParameters): |
| 9735 |
api_map = { |
| 9736 |
'fullPath': 'full_path', |
| 9737 |
'clientTimeout': 'client_timeout', |
| 9738 |
'defaultsFrom': 'parent', |
| 9739 |
'explicitFlowMigration': 'explicit_flow_migration', |
| 9740 |
'hardwareSynCookie': 'hardware_syn_cookie', |
| 9741 |
'idleTimeout': 'idle_timeout', |
| 9742 |
'ipDfMode': 'dont_fragment_flag', |
| 9743 |
'ipTosToClient': 'ip_tos_to_client', |
| 9744 |
'ipTosToServer': 'ip_tos_to_server', |
| 9745 |
'ipTtlMode': 'ttl_mode', |
| 9746 |
'ipTtlV4': 'ttl_v4', |
| 9747 |
'ipTtlV6': 'ttl_v6', |
| 9748 |
'keepAliveInterval': 'keep_alive_interval', |
| 9749 |
'lateBinding': 'late_binding', |
| 9750 |
'linkQosToClient': 'link_qos_to_client', |
| 9751 |
'linkQosToServer': 'link_qos_to_server', |
| 9752 |
'looseClose': 'loose_close', |
| 9753 |
'looseInitialization': 'loose_init', |
| 9754 |
'mssOverride': 'mss_override', |
| 9755 |
'priorityToClient': 'priority_to_client', |
| 9756 |
'priorityToServer': 'priority_to_server', |
| 9757 |
'pvaAcceleration': 'pva_acceleration', |
| 9758 |
'pvaDynamicClientPackets': 'pva_dynamic_client_packets', |
| 9759 |
'pvaDynamicServerPackets': 'pva_dynamic_server_packets', |
| 9760 |
'pvaFlowAging': 'pva_flow_aging', |
| 9761 |
'pvaFlowEvict': 'pva_flow_evict', |
| 9762 |
'pvaOffloadDynamic': 'pva_offload_dynamic', |
| 9763 |
'pvaOffloadState': 'pva_offload_state', |
| 9764 |
'reassembleFragments': 'reassemble_fragments', |
| 9765 |
'receiveWindowSize': 'receive_window', |
| 9766 |
'resetOnTimeout': 'reset_on_timeout', |
| 9767 |
'rttFromClient': 'rtt_from_client', |
| 9768 |
'rttFromServer': 'rtt_from_server', |
| 9769 |
'serverSack': 'server_sack', |
| 9770 |
'serverTimestamp': 'server_timestamp', |
| 9771 |
'softwareSynCookie': 'software_syn_cookie', |
| 9772 |
'synCookieEnable': 'syn_cookie_enabled', |
| 9773 |
'synCookieMss': 'syn_cookie_mss', |
| 9774 |
'synCookieWhitelist': 'syn_cookie_whitelist', |
| 9775 |
'tcpCloseTimeout': 'tcp_close_timeout', |
| 9776 |
'tcpGenerateIsn': 'generate_init_seq_number', |
| 9777 |
'tcpHandshakeTimeout': 'tcp_handshake_timeout', |
| 9778 |
'tcpStripSack': 'strip_sack', |
| 9779 |
'tcpTimeWaitTimeout': 'tcp_time_wait_timeout', |
| 9780 |
'tcpTimestampMode': 'tcp_timestamp_mode', |
| 9781 |
'tcpWscaleMode': 'tcp_window_scale_mode', |
| 9782 |
'timeoutRecovery': 'timeout_recovery', |
| 9783 |
} |
| 9784 |
|
| 9785 |
returnables = [ |
| 9786 |
'full_path', |
| 9787 |
'name', |
| 9788 |
'client_timeout', |
| 9789 |
'parent', |
| 9790 |
'description', |
| 9791 |
'explicit_flow_migration', |
| 9792 |
'hardware_syn_cookie', |
| 9793 |
'idle_timeout', |
| 9794 |
'dont_fragment_flag', |
| 9795 |
'ip_tos_to_client', |
| 9796 |
'ip_tos_to_server', |
| 9797 |
'ttl_mode', |
| 9798 |
'ttl_v4', |
| 9799 |
'ttl_v6', |
| 9800 |
'keep_alive_interval', |
| 9801 |
'late_binding', |
| 9802 |
'link_qos_to_client', |
| 9803 |
'link_qos_to_server', |
| 9804 |
'loose_close', |
| 9805 |
'loose_init', |
| 9806 |
'mss_override', |
| 9807 |
'priority_to_client', |
| 9808 |
'priority_to_server', |
| 9809 |
'pva_acceleration', |
| 9810 |
'pva_dynamic_client_packets', |
| 9811 |
'pva_dynamic_server_packets', |
| 9812 |
'pva_flow_aging', |
| 9813 |
'pva_flow_evict', |
| 9814 |
'pva_offload_dynamic', |
| 9815 |
'pva_offload_state', |
| 9816 |
'reassemble_fragments', |
| 9817 |
'receive_window', |
| 9818 |
'reset_on_timeout', |
| 9819 |
'rtt_from_client', |
| 9820 |
'rtt_from_server', |
| 9821 |
'server_sack', |
| 9822 |
'server_timestamp', |
| 9823 |
'software_syn_cookie', |
| 9824 |
'syn_cookie_enabled', |
| 9825 |
'syn_cookie_mss', |
| 9826 |
'syn_cookie_whitelist', |
| 9827 |
'tcp_close_timeout', |
| 9828 |
'generate_init_seq_number', |
| 9829 |
'tcp_handshake_timeout', |
| 9830 |
'strip_sack', |
| 9831 |
'tcp_time_wait_timeout', |
| 9832 |
'tcp_timestamp_mode', |
| 9833 |
'tcp_window_scale_mode', |
| 9834 |
'timeout_recovery', |
| 9835 |
] |
| 9836 |
|
| 9837 |
@property |
| 9838 |
def description(self): |
| 9839 |
if self._values['description'] in [None, 'none']: |
| 9840 |
return None |
| 9841 |
return self._values['description'] |
| 9842 |
|
| 9843 |
@property |
| 9844 |
def strip_sack(self): |
| 9845 |
return flatten_boolean(self._values['strip_sack']) |
| 9846 |
|
| 9847 |
@property |
| 9848 |
def generate_init_seq_number(self): |
| 9849 |
return flatten_boolean(self._values['generate_init_seq_number']) |
| 9850 |
|
| 9851 |
@property |
| 9852 |
def syn_cookie_whitelist(self): |
| 9853 |
return flatten_boolean(self._values['syn_cookie_whitelist']) |
| 9854 |
|
| 9855 |
@property |
| 9856 |
def syn_cookie_enabled(self): |
| 9857 |
return flatten_boolean(self._values['syn_cookie_enabled']) |
| 9858 |
|
| 9859 |
@property |
| 9860 |
def software_syn_cookie(self): |
| 9861 |
return flatten_boolean(self._values['software_syn_cookie']) |
| 9862 |
|
| 9863 |
@property |
| 9864 |
def server_timestamp(self): |
| 9865 |
return flatten_boolean(self._values['server_timestamp']) |
| 9866 |
|
| 9867 |
@property |
| 9868 |
def server_sack(self): |
| 9869 |
return flatten_boolean(self._values['server_sack']) |
| 9870 |
|
| 9871 |
@property |
| 9872 |
def rtt_from_server(self): |
| 9873 |
return flatten_boolean(self._values['rtt_from_server']) |
| 9874 |
|
| 9875 |
@property |
| 9876 |
def rtt_from_client(self): |
| 9877 |
return flatten_boolean(self._values['rtt_from_client']) |
| 9878 |
|
| 9879 |
@property |
| 9880 |
def reset_on_timeout(self): |
| 9881 |
return flatten_boolean(self._values['reset_on_timeout']) |
| 9882 |
|
| 9883 |
@property |
| 9884 |
def explicit_flow_migration(self): |
| 9885 |
return flatten_boolean(self._values['explicit_flow_migration']) |
| 9886 |
|
| 9887 |
@property |
| 9888 |
def reassemble_fragments(self): |
| 9889 |
return flatten_boolean(self._values['reassemble_fragments']) |
| 9890 |
|
| 9891 |
@property |
| 9892 |
def pva_flow_aging(self): |
| 9893 |
return flatten_boolean(self._values['pva_flow_aging']) |
| 9894 |
|
| 9895 |
@property |
| 9896 |
def pva_flow_evict(self): |
| 9897 |
return flatten_boolean(self._values['pva_flow_evict']) |
| 9898 |
|
| 9899 |
@property |
| 9900 |
def pva_offload_dynamic(self): |
| 9901 |
return flatten_boolean(self._values['pva_offload_dynamic']) |
| 9902 |
|
| 9903 |
@property |
| 9904 |
def hardware_syn_cookie(self): |
| 9905 |
return flatten_boolean(self._values['hardware_syn_cookie']) |
| 9906 |
|
| 9907 |
@property |
| 9908 |
def loose_close(self): |
| 9909 |
return flatten_boolean(self._values['loose_close']) |
| 9910 |
|
| 9911 |
@property |
| 9912 |
def loose_init(self): |
| 9913 |
return flatten_boolean(self._values['loose_init']) |
| 9914 |
|
| 9915 |
@property |
| 9916 |
def late_binding(self): |
| 9917 |
return flatten_boolean(self._values['late_binding']) |
| 9918 |
|
| 9919 |
@property |
| 9920 |
def tcp_handshake_timeout(self): |
| 9921 |
if self._values['tcp_handshake_timeout'] is None: |
| 9922 |
return None |
| 9923 |
elif self._values['tcp_handshake_timeout'] == 'immediate': |
| 9924 |
return 0 |
| 9925 |
elif self._values['tcp_handshake_timeout'] == 'indefinite': |
| 9926 |
return 4294967295 |
| 9927 |
return int(self._values['tcp_handshake_timeout']) |
| 9928 |
|
| 9929 |
@property |
| 9930 |
def idle_timeout(self): |
| 9931 |
if self._values['idle_timeout'] is None: |
| 9932 |
return None |
| 9933 |
elif self._values['idle_timeout'] == 'immediate': |
| 9934 |
return 0 |
| 9935 |
elif self._values['idle_timeout'] == 'indefinite': |
| 9936 |
return 4294967295 |
| 9937 |
return int(self._values['idle_timeout']) |
| 9938 |
|
| 9939 |
@property |
| 9940 |
def tcp_close_timeout(self): |
| 9941 |
if self._values['tcp_close_timeout'] is None: |
| 9942 |
return None |
| 9943 |
elif self._values['tcp_close_timeout'] == 'immediate': |
| 9944 |
return 0 |
| 9945 |
elif self._values['tcp_close_timeout'] == 'indefinite': |
| 9946 |
return 4294967295 |
| 9947 |
return int(self._values['tcp_close_timeout']) |
| 9948 |
|
| 9949 |
@property |
| 9950 |
def keep_alive_interval(self): |
| 9951 |
if self._values['keep_alive_interval'] is None: |
| 9952 |
return None |
| 9953 |
elif self._values['keep_alive_interval'] == 'disabled': |
| 9954 |
return 0 |
| 9955 |
return int(self._values['keep_alive_interval']) |
| 9956 |
|
| 9957 |
@property |
| 9958 |
def ip_tos_to_client(self): |
| 9959 |
if self._values['ip_tos_to_client'] is None: |
| 9960 |
return None |
| 9961 |
try: |
| 9962 |
return int(self._values['ip_tos_to_client']) |
| 9963 |
except ValueError: |
| 9964 |
return self._values['ip_tos_to_client'] |
| 9965 |
|
| 9966 |
@property |
| 9967 |
def ip_tos_to_server(self): |
| 9968 |
if self._values['ip_tos_to_server'] is None: |
| 9969 |
return None |
| 9970 |
try: |
| 9971 |
return int(self._values['ip_tos_to_server']) |
| 9972 |
except ValueError: |
| 9973 |
return self._values['ip_tos_to_server'] |
| 9974 |
|
| 9975 |
@property |
| 9976 |
def link_qos_to_client(self): |
| 9977 |
if self._values['link_qos_to_client'] is None: |
| 9978 |
return None |
| 9979 |
try: |
| 9980 |
return int(self._values['link_qos_to_client']) |
| 9981 |
except ValueError: |
| 9982 |
return self._values['link_qos_to_client'] |
| 9983 |
|
| 9984 |
@property |
| 9985 |
def link_qos_to_server(self): |
| 9986 |
if self._values['link_qos_to_server'] is None: |
| 9987 |
return None |
| 9988 |
try: |
| 9989 |
return int(self._values['link_qos_to_server']) |
| 9990 |
except ValueError: |
| 9991 |
return self._values['link_qos_to_server'] |
| 9992 |
|
| 9993 |
@property |
| 9994 |
def priority_to_client(self): |
| 9995 |
if self._values['priority_to_client'] is None: |
| 9996 |
return None |
| 9997 |
try: |
| 9998 |
return int(self._values['priority_to_client']) |
| 9999 |
except ValueError: |
| 10000 |
return self._values['priority_to_client'] |
| 10001 |
|
| 10002 |
@property |
| 10003 |
def priority_to_server(self): |
| 10004 |
if self._values['priority_to_server'] is None: |
| 10005 |
return None |
| 10006 |
try: |
| 10007 |
return int(self._values['priority_to_server']) |
| 10008 |
except ValueError: |
| 10009 |
return self._values['priority_to_server'] |
| 10010 |
|
| 10011 |
|
| 10012 |
class FastL4ProfilesFactManager(BaseManager): |
| 10013 |
def __init__(self, *args, **kwargs): |
| 10014 |
self.client = kwargs.get('client', None) |
| 10015 |
self.module = kwargs.get('module', None) |
| 10016 |
super(FastL4ProfilesFactManager, self).__init__(**kwargs) |
| 10017 |
|
| 10018 |
def exec_module(self): |
| 10019 |
facts = self._exec_module() |
| 10020 |
result = dict(fastl4_profiles=facts) |
| 10021 |
return result |
| 10022 |
|
| 10023 |
def _exec_module(self): |
| 10024 |
results = [] |
| 10025 |
facts = self.read_facts() |
| 10026 |
for item in facts: |
| 10027 |
attrs = item.to_return() |
| 10028 |
results.append(attrs) |
| 10029 |
results = sorted(results, key=lambda k: k['full_path']) |
| 10030 |
return results |
| 10031 |
|
| 10032 |
def read_facts(self): |
| 10033 |
results = [] |
| 10034 |
collection = self.increment_read() |
| 10035 |
for resource in collection: |
| 10036 |
params = FastL4ProfilesParameters(params=resource) |
| 10037 |
results.append(params) |
| 10038 |
return results |
| 10039 |
|
| 10040 |
def increment_read(self): |
| 10041 |
n = 0 |
| 10042 |
result = [] |
| 10043 |
while True: |
| 10044 |
items = self.read_collection_from_device(skip=n) |
| 10045 |
if not items: |
| 10046 |
break |
| 10047 |
result.extend(items) |
| 10048 |
n = n + self.module.params['data_increment'] |
| 10049 |
return result |
| 10050 |
|
| 10051 |
def read_collection_from_device(self, skip=0): |
| 10052 |
uri = "https://{0}:{1}/mgmt/tm/ltm/profile/fastl4".format( |
| 10053 |
self.client.provider['server'], |
| 10054 |
self.client.provider['server_port'], |
| 10055 |
) |
| 10056 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 10057 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 10058 |
) |
| 10059 |
resp = self.client.api.get(uri + query) |
| 10060 |
try: |
| 10061 |
response = resp.json() |
| 10062 |
except ValueError as ex: |
| 10063 |
raise F5ModuleError(str(ex)) |
| 10064 |
|
| 10065 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 10066 |
raise F5ModuleError(resp.content) |
| 10067 |
|
| 10068 |
if 'items' not in response: |
| 10069 |
return [] |
| 10070 |
result = response['items'] |
| 10071 |
return result |
| 10072 |
|
| 10073 |
|
| 10074 |
class GatewayIcmpMonitorsParameters(BaseParameters): |
| 10075 |
api_map = { |
| 10076 |
'fullPath': 'full_path', |
| 10077 |
'defaultsFrom': 'parent', |
| 10078 |
'adaptiveDivergenceType': 'adaptive_divergence_type', |
| 10079 |
'adaptiveDivergenceValue': 'adaptive_divergence_value', |
| 10080 |
'adaptiveLimit': 'adaptive_limit', |
| 10081 |
'adaptiveSamplingTimespan': 'adaptive_sampling_timespan', |
| 10082 |
'manualResume': 'manual_resume', |
| 10083 |
'timeUntilUp': 'time_until_up', |
| 10084 |
'upInterval': 'up_interval', |
| 10085 |
} |
| 10086 |
|
| 10087 |
returnables = [ |
| 10088 |
'full_path', |
| 10089 |
'name', |
| 10090 |
'parent', |
| 10091 |
'description', |
| 10092 |
'adaptive', |
| 10093 |
'adaptive_divergence_type', |
| 10094 |
'adaptive_divergence_value', |
| 10095 |
'adaptive_limit', |
| 10096 |
'adaptive_sampling_timespan', |
| 10097 |
'destination', |
| 10098 |
'interval', |
| 10099 |
'manual_resume', |
| 10100 |
'time_until_up', |
| 10101 |
'timeout', |
| 10102 |
'transparent', |
| 10103 |
'up_interval', |
| 10104 |
] |
| 10105 |
|
| 10106 |
@property |
| 10107 |
def description(self): |
| 10108 |
if self._values['description'] in [None, 'none']: |
| 10109 |
return None |
| 10110 |
return self._values['description'] |
| 10111 |
|
| 10112 |
@property |
| 10113 |
def transparent(self): |
| 10114 |
return flatten_boolean(self._values['transparent']) |
| 10115 |
|
| 10116 |
@property |
| 10117 |
def manual_resume(self): |
| 10118 |
return flatten_boolean(self._values['manual_resume']) |
| 10119 |
|
| 10120 |
@property |
| 10121 |
def adaptive(self): |
| 10122 |
return flatten_boolean(self._values['adaptive']) |
| 10123 |
|
| 10124 |
|
| 10125 |
class GatewayIcmpMonitorsFactManager(BaseManager): |
| 10126 |
def __init__(self, *args, **kwargs): |
| 10127 |
self.client = kwargs.get('client', None) |
| 10128 |
self.module = kwargs.get('module', None) |
| 10129 |
super(GatewayIcmpMonitorsFactManager, self).__init__(**kwargs) |
| 10130 |
|
| 10131 |
def exec_module(self): |
| 10132 |
facts = self._exec_module() |
| 10133 |
result = dict(gateway_icmp_monitors=facts) |
| 10134 |
return result |
| 10135 |
|
| 10136 |
def _exec_module(self): |
| 10137 |
results = [] |
| 10138 |
facts = self.read_facts() |
| 10139 |
for item in facts: |
| 10140 |
attrs = item.to_return() |
| 10141 |
results.append(attrs) |
| 10142 |
results = sorted(results, key=lambda k: k['full_path']) |
| 10143 |
return results |
| 10144 |
|
| 10145 |
def read_facts(self): |
| 10146 |
results = [] |
| 10147 |
collection = self.increment_read() |
| 10148 |
for resource in collection: |
| 10149 |
params = GatewayIcmpMonitorsParameters(params=resource) |
| 10150 |
results.append(params) |
| 10151 |
return results |
| 10152 |
|
| 10153 |
def increment_read(self): |
| 10154 |
n = 0 |
| 10155 |
result = [] |
| 10156 |
while True: |
| 10157 |
items = self.read_collection_from_device(skip=n) |
| 10158 |
if not items: |
| 10159 |
break |
| 10160 |
result.extend(items) |
| 10161 |
n = n + self.module.params['data_increment'] |
| 10162 |
return result |
| 10163 |
|
| 10164 |
def read_collection_from_device(self, skip=0): |
| 10165 |
uri = "https://{0}:{1}/mgmt/tm/ltm/monitor/gateway-icmp".format( |
| 10166 |
self.client.provider['server'], |
| 10167 |
self.client.provider['server_port'], |
| 10168 |
) |
| 10169 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 10170 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 10171 |
) |
| 10172 |
resp = self.client.api.get(uri + query) |
| 10173 |
try: |
| 10174 |
response = resp.json() |
| 10175 |
except ValueError as ex: |
| 10176 |
raise F5ModuleError(str(ex)) |
| 10177 |
|
| 10178 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 10179 |
raise F5ModuleError(resp.content) |
| 10180 |
|
| 10181 |
if 'items' not in response: |
| 10182 |
return [] |
| 10183 |
result = response['items'] |
| 10184 |
return result |
| 10185 |
|
| 10186 |
|
| 10187 |
class GtmXPoolsParameters(BaseParameters): |
| 10188 |
api_map = { |
| 10189 |
'alternateMode': 'alternate_mode', |
| 10190 |
'dynamicRatio': 'dynamic_ratio', |
| 10191 |
'fallbackMode': 'fallback_mode', |
| 10192 |
'fullPath': 'full_path', |
| 10193 |
'loadBalancingMode': 'load_balancing_mode', |
| 10194 |
'manualResume': 'manual_resume', |
| 10195 |
'maxAnswersReturned': 'max_answers_returned', |
| 10196 |
'qosHitRatio': 'qos_hit_ratio', |
| 10197 |
'qosHops': 'qos_hops', |
| 10198 |
'qosKilobytesSecond': 'qos_kilobytes_second', |
| 10199 |
'qosLcs': 'qos_lcs', |
| 10200 |
'qosPacketRate': 'qos_packet_rate', |
| 10201 |
'qosRtt': 'qos_rtt', |
| 10202 |
'qosTopology': 'qos_topology', |
| 10203 |
'qosVsCapacity': 'qos_vs_capacity', |
| 10204 |
'qosVsScore': 'qos_vs_score', |
| 10205 |
'verifyMemberAvailability': 'verify_member_availability', |
| 10206 |
'membersReference': 'members' |
| 10207 |
} |
| 10208 |
|
| 10209 |
returnables = [ |
| 10210 |
'alternate_mode', |
| 10211 |
'dynamic_ratio', |
| 10212 |
'enabled', |
| 10213 |
'disabled', |
| 10214 |
'fallback_mode', |
| 10215 |
'full_path', |
| 10216 |
'load_balancing_mode', |
| 10217 |
'manual_resume', |
| 10218 |
'max_answers_returned', |
| 10219 |
'members', |
| 10220 |
'name', |
| 10221 |
'partition', |
| 10222 |
'qos_hit_ratio', |
| 10223 |
'qos_hops', |
| 10224 |
'qos_kilobytes_second', |
| 10225 |
'qos_lcs', |
| 10226 |
'qos_packet_rate', |
| 10227 |
'qos_rtt', |
| 10228 |
'qos_topology', |
| 10229 |
'qos_vs_capacity', |
| 10230 |
'qos_vs_score', |
| 10231 |
'ttl', |
| 10232 |
'verify_member_availability', |
| 10233 |
] |
| 10234 |
|
| 10235 |
@property |
| 10236 |
def verify_member_availability(self): |
| 10237 |
return flatten_boolean(self._values['verify_member_availability']) |
| 10238 |
|
| 10239 |
@property |
| 10240 |
def dynamic_ratio(self): |
| 10241 |
return flatten_boolean(self._values['dynamic_ratio']) |
| 10242 |
|
| 10243 |
@property |
| 10244 |
def max_answers_returned(self): |
| 10245 |
if self._values['max_answers_returned'] is None: |
| 10246 |
return None |
| 10247 |
return int(self._values['max_answers_returned']) |
| 10248 |
|
| 10249 |
@property |
| 10250 |
def members(self): |
| 10251 |
result = [] |
| 10252 |
if self._values['members'] is None or 'items' not in self._values['members']: |
| 10253 |
return result |
| 10254 |
for item in self._values['members']['items']: |
| 10255 |
self._remove_internal_keywords(item) |
| 10256 |
if 'disabled' in item: |
| 10257 |
item['disabled'] = flatten_boolean(item['disabled']) |
| 10258 |
item['enabled'] = flatten_boolean(not item['disabled']) |
| 10259 |
if 'enabled' in item: |
| 10260 |
item['enabled'] = flatten_boolean(item['enabled']) |
| 10261 |
item['disabled'] = flatten_boolean(not item['enabled']) |
| 10262 |
if 'fullPath' in item: |
| 10263 |
item['full_path'] = item.pop('fullPath') |
| 10264 |
if 'memberOrder' in item: |
| 10265 |
item['member_order'] = int(item.pop('memberOrder')) |
| 10266 |
|
| 10267 |
for x in ['order', 'preference', 'ratio', 'service']: |
| 10268 |
if x in item: |
| 10269 |
item[x] = int(item[x]) |
| 10270 |
result.append(item) |
| 10271 |
return result |
| 10272 |
|
| 10273 |
@property |
| 10274 |
def qos_hit_ratio(self): |
| 10275 |
if self._values['qos_hit_ratio'] is None: |
| 10276 |
return None |
| 10277 |
return int(self._values['qos_hit_ratio']) |
| 10278 |
|
| 10279 |
@property |
| 10280 |
def qos_hops(self): |
| 10281 |
if self._values['qos_hops'] is None: |
| 10282 |
return None |
| 10283 |
return int(self._values['qos_hops']) |
| 10284 |
|
| 10285 |
@property |
| 10286 |
def qos_kilobytes_second(self): |
| 10287 |
if self._values['qos_kilobytes_second'] is None: |
| 10288 |
return None |
| 10289 |
return int(self._values['qos_kilobytes_second']) |
| 10290 |
|
| 10291 |
@property |
| 10292 |
def qos_lcs(self): |
| 10293 |
if self._values['qos_lcs'] is None: |
| 10294 |
return None |
| 10295 |
return int(self._values['qos_lcs']) |
| 10296 |
|
| 10297 |
@property |
| 10298 |
def qos_packet_rate(self): |
| 10299 |
if self._values['qos_packet_rate'] is None: |
| 10300 |
return None |
| 10301 |
return int(self._values['qos_packet_rate']) |
| 10302 |
|
| 10303 |
@property |
| 10304 |
def qos_rtt(self): |
| 10305 |
if self._values['qos_rtt'] is None: |
| 10306 |
return None |
| 10307 |
return int(self._values['qos_rtt']) |
| 10308 |
|
| 10309 |
@property |
| 10310 |
def qos_topology(self): |
| 10311 |
if self._values['qos_topology'] is None: |
| 10312 |
return None |
| 10313 |
return int(self._values['qos_topology']) |
| 10314 |
|
| 10315 |
@property |
| 10316 |
def qos_vs_capacity(self): |
| 10317 |
if self._values['qos_vs_capacity'] is None: |
| 10318 |
return None |
| 10319 |
return int(self._values['qos_vs_capacity']) |
| 10320 |
|
| 10321 |
@property |
| 10322 |
def qos_vs_score(self): |
| 10323 |
if self._values['qos_vs_score'] is None: |
| 10324 |
return None |
| 10325 |
return int(self._values['qos_vs_score']) |
| 10326 |
|
| 10327 |
@property |
| 10328 |
def availability_state(self): |
| 10329 |
if self._values['stats'] is None: |
| 10330 |
return None |
| 10331 |
try: |
| 10332 |
result = self._values['stats']['status']['availabilityState'] |
| 10333 |
return result['description'] |
| 10334 |
except AttributeError: |
| 10335 |
return None |
| 10336 |
|
| 10337 |
@property |
| 10338 |
def enabled_state(self): |
| 10339 |
if self._values['stats'] is None: |
| 10340 |
return None |
| 10341 |
try: |
| 10342 |
result = self._values['stats']['status']['enabledState'] |
| 10343 |
return result['description'] |
| 10344 |
except AttributeError: |
| 10345 |
return None |
| 10346 |
|
| 10347 |
@property |
| 10348 |
def availability_status(self): |
| 10349 |
|
| 10350 |
|
| 10351 |
|
| 10352 |
|
| 10353 |
|
| 10354 |
|
| 10355 |
|
| 10356 |
|
| 10357 |
|
| 10358 |
if self.enabled_state == 'enabled': |
| 10359 |
if self.availability_state == 'offline': |
| 10360 |
return 'red' |
| 10361 |
elif self.availability_state == 'available': |
| 10362 |
return 'green' |
| 10363 |
elif self.availability_state == 'unknown': |
| 10364 |
return 'blue' |
| 10365 |
else: |
| 10366 |
return 'none' |
| 10367 |
else: |
| 10368 |
|
| 10369 |
return 'black' |
| 10370 |
|
| 10371 |
@property |
| 10372 |
def manual_resume(self): |
| 10373 |
return flatten_boolean(self._values['manual_resume']) |
| 10374 |
|
| 10375 |
|
| 10376 |
class GtmAPoolsFactManager(BaseManager): |
| 10377 |
def __init__(self, *args, **kwargs): |
| 10378 |
self.client = kwargs.get('client', None) |
| 10379 |
self.module = kwargs.get('module', None) |
| 10380 |
super(GtmAPoolsFactManager, self).__init__(**kwargs) |
| 10381 |
|
| 10382 |
def exec_module(self): |
| 10383 |
facts = self._exec_module() |
| 10384 |
result = dict(gtm_a_pools=facts) |
| 10385 |
return result |
| 10386 |
|
| 10387 |
def _exec_module(self): |
| 10388 |
if 'gtm' not in self.provisioned_modules: |
| 10389 |
return [] |
| 10390 |
results = [] |
| 10391 |
facts = self.read_facts() |
| 10392 |
for item in facts: |
| 10393 |
attrs = item.to_return() |
| 10394 |
results.append(attrs) |
| 10395 |
results = sorted(results, key=lambda k: k['full_path']) |
| 10396 |
return results |
| 10397 |
|
| 10398 |
def read_facts(self): |
| 10399 |
results = [] |
| 10400 |
collection = self.increment_read() |
| 10401 |
for resource in collection: |
| 10402 |
params = GtmXPoolsParameters(params=resource) |
| 10403 |
results.append(params) |
| 10404 |
return results |
| 10405 |
|
| 10406 |
def increment_read(self): |
| 10407 |
n = 0 |
| 10408 |
result = [] |
| 10409 |
while True: |
| 10410 |
items = self.read_collection_from_device(skip=n) |
| 10411 |
if not items: |
| 10412 |
break |
| 10413 |
result.extend(items) |
| 10414 |
n = n + self.module.params['data_increment'] |
| 10415 |
return result |
| 10416 |
|
| 10417 |
def read_collection_from_device(self, skip=0): |
| 10418 |
uri = "https://{0}:{1}/mgmt/tm/gtm/pool/a".format( |
| 10419 |
self.client.provider['server'], |
| 10420 |
self.client.provider['server_port'], |
| 10421 |
) |
| 10422 |
query = "?expandSubcollections=true&$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 10423 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 10424 |
) |
| 10425 |
resp = self.client.api.get(uri + query) |
| 10426 |
try: |
| 10427 |
response = resp.json() |
| 10428 |
except ValueError as ex: |
| 10429 |
raise F5ModuleError(str(ex)) |
| 10430 |
|
| 10431 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 10432 |
raise F5ModuleError(resp.content) |
| 10433 |
|
| 10434 |
if 'items' not in response: |
| 10435 |
return [] |
| 10436 |
result = response['items'] |
| 10437 |
return result |
| 10438 |
|
| 10439 |
|
| 10440 |
class GtmAaaaPoolsFactManager(BaseManager): |
| 10441 |
def __init__(self, *args, **kwargs): |
| 10442 |
self.client = kwargs.get('client', None) |
| 10443 |
self.module = kwargs.get('module', None) |
| 10444 |
super(GtmAaaaPoolsFactManager, self).__init__(**kwargs) |
| 10445 |
|
| 10446 |
def exec_module(self): |
| 10447 |
facts = self._exec_module() |
| 10448 |
result = dict(gtm_aaaa_pools=facts) |
| 10449 |
return result |
| 10450 |
|
| 10451 |
def _exec_module(self): |
| 10452 |
if 'gtm' not in self.provisioned_modules: |
| 10453 |
return [] |
| 10454 |
results = [] |
| 10455 |
facts = self.read_facts() |
| 10456 |
for item in facts: |
| 10457 |
attrs = item.to_return() |
| 10458 |
results.append(attrs) |
| 10459 |
results = sorted(results, key=lambda k: k['full_path']) |
| 10460 |
return results |
| 10461 |
|
| 10462 |
def read_facts(self): |
| 10463 |
results = [] |
| 10464 |
collection = self.increment_read() |
| 10465 |
for resource in collection: |
| 10466 |
params = GtmXPoolsParameters(params=resource) |
| 10467 |
results.append(params) |
| 10468 |
return results |
| 10469 |
|
| 10470 |
def increment_read(self): |
| 10471 |
n = 0 |
| 10472 |
result = [] |
| 10473 |
while True: |
| 10474 |
items = self.read_collection_from_device(skip=n) |
| 10475 |
if not items: |
| 10476 |
break |
| 10477 |
result.extend(items) |
| 10478 |
n = n + self.module.params['data_increment'] |
| 10479 |
return result |
| 10480 |
|
| 10481 |
def read_collection_from_device(self, skip=0): |
| 10482 |
uri = "https://{0}:{1}/mgmt/tm/gtm/pool/aaaa".format( |
| 10483 |
self.client.provider['server'], |
| 10484 |
self.client.provider['server_port'], |
| 10485 |
) |
| 10486 |
query = "?expandSubcollections=true&$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 10487 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 10488 |
) |
| 10489 |
resp = self.client.api.get(uri + query) |
| 10490 |
try: |
| 10491 |
response = resp.json() |
| 10492 |
except ValueError as ex: |
| 10493 |
raise F5ModuleError(str(ex)) |
| 10494 |
|
| 10495 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 10496 |
raise F5ModuleError(resp.content) |
| 10497 |
|
| 10498 |
if 'items' not in response: |
| 10499 |
return [] |
| 10500 |
result = response['items'] |
| 10501 |
return result |
| 10502 |
|
| 10503 |
|
| 10504 |
class GtmCnamePoolsFactManager(BaseManager): |
| 10505 |
def __init__(self, *args, **kwargs): |
| 10506 |
self.client = kwargs.get('client', None) |
| 10507 |
self.module = kwargs.get('module', None) |
| 10508 |
super(GtmCnamePoolsFactManager, self).__init__(**kwargs) |
| 10509 |
|
| 10510 |
def exec_module(self): |
| 10511 |
facts = self._exec_module() |
| 10512 |
result = dict(gtm_cname_pools=facts) |
| 10513 |
return result |
| 10514 |
|
| 10515 |
def _exec_module(self): |
| 10516 |
if 'gtm' not in self.provisioned_modules: |
| 10517 |
return [] |
| 10518 |
results = [] |
| 10519 |
facts = self.read_facts() |
| 10520 |
for item in facts: |
| 10521 |
attrs = item.to_return() |
| 10522 |
results.append(attrs) |
| 10523 |
results = sorted(results, key=lambda k: k['full_path']) |
| 10524 |
return results |
| 10525 |
|
| 10526 |
def read_facts(self): |
| 10527 |
results = [] |
| 10528 |
collection = self.increment_read() |
| 10529 |
for resource in collection: |
| 10530 |
params = GtmXPoolsParameters(params=resource) |
| 10531 |
results.append(params) |
| 10532 |
return results |
| 10533 |
|
| 10534 |
def increment_read(self): |
| 10535 |
n = 0 |
| 10536 |
result = [] |
| 10537 |
while True: |
| 10538 |
items = self.read_collection_from_device(skip=n) |
| 10539 |
if not items: |
| 10540 |
break |
| 10541 |
result.extend(items) |
| 10542 |
n = n + self.module.params['data_increment'] |
| 10543 |
return result |
| 10544 |
|
| 10545 |
def read_collection_from_device(self, skip=0): |
| 10546 |
uri = "https://{0}:{1}/mgmt/tm/gtm/pool/cname".format( |
| 10547 |
self.client.provider['server'], |
| 10548 |
self.client.provider['server_port'], |
| 10549 |
) |
| 10550 |
query = "?expandSubcollections=true&$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 10551 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 10552 |
) |
| 10553 |
resp = self.client.api.get(uri + query) |
| 10554 |
try: |
| 10555 |
response = resp.json() |
| 10556 |
except ValueError as ex: |
| 10557 |
raise F5ModuleError(str(ex)) |
| 10558 |
|
| 10559 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 10560 |
raise F5ModuleError(resp.content) |
| 10561 |
|
| 10562 |
if 'items' not in response: |
| 10563 |
return [] |
| 10564 |
result = response['items'] |
| 10565 |
return result |
| 10566 |
|
| 10567 |
|
| 10568 |
class GtmMxPoolsFactManager(BaseManager): |
| 10569 |
def __init__(self, *args, **kwargs): |
| 10570 |
self.client = kwargs.get('client', None) |
| 10571 |
self.module = kwargs.get('module', None) |
| 10572 |
super(GtmMxPoolsFactManager, self).__init__(**kwargs) |
| 10573 |
|
| 10574 |
def exec_module(self): |
| 10575 |
facts = self._exec_module() |
| 10576 |
result = dict(gtm_mx_pools=facts) |
| 10577 |
return result |
| 10578 |
|
| 10579 |
def _exec_module(self): |
| 10580 |
if 'gtm' not in self.provisioned_modules: |
| 10581 |
return [] |
| 10582 |
results = [] |
| 10583 |
facts = self.read_facts() |
| 10584 |
for item in facts: |
| 10585 |
attrs = item.to_return() |
| 10586 |
results.append(attrs) |
| 10587 |
results = sorted(results, key=lambda k: k['full_path']) |
| 10588 |
return results |
| 10589 |
|
| 10590 |
def read_facts(self): |
| 10591 |
results = [] |
| 10592 |
collection = self.increment_read() |
| 10593 |
for resource in collection: |
| 10594 |
params = GtmXPoolsParameters(params=resource) |
| 10595 |
results.append(params) |
| 10596 |
return results |
| 10597 |
|
| 10598 |
def increment_read(self): |
| 10599 |
n = 0 |
| 10600 |
result = [] |
| 10601 |
while True: |
| 10602 |
items = self.read_collection_from_device(skip=n) |
| 10603 |
if not items: |
| 10604 |
break |
| 10605 |
result.extend(items) |
| 10606 |
n = n + self.module.params['data_increment'] |
| 10607 |
return result |
| 10608 |
|
| 10609 |
def read_collection_from_device(self, skip=0): |
| 10610 |
uri = "https://{0}:{1}/mgmt/tm/gtm/pool/mx".format( |
| 10611 |
self.client.provider['server'], |
| 10612 |
self.client.provider['server_port'], |
| 10613 |
) |
| 10614 |
query = "?expandSubcollections=true&$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 10615 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 10616 |
) |
| 10617 |
resp = self.client.api.get(uri + query) |
| 10618 |
try: |
| 10619 |
response = resp.json() |
| 10620 |
except ValueError as ex: |
| 10621 |
raise F5ModuleError(str(ex)) |
| 10622 |
|
| 10623 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 10624 |
raise F5ModuleError(resp.content) |
| 10625 |
|
| 10626 |
if 'items' not in response: |
| 10627 |
return [] |
| 10628 |
result = response['items'] |
| 10629 |
return result |
| 10630 |
|
| 10631 |
|
| 10632 |
class GtmNaptrPoolsFactManager(BaseManager): |
| 10633 |
def __init__(self, *args, **kwargs): |
| 10634 |
self.client = kwargs.get('client', None) |
| 10635 |
self.module = kwargs.get('module', None) |
| 10636 |
super(GtmNaptrPoolsFactManager, self).__init__(**kwargs) |
| 10637 |
|
| 10638 |
def exec_module(self): |
| 10639 |
facts = self._exec_module() |
| 10640 |
result = dict(gtm_naptr_pools=facts) |
| 10641 |
return result |
| 10642 |
|
| 10643 |
def _exec_module(self): |
| 10644 |
if 'gtm' not in self.provisioned_modules: |
| 10645 |
return [] |
| 10646 |
results = [] |
| 10647 |
facts = self.read_facts() |
| 10648 |
for item in facts: |
| 10649 |
attrs = item.to_return() |
| 10650 |
results.append(attrs) |
| 10651 |
results = sorted(results, key=lambda k: k['full_path']) |
| 10652 |
return results |
| 10653 |
|
| 10654 |
def read_facts(self): |
| 10655 |
results = [] |
| 10656 |
collection = self.increment_read() |
| 10657 |
for resource in collection: |
| 10658 |
params = GtmXPoolsParameters(params=resource) |
| 10659 |
results.append(params) |
| 10660 |
return results |
| 10661 |
|
| 10662 |
def increment_read(self): |
| 10663 |
n = 0 |
| 10664 |
result = [] |
| 10665 |
while True: |
| 10666 |
items = self.read_collection_from_device(skip=n) |
| 10667 |
if not items: |
| 10668 |
break |
| 10669 |
result.extend(items) |
| 10670 |
n = n + self.module.params['data_increment'] |
| 10671 |
return result |
| 10672 |
|
| 10673 |
def read_collection_from_device(self, skip=0): |
| 10674 |
uri = "https://{0}:{1}/mgmt/tm/gtm/pool/naptr".format( |
| 10675 |
self.client.provider['server'], |
| 10676 |
self.client.provider['server_port'], |
| 10677 |
) |
| 10678 |
query = "?expandSubcollections=true&$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 10679 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 10680 |
) |
| 10681 |
resp = self.client.api.get(uri + query) |
| 10682 |
try: |
| 10683 |
response = resp.json() |
| 10684 |
except ValueError as ex: |
| 10685 |
raise F5ModuleError(str(ex)) |
| 10686 |
|
| 10687 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 10688 |
raise F5ModuleError(resp.content) |
| 10689 |
|
| 10690 |
if 'items' not in response: |
| 10691 |
return [] |
| 10692 |
result = response['items'] |
| 10693 |
return result |
| 10694 |
|
| 10695 |
|
| 10696 |
class GtmSrvPoolsFactManager(BaseManager): |
| 10697 |
def __init__(self, *args, **kwargs): |
| 10698 |
self.client = kwargs.get('client', None) |
| 10699 |
self.module = kwargs.get('module', None) |
| 10700 |
super(GtmSrvPoolsFactManager, self).__init__(**kwargs) |
| 10701 |
|
| 10702 |
def exec_module(self): |
| 10703 |
facts = self._exec_module() |
| 10704 |
result = dict(gtm_srv_pools=facts) |
| 10705 |
return result |
| 10706 |
|
| 10707 |
def _exec_module(self): |
| 10708 |
if 'gtm' not in self.provisioned_modules: |
| 10709 |
return [] |
| 10710 |
results = [] |
| 10711 |
facts = self.read_facts() |
| 10712 |
for item in facts: |
| 10713 |
attrs = item.to_return() |
| 10714 |
results.append(attrs) |
| 10715 |
results = sorted(results, key=lambda k: k['full_path']) |
| 10716 |
return results |
| 10717 |
|
| 10718 |
def read_facts(self): |
| 10719 |
results = [] |
| 10720 |
collection = self.increment_read() |
| 10721 |
for resource in collection: |
| 10722 |
params = GtmXPoolsParameters(params=resource) |
| 10723 |
results.append(params) |
| 10724 |
return results |
| 10725 |
|
| 10726 |
def increment_read(self): |
| 10727 |
n = 0 |
| 10728 |
result = [] |
| 10729 |
while True: |
| 10730 |
items = self.read_collection_from_device(skip=n) |
| 10731 |
if not items: |
| 10732 |
break |
| 10733 |
result.extend(items) |
| 10734 |
n = n + self.module.params['data_increment'] |
| 10735 |
return result |
| 10736 |
|
| 10737 |
def read_collection_from_device(self, skip=0): |
| 10738 |
uri = "https://{0}:{1}/mgmt/tm/gtm/pool/srv".format( |
| 10739 |
self.client.provider['server'], |
| 10740 |
self.client.provider['server_port'], |
| 10741 |
) |
| 10742 |
query = "?expandSubcollections=true&$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 10743 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 10744 |
) |
| 10745 |
resp = self.client.api.get(uri + query) |
| 10746 |
try: |
| 10747 |
response = resp.json() |
| 10748 |
except ValueError as ex: |
| 10749 |
raise F5ModuleError(str(ex)) |
| 10750 |
|
| 10751 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 10752 |
raise F5ModuleError(resp.content) |
| 10753 |
|
| 10754 |
if 'items' not in response: |
| 10755 |
return [] |
| 10756 |
result = response['items'] |
| 10757 |
return result |
| 10758 |
|
| 10759 |
|
| 10760 |
class GtmServersParameters(BaseParameters): |
| 10761 |
api_map = { |
| 10762 |
'fullPath': 'full_path', |
| 10763 |
'exposeRouteDomains': 'expose_route_domains', |
| 10764 |
'iqAllowPath': 'iq_allow_path', |
| 10765 |
'iqAllowServiceCheck': 'iq_allow_service_check', |
| 10766 |
'iqAllowSnmp': 'iq_allow_snmp', |
| 10767 |
'limitCpuUsage': 'limit_cpu_usage', |
| 10768 |
'limitCpuUsageStatus': 'limit_cpu_usage_status', |
| 10769 |
'limitMaxBps': 'limit_max_bps', |
| 10770 |
'limitMaxBpsStatus': 'limit_max_bps_status', |
| 10771 |
'limitMaxConnections': 'limit_max_connections', |
| 10772 |
'limitMaxConnectionsStatus': 'limit_max_connections_status', |
| 10773 |
'limitMaxPps': 'limit_max_pps', |
| 10774 |
'limitMaxPpsStatus': 'limit_max_pps_status', |
| 10775 |
'limitMemAvail': 'limit_mem_available', |
| 10776 |
'limitMemAvailStatus': 'limit_mem_available_status', |
| 10777 |
'linkDiscovery': 'link_discovery', |
| 10778 |
'proberFallback': 'prober_fallback', |
| 10779 |
'proberPreference': 'prober_preference', |
| 10780 |
'virtualServerDiscovery': 'virtual_server_discovery', |
| 10781 |
'devicesReference': 'devices', |
| 10782 |
'virtualServersReference': 'virtual_servers', |
| 10783 |
'monitor': 'monitors', |
| 10784 |
} |
| 10785 |
|
| 10786 |
returnables = [ |
| 10787 |
'datacenter', |
| 10788 |
'enabled', |
| 10789 |
'disabled', |
| 10790 |
'expose_route_domains', |
| 10791 |
'iq_allow_path', |
| 10792 |
'full_path', |
| 10793 |
'iq_allow_service_check', |
| 10794 |
'iq_allow_snmp', |
| 10795 |
'limit_cpu_usage', |
| 10796 |
'limit_cpu_usage_status', |
| 10797 |
'limit_max_bps', |
| 10798 |
'limit_max_bps_status', |
| 10799 |
'limit_max_connections', |
| 10800 |
'limit_max_connections_status', |
| 10801 |
'limit_max_pps', |
| 10802 |
'limit_max_pps_status', |
| 10803 |
'limit_mem_available', |
| 10804 |
'limit_mem_available_status', |
| 10805 |
'link_discovery', |
| 10806 |
'monitors', |
| 10807 |
'monitor_type', |
| 10808 |
'name', |
| 10809 |
'product', |
| 10810 |
'prober_fallback', |
| 10811 |
'prober_preference', |
| 10812 |
'virtual_server_discovery', |
| 10813 |
'addresses', |
| 10814 |
'devices', |
| 10815 |
'virtual_servers', |
| 10816 |
] |
| 10817 |
|
| 10818 |
def _remove_internal_keywords(self, resource, stats=False): |
| 10819 |
if stats: |
| 10820 |
resource.pop('kind', None) |
| 10821 |
resource.pop('generation', None) |
| 10822 |
resource.pop('isSubcollection', None) |
| 10823 |
resource.pop('fullPath', None) |
| 10824 |
else: |
| 10825 |
resource.pop('kind', None) |
| 10826 |
resource.pop('generation', None) |
| 10827 |
resource.pop('selfLink', None) |
| 10828 |
resource.pop('isSubcollection', None) |
| 10829 |
resource.pop('fullPath', None) |
| 10830 |
|
| 10831 |
def _read_virtual_stats_from_device(self, url): |
| 10832 |
uri = "https://{0}:{1}{2}/stats".format( |
| 10833 |
self.client.provider['server'], |
| 10834 |
self.client.provider['server_port'], |
| 10835 |
url |
| 10836 |
) |
| 10837 |
resp = self.client.api.get(uri) |
| 10838 |
try: |
| 10839 |
response = resp.json() |
| 10840 |
except ValueError as ex: |
| 10841 |
raise F5ModuleError(str(ex)) |
| 10842 |
|
| 10843 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 10844 |
raise F5ModuleError(resp.content) |
| 10845 |
result = parseStats(response) |
| 10846 |
try: |
| 10847 |
return result['stats'] |
| 10848 |
except KeyError: |
| 10849 |
return {} |
| 10850 |
|
| 10851 |
def _process_vs_stats(self, link): |
| 10852 |
result = dict() |
| 10853 |
item = self._read_virtual_stats_from_device(urlparse(link).path) |
| 10854 |
if not item: |
| 10855 |
return result |
| 10856 |
result['status'] = item['status']['availabilityState'] |
| 10857 |
result['status_reason'] = item['status']['statusReason'] |
| 10858 |
result['state'] = item['status']['enabledState'] |
| 10859 |
result['bits_per_sec_in'] = item['metrics']['bitsPerSecIn'] |
| 10860 |
result['bits_per_sec_in'] = item['metrics']['bitsPerSecOut'] |
| 10861 |
result['pkts_per_sec_in'] = item['metrics']['pktsPerSecIn'] |
| 10862 |
result['pkts_per_sec_out'] = item['metrics']['pktsPerSecOut'] |
| 10863 |
result['connections'] = item['metrics']['connections'] |
| 10864 |
result['picks'] = item['picks'] |
| 10865 |
result['virtual_server_score'] = item['metrics']['vsScore'] |
| 10866 |
result['uptime'] = item['uptime'] |
| 10867 |
return result |
| 10868 |
|
| 10869 |
@property |
| 10870 |
def monitors(self): |
| 10871 |
if self._values['monitors'] is None: |
| 10872 |
return [] |
| 10873 |
try: |
| 10874 |
result = re.findall(r'/\w+/[^\s}]+', self._values['monitors']) |
| 10875 |
return result |
| 10876 |
except Exception: |
| 10877 |
return [self._values['monitors']] |
| 10878 |
|
| 10879 |
@property |
| 10880 |
def monitor_type(self): |
| 10881 |
if self._values['monitors'] is None: |
| 10882 |
return None |
| 10883 |
pattern = r'min\s+\d+\s+of' |
| 10884 |
matches = re.search(pattern, self._values['monitors']) |
| 10885 |
if matches: |
| 10886 |
return 'm_of_n' |
| 10887 |
else: |
| 10888 |
return 'and_list' |
| 10889 |
|
| 10890 |
@property |
| 10891 |
def limit_mem_available_status(self): |
| 10892 |
return flatten_boolean(self._values['limit_mem_available_status']) |
| 10893 |
|
| 10894 |
@property |
| 10895 |
def limit_max_pps_status(self): |
| 10896 |
return flatten_boolean(self._values['limit_max_pps_status']) |
| 10897 |
|
| 10898 |
@property |
| 10899 |
def limit_max_connections_status(self): |
| 10900 |
return flatten_boolean(self._values['limit_max_connections_status']) |
| 10901 |
|
| 10902 |
@property |
| 10903 |
def limit_max_bps_status(self): |
| 10904 |
return flatten_boolean(self._values['limit_max_bps_status']) |
| 10905 |
|
| 10906 |
@property |
| 10907 |
def limit_cpu_usage_status(self): |
| 10908 |
return flatten_boolean(self._values['limit_cpu_usage_status']) |
| 10909 |
|
| 10910 |
@property |
| 10911 |
def iq_allow_service_check(self): |
| 10912 |
return flatten_boolean(self._values['iq_allow_service_check']) |
| 10913 |
|
| 10914 |
@property |
| 10915 |
def iq_allow_snmp(self): |
| 10916 |
return flatten_boolean(self._values['iq_allow_snmp']) |
| 10917 |
|
| 10918 |
@property |
| 10919 |
def expose_route_domains(self): |
| 10920 |
return flatten_boolean(self._values['expose_route_domains']) |
| 10921 |
|
| 10922 |
@property |
| 10923 |
def iq_allow_path(self): |
| 10924 |
return flatten_boolean(self._values['iq_allow_path']) |
| 10925 |
|
| 10926 |
@property |
| 10927 |
def product(self): |
| 10928 |
if self._values['product'] is None: |
| 10929 |
return None |
| 10930 |
if self._values['product'] in ['single-bigip', 'redundant-bigip']: |
| 10931 |
return 'bigip' |
| 10932 |
return self._values['product'] |
| 10933 |
|
| 10934 |
@property |
| 10935 |
def devices(self): |
| 10936 |
result = [] |
| 10937 |
if self._values['devices'] is None or 'items' not in self._values['devices']: |
| 10938 |
return result |
| 10939 |
for item in self._values['devices']['items']: |
| 10940 |
self._remove_internal_keywords(item) |
| 10941 |
if 'fullPath' in item: |
| 10942 |
item['full_path'] = item.pop('fullPath') |
| 10943 |
result.append(item) |
| 10944 |
return result |
| 10945 |
|
| 10946 |
@property |
| 10947 |
def virtual_servers(self): |
| 10948 |
result = [] |
| 10949 |
if self._values['virtual_servers'] is None or 'items' not in self._values['virtual_servers']: |
| 10950 |
return result |
| 10951 |
for item in self._values['virtual_servers']['items']: |
| 10952 |
self._remove_internal_keywords(item, stats=True) |
| 10953 |
stats = self._process_vs_stats(item['selfLink']) |
| 10954 |
self._remove_internal_keywords(item) |
| 10955 |
item['stats'] = stats |
| 10956 |
if 'disabled' in item: |
| 10957 |
if item['disabled'] in BOOLEANS_TRUE: |
| 10958 |
item['disabled'] = flatten_boolean(item['disabled']) |
| 10959 |
item['enabled'] = flatten_boolean(not item['disabled']) |
| 10960 |
if 'enabled' in item: |
| 10961 |
if item['enabled'] in BOOLEANS_TRUE: |
| 10962 |
item['enabled'] = flatten_boolean(item['enabled']) |
| 10963 |
item['disabled'] = flatten_boolean(not item['enabled']) |
| 10964 |
if 'fullPath' in item: |
| 10965 |
item['full_path'] = item.pop('fullPath') |
| 10966 |
if 'limitMaxBps' in item: |
| 10967 |
item['limit_max_bps'] = int(item.pop('limitMaxBps')) |
| 10968 |
if 'limitMaxBpsStatus' in item: |
| 10969 |
item['limit_max_bps_status'] = item.pop('limitMaxBpsStatus') |
| 10970 |
if 'limitMaxConnections' in item: |
| 10971 |
item['limit_max_connections'] = int(item.pop('limitMaxConnections')) |
| 10972 |
if 'limitMaxConnectionsStatus' in item: |
| 10973 |
item['limit_max_connections_status'] = item.pop('limitMaxConnectionsStatus') |
| 10974 |
if 'limitMaxPps' in item: |
| 10975 |
item['limit_max_pps'] = int(item.pop('limitMaxPps')) |
| 10976 |
if 'limitMaxPpsStatus' in item: |
| 10977 |
item['limit_max_pps_status'] = item.pop('limitMaxPpsStatus') |
| 10978 |
if 'translationAddress' in item: |
| 10979 |
item['translation_address'] = item.pop('translationAddress') |
| 10980 |
if 'translationPort' in item: |
| 10981 |
item['translation_port'] = int(item.pop('translationPort')) |
| 10982 |
result.append(item) |
| 10983 |
return result |
| 10984 |
|
| 10985 |
@property |
| 10986 |
def limit_cpu_usage(self): |
| 10987 |
if self._values['limit_cpu_usage'] is None: |
| 10988 |
return None |
| 10989 |
return int(self._values['limit_cpu_usage']) |
| 10990 |
|
| 10991 |
@property |
| 10992 |
def limit_max_bps(self): |
| 10993 |
if self._values['limit_max_bps'] is None: |
| 10994 |
return None |
| 10995 |
return int(self._values['limit_max_bps']) |
| 10996 |
|
| 10997 |
@property |
| 10998 |
def limit_max_connections(self): |
| 10999 |
if self._values['limit_max_connections'] is None: |
| 11000 |
return None |
| 11001 |
return int(self._values['limit_max_connections']) |
| 11002 |
|
| 11003 |
@property |
| 11004 |
def limit_max_pps(self): |
| 11005 |
if self._values['limit_max_pps'] is None: |
| 11006 |
return None |
| 11007 |
return int(self._values['limit_max_pps']) |
| 11008 |
|
| 11009 |
@property |
| 11010 |
def limit_mem_available(self): |
| 11011 |
if self._values['limit_mem_available'] is None: |
| 11012 |
return None |
| 11013 |
return int(self._values['limit_mem_available']) |
| 11014 |
|
| 11015 |
|
| 11016 |
class GtmServersFactManager(BaseManager): |
| 11017 |
def __init__(self, *args, **kwargs): |
| 11018 |
self.client = kwargs.get('client', None) |
| 11019 |
self.module = kwargs.get('module', None) |
| 11020 |
super(GtmServersFactManager, self).__init__(**kwargs) |
| 11021 |
|
| 11022 |
def exec_module(self): |
| 11023 |
facts = self._exec_module() |
| 11024 |
result = dict(gtm_servers=facts) |
| 11025 |
return result |
| 11026 |
|
| 11027 |
def _exec_module(self): |
| 11028 |
if 'gtm' not in self.provisioned_modules: |
| 11029 |
return [] |
| 11030 |
results = [] |
| 11031 |
facts = self.read_facts() |
| 11032 |
for item in facts: |
| 11033 |
attrs = item.to_return() |
| 11034 |
results.append(attrs) |
| 11035 |
results = sorted(results, key=lambda k: k['full_path']) |
| 11036 |
return results |
| 11037 |
|
| 11038 |
def read_facts(self): |
| 11039 |
results = [] |
| 11040 |
collection = self.increment_read() |
| 11041 |
for resource in collection: |
| 11042 |
params = GtmServersParameters(client=self.client, params=resource) |
| 11043 |
results.append(params) |
| 11044 |
return results |
| 11045 |
|
| 11046 |
def increment_read(self): |
| 11047 |
n = 0 |
| 11048 |
result = [] |
| 11049 |
while True: |
| 11050 |
items = self.read_collection_from_device(skip=n) |
| 11051 |
if not items: |
| 11052 |
break |
| 11053 |
result.extend(items) |
| 11054 |
n = n + self.module.params['data_increment'] |
| 11055 |
return result |
| 11056 |
|
| 11057 |
def read_collection_from_device(self, skip=0): |
| 11058 |
uri = "https://{0}:{1}/mgmt/tm/gtm/server".format( |
| 11059 |
self.client.provider['server'], |
| 11060 |
self.client.provider['server_port'], |
| 11061 |
) |
| 11062 |
query = "?expandSubcollections=true&$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 11063 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 11064 |
) |
| 11065 |
resp = self.client.api.get(uri + query) |
| 11066 |
try: |
| 11067 |
response = resp.json() |
| 11068 |
except ValueError as ex: |
| 11069 |
raise F5ModuleError(str(ex)) |
| 11070 |
|
| 11071 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 11072 |
raise F5ModuleError(resp.content) |
| 11073 |
|
| 11074 |
if 'items' not in response: |
| 11075 |
return [] |
| 11076 |
result = response['items'] |
| 11077 |
return result |
| 11078 |
|
| 11079 |
|
| 11080 |
class GtmXWideIpsParameters(BaseParameters): |
| 11081 |
api_map = { |
| 11082 |
'fullPath': 'full_path', |
| 11083 |
'failureRcode': 'failure_rcode', |
| 11084 |
'failureRcodeResponse': 'failure_rcode_response', |
| 11085 |
'failureRcodeTtl': 'failure_rcode_ttl', |
| 11086 |
'lastResortPool': 'last_resort_pool', |
| 11087 |
'minimalResponse': 'minimal_response', |
| 11088 |
'persistCidrIpv4': 'persist_cidr_ipv4', |
| 11089 |
'persistCidrIpv6': 'persist_cidr_ipv6', |
| 11090 |
'poolLbMode': 'pool_lb_mode', |
| 11091 |
'ttlPersistence': 'ttl_persistence' |
| 11092 |
} |
| 11093 |
|
| 11094 |
returnables = [ |
| 11095 |
'full_path', |
| 11096 |
'description', |
| 11097 |
'enabled', |
| 11098 |
'disabled', |
| 11099 |
'failure_rcode', |
| 11100 |
'failure_rcode_response', |
| 11101 |
'failure_rcode_ttl', |
| 11102 |
'last_resort_pool', |
| 11103 |
'minimal_response', |
| 11104 |
'name', |
| 11105 |
'persist_cidr_ipv4', |
| 11106 |
'persist_cidr_ipv6', |
| 11107 |
'pool_lb_mode', |
| 11108 |
'ttl_persistence', |
| 11109 |
'pools', |
| 11110 |
] |
| 11111 |
|
| 11112 |
@property |
| 11113 |
def pools(self): |
| 11114 |
result = [] |
| 11115 |
if self._values['pools'] is None: |
| 11116 |
return [] |
| 11117 |
for pool in self._values['pools']: |
| 11118 |
del pool['nameReference'] |
| 11119 |
for x in ['order', 'ratio']: |
| 11120 |
if x in pool: |
| 11121 |
pool[x] = int(pool[x]) |
| 11122 |
result.append(pool) |
| 11123 |
return result |
| 11124 |
|
| 11125 |
@property |
| 11126 |
def failure_rcode_response(self): |
| 11127 |
return flatten_boolean(self._values['failure_rcode_response']) |
| 11128 |
|
| 11129 |
@property |
| 11130 |
def failure_rcode_ttl(self): |
| 11131 |
if self._values['failure_rcode_ttl'] is None: |
| 11132 |
return None |
| 11133 |
return int(self._values['failure_rcode_ttl']) |
| 11134 |
|
| 11135 |
@property |
| 11136 |
def persist_cidr_ipv4(self): |
| 11137 |
if self._values['persist_cidr_ipv4'] is None: |
| 11138 |
return None |
| 11139 |
return int(self._values['persist_cidr_ipv4']) |
| 11140 |
|
| 11141 |
@property |
| 11142 |
def persist_cidr_ipv6(self): |
| 11143 |
if self._values['persist_cidr_ipv6'] is None: |
| 11144 |
return None |
| 11145 |
return int(self._values['persist_cidr_ipv6']) |
| 11146 |
|
| 11147 |
@property |
| 11148 |
def ttl_persistence(self): |
| 11149 |
if self._values['ttl_persistence'] is None: |
| 11150 |
return None |
| 11151 |
return int(self._values['ttl_persistence']) |
| 11152 |
|
| 11153 |
|
| 11154 |
class GtmAWideIpsFactManager(BaseManager): |
| 11155 |
def __init__(self, *args, **kwargs): |
| 11156 |
self.client = kwargs.get('client', None) |
| 11157 |
self.module = kwargs.get('module', None) |
| 11158 |
super(GtmAWideIpsFactManager, self).__init__(**kwargs) |
| 11159 |
|
| 11160 |
def exec_module(self): |
| 11161 |
facts = self._exec_module() |
| 11162 |
result = dict(gtm_a_wide_ips=facts) |
| 11163 |
return result |
| 11164 |
|
| 11165 |
def _exec_module(self): |
| 11166 |
if 'gtm' not in self.provisioned_modules: |
| 11167 |
return [] |
| 11168 |
results = [] |
| 11169 |
facts = self.read_facts() |
| 11170 |
for item in facts: |
| 11171 |
attrs = item.to_return() |
| 11172 |
results.append(attrs) |
| 11173 |
results = sorted(results, key=lambda k: k['full_path']) |
| 11174 |
return results |
| 11175 |
|
| 11176 |
def read_facts(self): |
| 11177 |
results = [] |
| 11178 |
collection = self.increment_read() |
| 11179 |
for resource in collection: |
| 11180 |
params = GtmXWideIpsParameters(params=resource) |
| 11181 |
results.append(params) |
| 11182 |
return results |
| 11183 |
|
| 11184 |
def increment_read(self): |
| 11185 |
n = 0 |
| 11186 |
result = [] |
| 11187 |
while True: |
| 11188 |
items = self.read_collection_from_device(skip=n) |
| 11189 |
if not items: |
| 11190 |
break |
| 11191 |
result.extend(items) |
| 11192 |
n = n + self.module.params['data_increment'] |
| 11193 |
return result |
| 11194 |
|
| 11195 |
def read_collection_from_device(self, skip=0): |
| 11196 |
uri = "https://{0}:{1}/mgmt/tm/gtm/wideip/a".format( |
| 11197 |
self.client.provider['server'], |
| 11198 |
self.client.provider['server_port'], |
| 11199 |
) |
| 11200 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 11201 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 11202 |
) |
| 11203 |
resp = self.client.api.get(uri + query) |
| 11204 |
try: |
| 11205 |
response = resp.json() |
| 11206 |
except ValueError as ex: |
| 11207 |
raise F5ModuleError(str(ex)) |
| 11208 |
|
| 11209 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 11210 |
raise F5ModuleError(resp.content) |
| 11211 |
|
| 11212 |
if 'items' not in response: |
| 11213 |
return [] |
| 11214 |
result = response['items'] |
| 11215 |
return result |
| 11216 |
|
| 11217 |
|
| 11218 |
class GtmAaaaWideIpsFactManager(BaseManager): |
| 11219 |
def __init__(self, *args, **kwargs): |
| 11220 |
self.client = kwargs.get('client', None) |
| 11221 |
self.module = kwargs.get('module', None) |
| 11222 |
super(GtmAaaaWideIpsFactManager, self).__init__(**kwargs) |
| 11223 |
|
| 11224 |
def exec_module(self): |
| 11225 |
facts = self._exec_module() |
| 11226 |
result = dict(gtm_aaaa_wide_ips=facts) |
| 11227 |
return result |
| 11228 |
|
| 11229 |
def _exec_module(self): |
| 11230 |
if 'gtm' not in self.provisioned_modules: |
| 11231 |
return [] |
| 11232 |
results = [] |
| 11233 |
facts = self.read_facts() |
| 11234 |
for item in facts: |
| 11235 |
attrs = item.to_return() |
| 11236 |
results.append(attrs) |
| 11237 |
results = sorted(results, key=lambda k: k['full_path']) |
| 11238 |
return results |
| 11239 |
|
| 11240 |
def read_facts(self): |
| 11241 |
results = [] |
| 11242 |
collection = self.increment_read() |
| 11243 |
for resource in collection: |
| 11244 |
params = GtmXWideIpsParameters(params=resource) |
| 11245 |
results.append(params) |
| 11246 |
return results |
| 11247 |
|
| 11248 |
def increment_read(self): |
| 11249 |
n = 0 |
| 11250 |
result = [] |
| 11251 |
while True: |
| 11252 |
items = self.read_collection_from_device(skip=n) |
| 11253 |
if not items: |
| 11254 |
break |
| 11255 |
result.extend(items) |
| 11256 |
n = n + self.module.params['data_increment'] |
| 11257 |
return result |
| 11258 |
|
| 11259 |
def read_collection_from_device(self, skip=0): |
| 11260 |
uri = "https://{0}:{1}/mgmt/tm/gtm/wideip/aaaa".format( |
| 11261 |
self.client.provider['server'], |
| 11262 |
self.client.provider['server_port'], |
| 11263 |
) |
| 11264 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 11265 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 11266 |
) |
| 11267 |
resp = self.client.api.get(uri + query) |
| 11268 |
try: |
| 11269 |
response = resp.json() |
| 11270 |
except ValueError as ex: |
| 11271 |
raise F5ModuleError(str(ex)) |
| 11272 |
|
| 11273 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 11274 |
raise F5ModuleError(resp.content) |
| 11275 |
|
| 11276 |
if 'items' not in response: |
| 11277 |
return [] |
| 11278 |
result = response['items'] |
| 11279 |
return result |
| 11280 |
|
| 11281 |
|
| 11282 |
class GtmCnameWideIpsFactManager(BaseManager): |
| 11283 |
def __init__(self, *args, **kwargs): |
| 11284 |
self.client = kwargs.get('client', None) |
| 11285 |
self.module = kwargs.get('module', None) |
| 11286 |
super(GtmCnameWideIpsFactManager, self).__init__(**kwargs) |
| 11287 |
|
| 11288 |
def exec_module(self): |
| 11289 |
facts = self._exec_module() |
| 11290 |
result = dict(gtm_cname_wide_ips=facts) |
| 11291 |
return result |
| 11292 |
|
| 11293 |
def _exec_module(self): |
| 11294 |
if 'gtm' not in self.provisioned_modules: |
| 11295 |
return [] |
| 11296 |
results = [] |
| 11297 |
facts = self.read_facts() |
| 11298 |
for item in facts: |
| 11299 |
attrs = item.to_return() |
| 11300 |
results.append(attrs) |
| 11301 |
results = sorted(results, key=lambda k: k['full_path']) |
| 11302 |
return results |
| 11303 |
|
| 11304 |
def read_facts(self): |
| 11305 |
results = [] |
| 11306 |
collection = self.increment_read() |
| 11307 |
for resource in collection: |
| 11308 |
params = GtmXWideIpsParameters(params=resource) |
| 11309 |
results.append(params) |
| 11310 |
return results |
| 11311 |
|
| 11312 |
def increment_read(self): |
| 11313 |
n = 0 |
| 11314 |
result = [] |
| 11315 |
while True: |
| 11316 |
items = self.read_collection_from_device(skip=n) |
| 11317 |
if not items: |
| 11318 |
break |
| 11319 |
result.extend(items) |
| 11320 |
n = n + self.module.params['data_increment'] |
| 11321 |
return result |
| 11322 |
|
| 11323 |
def read_collection_from_device(self, skip=0): |
| 11324 |
uri = "https://{0}:{1}/mgmt/tm/gtm/wideip/cname".format( |
| 11325 |
self.client.provider['server'], |
| 11326 |
self.client.provider['server_port'], |
| 11327 |
) |
| 11328 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 11329 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 11330 |
) |
| 11331 |
resp = self.client.api.get(uri + query) |
| 11332 |
try: |
| 11333 |
response = resp.json() |
| 11334 |
except ValueError as ex: |
| 11335 |
raise F5ModuleError(str(ex)) |
| 11336 |
|
| 11337 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 11338 |
raise F5ModuleError(resp.content) |
| 11339 |
|
| 11340 |
if 'items' not in response: |
| 11341 |
return [] |
| 11342 |
result = response['items'] |
| 11343 |
return result |
| 11344 |
|
| 11345 |
|
| 11346 |
class GtmMxWideIpsFactManager(BaseManager): |
| 11347 |
def __init__(self, *args, **kwargs): |
| 11348 |
self.client = kwargs.get('client', None) |
| 11349 |
self.module = kwargs.get('module', None) |
| 11350 |
super(GtmMxWideIpsFactManager, self).__init__(**kwargs) |
| 11351 |
|
| 11352 |
def exec_module(self): |
| 11353 |
facts = self._exec_module() |
| 11354 |
result = dict(gtm_mx_wide_ips=facts) |
| 11355 |
return result |
| 11356 |
|
| 11357 |
def _exec_module(self): |
| 11358 |
if 'gtm' not in self.provisioned_modules: |
| 11359 |
return [] |
| 11360 |
results = [] |
| 11361 |
facts = self.read_facts() |
| 11362 |
for item in facts: |
| 11363 |
attrs = item.to_return() |
| 11364 |
results.append(attrs) |
| 11365 |
results = sorted(results, key=lambda k: k['full_path']) |
| 11366 |
return results |
| 11367 |
|
| 11368 |
def read_facts(self): |
| 11369 |
results = [] |
| 11370 |
collection = self.increment_read() |
| 11371 |
for resource in collection: |
| 11372 |
params = GtmXWideIpsParameters(params=resource) |
| 11373 |
results.append(params) |
| 11374 |
return results |
| 11375 |
|
| 11376 |
def increment_read(self): |
| 11377 |
n = 0 |
| 11378 |
result = [] |
| 11379 |
while True: |
| 11380 |
items = self.read_collection_from_device(skip=n) |
| 11381 |
if not items: |
| 11382 |
break |
| 11383 |
result.extend(items) |
| 11384 |
n = n + self.module.params['data_increment'] |
| 11385 |
return result |
| 11386 |
|
| 11387 |
def read_collection_from_device(self, skip=0): |
| 11388 |
uri = "https://{0}:{1}/mgmt/tm/gtm/wideip/mx".format( |
| 11389 |
self.client.provider['server'], |
| 11390 |
self.client.provider['server_port'], |
| 11391 |
) |
| 11392 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 11393 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 11394 |
) |
| 11395 |
resp = self.client.api.get(uri + query) |
| 11396 |
try: |
| 11397 |
response = resp.json() |
| 11398 |
except ValueError as ex: |
| 11399 |
raise F5ModuleError(str(ex)) |
| 11400 |
|
| 11401 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 11402 |
raise F5ModuleError(resp.content) |
| 11403 |
|
| 11404 |
if 'items' not in response: |
| 11405 |
return [] |
| 11406 |
result = response['items'] |
| 11407 |
return result |
| 11408 |
|
| 11409 |
|
| 11410 |
class GtmNaptrWideIpsFactManager(BaseManager): |
| 11411 |
def __init__(self, *args, **kwargs): |
| 11412 |
self.client = kwargs.get('client', None) |
| 11413 |
self.module = kwargs.get('module', None) |
| 11414 |
super(GtmNaptrWideIpsFactManager, self).__init__(**kwargs) |
| 11415 |
|
| 11416 |
def exec_module(self): |
| 11417 |
facts = self._exec_module() |
| 11418 |
result = dict(gtm_naptr_wide_ips=facts) |
| 11419 |
return result |
| 11420 |
|
| 11421 |
def _exec_module(self): |
| 11422 |
results = [] |
| 11423 |
if 'gtm' not in self.provisioned_modules: |
| 11424 |
return [] |
| 11425 |
facts = self.read_facts() |
| 11426 |
for item in facts: |
| 11427 |
attrs = item.to_return() |
| 11428 |
results.append(attrs) |
| 11429 |
results = sorted(results, key=lambda k: k['full_path']) |
| 11430 |
return results |
| 11431 |
|
| 11432 |
def read_facts(self): |
| 11433 |
results = [] |
| 11434 |
collection = self.increment_read() |
| 11435 |
for resource in collection: |
| 11436 |
params = GtmXWideIpsParameters(params=resource) |
| 11437 |
results.append(params) |
| 11438 |
return results |
| 11439 |
|
| 11440 |
def increment_read(self): |
| 11441 |
n = 0 |
| 11442 |
result = [] |
| 11443 |
while True: |
| 11444 |
items = self.read_collection_from_device(skip=n) |
| 11445 |
if not items: |
| 11446 |
break |
| 11447 |
result.extend(items) |
| 11448 |
n = n + self.module.params['data_increment'] |
| 11449 |
return result |
| 11450 |
|
| 11451 |
def read_collection_from_device(self, skip=0): |
| 11452 |
uri = "https://{0}:{1}/mgmt/tm/gtm/wideip/naptr".format( |
| 11453 |
self.client.provider['server'], |
| 11454 |
self.client.provider['server_port'], |
| 11455 |
) |
| 11456 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 11457 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 11458 |
) |
| 11459 |
resp = self.client.api.get(uri + query) |
| 11460 |
try: |
| 11461 |
response = resp.json() |
| 11462 |
except ValueError as ex: |
| 11463 |
raise F5ModuleError(str(ex)) |
| 11464 |
|
| 11465 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 11466 |
raise F5ModuleError(resp.content) |
| 11467 |
|
| 11468 |
if 'items' not in response: |
| 11469 |
return [] |
| 11470 |
result = response['items'] |
| 11471 |
return result |
| 11472 |
|
| 11473 |
|
| 11474 |
class GtmSrvWideIpsFactManager(BaseManager): |
| 11475 |
def __init__(self, *args, **kwargs): |
| 11476 |
self.client = kwargs.get('client', None) |
| 11477 |
self.module = kwargs.get('module', None) |
| 11478 |
super(GtmSrvWideIpsFactManager, self).__init__(**kwargs) |
| 11479 |
|
| 11480 |
def exec_module(self): |
| 11481 |
facts = self._exec_module() |
| 11482 |
result = dict(gtm_srv_wide_ips=facts) |
| 11483 |
return result |
| 11484 |
|
| 11485 |
def _exec_module(self): |
| 11486 |
if 'gtm' not in self.provisioned_modules: |
| 11487 |
return [] |
| 11488 |
results = [] |
| 11489 |
facts = self.read_facts() |
| 11490 |
for item in facts: |
| 11491 |
attrs = item.to_return() |
| 11492 |
results.append(attrs) |
| 11493 |
results = sorted(results, key=lambda k: k['full_path']) |
| 11494 |
return results |
| 11495 |
|
| 11496 |
def read_facts(self): |
| 11497 |
results = [] |
| 11498 |
collection = self.increment_read() |
| 11499 |
for resource in collection: |
| 11500 |
params = GtmXWideIpsParameters(params=resource) |
| 11501 |
results.append(params) |
| 11502 |
return results |
| 11503 |
|
| 11504 |
def increment_read(self): |
| 11505 |
n = 0 |
| 11506 |
result = [] |
| 11507 |
while True: |
| 11508 |
items = self.read_collection_from_device(skip=n) |
| 11509 |
if not items: |
| 11510 |
break |
| 11511 |
result.extend(items) |
| 11512 |
n = n + self.module.params['data_increment'] |
| 11513 |
return result |
| 11514 |
|
| 11515 |
def read_collection_from_device(self, skip=0): |
| 11516 |
uri = "https://{0}:{1}/mgmt/tm/gtm/wideip/srv".format( |
| 11517 |
self.client.provider['server'], |
| 11518 |
self.client.provider['server_port'], |
| 11519 |
) |
| 11520 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 11521 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 11522 |
) |
| 11523 |
resp = self.client.api.get(uri + query) |
| 11524 |
try: |
| 11525 |
response = resp.json() |
| 11526 |
except ValueError as ex: |
| 11527 |
raise F5ModuleError(str(ex)) |
| 11528 |
|
| 11529 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 11530 |
raise F5ModuleError(resp.content) |
| 11531 |
|
| 11532 |
if 'items' not in response: |
| 11533 |
return [] |
| 11534 |
result = response['items'] |
| 11535 |
return result |
| 11536 |
|
| 11537 |
|
| 11538 |
class GtmTopologyRegionParameters(BaseParameters): |
| 11539 |
api_map = { |
| 11540 |
'fullPath': 'full_path', |
| 11541 |
'regionMembers': 'region_members', |
| 11542 |
} |
| 11543 |
|
| 11544 |
returnables = [ |
| 11545 |
'name', |
| 11546 |
'full_path', |
| 11547 |
'region_members', |
| 11548 |
] |
| 11549 |
|
| 11550 |
def _string_to_dict(self, member): |
| 11551 |
result = dict() |
| 11552 |
item = member['name'].split(' ', 2) |
| 11553 |
if len(item) > 2: |
| 11554 |
result['negate'] = 'yes' |
| 11555 |
if item[1] == 'geoip-isp': |
| 11556 |
result['geo_isp'] = item[2] |
| 11557 |
else: |
| 11558 |
result[item[1]] = item[2] |
| 11559 |
return result |
| 11560 |
else: |
| 11561 |
if item[0] == 'geoip-isp': |
| 11562 |
result['geo_isp'] = item[1] |
| 11563 |
else: |
| 11564 |
result[item[0]] = item[1] |
| 11565 |
return result |
| 11566 |
|
| 11567 |
@property |
| 11568 |
def region_members(self): |
| 11569 |
result = [] |
| 11570 |
if self._values['region_members'] is None: |
| 11571 |
return [] |
| 11572 |
for member in self._values['region_members']: |
| 11573 |
result.append(self._string_to_dict(member)) |
| 11574 |
return result |
| 11575 |
|
| 11576 |
|
| 11577 |
class GtmTopologyRegionFactManager(BaseManager): |
| 11578 |
def __init__(self, *args, **kwargs): |
| 11579 |
self.client = kwargs.get('client', None) |
| 11580 |
self.module = kwargs.get('module', None) |
| 11581 |
super(GtmTopologyRegionFactManager, self).__init__(**kwargs) |
| 11582 |
|
| 11583 |
def exec_module(self): |
| 11584 |
facts = self._exec_module() |
| 11585 |
result = dict(gtm_topology_regions=facts) |
| 11586 |
return result |
| 11587 |
|
| 11588 |
def _exec_module(self): |
| 11589 |
if 'gtm' not in self.provisioned_modules: |
| 11590 |
return [] |
| 11591 |
results = [] |
| 11592 |
facts = self.read_facts() |
| 11593 |
for item in facts: |
| 11594 |
attrs = item.to_return() |
| 11595 |
results.append(attrs) |
| 11596 |
results = sorted(results, key=lambda k: k['full_path']) |
| 11597 |
return results |
| 11598 |
|
| 11599 |
def read_facts(self): |
| 11600 |
results = [] |
| 11601 |
collection = self.increment_read() |
| 11602 |
for resource in collection: |
| 11603 |
params = GtmTopologyRegionParameters(params=resource) |
| 11604 |
results.append(params) |
| 11605 |
return results |
| 11606 |
|
| 11607 |
def increment_read(self): |
| 11608 |
n = 0 |
| 11609 |
result = [] |
| 11610 |
while True: |
| 11611 |
items = self.read_collection_from_device(skip=n) |
| 11612 |
if not items: |
| 11613 |
break |
| 11614 |
result.extend(items) |
| 11615 |
n = n + self.module.params['data_increment'] |
| 11616 |
return result |
| 11617 |
|
| 11618 |
def read_collection_from_device(self, skip=0): |
| 11619 |
uri = "https://{0}:{1}/mgmt/tm/gtm/region".format( |
| 11620 |
self.client.provider['server'], |
| 11621 |
self.client.provider['server_port'], |
| 11622 |
) |
| 11623 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 11624 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 11625 |
) |
| 11626 |
resp = self.client.api.get(uri + query) |
| 11627 |
try: |
| 11628 |
response = resp.json() |
| 11629 |
except ValueError as ex: |
| 11630 |
raise F5ModuleError(str(ex)) |
| 11631 |
|
| 11632 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 11633 |
raise F5ModuleError(resp.content) |
| 11634 |
|
| 11635 |
if 'items' not in response: |
| 11636 |
return [] |
| 11637 |
result = response['items'] |
| 11638 |
return result |
| 11639 |
|
| 11640 |
|
| 11641 |
class HttpMonitorsParameters(BaseParameters): |
| 11642 |
api_map = { |
| 11643 |
'fullPath': 'full_path', |
| 11644 |
'defaultsFrom': 'parent', |
| 11645 |
'adaptiveDivergenceType': 'adaptive_divergence_type', |
| 11646 |
'adaptiveDivergenceValue': 'adaptive_divergence_value', |
| 11647 |
'adaptiveLimit': 'adaptive_limit', |
| 11648 |
'adaptiveSamplingTimespan': 'adaptive_sampling_timespan', |
| 11649 |
'ipDscp': 'ip_dscp', |
| 11650 |
'manualResume': 'manual_resume', |
| 11651 |
'recv': 'receive_string', |
| 11652 |
'recvDisable': 'receive_disable_string', |
| 11653 |
'send': 'send_string', |
| 11654 |
'timeUntilUp': 'time_until_up', |
| 11655 |
'upInterval': 'up_interval', |
| 11656 |
} |
| 11657 |
|
| 11658 |
returnables = [ |
| 11659 |
'full_path', |
| 11660 |
'name', |
| 11661 |
'parent', |
| 11662 |
'description', |
| 11663 |
'adaptive', |
| 11664 |
'adaptive_divergence_type', |
| 11665 |
'adaptive_divergence_value', |
| 11666 |
'adaptive_limit', |
| 11667 |
'adaptive_sampling_timespan', |
| 11668 |
'destination', |
| 11669 |
'interval', |
| 11670 |
'ip_dscp', |
| 11671 |
'manual_resume', |
| 11672 |
'receive_string', |
| 11673 |
'receive_disable_string', |
| 11674 |
'reverse', |
| 11675 |
'send_string', |
| 11676 |
'time_until_up', |
| 11677 |
'timeout', |
| 11678 |
'transparent', |
| 11679 |
'up_interval', |
| 11680 |
'username', |
| 11681 |
] |
| 11682 |
|
| 11683 |
@property |
| 11684 |
def description(self): |
| 11685 |
if self._values['description'] in [None, 'none']: |
| 11686 |
return None |
| 11687 |
return self._values['description'] |
| 11688 |
|
| 11689 |
@property |
| 11690 |
def transparent(self): |
| 11691 |
return flatten_boolean(self._values['transparent']) |
| 11692 |
|
| 11693 |
@property |
| 11694 |
def reverse(self): |
| 11695 |
return flatten_boolean(self._values['reverse']) |
| 11696 |
|
| 11697 |
@property |
| 11698 |
def manual_resume(self): |
| 11699 |
return flatten_boolean(self._values['manual_resume']) |
| 11700 |
|
| 11701 |
@property |
| 11702 |
def adaptive(self): |
| 11703 |
return flatten_boolean(self._values['adaptive']) |
| 11704 |
|
| 11705 |
|
| 11706 |
class HttpMonitorsFactManager(BaseManager): |
| 11707 |
def __init__(self, *args, **kwargs): |
| 11708 |
self.client = kwargs.get('client', None) |
| 11709 |
self.module = kwargs.get('module', None) |
| 11710 |
super(HttpMonitorsFactManager, self).__init__(**kwargs) |
| 11711 |
|
| 11712 |
def exec_module(self): |
| 11713 |
facts = self._exec_module() |
| 11714 |
result = dict(http_monitors=facts) |
| 11715 |
return result |
| 11716 |
|
| 11717 |
def _exec_module(self): |
| 11718 |
results = [] |
| 11719 |
facts = self.read_facts() |
| 11720 |
for item in facts: |
| 11721 |
attrs = item.to_return() |
| 11722 |
results.append(attrs) |
| 11723 |
results = sorted(results, key=lambda k: k['full_path']) |
| 11724 |
return results |
| 11725 |
|
| 11726 |
def read_facts(self): |
| 11727 |
results = [] |
| 11728 |
collection = self.increment_read() |
| 11729 |
for resource in collection: |
| 11730 |
params = HttpMonitorsParameters(params=resource) |
| 11731 |
results.append(params) |
| 11732 |
return results |
| 11733 |
|
| 11734 |
def increment_read(self): |
| 11735 |
n = 0 |
| 11736 |
result = [] |
| 11737 |
while True: |
| 11738 |
items = self.read_collection_from_device(skip=n) |
| 11739 |
if not items: |
| 11740 |
break |
| 11741 |
result.extend(items) |
| 11742 |
n = n + self.module.params['data_increment'] |
| 11743 |
return result |
| 11744 |
|
| 11745 |
def read_collection_from_device(self, skip=0): |
| 11746 |
uri = "https://{0}:{1}/mgmt/tm/ltm/monitor/http".format( |
| 11747 |
self.client.provider['server'], |
| 11748 |
self.client.provider['server_port'], |
| 11749 |
) |
| 11750 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 11751 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 11752 |
) |
| 11753 |
resp = self.client.api.get(uri + query) |
| 11754 |
try: |
| 11755 |
response = resp.json() |
| 11756 |
except ValueError as ex: |
| 11757 |
raise F5ModuleError(str(ex)) |
| 11758 |
|
| 11759 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 11760 |
raise F5ModuleError(resp.content) |
| 11761 |
|
| 11762 |
result = response['items'] |
| 11763 |
return result |
| 11764 |
|
| 11765 |
|
| 11766 |
class HttpsMonitorsParameters(BaseParameters): |
| 11767 |
api_map = { |
| 11768 |
'fullPath': 'full_path', |
| 11769 |
'defaultsFrom': 'parent', |
| 11770 |
'adaptiveDivergenceType': 'adaptive_divergence_type', |
| 11771 |
'adaptiveDivergenceValue': 'adaptive_divergence_value', |
| 11772 |
'adaptiveLimit': 'adaptive_limit', |
| 11773 |
'adaptiveSamplingTimespan': 'adaptive_sampling_timespan', |
| 11774 |
'ipDscp': 'ip_dscp', |
| 11775 |
'manualResume': 'manual_resume', |
| 11776 |
'recv': 'receive_string', |
| 11777 |
'recvDisable': 'receive_disable_string', |
| 11778 |
'send': 'send_string', |
| 11779 |
'sslProfile': 'ssl_profile', |
| 11780 |
'timeUntilUp': 'time_until_up', |
| 11781 |
'upInterval': 'up_interval', |
| 11782 |
} |
| 11783 |
|
| 11784 |
returnables = [ |
| 11785 |
'full_path', |
| 11786 |
'name', |
| 11787 |
'parent', |
| 11788 |
'description', |
| 11789 |
'adaptive', |
| 11790 |
'adaptive_divergence_type', |
| 11791 |
'adaptive_divergence_value', |
| 11792 |
'adaptive_limit', |
| 11793 |
'adaptive_sampling_timespan', |
| 11794 |
'destination', |
| 11795 |
'interval', |
| 11796 |
'ip_dscp', |
| 11797 |
'manual_resume', |
| 11798 |
'receive_string', |
| 11799 |
'receive_disable_string', |
| 11800 |
'reverse', |
| 11801 |
'send_string', |
| 11802 |
'ssl_profile', |
| 11803 |
'time_until_up', |
| 11804 |
'timeout', |
| 11805 |
'transparent', |
| 11806 |
'up_interval', |
| 11807 |
'username', |
| 11808 |
] |
| 11809 |
|
| 11810 |
@property |
| 11811 |
def description(self): |
| 11812 |
if self._values['description'] in [None, 'none']: |
| 11813 |
return None |
| 11814 |
return self._values['description'] |
| 11815 |
|
| 11816 |
@property |
| 11817 |
def transparent(self): |
| 11818 |
return flatten_boolean(self._values['transparent']) |
| 11819 |
|
| 11820 |
@property |
| 11821 |
def reverse(self): |
| 11822 |
return flatten_boolean(self._values['reverse']) |
| 11823 |
|
| 11824 |
@property |
| 11825 |
def manual_resume(self): |
| 11826 |
return flatten_boolean(self._values['manual_resume']) |
| 11827 |
|
| 11828 |
@property |
| 11829 |
def adaptive(self): |
| 11830 |
return flatten_boolean(self._values['adaptive']) |
| 11831 |
|
| 11832 |
|
| 11833 |
class HttpsMonitorsFactManager(BaseManager): |
| 11834 |
def __init__(self, *args, **kwargs): |
| 11835 |
self.client = kwargs.get('client', None) |
| 11836 |
self.module = kwargs.get('module', None) |
| 11837 |
super(HttpsMonitorsFactManager, self).__init__(**kwargs) |
| 11838 |
|
| 11839 |
def exec_module(self): |
| 11840 |
facts = self._exec_module() |
| 11841 |
result = dict(https_monitors=facts) |
| 11842 |
return result |
| 11843 |
|
| 11844 |
def _exec_module(self): |
| 11845 |
results = [] |
| 11846 |
facts = self.read_facts() |
| 11847 |
for item in facts: |
| 11848 |
attrs = item.to_return() |
| 11849 |
results.append(attrs) |
| 11850 |
results = sorted(results, key=lambda k: k['full_path']) |
| 11851 |
return results |
| 11852 |
|
| 11853 |
def read_facts(self): |
| 11854 |
results = [] |
| 11855 |
collection = self.increment_read() |
| 11856 |
for resource in collection: |
| 11857 |
params = HttpsMonitorsParameters(params=resource) |
| 11858 |
results.append(params) |
| 11859 |
return results |
| 11860 |
|
| 11861 |
def increment_read(self): |
| 11862 |
n = 0 |
| 11863 |
result = [] |
| 11864 |
while True: |
| 11865 |
items = self.read_collection_from_device(skip=n) |
| 11866 |
if not items: |
| 11867 |
break |
| 11868 |
result.extend(items) |
| 11869 |
n = n + self.module.params['data_increment'] |
| 11870 |
return result |
| 11871 |
|
| 11872 |
def read_collection_from_device(self, skip=0): |
| 11873 |
uri = "https://{0}:{1}/mgmt/tm/ltm/monitor/https".format( |
| 11874 |
self.client.provider['server'], |
| 11875 |
self.client.provider['server_port'], |
| 11876 |
) |
| 11877 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 11878 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 11879 |
) |
| 11880 |
resp = self.client.api.get(uri + query) |
| 11881 |
try: |
| 11882 |
response = resp.json() |
| 11883 |
except ValueError as ex: |
| 11884 |
raise F5ModuleError(str(ex)) |
| 11885 |
|
| 11886 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 11887 |
raise F5ModuleError(resp.content) |
| 11888 |
|
| 11889 |
result = response['items'] |
| 11890 |
return result |
| 11891 |
|
| 11892 |
|
| 11893 |
class HttpProfilesParameters(BaseParameters): |
| 11894 |
api_map = { |
| 11895 |
'fullPath': 'full_path', |
| 11896 |
'defaultsFrom': 'parent', |
| 11897 |
'acceptXff': 'accept_xff', |
| 11898 |
'explicitProxy': 'explicit_proxy', |
| 11899 |
'insertXforwardedFor': 'insert_xforwarded_for', |
| 11900 |
'lwsWidth': 'lws_max_columns', |
| 11901 |
'oneconnectTransformations': 'onconnect_transformations', |
| 11902 |
'proxyType': 'proxy_mode', |
| 11903 |
'redirectRewrite': 'redirect_rewrite', |
| 11904 |
'requestChunking': 'request_chunking', |
| 11905 |
'responseChunking': 'response_chunking', |
| 11906 |
'serverAgentName': 'server_agent_name', |
| 11907 |
'viaRequest': 'via_request', |
| 11908 |
'viaResponse': 'via_response', |
| 11909 |
'pipeline': 'pipeline_action', |
| 11910 |
} |
| 11911 |
|
| 11912 |
returnables = [ |
| 11913 |
'full_path', |
| 11914 |
'name', |
| 11915 |
'parent', |
| 11916 |
'description', |
| 11917 |
'accept_xff', |
| 11918 |
'allow_truncated_redirects', |
| 11919 |
'excess_client_headers', |
| 11920 |
'excess_server_headers', |
| 11921 |
'known_methods', |
| 11922 |
'max_header_count', |
| 11923 |
'max_header_size', |
| 11924 |
'max_requests', |
| 11925 |
'oversize_client_headers', |
| 11926 |
'oversize_server_headers', |
| 11927 |
'pipeline_action', |
| 11928 |
'unknown_method', |
| 11929 |
'default_connect_handling', |
| 11930 |
'hsts_include_subdomains', |
| 11931 |
'hsts_enabled', |
| 11932 |
'insert_xforwarded_for', |
| 11933 |
'lws_max_columns', |
| 11934 |
'onconnect_transformations', |
| 11935 |
'proxy_mode', |
| 11936 |
'redirect_rewrite', |
| 11937 |
'request_chunking', |
| 11938 |
'response_chunking', |
| 11939 |
'server_agent_name', |
| 11940 |
'sflow_poll_interval', |
| 11941 |
'sflow_sampling_rate', |
| 11942 |
'via_request', |
| 11943 |
'via_response', |
| 11944 |
] |
| 11945 |
|
| 11946 |
@property |
| 11947 |
def description(self): |
| 11948 |
if self._values['description'] in [None, 'none']: |
| 11949 |
return None |
| 11950 |
return self._values['description'] |
| 11951 |
|
| 11952 |
@property |
| 11953 |
def accept_xff(self): |
| 11954 |
return flatten_boolean(self._values['accept_xff']) |
| 11955 |
|
| 11956 |
@property |
| 11957 |
def excess_client_headers(self): |
| 11958 |
if self._values['enforcement'] is None: |
| 11959 |
return None |
| 11960 |
if self._values['enforcement']['excessClientHeaders'] is None: |
| 11961 |
return None |
| 11962 |
return self._values['enforcement']['excessClientHeaders'] |
| 11963 |
|
| 11964 |
@property |
| 11965 |
def excess_server_headers(self): |
| 11966 |
if self._values['enforcement'] is None: |
| 11967 |
return None |
| 11968 |
if self._values['enforcement']['excessServerHeaders'] is None: |
| 11969 |
return None |
| 11970 |
return self._values['enforcement']['excessServerHeaders'] |
| 11971 |
|
| 11972 |
@property |
| 11973 |
def known_methods(self): |
| 11974 |
if self._values['enforcement'] is None: |
| 11975 |
return None |
| 11976 |
if self._values['enforcement']['knownMethods'] is None: |
| 11977 |
return None |
| 11978 |
return self._values['enforcement']['knownMethods'] |
| 11979 |
|
| 11980 |
@property |
| 11981 |
def max_header_count(self): |
| 11982 |
if self._values['enforcement'] is None: |
| 11983 |
return None |
| 11984 |
if self._values['enforcement']['maxHeaderCount'] is None: |
| 11985 |
return None |
| 11986 |
return self._values['enforcement']['maxHeaderCount'] |
| 11987 |
|
| 11988 |
@property |
| 11989 |
def max_header_size(self): |
| 11990 |
if self._values['enforcement'] is None: |
| 11991 |
return None |
| 11992 |
if self._values['enforcement']['maxHeaderSize'] is None: |
| 11993 |
return None |
| 11994 |
return self._values['enforcement']['maxHeaderSize'] |
| 11995 |
|
| 11996 |
@property |
| 11997 |
def max_requests(self): |
| 11998 |
if self._values['enforcement'] is None: |
| 11999 |
return None |
| 12000 |
if self._values['enforcement']['maxRequests'] is None: |
| 12001 |
return None |
| 12002 |
return self._values['enforcement']['maxRequests'] |
| 12003 |
|
| 12004 |
@property |
| 12005 |
def oversize_client_headers(self): |
| 12006 |
if self._values['enforcement'] is None: |
| 12007 |
return None |
| 12008 |
if self._values['enforcement']['oversizeClientHeaders'] is None: |
| 12009 |
return None |
| 12010 |
return self._values['enforcement']['oversizeClientHeaders'] |
| 12011 |
|
| 12012 |
@property |
| 12013 |
def oversize_server_headers(self): |
| 12014 |
if self._values['enforcement'] is None: |
| 12015 |
return None |
| 12016 |
if self._values['enforcement']['oversizeServerHeaders'] is None: |
| 12017 |
return None |
| 12018 |
return self._values['enforcement']['oversizeServerHeaders'] |
| 12019 |
|
| 12020 |
@property |
| 12021 |
def allow_truncated_redirects(self): |
| 12022 |
if self._values['enforcement'] is None: |
| 12023 |
return None |
| 12024 |
if self._values['enforcement']['truncatedRedirects'] is None: |
| 12025 |
return None |
| 12026 |
return flatten_boolean(self._values['enforcement']['truncatedRedirects']) |
| 12027 |
|
| 12028 |
@property |
| 12029 |
def unknown_method(self): |
| 12030 |
if self._values['enforcement'] is None: |
| 12031 |
return None |
| 12032 |
if self._values['enforcement']['unknownMethod'] is None: |
| 12033 |
return None |
| 12034 |
return self._values['enforcement']['unknownMethod'] |
| 12035 |
|
| 12036 |
@property |
| 12037 |
def default_connect_handling(self): |
| 12038 |
if self._values['explicit_proxy'] is None: |
| 12039 |
return None |
| 12040 |
if self._values['explicit_proxy']['defaultConnectHandling'] is None: |
| 12041 |
return None |
| 12042 |
return self._values['explicit_proxy']['defaultConnectHandling'] |
| 12043 |
|
| 12044 |
@property |
| 12045 |
def hsts_include_subdomains(self): |
| 12046 |
if self._values['hsts'] is None: |
| 12047 |
return None |
| 12048 |
if self._values['hsts']['includeSubdomains'] is None: |
| 12049 |
return None |
| 12050 |
return flatten_boolean(self._values['hsts']['includeSubdomains']) |
| 12051 |
|
| 12052 |
@property |
| 12053 |
def hsts_enabled(self): |
| 12054 |
if self._values['hsts'] is None: |
| 12055 |
return None |
| 12056 |
if self._values['hsts']['mode'] is None: |
| 12057 |
return None |
| 12058 |
return flatten_boolean(self._values['hsts']['mode']) |
| 12059 |
|
| 12060 |
@property |
| 12061 |
def hsts_max_age(self): |
| 12062 |
if self._values['hsts'] is None: |
| 12063 |
return None |
| 12064 |
if self._values['hsts']['mode'] is None: |
| 12065 |
return None |
| 12066 |
return self._values['hsts']['maximumAge'] |
| 12067 |
|
| 12068 |
@property |
| 12069 |
def insert_xforwarded_for(self): |
| 12070 |
if self._values['insert_xforwarded_for'] is None: |
| 12071 |
return None |
| 12072 |
return flatten_boolean(self._values['insert_xforwarded_for']) |
| 12073 |
|
| 12074 |
@property |
| 12075 |
def onconnect_transformations(self): |
| 12076 |
if self._values['onconnect_transformations'] is None: |
| 12077 |
return None |
| 12078 |
return flatten_boolean(self._values['onconnect_transformations']) |
| 12079 |
|
| 12080 |
@property |
| 12081 |
def sflow_poll_interval(self): |
| 12082 |
if self._values['sflow'] is None: |
| 12083 |
return None |
| 12084 |
if self._values['sflow']['pollInterval'] is None: |
| 12085 |
return None |
| 12086 |
return self._values['sflow']['pollInterval'] |
| 12087 |
|
| 12088 |
@property |
| 12089 |
def sflow_sampling_rate(self): |
| 12090 |
if self._values['sflow'] is None: |
| 12091 |
return None |
| 12092 |
if self._values['sflow']['samplingRate'] is None: |
| 12093 |
return None |
| 12094 |
return self._values['sflow']['samplingRate'] |
| 12095 |
|
| 12096 |
|
| 12097 |
class HttpProfilesFactManager(BaseManager): |
| 12098 |
def __init__(self, *args, **kwargs): |
| 12099 |
self.client = kwargs.get('client', None) |
| 12100 |
self.module = kwargs.get('module', None) |
| 12101 |
super(HttpProfilesFactManager, self).__init__(**kwargs) |
| 12102 |
|
| 12103 |
def exec_module(self): |
| 12104 |
facts = self._exec_module() |
| 12105 |
result = dict(http_profiles=facts) |
| 12106 |
return result |
| 12107 |
|
| 12108 |
def _exec_module(self): |
| 12109 |
results = [] |
| 12110 |
facts = self.read_facts() |
| 12111 |
for item in facts: |
| 12112 |
attrs = item.to_return() |
| 12113 |
results.append(attrs) |
| 12114 |
results = sorted(results, key=lambda k: k['full_path']) |
| 12115 |
return results |
| 12116 |
|
| 12117 |
def read_facts(self): |
| 12118 |
results = [] |
| 12119 |
collection = self.increment_read() |
| 12120 |
for resource in collection: |
| 12121 |
params = HttpProfilesParameters(params=resource) |
| 12122 |
results.append(params) |
| 12123 |
return results |
| 12124 |
|
| 12125 |
def increment_read(self): |
| 12126 |
n = 0 |
| 12127 |
result = [] |
| 12128 |
while True: |
| 12129 |
items = self.read_collection_from_device(skip=n) |
| 12130 |
if not items: |
| 12131 |
break |
| 12132 |
result.extend(items) |
| 12133 |
n = n + self.module.params['data_increment'] |
| 12134 |
return result |
| 12135 |
|
| 12136 |
def read_collection_from_device(self, skip=0): |
| 12137 |
uri = "https://{0}:{1}/mgmt/tm/ltm/profile/http".format( |
| 12138 |
self.client.provider['server'], |
| 12139 |
self.client.provider['server_port'], |
| 12140 |
) |
| 12141 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 12142 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 12143 |
) |
| 12144 |
resp = self.client.api.get(uri + query) |
| 12145 |
try: |
| 12146 |
response = resp.json() |
| 12147 |
except ValueError as ex: |
| 12148 |
raise F5ModuleError(str(ex)) |
| 12149 |
|
| 12150 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 12151 |
raise F5ModuleError(resp.content) |
| 12152 |
|
| 12153 |
if 'items' not in response: |
| 12154 |
return [] |
| 12155 |
result = response['items'] |
| 12156 |
return result |
| 12157 |
|
| 12158 |
|
| 12159 |
class IappServicesParameters(BaseParameters): |
| 12160 |
api_map = { |
| 12161 |
'fullPath': 'full_path', |
| 12162 |
'deviceGroup': 'device_group', |
| 12163 |
'inheritedDevicegroup': 'inherited_device_group', |
| 12164 |
'inheritedTrafficGroup': 'inherited_traffic_group', |
| 12165 |
'strictUpdates': 'strict_updates', |
| 12166 |
'templateModified': 'template_modified', |
| 12167 |
'trafficGroup': 'traffic_group', |
| 12168 |
} |
| 12169 |
|
| 12170 |
returnables = [ |
| 12171 |
'full_path', |
| 12172 |
'name', |
| 12173 |
'device_group', |
| 12174 |
'inherited_device_group', |
| 12175 |
'inherited_traffic_group', |
| 12176 |
'strict_updates', |
| 12177 |
'template_modified', |
| 12178 |
'traffic_group', |
| 12179 |
'tables', |
| 12180 |
'variables', |
| 12181 |
'metadata', |
| 12182 |
'lists', |
| 12183 |
'description', |
| 12184 |
] |
| 12185 |
|
| 12186 |
@property |
| 12187 |
def description(self): |
| 12188 |
if self._values['description'] in [None, 'none']: |
| 12189 |
return None |
| 12190 |
return self._values['description'] |
| 12191 |
|
| 12192 |
@property |
| 12193 |
def inherited_device_group(self): |
| 12194 |
return flatten_boolean(self._values['inherited_device_group']) |
| 12195 |
|
| 12196 |
@property |
| 12197 |
def inherited_traffic_group(self): |
| 12198 |
return flatten_boolean(self._values['inherited_traffic_group']) |
| 12199 |
|
| 12200 |
@property |
| 12201 |
def strict_updates(self): |
| 12202 |
return flatten_boolean(self._values['strict_updates']) |
| 12203 |
|
| 12204 |
@property |
| 12205 |
def template_modified(self): |
| 12206 |
return flatten_boolean(self._values['template_modified']) |
| 12207 |
|
| 12208 |
|
| 12209 |
class IappServicesFactManager(BaseManager): |
| 12210 |
def __init__(self, *args, **kwargs): |
| 12211 |
self.client = kwargs.get('client', None) |
| 12212 |
self.module = kwargs.get('module', None) |
| 12213 |
super(IappServicesFactManager, self).__init__(**kwargs) |
| 12214 |
|
| 12215 |
def exec_module(self): |
| 12216 |
facts = self._exec_module() |
| 12217 |
result = dict(iapp_services=facts) |
| 12218 |
return result |
| 12219 |
|
| 12220 |
def _exec_module(self): |
| 12221 |
results = [] |
| 12222 |
facts = self.read_facts() |
| 12223 |
for item in facts: |
| 12224 |
attrs = item.to_return() |
| 12225 |
results.append(attrs) |
| 12226 |
results = sorted(results, key=lambda k: k['full_path']) |
| 12227 |
return results |
| 12228 |
|
| 12229 |
def read_facts(self): |
| 12230 |
results = [] |
| 12231 |
collection = self.increment_read() |
| 12232 |
for resource in collection: |
| 12233 |
params = IappServicesParameters(params=resource) |
| 12234 |
results.append(params) |
| 12235 |
return results |
| 12236 |
|
| 12237 |
def increment_read(self): |
| 12238 |
n = 0 |
| 12239 |
result = [] |
| 12240 |
while True: |
| 12241 |
items = self.read_collection_from_device(skip=n) |
| 12242 |
if not items: |
| 12243 |
break |
| 12244 |
result.extend(items) |
| 12245 |
n = n + self.module.params['data_increment'] |
| 12246 |
return result |
| 12247 |
|
| 12248 |
def read_collection_from_device(self, skip=0): |
| 12249 |
uri = "https://{0}:{1}/mgmt/tm/sys/application/service".format( |
| 12250 |
self.client.provider['server'], |
| 12251 |
self.client.provider['server_port'], |
| 12252 |
) |
| 12253 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 12254 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 12255 |
) |
| 12256 |
resp = self.client.api.get(uri + query) |
| 12257 |
try: |
| 12258 |
response = resp.json() |
| 12259 |
except ValueError as ex: |
| 12260 |
raise F5ModuleError(str(ex)) |
| 12261 |
|
| 12262 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 12263 |
raise F5ModuleError(resp.content) |
| 12264 |
|
| 12265 |
if 'items' not in response: |
| 12266 |
return [] |
| 12267 |
result = response['items'] |
| 12268 |
return result |
| 12269 |
|
| 12270 |
|
| 12271 |
class IapplxPackagesParameters(BaseParameters): |
| 12272 |
api_map = { |
| 12273 |
'packageName': 'package_name', |
| 12274 |
} |
| 12275 |
|
| 12276 |
returnables = [ |
| 12277 |
'name', |
| 12278 |
'version', |
| 12279 |
'release', |
| 12280 |
'arch', |
| 12281 |
'package_name', |
| 12282 |
'tags', |
| 12283 |
] |
| 12284 |
|
| 12285 |
|
| 12286 |
class IapplxPackagesFactManager(BaseManager): |
| 12287 |
def __init__(self, *args, **kwargs): |
| 12288 |
self.client = kwargs.get('client', None) |
| 12289 |
self.module = kwargs.get('module', None) |
| 12290 |
super(IapplxPackagesFactManager, self).__init__(**kwargs) |
| 12291 |
|
| 12292 |
def exec_module(self): |
| 12293 |
facts = self._exec_module() |
| 12294 |
result = dict(iapplx_packages=facts) |
| 12295 |
return result |
| 12296 |
|
| 12297 |
def _exec_module(self): |
| 12298 |
results = [] |
| 12299 |
facts = self.read_facts() |
| 12300 |
for item in facts: |
| 12301 |
attrs = item.to_return() |
| 12302 |
results.append(attrs) |
| 12303 |
results = sorted(results, key=lambda k: k['name']) |
| 12304 |
return results |
| 12305 |
|
| 12306 |
def read_facts(self): |
| 12307 |
results = [] |
| 12308 |
collection = self.read_collection_from_device() |
| 12309 |
for resource in collection: |
| 12310 |
params = IapplxPackagesParameters(params=resource) |
| 12311 |
results.append(params) |
| 12312 |
return results |
| 12313 |
|
| 12314 |
def read_collection_from_device(self): |
| 12315 |
params = dict(operation='QUERY') |
| 12316 |
uri = "https://{0}:{1}/mgmt/shared/iapp/package-management-tasks".format( |
| 12317 |
self.client.provider['server'], |
| 12318 |
self.client.provider['server_port'], |
| 12319 |
) |
| 12320 |
resp = self.client.api.post(uri, json=params) |
| 12321 |
try: |
| 12322 |
response = resp.json() |
| 12323 |
except ValueError as ex: |
| 12324 |
raise F5ModuleError(str(ex)) |
| 12325 |
if resp.status not in [200, 201, 202] or 'code' in response and response['code'] not in [200, 201, 202]: |
| 12326 |
raise F5ModuleError(resp.content) |
| 12327 |
|
| 12328 |
status = self.wait_for_task(response['id']) |
| 12329 |
if status == 'FINISHED': |
| 12330 |
uri = "https://{0}:{1}/mgmt/shared/iapp/package-management-tasks/{2}".format( |
| 12331 |
self.client.provider['server'], |
| 12332 |
self.client.provider['server_port'], |
| 12333 |
response['id'] |
| 12334 |
) |
| 12335 |
resp = self.client.api.get(uri) |
| 12336 |
try: |
| 12337 |
response = resp.json() |
| 12338 |
except ValueError as ex: |
| 12339 |
raise F5ModuleError(str(ex)) |
| 12340 |
if resp.status not in [200, 201, 202] or 'code' in response and response['code'] not in [200, 201, 202]: |
| 12341 |
raise F5ModuleError(resp.content) |
| 12342 |
|
| 12343 |
else: |
| 12344 |
raise F5ModuleError( |
| 12345 |
"An error occurred querying iAppLX packages." |
| 12346 |
) |
| 12347 |
result = response['queryResponse'] |
| 12348 |
return result |
| 12349 |
|
| 12350 |
def wait_for_task(self, task_id): |
| 12351 |
uri = "https://{0}:{1}/mgmt/shared/iapp/package-management-tasks/{2}".format( |
| 12352 |
self.client.provider['server'], |
| 12353 |
self.client.provider['server_port'], |
| 12354 |
task_id |
| 12355 |
) |
| 12356 |
for x in range(0, 60): |
| 12357 |
resp = self.client.api.get(uri) |
| 12358 |
try: |
| 12359 |
response = resp.json() |
| 12360 |
except ValueError as ex: |
| 12361 |
raise F5ModuleError(str(ex)) |
| 12362 |
|
| 12363 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 12364 |
raise F5ModuleError(resp.content) |
| 12365 |
|
| 12366 |
if response['status'] in ['FINISHED', 'FAILED']: |
| 12367 |
return response['status'] |
| 12368 |
time.sleep(1) |
| 12369 |
return response['status'] |
| 12370 |
|
| 12371 |
|
| 12372 |
class IcmpMonitorsParameters(BaseParameters): |
| 12373 |
api_map = { |
| 12374 |
'fullPath': 'full_path', |
| 12375 |
'defaultsFrom': 'parent', |
| 12376 |
'adaptiveDivergenceType': 'adaptive_divergence_type', |
| 12377 |
'adaptiveDivergenceValue': 'adaptive_divergence_value', |
| 12378 |
'adaptiveLimit': 'adaptive_limit', |
| 12379 |
'adaptiveSamplingTimespan': 'adaptive_sampling_timespan', |
| 12380 |
'manualResume': 'manual_resume', |
| 12381 |
'timeUntilUp': 'time_until_up', |
| 12382 |
'upInterval': 'up_interval', |
| 12383 |
} |
| 12384 |
|
| 12385 |
returnables = [ |
| 12386 |
'full_path', |
| 12387 |
'name', |
| 12388 |
'parent', |
| 12389 |
'description', |
| 12390 |
'adaptive', |
| 12391 |
'adaptive_divergence_type', |
| 12392 |
'adaptive_divergence_value', |
| 12393 |
'adaptive_limit', |
| 12394 |
'adaptive_sampling_timespan', |
| 12395 |
'destination', |
| 12396 |
'interval', |
| 12397 |
'manual_resume', |
| 12398 |
'time_until_up', |
| 12399 |
'timeout', |
| 12400 |
'transparent', |
| 12401 |
'up_interval', |
| 12402 |
] |
| 12403 |
|
| 12404 |
@property |
| 12405 |
def description(self): |
| 12406 |
if self._values['description'] in [None, 'none']: |
| 12407 |
return None |
| 12408 |
return self._values['description'] |
| 12409 |
|
| 12410 |
@property |
| 12411 |
def transparent(self): |
| 12412 |
return flatten_boolean(self._values['transparent']) |
| 12413 |
|
| 12414 |
@property |
| 12415 |
def manual_resume(self): |
| 12416 |
return flatten_boolean(self._values['manual_resume']) |
| 12417 |
|
| 12418 |
@property |
| 12419 |
def adaptive(self): |
| 12420 |
return flatten_boolean(self._values['adaptive']) |
| 12421 |
|
| 12422 |
|
| 12423 |
class IcmpMonitorsFactManager(BaseManager): |
| 12424 |
def __init__(self, *args, **kwargs): |
| 12425 |
self.client = kwargs.get('client', None) |
| 12426 |
self.module = kwargs.get('module', None) |
| 12427 |
super(IcmpMonitorsFactManager, self).__init__(**kwargs) |
| 12428 |
|
| 12429 |
def exec_module(self): |
| 12430 |
facts = self._exec_module() |
| 12431 |
result = dict(icmp_monitors=facts) |
| 12432 |
return result |
| 12433 |
|
| 12434 |
def _exec_module(self): |
| 12435 |
results = [] |
| 12436 |
facts = self.read_facts() |
| 12437 |
for item in facts: |
| 12438 |
attrs = item.to_return() |
| 12439 |
results.append(attrs) |
| 12440 |
results = sorted(results, key=lambda k: k['full_path']) |
| 12441 |
return results |
| 12442 |
|
| 12443 |
def read_facts(self): |
| 12444 |
results = [] |
| 12445 |
collection = self.increment_read() |
| 12446 |
for resource in collection: |
| 12447 |
params = IcmpMonitorsParameters(params=resource) |
| 12448 |
results.append(params) |
| 12449 |
return results |
| 12450 |
|
| 12451 |
def increment_read(self): |
| 12452 |
n = 0 |
| 12453 |
result = [] |
| 12454 |
while True: |
| 12455 |
items = self.read_collection_from_device(skip=n) |
| 12456 |
if not items: |
| 12457 |
break |
| 12458 |
result.extend(items) |
| 12459 |
n = n + self.module.params['data_increment'] |
| 12460 |
return result |
| 12461 |
|
| 12462 |
def read_collection_from_device(self, skip=0): |
| 12463 |
uri = "https://{0}:{1}/mgmt/tm/ltm/monitor/icmp".format( |
| 12464 |
self.client.provider['server'], |
| 12465 |
self.client.provider['server_port'], |
| 12466 |
) |
| 12467 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 12468 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 12469 |
) |
| 12470 |
resp = self.client.api.get(uri + query) |
| 12471 |
try: |
| 12472 |
response = resp.json() |
| 12473 |
except ValueError as ex: |
| 12474 |
raise F5ModuleError(str(ex)) |
| 12475 |
|
| 12476 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 12477 |
raise F5ModuleError(resp.content) |
| 12478 |
|
| 12479 |
if 'items' not in response: |
| 12480 |
return [] |
| 12481 |
result = response['items'] |
| 12482 |
return result |
| 12483 |
|
| 12484 |
|
| 12485 |
class InterfacesParameters(BaseParameters): |
| 12486 |
api_map = { |
| 12487 |
'fullPath': 'full_path', |
| 12488 |
'mediaActive': 'active_media_type', |
| 12489 |
'flowControl': 'flow_control', |
| 12490 |
'bundleSpeed': 'bundle_speed', |
| 12491 |
'ifIndex': 'if_index', |
| 12492 |
'macAddress': 'mac_address', |
| 12493 |
'mediaSfp': 'media_sfp', |
| 12494 |
'lldpAdmin': 'lldp_admin', |
| 12495 |
'preferPort': 'prefer_port', |
| 12496 |
'stpAutoEdgePort': 'stp_auto_edge_port', |
| 12497 |
'stp': 'stp_enabled', |
| 12498 |
'stpLinkType': 'stp_link_type' |
| 12499 |
} |
| 12500 |
|
| 12501 |
returnables = [ |
| 12502 |
'full_path', |
| 12503 |
'name', |
| 12504 |
'active_media_type', |
| 12505 |
'flow_control', |
| 12506 |
'description', |
| 12507 |
'bundle', |
| 12508 |
'bundle_speed', |
| 12509 |
'enabled', |
| 12510 |
'if_index', |
| 12511 |
'mac_address', |
| 12512 |
'media_sfp', |
| 12513 |
'lldp_admin', |
| 12514 |
'mtu', |
| 12515 |
'prefer_port', |
| 12516 |
'sflow_poll_interval', |
| 12517 |
'sflow_poll_interval_global', |
| 12518 |
'stp_auto_edge_port', |
| 12519 |
'stp_enabled', |
| 12520 |
'stp_link_type' |
| 12521 |
] |
| 12522 |
|
| 12523 |
@property |
| 12524 |
def stp_auto_edge_port(self): |
| 12525 |
return flatten_boolean(self._values['stp_auto_edge_port']) |
| 12526 |
|
| 12527 |
@property |
| 12528 |
def stp_enabled(self): |
| 12529 |
return flatten_boolean(self._values['stp_enabled']) |
| 12530 |
|
| 12531 |
@property |
| 12532 |
def sflow_poll_interval_global(self): |
| 12533 |
if self._values['sflow'] is None: |
| 12534 |
return None |
| 12535 |
if 'pollIntervalGlobal' in self._values['sflow']: |
| 12536 |
return self._values['sflow']['pollIntervalGlobal'] |
| 12537 |
|
| 12538 |
@property |
| 12539 |
def sflow_poll_interval(self): |
| 12540 |
if self._values['sflow'] is None: |
| 12541 |
return None |
| 12542 |
if 'pollInterval' in self._values['sflow']: |
| 12543 |
return self._values['sflow']['pollInterval'] |
| 12544 |
|
| 12545 |
@property |
| 12546 |
def mac_address(self): |
| 12547 |
if self._values['mac_address'] in [None, 'none']: |
| 12548 |
return None |
| 12549 |
return self._values['mac_address'] |
| 12550 |
|
| 12551 |
@property |
| 12552 |
def enabled(self): |
| 12553 |
return flatten_boolean(self._values['enabled']) |
| 12554 |
|
| 12555 |
|
| 12556 |
class InterfacesFactManager(BaseManager): |
| 12557 |
def __init__(self, *args, **kwargs): |
| 12558 |
self.client = kwargs.get('client', None) |
| 12559 |
self.module = kwargs.get('module', None) |
| 12560 |
super(InterfacesFactManager, self).__init__(**kwargs) |
| 12561 |
|
| 12562 |
def exec_module(self): |
| 12563 |
facts = self._exec_module() |
| 12564 |
result = dict(interfaces=facts) |
| 12565 |
return result |
| 12566 |
|
| 12567 |
def _exec_module(self): |
| 12568 |
results = [] |
| 12569 |
facts = self.read_facts() |
| 12570 |
for item in facts: |
| 12571 |
attrs = item.to_return() |
| 12572 |
results.append(attrs) |
| 12573 |
results = sorted(results, key=lambda k: k['full_path']) |
| 12574 |
return results |
| 12575 |
|
| 12576 |
def read_facts(self): |
| 12577 |
results = [] |
| 12578 |
collection = self.increment_read() |
| 12579 |
for resource in collection: |
| 12580 |
params = InterfacesParameters(params=resource) |
| 12581 |
results.append(params) |
| 12582 |
return results |
| 12583 |
|
| 12584 |
def increment_read(self): |
| 12585 |
n = 0 |
| 12586 |
result = [] |
| 12587 |
while True: |
| 12588 |
items = self.read_collection_from_device(skip=n) |
| 12589 |
if not items: |
| 12590 |
break |
| 12591 |
result.extend(items) |
| 12592 |
n = n + self.module.params['data_increment'] |
| 12593 |
return result |
| 12594 |
|
| 12595 |
def read_collection_from_device(self, skip=0): |
| 12596 |
uri = "https://{0}:{1}/mgmt/tm/net/interface".format( |
| 12597 |
self.client.provider['server'], |
| 12598 |
self.client.provider['server_port'], |
| 12599 |
) |
| 12600 |
query = "?$top={0}&$skip={1}".format(self.module.params['data_increment'], skip) |
| 12601 |
resp = self.client.api.get(uri + query) |
| 12602 |
try: |
| 12603 |
response = resp.json() |
| 12604 |
except ValueError as ex: |
| 12605 |
raise F5ModuleError(str(ex)) |
| 12606 |
|
| 12607 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 12608 |
raise F5ModuleError(resp.content) |
| 12609 |
|
| 12610 |
if 'items' not in response: |
| 12611 |
return [] |
| 12612 |
result = response['items'] |
| 12613 |
return result |
| 12614 |
|
| 12615 |
|
| 12616 |
class InternalDataGroupsParameters(BaseParameters): |
| 12617 |
api_map = { |
| 12618 |
'fullPath': 'full_path' |
| 12619 |
} |
| 12620 |
|
| 12621 |
returnables = [ |
| 12622 |
'full_path', |
| 12623 |
'name', |
| 12624 |
'type', |
| 12625 |
'records' |
| 12626 |
] |
| 12627 |
|
| 12628 |
|
| 12629 |
class InternalDataGroupsFactManager(BaseManager): |
| 12630 |
def __init__(self, *args, **kwargs): |
| 12631 |
self.client = kwargs.get('client', None) |
| 12632 |
self.module = kwargs.get('module', None) |
| 12633 |
super(InternalDataGroupsFactManager, self).__init__(**kwargs) |
| 12634 |
|
| 12635 |
def exec_module(self): |
| 12636 |
facts = self._exec_module() |
| 12637 |
result = dict(internal_data_groups=facts) |
| 12638 |
return result |
| 12639 |
|
| 12640 |
def _exec_module(self): |
| 12641 |
results = [] |
| 12642 |
facts = self.read_facts() |
| 12643 |
for item in facts: |
| 12644 |
attrs = item.to_return() |
| 12645 |
results.append(attrs) |
| 12646 |
results = sorted(results, key=lambda k: k['full_path']) |
| 12647 |
return results |
| 12648 |
|
| 12649 |
def read_facts(self): |
| 12650 |
results = [] |
| 12651 |
collection = self.increment_read() |
| 12652 |
for resource in collection: |
| 12653 |
params = InternalDataGroupsParameters(params=resource) |
| 12654 |
results.append(params) |
| 12655 |
return results |
| 12656 |
|
| 12657 |
def increment_read(self): |
| 12658 |
n = 0 |
| 12659 |
result = [] |
| 12660 |
while True: |
| 12661 |
items = self.read_collection_from_device(skip=n) |
| 12662 |
if not items: |
| 12663 |
break |
| 12664 |
result.extend(items) |
| 12665 |
n = n + self.module.params['data_increment'] |
| 12666 |
return result |
| 12667 |
|
| 12668 |
def read_collection_from_device(self, skip=0): |
| 12669 |
uri = "https://{0}:{1}/mgmt/tm/ltm/data-group/internal".format( |
| 12670 |
self.client.provider['server'], |
| 12671 |
self.client.provider['server_port'], |
| 12672 |
) |
| 12673 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 12674 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 12675 |
) |
| 12676 |
resp = self.client.api.get(uri + query) |
| 12677 |
try: |
| 12678 |
response = resp.json() |
| 12679 |
except ValueError as ex: |
| 12680 |
raise F5ModuleError(str(ex)) |
| 12681 |
|
| 12682 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 12683 |
raise F5ModuleError(resp.content) |
| 12684 |
|
| 12685 |
if 'items' not in response: |
| 12686 |
return [] |
| 12687 |
result = response['items'] |
| 12688 |
return result |
| 12689 |
|
| 12690 |
|
| 12691 |
class IrulesParameters(BaseParameters): |
| 12692 |
api_map = { |
| 12693 |
'fullPath': 'full_path', |
| 12694 |
'ignoreVerification': 'ignore_verification', |
| 12695 |
} |
| 12696 |
|
| 12697 |
returnables = [ |
| 12698 |
'full_path', |
| 12699 |
'name', |
| 12700 |
'ignore_verification', |
| 12701 |
'checksum', |
| 12702 |
'definition', |
| 12703 |
'signature' |
| 12704 |
] |
| 12705 |
|
| 12706 |
@property |
| 12707 |
def checksum(self): |
| 12708 |
if self._values['apiAnonymous'] is None: |
| 12709 |
return None |
| 12710 |
pattern = r'definition-checksum\s(?P<checksum>\w+)' |
| 12711 |
matches = re.search(pattern, self._values['apiAnonymous']) |
| 12712 |
if matches: |
| 12713 |
return matches.group('checksum') |
| 12714 |
|
| 12715 |
@property |
| 12716 |
def definition(self): |
| 12717 |
if self._values['apiAnonymous'] is None: |
| 12718 |
return None |
| 12719 |
pattern = r'(definition-(checksum|signature)\s[\w=\/+]+)' |
| 12720 |
result = re.sub(pattern, '', self._values['apiAnonymous']).strip() |
| 12721 |
if result: |
| 12722 |
return result |
| 12723 |
|
| 12724 |
@property |
| 12725 |
def signature(self): |
| 12726 |
if self._values['apiAnonymous'] is None: |
| 12727 |
return None |
| 12728 |
pattern = r'definition-signature\s(?P<signature>[\w=\/+]+)' |
| 12729 |
matches = re.search(pattern, self._values['apiAnonymous']) |
| 12730 |
if matches: |
| 12731 |
return matches.group('signature') |
| 12732 |
|
| 12733 |
@property |
| 12734 |
def ignore_verification(self): |
| 12735 |
if self._values['ignore_verification'] is None: |
| 12736 |
return 'no' |
| 12737 |
return 'yes' |
| 12738 |
|
| 12739 |
|
| 12740 |
class IrulesFactManager(BaseManager): |
| 12741 |
def __init__(self, *args, **kwargs): |
| 12742 |
self.client = kwargs.get('client', None) |
| 12743 |
self.module = kwargs.get('module', None) |
| 12744 |
super(IrulesFactManager, self).__init__(**kwargs) |
| 12745 |
|
| 12746 |
def exec_module(self): |
| 12747 |
facts = self._exec_module() |
| 12748 |
result = dict(irules=facts) |
| 12749 |
return result |
| 12750 |
|
| 12751 |
def _exec_module(self): |
| 12752 |
results = [] |
| 12753 |
facts = self.read_facts() |
| 12754 |
for item in facts: |
| 12755 |
attrs = item.to_return() |
| 12756 |
results.append(attrs) |
| 12757 |
results = sorted(results, key=lambda k: k['full_path']) |
| 12758 |
return results |
| 12759 |
|
| 12760 |
def read_facts(self): |
| 12761 |
results = [] |
| 12762 |
collection = self.increment_read() |
| 12763 |
for resource in collection: |
| 12764 |
params = IrulesParameters(params=resource) |
| 12765 |
results.append(params) |
| 12766 |
return results |
| 12767 |
|
| 12768 |
def increment_read(self): |
| 12769 |
n = 0 |
| 12770 |
result = [] |
| 12771 |
while True: |
| 12772 |
items = self.read_collection_from_device(skip=n) |
| 12773 |
if not items: |
| 12774 |
break |
| 12775 |
result.extend(items) |
| 12776 |
n = n + self.module.params['data_increment'] |
| 12777 |
return result |
| 12778 |
|
| 12779 |
def read_collection_from_device(self, skip=0): |
| 12780 |
uri = "https://{0}:{1}/mgmt/tm/ltm/rule".format( |
| 12781 |
self.client.provider['server'], |
| 12782 |
self.client.provider['server_port'], |
| 12783 |
) |
| 12784 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 12785 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 12786 |
) |
| 12787 |
resp = self.client.api.get(uri + query) |
| 12788 |
try: |
| 12789 |
response = resp.json() |
| 12790 |
except ValueError as ex: |
| 12791 |
raise F5ModuleError(str(ex)) |
| 12792 |
|
| 12793 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 12794 |
raise F5ModuleError(resp.content) |
| 12795 |
|
| 12796 |
if 'items' not in response: |
| 12797 |
return [] |
| 12798 |
result = response['items'] |
| 12799 |
return result |
| 12800 |
|
| 12801 |
|
| 12802 |
class LicenseParameters(BaseParameters): |
| 12803 |
api_map = { |
| 12804 |
|
| 12805 |
} |
| 12806 |
|
| 12807 |
returnables = [ |
| 12808 |
'license_start_date', |
| 12809 |
'license_end_date', |
| 12810 |
'licensed_on_date', |
| 12811 |
'licensed_version', |
| 12812 |
'max_permitted_version', |
| 12813 |
'min_permitted_version', |
| 12814 |
'platform_id', |
| 12815 |
'registration_key', |
| 12816 |
'service_check_date', |
| 12817 |
'active_modules' |
| 12818 |
] |
| 12819 |
|
| 12820 |
@property |
| 12821 |
def license_start_date(self): |
| 12822 |
if self._values['license'] is None: |
| 12823 |
return None |
| 12824 |
if bool(self._values['license'].get('licenseStartDate')): |
| 12825 |
return self._values['license']['licenseStartDate']['description'] |
| 12826 |
|
| 12827 |
@property |
| 12828 |
def license_end_date(self): |
| 12829 |
if self._values['license'] is None: |
| 12830 |
return None |
| 12831 |
if bool(self._values['license'].get('licenseEndDate')): |
| 12832 |
return self._values['license']['licenseEndDate']['description'] |
| 12833 |
|
| 12834 |
@property |
| 12835 |
def licensed_on_date(self): |
| 12836 |
if self._values['license'] is None: |
| 12837 |
return None |
| 12838 |
if bool(self._values['license'].get('licensedOnDate')): |
| 12839 |
return self._values['license']['licensedOnDate']['description'] |
| 12840 |
|
| 12841 |
@property |
| 12842 |
def licensed_version(self): |
| 12843 |
if self._values['license'] is None: |
| 12844 |
return None |
| 12845 |
if bool(self._values['license'].get('licensedVersion')): |
| 12846 |
return self._values['license']['licensedVersion']['description'] |
| 12847 |
|
| 12848 |
@property |
| 12849 |
def max_permitted_version(self): |
| 12850 |
if self._values['license'] is None: |
| 12851 |
return None |
| 12852 |
if bool(self._values['license'].get('maxPermittedVersion')): |
| 12853 |
return self._values['license']['maxPermittedVersion']['description'] |
| 12854 |
|
| 12855 |
@property |
| 12856 |
def min_permitted_version(self): |
| 12857 |
if self._values['license'] is None: |
| 12858 |
return None |
| 12859 |
if bool(self._values['license'].get('minPermittedVersion')): |
| 12860 |
return self._values['license']['minPermittedVersion']['description'] |
| 12861 |
|
| 12862 |
@property |
| 12863 |
def platform_id(self): |
| 12864 |
if self._values['license'] is None: |
| 12865 |
return None |
| 12866 |
if bool(self._values['license'].get('platformId')): |
| 12867 |
return self._values['license']['platformId']['description'] |
| 12868 |
|
| 12869 |
@property |
| 12870 |
def registration_key(self): |
| 12871 |
if self._values['license'] is None: |
| 12872 |
return None |
| 12873 |
if bool(self._values['license'].get('registrationKey')): |
| 12874 |
return self._values['license']['registrationKey']['description'] |
| 12875 |
|
| 12876 |
@property |
| 12877 |
def service_check_date(self): |
| 12878 |
if self._values['license'] is None: |
| 12879 |
return None |
| 12880 |
if bool(self._values['license'].get('serviceCheckDate')): |
| 12881 |
return self._values['license']['serviceCheckDate']['description'] |
| 12882 |
|
| 12883 |
@property |
| 12884 |
def active_modules(self): |
| 12885 |
if self._values['license'] is None: |
| 12886 |
return None |
| 12887 |
result = list() |
| 12888 |
license = self._values['license'] |
| 12889 |
for key in license: |
| 12890 |
if key.startswith("http"): |
| 12891 |
v = license[key]['nestedStats']['entries'] |
| 12892 |
for k in v.keys(): |
| 12893 |
addons = { |
| 12894 |
k2: v2['description'] |
| 12895 |
for k2, v2 in |
| 12896 |
v[k]['nestedStats']['entries'].items() |
| 12897 |
} |
| 12898 |
result.append(addons) |
| 12899 |
return result |
| 12900 |
|
| 12901 |
|
| 12902 |
class LicenseFactManager(BaseManager): |
| 12903 |
def __init__(self, *args, **kwargs): |
| 12904 |
self.client = kwargs.get('client', None) |
| 12905 |
self.module = kwargs.get('module', None) |
| 12906 |
super(LicenseFactManager, self).__init__(**kwargs) |
| 12907 |
|
| 12908 |
def exec_module(self): |
| 12909 |
facts = self._exec_module() |
| 12910 |
result = dict(license=facts) |
| 12911 |
return result |
| 12912 |
|
| 12913 |
def _exec_module(self): |
| 12914 |
facts = self.read_facts() |
| 12915 |
result = facts.to_return() |
| 12916 |
return result |
| 12917 |
|
| 12918 |
def read_facts(self): |
| 12919 |
resource = self.read_collection_from_device() |
| 12920 |
params = LicenseParameters(params=resource) |
| 12921 |
return params |
| 12922 |
|
| 12923 |
def read_collection_from_device(self): |
| 12924 |
uri = "https://{0}:{1}/mgmt/tm/sys/license/".format( |
| 12925 |
self.client.provider['server'], |
| 12926 |
self.client.provider['server_port'], |
| 12927 |
) |
| 12928 |
resp = self.client.api.get(uri) |
| 12929 |
|
| 12930 |
try: |
| 12931 |
response = resp.json() |
| 12932 |
except ValueError as ex: |
| 12933 |
raise F5ModuleError(str(ex)) |
| 12934 |
|
| 12935 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 12936 |
raise F5ModuleError(resp.content) |
| 12937 |
|
| 12938 |
result = dict() |
| 12939 |
try: |
| 12940 |
result['license'] = response['entries']['https://localhost/mgmt/tm/sys/license/0']['nestedStats']['entries'] |
| 12941 |
return result |
| 12942 |
except KeyError: |
| 12943 |
return None |
| 12944 |
|
| 12945 |
|
| 12946 |
class LtmPoolsParameters(BaseParameters): |
| 12947 |
api_map = { |
| 12948 |
'fullPath': 'full_path', |
| 12949 |
'allowNat': 'allow_nat', |
| 12950 |
'allowSnat': 'allow_snat', |
| 12951 |
'ignorePersistedWeight': 'ignore_persisted_weight', |
| 12952 |
'ipTosToClient': 'client_ip_tos', |
| 12953 |
'ipTosToServer': 'server_ip_tos', |
| 12954 |
'linkQosToClient': 'client_link_qos', |
| 12955 |
'linkQosToServer': 'server_link_qos', |
| 12956 |
'loadBalancingMode': 'lb_method', |
| 12957 |
'minActiveMembers': 'minimum_active_members', |
| 12958 |
'minUpMembers': 'minimum_up_members', |
| 12959 |
'minUpMembersAction': 'minimum_up_members_action', |
| 12960 |
'minUpMembersChecking': 'minimum_up_members_checking', |
| 12961 |
'queueDepthLimit': 'queue_depth_limit', |
| 12962 |
'queueOnConnectionLimit': 'queue_on_connection_limit', |
| 12963 |
'queueTimeLimit': 'queue_time_limit', |
| 12964 |
'reselectTries': 'reselect_tries', |
| 12965 |
'serviceDownAction': 'service_down_action', |
| 12966 |
'slowRampTime': 'slow_ramp_time', |
| 12967 |
'monitor': 'monitors', |
| 12968 |
} |
| 12969 |
|
| 12970 |
returnables = [ |
| 12971 |
'full_path', |
| 12972 |
'name', |
| 12973 |
'allow_nat', |
| 12974 |
'allow_snat', |
| 12975 |
'description', |
| 12976 |
'ignore_persisted_weight', |
| 12977 |
'client_ip_tos', |
| 12978 |
'server_ip_tos', |
| 12979 |
'client_link_qos', |
| 12980 |
'server_link_qos', |
| 12981 |
'lb_method', |
| 12982 |
'minimum_active_members', |
| 12983 |
'minimum_up_members', |
| 12984 |
'minimum_up_members_action', |
| 12985 |
'minimum_up_members_checking', |
| 12986 |
'monitors', |
| 12987 |
'queue_depth_limit', |
| 12988 |
'queue_on_connection_limit', |
| 12989 |
'queue_time_limit', |
| 12990 |
'reselect_tries', |
| 12991 |
'service_down_action', |
| 12992 |
'slow_ramp_time', |
| 12993 |
'priority_group_activation', |
| 12994 |
'members', |
| 12995 |
'metadata', |
| 12996 |
'active_member_count', |
| 12997 |
'available_member_count', |
| 12998 |
'availability_status', |
| 12999 |
'enabled_status', |
| 13000 |
'status_reason', |
| 13001 |
'all_max_queue_entry_age_ever', |
| 13002 |
'all_avg_queue_entry_age', |
| 13003 |
'all_queue_head_entry_age', |
| 13004 |
'all_max_queue_entry_age_recently', |
| 13005 |
'all_num_connections_queued_now', |
| 13006 |
'all_num_connections_serviced', |
| 13007 |
'pool_max_queue_entry_age_ever', |
| 13008 |
'pool_avg_queue_entry_age', |
| 13009 |
'pool_queue_head_entry_age', |
| 13010 |
'pool_max_queue_entry_age_recently', |
| 13011 |
'pool_num_connections_queued_now', |
| 13012 |
'pool_num_connections_serviced', |
| 13013 |
'current_sessions', |
| 13014 |
'member_count', |
| 13015 |
'total_requests', |
| 13016 |
'server_side_bits_in', |
| 13017 |
'server_side_bits_out', |
| 13018 |
'server_side_current_connections', |
| 13019 |
'server_side_max_connections', |
| 13020 |
'server_side_pkts_in', |
| 13021 |
'server_side_pkts_out', |
| 13022 |
'server_side_total_connections', |
| 13023 |
] |
| 13024 |
|
| 13025 |
@property |
| 13026 |
def active_member_count(self): |
| 13027 |
if 'availableMemberCnt' in self._values['stats']: |
| 13028 |
return int(self._values['stats']['activeMemberCnt']) |
| 13029 |
return None |
| 13030 |
|
| 13031 |
@property |
| 13032 |
def available_member_count(self): |
| 13033 |
if 'availableMemberCnt' in self._values['stats']: |
| 13034 |
return int(self._values['stats']['availableMemberCnt']) |
| 13035 |
return None |
| 13036 |
|
| 13037 |
@property |
| 13038 |
def all_max_queue_entry_age_ever(self): |
| 13039 |
if 'connqAll' in self._values['stats']: |
| 13040 |
return self._values['stats']['connqAll']['ageEdm'] |
| 13041 |
return None |
| 13042 |
|
| 13043 |
@property |
| 13044 |
def all_avg_queue_entry_age(self): |
| 13045 |
if 'connqAll' in self._values['stats']: |
| 13046 |
return self._values['stats']['connqAll']['ageEma'] |
| 13047 |
return None |
| 13048 |
|
| 13049 |
@property |
| 13050 |
def all_queue_head_entry_age(self): |
| 13051 |
if 'connqAll' in self._values['stats']: |
| 13052 |
return self._values['stats']['connqAll']['ageHead'] |
| 13053 |
return None |
| 13054 |
|
| 13055 |
@property |
| 13056 |
def all_max_queue_entry_age_recently(self): |
| 13057 |
if 'connqAll' in self._values['stats']: |
| 13058 |
return self._values['stats']['connqAll']['ageMax'] |
| 13059 |
return None |
| 13060 |
|
| 13061 |
@property |
| 13062 |
def all_num_connections_queued_now(self): |
| 13063 |
if 'connqAll' in self._values['stats']: |
| 13064 |
return self._values['stats']['connqAll']['depth'] |
| 13065 |
return None |
| 13066 |
|
| 13067 |
@property |
| 13068 |
def all_num_connections_serviced(self): |
| 13069 |
if 'connqAll' in self._values['stats']: |
| 13070 |
return self._values['stats']['connqAll']['serviced'] |
| 13071 |
return None |
| 13072 |
|
| 13073 |
@property |
| 13074 |
def availability_status(self): |
| 13075 |
if 'status' in self._values['stats']: |
| 13076 |
return self._values['stats']['status']['availabilityState'] |
| 13077 |
return None |
| 13078 |
|
| 13079 |
@property |
| 13080 |
def enabled_status(self): |
| 13081 |
if 'status' in self._values['stats']: |
| 13082 |
return self._values['stats']['status']['enabledState'] |
| 13083 |
return None |
| 13084 |
|
| 13085 |
@property |
| 13086 |
def status_reason(self): |
| 13087 |
if 'status' not in self._values['stats']: |
| 13088 |
return None |
| 13089 |
return self._values['stats']['status']['statusReason'] |
| 13090 |
|
| 13091 |
@property |
| 13092 |
def pool_max_queue_entry_age_ever(self): |
| 13093 |
if 'connq' in self._values['stats']: |
| 13094 |
return self._values['stats']['connq']['ageEdm'] |
| 13095 |
return None |
| 13096 |
|
| 13097 |
@property |
| 13098 |
def pool_avg_queue_entry_age(self): |
| 13099 |
if 'connq' in self._values['stats']: |
| 13100 |
return self._values['stats']['connq']['ageEma'] |
| 13101 |
return None |
| 13102 |
|
| 13103 |
@property |
| 13104 |
def pool_queue_head_entry_age(self): |
| 13105 |
if 'connq' in self._values['stats']: |
| 13106 |
return self._values['stats']['connq']['ageHead'] |
| 13107 |
return None |
| 13108 |
|
| 13109 |
@property |
| 13110 |
def pool_max_queue_entry_age_recently(self): |
| 13111 |
if 'connq' in self._values['stats']: |
| 13112 |
return self._values['stats']['connq']['ageMax'] |
| 13113 |
return None |
| 13114 |
|
| 13115 |
@property |
| 13116 |
def pool_num_connections_queued_now(self): |
| 13117 |
if 'connq' in self._values['stats']: |
| 13118 |
return self._values['stats']['connq']['depth'] |
| 13119 |
return None |
| 13120 |
|
| 13121 |
@property |
| 13122 |
def pool_num_connections_serviced(self): |
| 13123 |
if 'connq' in self._values['stats']: |
| 13124 |
return self._values['stats']['connq']['serviced'] |
| 13125 |
return None |
| 13126 |
|
| 13127 |
@property |
| 13128 |
def current_sessions(self): |
| 13129 |
if 'curSessions' in self._values['stats']: |
| 13130 |
return self._values['stats']['curSessions'] |
| 13131 |
return None |
| 13132 |
|
| 13133 |
@property |
| 13134 |
def member_count(self): |
| 13135 |
if 'memberCnt' in self._values['stats']: |
| 13136 |
return self._values['stats']['memberCnt'] |
| 13137 |
return None |
| 13138 |
|
| 13139 |
@property |
| 13140 |
def total_requests(self): |
| 13141 |
if 'totRequests' in self._values['stats']: |
| 13142 |
return self._values['stats']['totRequests'] |
| 13143 |
return None |
| 13144 |
|
| 13145 |
@property |
| 13146 |
def server_side_bits_in(self): |
| 13147 |
if 'serverside' in self._values['stats']: |
| 13148 |
return self._values['stats']['serverside']['bitsIn'] |
| 13149 |
return None |
| 13150 |
|
| 13151 |
@property |
| 13152 |
def server_side_bits_out(self): |
| 13153 |
if 'serverside' in self._values['stats']: |
| 13154 |
return self._values['stats']['serverside']['bitsOut'] |
| 13155 |
return None |
| 13156 |
|
| 13157 |
@property |
| 13158 |
def server_side_current_connections(self): |
| 13159 |
if 'serverside' in self._values['stats']: |
| 13160 |
return self._values['stats']['serverside']['curConns'] |
| 13161 |
return None |
| 13162 |
|
| 13163 |
@property |
| 13164 |
def server_side_max_connections(self): |
| 13165 |
if 'serverside' in self._values['stats']: |
| 13166 |
return self._values['stats']['serverside']['maxConns'] |
| 13167 |
return None |
| 13168 |
|
| 13169 |
@property |
| 13170 |
def server_side_pkts_in(self): |
| 13171 |
if 'serverside' in self._values['stats']: |
| 13172 |
return self._values['stats']['serverside']['pktsIn'] |
| 13173 |
return None |
| 13174 |
|
| 13175 |
@property |
| 13176 |
def server_side_pkts_out(self): |
| 13177 |
if 'serverside' in self._values['stats']: |
| 13178 |
return self._values['stats']['serverside']['pktsOut'] |
| 13179 |
return None |
| 13180 |
|
| 13181 |
@property |
| 13182 |
def server_side_total_connections(self): |
| 13183 |
if 'serverside' in self._values['stats']: |
| 13184 |
return self._values['stats']['serverside']['totConns'] |
| 13185 |
return None |
| 13186 |
|
| 13187 |
@property |
| 13188 |
def ignore_persisted_weight(self): |
| 13189 |
return flatten_boolean(self._values['ignore_persisted_weight']) |
| 13190 |
|
| 13191 |
@property |
| 13192 |
def minimum_up_members_checking(self): |
| 13193 |
return flatten_boolean(self._values['minimum_up_members_checking']) |
| 13194 |
|
| 13195 |
@property |
| 13196 |
def queue_on_connection_limit(self): |
| 13197 |
return flatten_boolean(self._values['queue_on_connection_limit']) |
| 13198 |
|
| 13199 |
@property |
| 13200 |
def priority_group_activation(self): |
| 13201 |
"""Returns the TMUI value for "Priority Group Activation" |
| 13202 |
|
| 13203 |
This value is identified as ``minActiveMembers`` in the REST API, so this |
| 13204 |
is just a convenience key for users of Ansible (where the ``bigip_virtual_server`` |
| 13205 |
parameter is called ``priority_group_activation``. |
| 13206 |
|
| 13207 |
Returns: |
| 13208 |
int: Priority number assigned to the pool members. |
| 13209 |
""" |
| 13210 |
return self._values['minimum_active_members'] |
| 13211 |
|
| 13212 |
@property |
| 13213 |
def metadata(self): |
| 13214 |
"""Returns metadata associated with a pool |
| 13215 |
|
| 13216 |
An arbitrary amount of metadata may be associated with a pool. You typically |
| 13217 |
see this used in situations where the user wants to annotate a resource, maybe |
| 13218 |
in cases where an automation system is responsible for creating the resource. |
| 13219 |
|
| 13220 |
The metadata in the API is always stored as a list of dictionaries. We change |
| 13221 |
this to be a simple dictionary before it is returned to the user. |
| 13222 |
|
| 13223 |
Returns: |
| 13224 |
dict: A dictionary of key/value pairs where the key is the metadata name |
| 13225 |
and the value is the metadata value. |
| 13226 |
""" |
| 13227 |
if self._values['metadata'] is None: |
| 13228 |
return None |
| 13229 |
result = dict([(k['name'], k['value']) for k in self._values['metadata']]) |
| 13230 |
return result |
| 13231 |
|
| 13232 |
@property |
| 13233 |
def members(self): |
| 13234 |
if not self._values['members']: |
| 13235 |
return None |
| 13236 |
result = [] |
| 13237 |
for member in self._values['members']: |
| 13238 |
member['connection_limit'] = member.pop('connectionLimit', None) |
| 13239 |
member['dynamic_ratio'] = member.pop('dynamicRatio', None) |
| 13240 |
member['full_path'] = member.pop('fullPath', None) |
| 13241 |
member['inherit_profile'] = member.pop('inheritProfile', None) |
| 13242 |
member['priority_group'] = member.pop('priorityGroup', None) |
| 13243 |
member['rate_limit'] = member.pop('rateLimit', None) |
| 13244 |
|
| 13245 |
if 'fqdn' in member and 'autopopulate' in member['fqdn']: |
| 13246 |
if member['fqdn']['autopopulate'] == 'enabled': |
| 13247 |
member['fqdn_autopopulate'] = 'yes' |
| 13248 |
elif member['fqdn']['autopopulate'] == 'disabled': |
| 13249 |
member['fqdn_autopopulate'] = 'no' |
| 13250 |
del member['fqdn'] |
| 13251 |
|
| 13252 |
for key in ['ephemeral', 'inherit_profile', 'logging', 'rate_limit']: |
| 13253 |
tmp = flatten_boolean(member[key]) |
| 13254 |
member[key] = tmp |
| 13255 |
|
| 13256 |
if 'profiles' in member: |
| 13257 |
|
| 13258 |
member['encapsulation_profile'] = [x['name'] for x in member['profiles']][0] |
| 13259 |
del member['profiles'] |
| 13260 |
|
| 13261 |
if 'monitor' in member: |
| 13262 |
monitors = member.pop('monitor') |
| 13263 |
if monitors is not None: |
| 13264 |
try: |
| 13265 |
member['monitors'] = re.findall(r'/[\w-]+/[^\s}]+', monitors) |
| 13266 |
except Exception: |
| 13267 |
member['monitors'] = [monitors.strip()] |
| 13268 |
|
| 13269 |
session = member.pop('session', None) |
| 13270 |
state = member.pop('state', None) |
| 13271 |
|
| 13272 |
member['real_session'] = session |
| 13273 |
member['real_state'] = state |
| 13274 |
|
| 13275 |
if state in ['user-up', 'unchecked', 'fqdn-up-no-addr', 'fqdn-up'] and session in ['user-enabled']: |
| 13276 |
member['state'] = 'present' |
| 13277 |
elif state in ['user-down'] and session in ['user-disabled']: |
| 13278 |
member['state'] = 'forced_offline' |
| 13279 |
elif state in ['up', 'checking'] and session in ['monitor-enabled']: |
| 13280 |
member['state'] = 'present' |
| 13281 |
elif state in ['down'] and session in ['monitor-enabled']: |
| 13282 |
member['state'] = 'offline' |
| 13283 |
else: |
| 13284 |
member['state'] = 'disabled' |
| 13285 |
self._remove_internal_keywords(member) |
| 13286 |
member = dict([(k, v) for k, v in iteritems(member) if v is not None]) |
| 13287 |
result.append(member) |
| 13288 |
return result |
| 13289 |
|
| 13290 |
@property |
| 13291 |
def monitors(self): |
| 13292 |
if self._values['monitors'] is None: |
| 13293 |
return None |
| 13294 |
try: |
| 13295 |
result = re.findall(r'/[\w-]+/[^\s}]+', self._values['monitors']) |
| 13296 |
return result |
| 13297 |
except Exception: |
| 13298 |
return [self._values['monitors'].strip()] |
| 13299 |
|
| 13300 |
|
| 13301 |
class LtmPoolsFactManager(BaseManager): |
| 13302 |
def __init__(self, *args, **kwargs): |
| 13303 |
self.client = kwargs.get('client', None) |
| 13304 |
self.module = kwargs.get('module', None) |
| 13305 |
super(LtmPoolsFactManager, self).__init__(**kwargs) |
| 13306 |
|
| 13307 |
def exec_module(self): |
| 13308 |
facts = self._exec_module() |
| 13309 |
result = dict(ltm_pools=facts) |
| 13310 |
return result |
| 13311 |
|
| 13312 |
def _exec_module(self): |
| 13313 |
results = [] |
| 13314 |
results = self.read_facts() |
| 13315 |
|
| 13316 |
|
| 13317 |
|
| 13318 |
results = sorted(results, key=lambda k: k['full_path']) |
| 13319 |
return results |
| 13320 |
|
| 13321 |
|
| 13322 |
|
| 13323 |
|
| 13324 |
|
| 13325 |
|
| 13326 |
|
| 13327 |
|
| 13328 |
|
| 13329 |
|
| 13330 |
|
| 13331 |
|
| 13332 |
|
| 13333 |
|
| 13334 |
|
| 13335 |
|
| 13336 |
|
| 13337 |
|
| 13338 |
|
| 13339 |
|
| 13340 |
|
| 13341 |
|
| 13342 |
|
| 13343 |
|
| 13344 |
|
| 13345 |
|
| 13346 |
|
| 13347 |
|
| 13348 |
|
| 13349 |
|
| 13350 |
|
| 13351 |
|
| 13352 |
|
| 13353 |
|
| 13354 |
|
| 13355 |
|
| 13356 |
|
| 13357 |
|
| 13358 |
def read_facts(self): |
| 13359 |
results = [] |
| 13360 |
collection = self.increment_read() |
| 13361 |
|
| 13362 |
def collect_stats(resource): |
| 13363 |
|
| 13364 |
if 'membersReference' in resource and 'items' in resource['membersReference']: |
| 13365 |
resource['members'] = resource['membersReference']['items'] |
| 13366 |
else: |
| 13367 |
resource['members'] = [] |
| 13368 |
|
| 13369 |
resource['stats'] = self.read_stats_from_device(resource['fullPath']) |
| 13370 |
params = LtmPoolsParameters(params=resource) |
| 13371 |
return params.to_return() |
| 13372 |
|
| 13373 |
with ThreadPoolExecutor() as executor: |
| 13374 |
future_to_resource = {executor.submit(collect_stats, resource): resource for resource in collection} |
| 13375 |
for future in as_completed(future_to_resource): |
| 13376 |
try: |
| 13377 |
result = future.result() |
| 13378 |
results.append(result) |
| 13379 |
except Exception as exc: |
| 13380 |
pass |
| 13381 |
return results |
| 13382 |
|
| 13383 |
def increment_read(self): |
| 13384 |
n = 0 |
| 13385 |
result = [] |
| 13386 |
while True: |
| 13387 |
items = self.read_collection_from_device(skip=n) |
| 13388 |
if not items: |
| 13389 |
break |
| 13390 |
result.extend(items) |
| 13391 |
n = n + self.module.params['data_increment'] |
| 13392 |
return result |
| 13393 |
|
| 13394 |
def read_collection_from_device(self, skip=0): |
| 13395 |
"""Read the LTM pools collection from the device |
| 13396 |
|
| 13397 |
Note that sub-collection expansion does not work with LTM pools. Therefore, |
| 13398 |
one needs to query the ``members`` endpoint separately and add that to the |
| 13399 |
list of ``attrs`` before the full set of attributes is sent to the ``Parameters`` |
| 13400 |
class. |
| 13401 |
|
| 13402 |
Returns: |
| 13403 |
list: List of ``Pool`` objects |
| 13404 |
""" |
| 13405 |
uri = "https://{0}:{1}/mgmt/tm/ltm/pool".format( |
| 13406 |
self.client.provider['server'], |
| 13407 |
self.client.provider['server_port'], |
| 13408 |
) |
| 13409 |
if self.module.params['partition'] == 'all': |
| 13410 |
query = "?$top={0}&$skip={1}&expandSubcollections=true".format( |
| 13411 |
self.module.params['data_increment'], skip) |
| 13412 |
else: |
| 13413 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}&expandSubcollections=true".format( |
| 13414 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 13415 |
) |
| 13416 |
resp = self.client.api.get(uri + query) |
| 13417 |
try: |
| 13418 |
response = resp.json() |
| 13419 |
except ValueError as ex: |
| 13420 |
raise F5ModuleError(str(ex)) |
| 13421 |
|
| 13422 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 13423 |
raise F5ModuleError(resp.content) |
| 13424 |
|
| 13425 |
if 'items' not in response: |
| 13426 |
return [] |
| 13427 |
result = response['items'] |
| 13428 |
return result |
| 13429 |
|
| 13430 |
def read_member_from_device(self, full_path): |
| 13431 |
uri = "https://{0}:{1}/mgmt/tm/ltm/pool/{2}/members".format( |
| 13432 |
self.client.provider['server'], |
| 13433 |
self.client.provider['server_port'], |
| 13434 |
transform_name(name=full_path) |
| 13435 |
) |
| 13436 |
resp = self.client.api.get(uri) |
| 13437 |
try: |
| 13438 |
response = resp.json() |
| 13439 |
except ValueError as ex: |
| 13440 |
raise F5ModuleError(str(ex)) |
| 13441 |
|
| 13442 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 13443 |
raise F5ModuleError(resp.content) |
| 13444 |
|
| 13445 |
if 'items' not in response: |
| 13446 |
return [] |
| 13447 |
result = response['items'] |
| 13448 |
return result |
| 13449 |
|
| 13450 |
def read_stats_from_device(self, full_path): |
| 13451 |
uri = "https://{0}:{1}/mgmt/tm/ltm/pool/{2}/stats".format( |
| 13452 |
self.client.provider['server'], |
| 13453 |
self.client.provider['server_port'], |
| 13454 |
transform_name(name=full_path) |
| 13455 |
) |
| 13456 |
try: |
| 13457 |
resp = self.client.api.get(uri) |
| 13458 |
response = resp.json() |
| 13459 |
except ValueError as ex: |
| 13460 |
raise F5ModuleError(str(ex)) |
| 13461 |
except Exception as ex: |
| 13462 |
raise F5ModuleError(str(ex)) |
| 13463 |
|
| 13464 |
if resp.status not in [200, 201] or ('code' in response and response['code'] not in [200, 201]): |
| 13465 |
raise F5ModuleError(resp.content) |
| 13466 |
|
| 13467 |
result = parseStats(response) |
| 13468 |
try: |
| 13469 |
return result['stats'] |
| 13470 |
except KeyError: |
| 13471 |
return {} |
| 13472 |
|
| 13473 |
|
| 13474 |
class SnatPoolsParameters(BaseParameters): |
| 13475 |
api_map = { |
| 13476 |
'fullPath': 'full_path', |
| 13477 |
'membersReference': 'members_reference', |
| 13478 |
} |
| 13479 |
|
| 13480 |
returnables = [ |
| 13481 |
'full_path', |
| 13482 |
'name', |
| 13483 |
'description', |
| 13484 |
'members', |
| 13485 |
'members_reference', |
| 13486 |
] |
| 13487 |
|
| 13488 |
@property |
| 13489 |
def description(self): |
| 13490 |
if self._values['description'] in [None, 'none']: |
| 13491 |
return None |
| 13492 |
return self._values['description'] |
| 13493 |
|
| 13494 |
@property |
| 13495 |
def members(self): |
| 13496 |
if self._values['members'] is None: |
| 13497 |
return [] |
| 13498 |
return self._values['members'] |
| 13499 |
|
| 13500 |
@property |
| 13501 |
def members_reference(self): |
| 13502 |
if self._values['members_reference'] is None: |
| 13503 |
return [] |
| 13504 |
result = [] |
| 13505 |
for item in self._values['members_reference']: |
| 13506 |
if 'link' in item: |
| 13507 |
result.append(item['link']) |
| 13508 |
return result |
| 13509 |
|
| 13510 |
|
| 13511 |
class SnatPoolsFactManager(BaseManager): |
| 13512 |
def __init__(self, *args, **kwargs): |
| 13513 |
self.client = kwargs.get('client', None) |
| 13514 |
self.module = kwargs.get('module', None) |
| 13515 |
super(SnatPoolsFactManager, self).__init__(**kwargs) |
| 13516 |
|
| 13517 |
def exec_module(self): |
| 13518 |
facts = self._exec_module() |
| 13519 |
result = dict(snat_pools=facts) |
| 13520 |
return result |
| 13521 |
|
| 13522 |
def _exec_module(self): |
| 13523 |
results = [] |
| 13524 |
facts = self.read_facts() |
| 13525 |
for item in facts: |
| 13526 |
attrs = item.to_return() |
| 13527 |
results.append(attrs) |
| 13528 |
results = sorted(results, key=lambda k: k['full_path']) |
| 13529 |
return results |
| 13530 |
|
| 13531 |
def read_facts(self): |
| 13532 |
results = [] |
| 13533 |
collection = self.increment_read() |
| 13534 |
for resource in collection: |
| 13535 |
params = SnatPoolsParameters(params=resource) |
| 13536 |
results.append(params) |
| 13537 |
return results |
| 13538 |
|
| 13539 |
def increment_read(self): |
| 13540 |
n = 0 |
| 13541 |
result = [] |
| 13542 |
while True: |
| 13543 |
items = self.read_collection_from_device(skip=n) |
| 13544 |
if not items: |
| 13545 |
break |
| 13546 |
result.extend(items) |
| 13547 |
n = n + self.module.params['data_increment'] |
| 13548 |
return result |
| 13549 |
|
| 13550 |
def read_collection_from_device(self, skip=0): |
| 13551 |
uri = "https://{0}:{1}/mgmt/tm/ltm/snatpool".format( |
| 13552 |
self.client.provider['server'], |
| 13553 |
self.client.provider['server_port'], |
| 13554 |
) |
| 13555 |
query = "?expandSubcollections=true&$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 13556 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 13557 |
) |
| 13558 |
resp = self.client.api.get(uri + query) |
| 13559 |
try: |
| 13560 |
response = resp.json() |
| 13561 |
except ValueError as ex: |
| 13562 |
raise F5ModuleError(str(ex)) |
| 13563 |
|
| 13564 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 13565 |
raise F5ModuleError(resp.content) |
| 13566 |
|
| 13567 |
if 'items' not in response: |
| 13568 |
return [] |
| 13569 |
result = response['items'] |
| 13570 |
return result |
| 13571 |
|
| 13572 |
|
| 13573 |
class LtmPolicyParameters(BaseParameters): |
| 13574 |
api_map = { |
| 13575 |
'fullPath': 'full_path', |
| 13576 |
'rulesReference': 'rules', |
| 13577 |
} |
| 13578 |
|
| 13579 |
returnables = [ |
| 13580 |
'full_path', |
| 13581 |
'name', |
| 13582 |
'status', |
| 13583 |
'description', |
| 13584 |
'strategy', |
| 13585 |
'rules', |
| 13586 |
'requires', |
| 13587 |
'controls', |
| 13588 |
] |
| 13589 |
|
| 13590 |
def _handle_conditions(self, conditions): |
| 13591 |
result = [] |
| 13592 |
if conditions is None or 'items' not in conditions: |
| 13593 |
return result |
| 13594 |
for condition in conditions['items']: |
| 13595 |
tmp = dict() |
| 13596 |
tmp['case_insensitive'] = flatten_boolean(condition.pop('caseInsensitive', None)) |
| 13597 |
tmp['case_sensitive'] = flatten_boolean(condition.pop('caseSensitive', None)) |
| 13598 |
tmp['contains_string'] = flatten_boolean(condition.pop('contains', None)) |
| 13599 |
tmp['external'] = flatten_boolean(condition.pop('external', None)) |
| 13600 |
tmp['http_basic_auth'] = flatten_boolean(condition.pop('httpBasicAuth', None)) |
| 13601 |
tmp['http_host'] = flatten_boolean(condition.pop('httpHost', None)) |
| 13602 |
tmp['datagroup'] = condition.pop('datagroup', None) |
| 13603 |
tmp['tcp'] = flatten_boolean(condition.pop('tcp', None)) |
| 13604 |
tmp['remote'] = flatten_boolean(condition.pop('remote', None)) |
| 13605 |
tmp['matches'] = flatten_boolean(condition.pop('matches', None)) |
| 13606 |
tmp['address'] = flatten_boolean(condition.pop('address', None)) |
| 13607 |
tmp['present'] = flatten_boolean(condition.pop('present', None)) |
| 13608 |
tmp['proxy_connect'] = flatten_boolean(condition.pop('proxyConnect', None)) |
| 13609 |
tmp['proxy_request'] = flatten_boolean(condition.pop('proxyRequest', None)) |
| 13610 |
tmp['host'] = flatten_boolean(condition.pop('host', None)) |
| 13611 |
tmp['http_uri'] = flatten_boolean(condition.pop('httpUri', None)) |
| 13612 |
tmp['request'] = flatten_boolean(condition.pop('request', None)) |
| 13613 |
tmp['username'] = flatten_boolean(condition.pop('username', None)) |
| 13614 |
tmp['external'] = flatten_boolean(condition.pop('external', None)) |
| 13615 |
tmp['values'] = condition.pop('values', None) |
| 13616 |
tmp['all'] = flatten_boolean(condition.pop('all', None)) |
| 13617 |
result.append(self._filter_params(tmp)) |
| 13618 |
return result |
| 13619 |
|
| 13620 |
def _handle_actions(self, actions): |
| 13621 |
result = [] |
| 13622 |
if actions is None or 'items' not in actions: |
| 13623 |
return result |
| 13624 |
exclude_keys = ["poolReference", "name"] |
| 13625 |
for action in actions['items']: |
| 13626 |
tmp = dict((k, v) for k, v in iteritems(action) if v != 0 and k not in exclude_keys) |
| 13627 |
self._remove_internal_keywords(tmp) |
| 13628 |
result.append(self._filter_params(tmp)) |
| 13629 |
return result |
| 13630 |
|
| 13631 |
@property |
| 13632 |
def rules(self): |
| 13633 |
result = [] |
| 13634 |
if self._values['rules'] is None or 'items' not in self._values['rules']: |
| 13635 |
return result |
| 13636 |
for item in self._values['rules']['items']: |
| 13637 |
self._remove_internal_keywords(item) |
| 13638 |
item['conditions'] = self._handle_conditions(item.pop('conditionsReference', None)) |
| 13639 |
item['actions'] = self._handle_actions(item.pop('actionsReference', None)) |
| 13640 |
result.append(item) |
| 13641 |
return result |
| 13642 |
|
| 13643 |
|
| 13644 |
class LtmPolicyFactManager(BaseManager): |
| 13645 |
def __init__(self, *args, **kwargs): |
| 13646 |
self.client = kwargs.get('client', None) |
| 13647 |
self.module = kwargs.get('module', None) |
| 13648 |
super(LtmPolicyFactManager, self).__init__(**kwargs) |
| 13649 |
|
| 13650 |
def exec_module(self): |
| 13651 |
facts = self._exec_module() |
| 13652 |
result = dict(ltm_policies=facts) |
| 13653 |
return result |
| 13654 |
|
| 13655 |
def _exec_module(self): |
| 13656 |
results = [] |
| 13657 |
facts = self.read_facts() |
| 13658 |
for item in facts: |
| 13659 |
attrs = item.to_return() |
| 13660 |
results.append(attrs) |
| 13661 |
results = sorted(results, key=lambda k: k['full_path']) |
| 13662 |
return results |
| 13663 |
|
| 13664 |
def read_facts(self): |
| 13665 |
results = [] |
| 13666 |
collection = self.increment_read() |
| 13667 |
for resource in collection: |
| 13668 |
params = LtmPolicyParameters(params=resource) |
| 13669 |
results.append(params) |
| 13670 |
return results |
| 13671 |
|
| 13672 |
def increment_read(self): |
| 13673 |
n = 0 |
| 13674 |
result = [] |
| 13675 |
while True: |
| 13676 |
items = self.read_collection_from_device(skip=n) |
| 13677 |
if not items: |
| 13678 |
break |
| 13679 |
result.extend(items) |
| 13680 |
n = n + self.module.params['data_increment'] |
| 13681 |
return result |
| 13682 |
|
| 13683 |
def read_collection_from_device(self, skip=0): |
| 13684 |
uri = "https://{0}:{1}/mgmt/tm/ltm/policy/".format( |
| 13685 |
self.client.provider['server'], |
| 13686 |
self.client.provider['server_port'], |
| 13687 |
) |
| 13688 |
query = "?expandSubcollections=true&$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 13689 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 13690 |
) |
| 13691 |
resp = self.client.api.get(uri + query) |
| 13692 |
try: |
| 13693 |
response = resp.json() |
| 13694 |
except ValueError as ex: |
| 13695 |
raise F5ModuleError(str(ex)) |
| 13696 |
|
| 13697 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 13698 |
raise F5ModuleError(resp.content) |
| 13699 |
|
| 13700 |
if 'items' not in response: |
| 13701 |
return [] |
| 13702 |
result = response['items'] |
| 13703 |
return result |
| 13704 |
|
| 13705 |
|
| 13706 |
class NodesParameters(BaseParameters): |
| 13707 |
api_map = { |
| 13708 |
'fullPath': 'full_path', |
| 13709 |
'connectionLimit': 'connection_limit', |
| 13710 |
'dynamicRatio': 'dynamic_ratio', |
| 13711 |
'rateLimit': 'rate_limit', |
| 13712 |
'monitor': 'monitors' |
| 13713 |
} |
| 13714 |
|
| 13715 |
returnables = [ |
| 13716 |
'full_path', |
| 13717 |
'name', |
| 13718 |
'ratio', |
| 13719 |
'description', |
| 13720 |
'connection_limit', |
| 13721 |
'address', |
| 13722 |
'dynamic_ratio', |
| 13723 |
'rate_limit', |
| 13724 |
'monitor_status', |
| 13725 |
'session_status', |
| 13726 |
'availability_status', |
| 13727 |
'enabled_status', |
| 13728 |
'status_reason', |
| 13729 |
'monitor_rule', |
| 13730 |
'monitors', |
| 13731 |
'monitor_type', |
| 13732 |
'fqdn_name', |
| 13733 |
'fqdn_auto_populate', |
| 13734 |
'fqdn_address_type', |
| 13735 |
'fqdn_up_interval', |
| 13736 |
'fqdn_down_interval', |
| 13737 |
] |
| 13738 |
|
| 13739 |
@property |
| 13740 |
def fqdn_name(self): |
| 13741 |
if self._values['fqdn'] is None: |
| 13742 |
return None |
| 13743 |
return self._values['fqdn'].get('tmName', None) |
| 13744 |
|
| 13745 |
@property |
| 13746 |
def fqdn_auto_populate(self): |
| 13747 |
if self._values['fqdn'] is None: |
| 13748 |
return None |
| 13749 |
return flatten_boolean(self._values['fqdn'].get('autopopulate', None)) |
| 13750 |
|
| 13751 |
@property |
| 13752 |
def fqdn_address_type(self): |
| 13753 |
if self._values['fqdn'] is None: |
| 13754 |
return None |
| 13755 |
return self._values['fqdn'].get('addressFamily', None) |
| 13756 |
|
| 13757 |
@property |
| 13758 |
def fqdn_up_interval(self): |
| 13759 |
if self._values['fqdn'] is None: |
| 13760 |
return None |
| 13761 |
result = self._values['fqdn'].get('interval', None) |
| 13762 |
if result: |
| 13763 |
try: |
| 13764 |
return int(result) |
| 13765 |
except ValueError: |
| 13766 |
return result |
| 13767 |
|
| 13768 |
@property |
| 13769 |
def fqdn_down_interval(self): |
| 13770 |
if self._values['fqdn'] is None: |
| 13771 |
return None |
| 13772 |
result = self._values['fqdn'].get('downInterval', None) |
| 13773 |
if result: |
| 13774 |
try: |
| 13775 |
return int(result) |
| 13776 |
except ValueError: |
| 13777 |
return result |
| 13778 |
|
| 13779 |
@property |
| 13780 |
def monitors(self): |
| 13781 |
if self._values['monitors'] is None: |
| 13782 |
return [] |
| 13783 |
try: |
| 13784 |
result = re.findall(r'/\w+/[^\s}]+', self._values['monitors']) |
| 13785 |
return result |
| 13786 |
except Exception: |
| 13787 |
return [self._values['monitors']] |
| 13788 |
|
| 13789 |
@property |
| 13790 |
def monitor_type(self): |
| 13791 |
if self._values['monitors'] is None: |
| 13792 |
return None |
| 13793 |
pattern = r'min\s+\d+\s+of' |
| 13794 |
matches = re.search(pattern, self._values['monitors']) |
| 13795 |
if matches: |
| 13796 |
return 'm_of_n' |
| 13797 |
else: |
| 13798 |
return 'and_list' |
| 13799 |
|
| 13800 |
@property |
| 13801 |
def rate_limit(self): |
| 13802 |
if self._values['rate_limit'] is None: |
| 13803 |
return None |
| 13804 |
elif self._values['rate_limit'] == 'disabled': |
| 13805 |
return 0 |
| 13806 |
else: |
| 13807 |
return int(self._values['rate_limit']) |
| 13808 |
|
| 13809 |
@property |
| 13810 |
def monitor_status(self): |
| 13811 |
return self._values['stats']['monitorStatus'] |
| 13812 |
|
| 13813 |
@property |
| 13814 |
def session_status(self): |
| 13815 |
return self._values['stats']['sessionStatus'] |
| 13816 |
|
| 13817 |
@property |
| 13818 |
def availability_status(self): |
| 13819 |
return self._values['stats']['status']['availabilityState'] |
| 13820 |
|
| 13821 |
@property |
| 13822 |
def enabled_status(self): |
| 13823 |
return self._values['stats']['status']['enabledState'] |
| 13824 |
|
| 13825 |
@property |
| 13826 |
def status_reason(self): |
| 13827 |
return self._values['stats']['status']['statusReason'] |
| 13828 |
|
| 13829 |
@property |
| 13830 |
def monitor_rule(self): |
| 13831 |
return self._values['stats']['monitorRule'] |
| 13832 |
|
| 13833 |
|
| 13834 |
class NodesFactManager(BaseManager): |
| 13835 |
def __init__(self, *args, **kwargs): |
| 13836 |
self.client = kwargs.get('client', None) |
| 13837 |
self.module = kwargs.get('module', None) |
| 13838 |
super(NodesFactManager, self).__init__(**kwargs) |
| 13839 |
|
| 13840 |
def exec_module(self): |
| 13841 |
facts = self._exec_module() |
| 13842 |
result = dict(nodes=facts) |
| 13843 |
return result |
| 13844 |
|
| 13845 |
def _exec_module(self): |
| 13846 |
results = [] |
| 13847 |
facts = self.read_facts() |
| 13848 |
for item in facts: |
| 13849 |
attrs = item.to_return() |
| 13850 |
results.append(attrs) |
| 13851 |
results = sorted(results, key=lambda k: k['full_path']) |
| 13852 |
return results |
| 13853 |
|
| 13854 |
def read_facts(self): |
| 13855 |
results = [] |
| 13856 |
collection = self.increment_read() |
| 13857 |
for resource in collection: |
| 13858 |
attrs = resource |
| 13859 |
attrs['stats'] = self.read_stats_from_device(attrs['fullPath']) |
| 13860 |
params = NodesParameters(params=attrs) |
| 13861 |
results.append(params) |
| 13862 |
return results |
| 13863 |
|
| 13864 |
def increment_read(self): |
| 13865 |
n = 0 |
| 13866 |
result = [] |
| 13867 |
while True: |
| 13868 |
items = self.read_collection_from_device(skip=n) |
| 13869 |
if not items: |
| 13870 |
break |
| 13871 |
result.extend(items) |
| 13872 |
n = n + self.module.params['data_increment'] |
| 13873 |
return result |
| 13874 |
|
| 13875 |
def read_collection_from_device(self, skip=0): |
| 13876 |
uri = "https://{0}:{1}/mgmt/tm/ltm/node".format( |
| 13877 |
self.client.provider['server'], |
| 13878 |
self.client.provider['server_port'], |
| 13879 |
) |
| 13880 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 13881 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 13882 |
) |
| 13883 |
resp = self.client.api.get(uri + query) |
| 13884 |
try: |
| 13885 |
response = resp.json() |
| 13886 |
except ValueError as ex: |
| 13887 |
raise F5ModuleError(str(ex)) |
| 13888 |
|
| 13889 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 13890 |
raise F5ModuleError(resp.content) |
| 13891 |
|
| 13892 |
if 'items' not in response: |
| 13893 |
return [] |
| 13894 |
result = response['items'] |
| 13895 |
return result |
| 13896 |
|
| 13897 |
def read_stats_from_device(self, full_path): |
| 13898 |
uri = "https://{0}:{1}/mgmt/tm/ltm/node/{2}/stats".format( |
| 13899 |
self.client.provider['server'], |
| 13900 |
self.client.provider['server_port'], |
| 13901 |
transform_name(name=full_path) |
| 13902 |
) |
| 13903 |
resp = self.client.api.get(uri) |
| 13904 |
try: |
| 13905 |
response = resp.json() |
| 13906 |
except ValueError as ex: |
| 13907 |
raise F5ModuleError(str(ex)) |
| 13908 |
|
| 13909 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 13910 |
raise F5ModuleError(resp.content) |
| 13911 |
|
| 13912 |
result = parseStats(response) |
| 13913 |
try: |
| 13914 |
return result['stats'] |
| 13915 |
except KeyError: |
| 13916 |
return {} |
| 13917 |
|
| 13918 |
|
| 13919 |
class OneConnectProfilesParameters(BaseParameters): |
| 13920 |
api_map = { |
| 13921 |
'fullPath': 'full_path', |
| 13922 |
'clientTimeout': 'client_timeout', |
| 13923 |
'defaultsFrom': 'parent', |
| 13924 |
'idleTimeoutOverride': 'idle_timeout_override', |
| 13925 |
'limitType': 'limit_type', |
| 13926 |
'maxAge': 'max_age', |
| 13927 |
'maxReuse': 'max_reuse', |
| 13928 |
'maxSize': 'max_size', |
| 13929 |
'sharePools': 'share_pools', |
| 13930 |
'sourceMask': 'source_mask', |
| 13931 |
} |
| 13932 |
|
| 13933 |
returnables = [ |
| 13934 |
'full_path', |
| 13935 |
'name', |
| 13936 |
'parent', |
| 13937 |
'description', |
| 13938 |
'idle_timeout_override', |
| 13939 |
'limit_type', |
| 13940 |
'max_age', |
| 13941 |
'max_reuse', |
| 13942 |
'max_size', |
| 13943 |
'share_pools', |
| 13944 |
'source_mask', |
| 13945 |
] |
| 13946 |
|
| 13947 |
@property |
| 13948 |
def description(self): |
| 13949 |
if self._values['description'] in [None, 'none']: |
| 13950 |
return None |
| 13951 |
return self._values['description'] |
| 13952 |
|
| 13953 |
@property |
| 13954 |
def idle_timeout_override(self): |
| 13955 |
if self._values['idle_timeout_override'] is None: |
| 13956 |
return None |
| 13957 |
elif self._values['idle_timeout_override'] == 'disabled': |
| 13958 |
return 0 |
| 13959 |
elif self._values['idle_timeout_override'] == 'indefinite': |
| 13960 |
return 4294967295 |
| 13961 |
return int(self._values['idle_timeout_override']) |
| 13962 |
|
| 13963 |
@property |
| 13964 |
def share_pools(self): |
| 13965 |
return flatten_boolean(self._values['share_pools']) |
| 13966 |
|
| 13967 |
|
| 13968 |
class OneConnectProfilesFactManager(BaseManager): |
| 13969 |
def __init__(self, *args, **kwargs): |
| 13970 |
self.client = kwargs.get('client', None) |
| 13971 |
self.module = kwargs.get('module', None) |
| 13972 |
super(OneConnectProfilesFactManager, self).__init__(**kwargs) |
| 13973 |
|
| 13974 |
def exec_module(self): |
| 13975 |
facts = self._exec_module() |
| 13976 |
result = dict(oneconnect_profiles=facts) |
| 13977 |
return result |
| 13978 |
|
| 13979 |
def _exec_module(self): |
| 13980 |
results = [] |
| 13981 |
facts = self.read_facts() |
| 13982 |
for item in facts: |
| 13983 |
attrs = item.to_return() |
| 13984 |
results.append(attrs) |
| 13985 |
results = sorted(results, key=lambda k: k['full_path']) |
| 13986 |
return results |
| 13987 |
|
| 13988 |
def read_facts(self): |
| 13989 |
results = [] |
| 13990 |
collection = self.increment_read() |
| 13991 |
for resource in collection: |
| 13992 |
params = OneConnectProfilesParameters(params=resource) |
| 13993 |
results.append(params) |
| 13994 |
return results |
| 13995 |
|
| 13996 |
def increment_read(self): |
| 13997 |
n = 0 |
| 13998 |
result = [] |
| 13999 |
while True: |
| 14000 |
items = self.read_collection_from_device(skip=n) |
| 14001 |
if not items: |
| 14002 |
break |
| 14003 |
result.extend(items) |
| 14004 |
n = n + self.module.params['data_increment'] |
| 14005 |
return result |
| 14006 |
|
| 14007 |
def read_collection_from_device(self, skip=0): |
| 14008 |
uri = "https://{0}:{1}/mgmt/tm/ltm/profile/one-connect".format( |
| 14009 |
self.client.provider['server'], |
| 14010 |
self.client.provider['server_port'], |
| 14011 |
) |
| 14012 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 14013 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 14014 |
) |
| 14015 |
resp = self.client.api.get(uri + query) |
| 14016 |
try: |
| 14017 |
response = resp.json() |
| 14018 |
except ValueError as ex: |
| 14019 |
raise F5ModuleError(str(ex)) |
| 14020 |
|
| 14021 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 14022 |
raise F5ModuleError(resp.content) |
| 14023 |
|
| 14024 |
if 'items' not in response: |
| 14025 |
return [] |
| 14026 |
result = response['items'] |
| 14027 |
return result |
| 14028 |
|
| 14029 |
|
| 14030 |
class PartitionParameters(BaseParameters): |
| 14031 |
api_map = { |
| 14032 |
'defaultRouteDomain': 'default_route_domain', |
| 14033 |
'fullPath': 'full_path', |
| 14034 |
} |
| 14035 |
|
| 14036 |
returnables = [ |
| 14037 |
'name', |
| 14038 |
'full_path', |
| 14039 |
'description', |
| 14040 |
'default_route_domain' |
| 14041 |
] |
| 14042 |
|
| 14043 |
|
| 14044 |
class PartitionFactManager(BaseManager): |
| 14045 |
def __init__(self, *args, **kwargs): |
| 14046 |
self.client = kwargs.get('client', None) |
| 14047 |
self.module = kwargs.get('module', None) |
| 14048 |
super(PartitionFactManager, self).__init__(**kwargs) |
| 14049 |
|
| 14050 |
def exec_module(self): |
| 14051 |
facts = self._exec_module() |
| 14052 |
result = dict(partitions=facts) |
| 14053 |
return result |
| 14054 |
|
| 14055 |
def _exec_module(self): |
| 14056 |
results = [] |
| 14057 |
facts = self.read_facts() |
| 14058 |
for item in facts: |
| 14059 |
attrs = item.to_return() |
| 14060 |
results.append(attrs) |
| 14061 |
results = sorted(results, key=lambda k: k['full_path']) |
| 14062 |
return results |
| 14063 |
|
| 14064 |
def read_facts(self): |
| 14065 |
results = [] |
| 14066 |
collection = self.read_collection_from_device() |
| 14067 |
for resource in collection: |
| 14068 |
params = PartitionParameters(params=resource) |
| 14069 |
results.append(params) |
| 14070 |
return results |
| 14071 |
|
| 14072 |
def read_collection_from_device(self): |
| 14073 |
uri = "https://{0}:{1}/mgmt/tm/auth/partition".format( |
| 14074 |
self.client.provider['server'], |
| 14075 |
self.client.provider['server_port'], |
| 14076 |
) |
| 14077 |
resp = self.client.api.get(uri) |
| 14078 |
try: |
| 14079 |
response = resp.json() |
| 14080 |
except ValueError as ex: |
| 14081 |
raise F5ModuleError(str(ex)) |
| 14082 |
|
| 14083 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 14084 |
raise F5ModuleError(resp.content) |
| 14085 |
|
| 14086 |
if 'items' not in response: |
| 14087 |
return [] |
| 14088 |
result = response['items'] |
| 14089 |
return result |
| 14090 |
|
| 14091 |
|
| 14092 |
class ProvisionInfoParameters(BaseParameters): |
| 14093 |
api_map = { |
| 14094 |
'fullPath': 'full_path', |
| 14095 |
'cpuRatio': 'cpu_ratio', |
| 14096 |
'diskRatio': 'disk_ratio', |
| 14097 |
'memoryRatio': 'memory_ratio', |
| 14098 |
} |
| 14099 |
|
| 14100 |
returnables = [ |
| 14101 |
'full_path', |
| 14102 |
'name', |
| 14103 |
'cpu_ratio', |
| 14104 |
'disk_ratio', |
| 14105 |
'memory_ratio', |
| 14106 |
'level' |
| 14107 |
] |
| 14108 |
|
| 14109 |
|
| 14110 |
class ProvisionInfoFactManager(BaseManager): |
| 14111 |
def __init__(self, *args, **kwargs): |
| 14112 |
self.client = kwargs.get('client', None) |
| 14113 |
self.module = kwargs.get('module', None) |
| 14114 |
super(ProvisionInfoFactManager, self).__init__(**kwargs) |
| 14115 |
|
| 14116 |
def exec_module(self): |
| 14117 |
facts = self._exec_module() |
| 14118 |
result = dict(provision_info=facts) |
| 14119 |
return result |
| 14120 |
|
| 14121 |
def _exec_module(self): |
| 14122 |
results = [] |
| 14123 |
facts = self.read_facts() |
| 14124 |
for item in facts: |
| 14125 |
attrs = item.to_return() |
| 14126 |
results.append(attrs) |
| 14127 |
results = sorted(results, key=lambda k: k['full_path']) |
| 14128 |
return results |
| 14129 |
|
| 14130 |
def read_facts(self): |
| 14131 |
results = [] |
| 14132 |
collection = self.read_collection_from_device() |
| 14133 |
for resource in collection: |
| 14134 |
params = ProvisionInfoParameters(params=resource) |
| 14135 |
results.append(params) |
| 14136 |
return results |
| 14137 |
|
| 14138 |
def read_collection_from_device(self): |
| 14139 |
uri = "https://{0}:{1}/mgmt/tm/sys/provision".format( |
| 14140 |
self.client.provider['server'], |
| 14141 |
self.client.provider['server_port'], |
| 14142 |
) |
| 14143 |
resp = self.client.api.get(uri) |
| 14144 |
try: |
| 14145 |
response = resp.json() |
| 14146 |
except ValueError as ex: |
| 14147 |
raise F5ModuleError(str(ex)) |
| 14148 |
|
| 14149 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 14150 |
raise F5ModuleError(resp.content) |
| 14151 |
|
| 14152 |
if 'items' not in response: |
| 14153 |
return [] |
| 14154 |
result = response['items'] |
| 14155 |
return result |
| 14156 |
|
| 14157 |
|
| 14158 |
class RouteDomainParameters(BaseParameters): |
| 14159 |
api_map = { |
| 14160 |
'fullPath': 'full_path', |
| 14161 |
'bwcPolicy': 'bwc_policy', |
| 14162 |
'connectionLimit': 'connection_limit', |
| 14163 |
'flowEvictionPolicy': 'flow_eviction_policy', |
| 14164 |
'servicePolicy': 'service_policy', |
| 14165 |
'routingProtocol': 'routing_protocol', |
| 14166 |
} |
| 14167 |
|
| 14168 |
returnables = [ |
| 14169 |
'name', |
| 14170 |
'id', |
| 14171 |
'full_path', |
| 14172 |
'parent', |
| 14173 |
'bwc_policy', |
| 14174 |
'connection_limit', |
| 14175 |
'description', |
| 14176 |
'flow_eviction_policy', |
| 14177 |
'service_policy', |
| 14178 |
'strict', |
| 14179 |
'routing_protocol', |
| 14180 |
'vlans', |
| 14181 |
] |
| 14182 |
|
| 14183 |
@property |
| 14184 |
def strict(self): |
| 14185 |
return flatten_boolean(self._values['strict']) |
| 14186 |
|
| 14187 |
@property |
| 14188 |
def connection_limit(self): |
| 14189 |
if self._values['connection_limit'] is None: |
| 14190 |
return None |
| 14191 |
return int(self._values['connection_limit']) |
| 14192 |
|
| 14193 |
@property |
| 14194 |
def id(self): |
| 14195 |
if self._values['id'] is None: |
| 14196 |
return None |
| 14197 |
return int(self._values['id']) |
| 14198 |
|
| 14199 |
|
| 14200 |
class RouteDomainFactManager(BaseManager): |
| 14201 |
def __init__(self, *args, **kwargs): |
| 14202 |
self.client = kwargs.get('client', None) |
| 14203 |
self.module = kwargs.get('module', None) |
| 14204 |
super(RouteDomainFactManager, self).__init__(**kwargs) |
| 14205 |
|
| 14206 |
def exec_module(self): |
| 14207 |
facts = self._exec_module() |
| 14208 |
result = dict(route_domains=facts) |
| 14209 |
return result |
| 14210 |
|
| 14211 |
def _exec_module(self): |
| 14212 |
results = [] |
| 14213 |
facts = self.read_facts() |
| 14214 |
for item in facts: |
| 14215 |
attrs = item.to_return() |
| 14216 |
results.append(attrs) |
| 14217 |
results = sorted(results, key=lambda k: k['full_path']) |
| 14218 |
return results |
| 14219 |
|
| 14220 |
def read_facts(self): |
| 14221 |
results = [] |
| 14222 |
collection = self.increment_read() |
| 14223 |
for resource in collection: |
| 14224 |
params = RouteDomainParameters(params=resource) |
| 14225 |
results.append(params) |
| 14226 |
return results |
| 14227 |
|
| 14228 |
def increment_read(self): |
| 14229 |
n = 0 |
| 14230 |
result = [] |
| 14231 |
while True: |
| 14232 |
items = self.read_collection_from_device(skip=n) |
| 14233 |
if not items: |
| 14234 |
break |
| 14235 |
result.extend(items) |
| 14236 |
n = n + self.module.params['data_increment'] |
| 14237 |
return result |
| 14238 |
|
| 14239 |
def read_collection_from_device(self, skip=0): |
| 14240 |
uri = "https://{0}:{1}/mgmt/tm/net/route-domain".format( |
| 14241 |
self.client.provider['server'], |
| 14242 |
self.client.provider['server_port'], |
| 14243 |
) |
| 14244 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 14245 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 14246 |
) |
| 14247 |
resp = self.client.api.get(uri + query) |
| 14248 |
try: |
| 14249 |
response = resp.json() |
| 14250 |
except ValueError as ex: |
| 14251 |
raise F5ModuleError(str(ex)) |
| 14252 |
|
| 14253 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 14254 |
raise F5ModuleError(resp.content) |
| 14255 |
|
| 14256 |
if 'items' not in response: |
| 14257 |
return [] |
| 14258 |
result = response['items'] |
| 14259 |
return result |
| 14260 |
|
| 14261 |
|
| 14262 |
class SelfIpsParameters(BaseParameters): |
| 14263 |
api_map = { |
| 14264 |
'fullPath': 'full_path', |
| 14265 |
'trafficGroup': 'traffic_group', |
| 14266 |
'servicePolicy': 'service_policy', |
| 14267 |
'allowService': 'allow_access_list', |
| 14268 |
'inheritedTrafficGroup': 'traffic_group_inherited' |
| 14269 |
} |
| 14270 |
|
| 14271 |
returnables = [ |
| 14272 |
'full_path', |
| 14273 |
'name', |
| 14274 |
'address', |
| 14275 |
'description', |
| 14276 |
'netmask', |
| 14277 |
'netmask_cidr', |
| 14278 |
'floating', |
| 14279 |
'traffic_group', |
| 14280 |
'service_policy', |
| 14281 |
'vlan', |
| 14282 |
'allow_access_list', |
| 14283 |
'traffic_group_inherited' |
| 14284 |
] |
| 14285 |
|
| 14286 |
@property |
| 14287 |
def address(self): |
| 14288 |
parts = self._values['address'].split('/') |
| 14289 |
return parts[0] |
| 14290 |
|
| 14291 |
@property |
| 14292 |
def netmask(self): |
| 14293 |
result = None |
| 14294 |
parts = self._values['address'].split('/') |
| 14295 |
if is_valid_ip(parts[0]): |
| 14296 |
ip = ip_interface(u'{0}'.format(self._values['address'])) |
| 14297 |
result = ip.netmask |
| 14298 |
return str(result) |
| 14299 |
|
| 14300 |
@property |
| 14301 |
def netmask_cidr(self): |
| 14302 |
parts = self._values['address'].split('/') |
| 14303 |
return int(parts[1]) |
| 14304 |
|
| 14305 |
@property |
| 14306 |
def traffic_group_inherited(self): |
| 14307 |
if self._values['traffic_group_inherited'] is None: |
| 14308 |
return None |
| 14309 |
elif self._values['traffic_group_inherited'] in [False, 'false']: |
| 14310 |
|
| 14311 |
|
| 14312 |
return 'no' |
| 14313 |
else: |
| 14314 |
return 'yes' |
| 14315 |
|
| 14316 |
@property |
| 14317 |
def floating(self): |
| 14318 |
if self._values['floating'] is None: |
| 14319 |
return None |
| 14320 |
elif self._values['floating'] == 'disabled': |
| 14321 |
return 'no' |
| 14322 |
else: |
| 14323 |
return 'yes' |
| 14324 |
|
| 14325 |
|
| 14326 |
class SelfIpsFactManager(BaseManager): |
| 14327 |
def __init__(self, *args, **kwargs): |
| 14328 |
self.client = kwargs.get('client', None) |
| 14329 |
self.module = kwargs.get('module', None) |
| 14330 |
super(SelfIpsFactManager, self).__init__(**kwargs) |
| 14331 |
|
| 14332 |
def exec_module(self): |
| 14333 |
facts = self._exec_module() |
| 14334 |
result = dict(self_ips=facts) |
| 14335 |
return result |
| 14336 |
|
| 14337 |
def _exec_module(self): |
| 14338 |
results = [] |
| 14339 |
facts = self.read_facts() |
| 14340 |
for item in facts: |
| 14341 |
attrs = item.to_return() |
| 14342 |
results.append(attrs) |
| 14343 |
results = sorted(results, key=lambda k: k['full_path']) |
| 14344 |
return results |
| 14345 |
|
| 14346 |
def read_facts(self): |
| 14347 |
results = [] |
| 14348 |
collection = self.increment_read() |
| 14349 |
for resource in collection: |
| 14350 |
params = SelfIpsParameters(params=resource) |
| 14351 |
results.append(params) |
| 14352 |
return results |
| 14353 |
|
| 14354 |
def increment_read(self): |
| 14355 |
n = 0 |
| 14356 |
result = [] |
| 14357 |
while True: |
| 14358 |
items = self.read_collection_from_device(skip=n) |
| 14359 |
if not items: |
| 14360 |
break |
| 14361 |
result.extend(items) |
| 14362 |
n = n + self.module.params['data_increment'] |
| 14363 |
return result |
| 14364 |
|
| 14365 |
def read_collection_from_device(self, skip=0): |
| 14366 |
uri = "https://{0}:{1}/mgmt/tm/net/self".format( |
| 14367 |
self.client.provider['server'], |
| 14368 |
self.client.provider['server_port'], |
| 14369 |
) |
| 14370 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 14371 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 14372 |
) |
| 14373 |
resp = self.client.api.get(uri + query) |
| 14374 |
try: |
| 14375 |
response = resp.json() |
| 14376 |
except ValueError as ex: |
| 14377 |
raise F5ModuleError(str(ex)) |
| 14378 |
|
| 14379 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 14380 |
raise F5ModuleError(resp.content) |
| 14381 |
|
| 14382 |
if 'items' not in response: |
| 14383 |
return [] |
| 14384 |
result = response['items'] |
| 14385 |
return result |
| 14386 |
|
| 14387 |
|
| 14388 |
class ServerSslProfilesParameters(BaseParameters): |
| 14389 |
api_map = { |
| 14390 |
'fullPath': 'full_path', |
| 14391 |
'alertTimeout': 'alert_timeout', |
| 14392 |
'allowExpiredCrl': 'allow_expired_crl', |
| 14393 |
'authenticate': 'authentication_frequency', |
| 14394 |
'authenticateDepth': 'authenticate_depth', |
| 14395 |
'authenticateName': 'authenticate_name', |
| 14396 |
'bypassOnClientCertFail': 'bypass_on_client_cert_fail', |
| 14397 |
'bypassOnHandshakeAlert': 'bypass_on_handshake_alert', |
| 14398 |
'c3dCaCert': 'c3d_ca_cert', |
| 14399 |
'c3dCaKey': 'c3d_ca_key', |
| 14400 |
'c3dCertExtensionIncludes': 'c3d_cert_extension_includes', |
| 14401 |
'c3dCertLifespan': 'c3d_cert_lifespan', |
| 14402 |
'caFile': 'ca_file', |
| 14403 |
'cacheSize': 'cache_size', |
| 14404 |
'cacheTimeout': 'cache_timeout', |
| 14405 |
'cipherGroup': 'cipher_group', |
| 14406 |
'crlFile': 'crl_file', |
| 14407 |
'defaultsFrom': 'parent', |
| 14408 |
'expireCertResponseControl': 'expire_cert_response_control', |
| 14409 |
'genericAlert': 'generic_alert', |
| 14410 |
'handshakeTimeout': 'handshake_timeout', |
| 14411 |
'maxActiveHandshakes': 'max_active_handshakes', |
| 14412 |
'modSslMethods': 'mod_ssl_methods', |
| 14413 |
'tmOptions': 'options', |
| 14414 |
'peerCertMode': 'peer_cert_mode', |
| 14415 |
'proxySsl': 'proxy_ssl', |
| 14416 |
'proxySslPassthrough': 'proxy_ssl_passthrough', |
| 14417 |
'renegotiatePeriod': 'renegotiate_period', |
| 14418 |
'renegotiateSize': 'renegotiate_size', |
| 14419 |
'retainCertificate': 'retain_certificate', |
| 14420 |
'secureRenegotiation': 'secure_renegotiation', |
| 14421 |
'serverName': 'server_name', |
| 14422 |
'sessionMirroring': 'session_mirroring', |
| 14423 |
'sessionTicket': 'session_ticket', |
| 14424 |
'sniDefault': 'sni_default', |
| 14425 |
'sniRequire': 'sni_require', |
| 14426 |
'sslC3d': 'ssl_c3d', |
| 14427 |
'sslForwardProxy': 'ssl_forward_proxy_enabled', |
| 14428 |
'sslForwardProxyBypass': 'ssl_forward_proxy_bypass', |
| 14429 |
'sslSignHash': 'ssl_sign_hash', |
| 14430 |
'strictResume': 'strict_resume', |
| 14431 |
'uncleanShutdown': 'unclean_shutdown', |
| 14432 |
'untrustedCertResponseControl': 'untrusted_cert_response_control' |
| 14433 |
} |
| 14434 |
|
| 14435 |
returnables = [ |
| 14436 |
'full_path', |
| 14437 |
'name', |
| 14438 |
'parent', |
| 14439 |
'description', |
| 14440 |
'unclean_shutdown', |
| 14441 |
'strict_resume', |
| 14442 |
'ssl_forward_proxy_enabled', |
| 14443 |
'ssl_forward_proxy_bypass', |
| 14444 |
'sni_default', |
| 14445 |
'sni_require', |
| 14446 |
'ssl_c3d', |
| 14447 |
'session_mirroring', |
| 14448 |
'session_ticket', |
| 14449 |
'mod_ssl_methods', |
| 14450 |
'allow_expired_crl', |
| 14451 |
'retain_certificate', |
| 14452 |
'mode', |
| 14453 |
'bypass_on_client_cert_fail', |
| 14454 |
'bypass_on_handshake_alert', |
| 14455 |
'generic_alert', |
| 14456 |
'renegotiation', |
| 14457 |
'proxy_ssl', |
| 14458 |
'proxy_ssl_passthrough', |
| 14459 |
'peer_cert_mode', |
| 14460 |
'untrusted_cert_response_control', |
| 14461 |
'ssl_sign_hash', |
| 14462 |
'server_name', |
| 14463 |
'secure_renegotiation', |
| 14464 |
'renegotiate_size', |
| 14465 |
'renegotiate_period', |
| 14466 |
'options', |
| 14467 |
'ocsp', |
| 14468 |
'max_active_handshakes', |
| 14469 |
'key', |
| 14470 |
'handshake_timeout', |
| 14471 |
'expire_cert_response_control', |
| 14472 |
'cert', |
| 14473 |
'chain', |
| 14474 |
'authentication_frequency', |
| 14475 |
'ciphers', |
| 14476 |
'cipher_group', |
| 14477 |
'crl_file', |
| 14478 |
'cache_timeout', |
| 14479 |
'cache_size', |
| 14480 |
'ca_file', |
| 14481 |
'c3d_cert_lifespan', |
| 14482 |
'alert_timeout', |
| 14483 |
'c3d_ca_key', |
| 14484 |
'authenticate_depth', |
| 14485 |
'authenticate_name', |
| 14486 |
'c3d_ca_cert', |
| 14487 |
'c3d_cert_extension_includes', |
| 14488 |
] |
| 14489 |
|
| 14490 |
@property |
| 14491 |
def c3d_cert_extension_includes(self): |
| 14492 |
if self._values['c3d_cert_extension_includes'] is None: |
| 14493 |
return None |
| 14494 |
if len(self._values['c3d_cert_extension_includes']) == 0: |
| 14495 |
return None |
| 14496 |
self._values['c3d_cert_extension_includes'].sort() |
| 14497 |
return self._values['c3d_cert_extension_includes'] |
| 14498 |
|
| 14499 |
@property |
| 14500 |
def options(self): |
| 14501 |
if self._values['options'] is None: |
| 14502 |
return None |
| 14503 |
if len(self._values['options']) == 0: |
| 14504 |
return None |
| 14505 |
self._values['options'].sort() |
| 14506 |
return self._values['options'] |
| 14507 |
|
| 14508 |
@property |
| 14509 |
def c3d_ca_cert(self): |
| 14510 |
if self._values['c3d_ca_cert'] in [None, 'none']: |
| 14511 |
return None |
| 14512 |
return self._values['c3d_ca_cert'] |
| 14513 |
|
| 14514 |
@property |
| 14515 |
def ocsp(self): |
| 14516 |
if self._values['ocsp'] in [None, 'none']: |
| 14517 |
return None |
| 14518 |
return self._values['ocsp'] |
| 14519 |
|
| 14520 |
@property |
| 14521 |
def server_name(self): |
| 14522 |
if self._values['server_name'] in [None, 'none']: |
| 14523 |
return None |
| 14524 |
return self._values['server_name'] |
| 14525 |
|
| 14526 |
@property |
| 14527 |
def cipher_group(self): |
| 14528 |
if self._values['cipher_group'] is None: |
| 14529 |
return None |
| 14530 |
if self._values['cipher_group'] == 'none': |
| 14531 |
return 'none' |
| 14532 |
return self._values['cipher_group'] |
| 14533 |
|
| 14534 |
@property |
| 14535 |
def authenticate_name(self): |
| 14536 |
if self._values['authenticate_name'] in [None, 'none']: |
| 14537 |
return None |
| 14538 |
return self._values['authenticate_name'] |
| 14539 |
|
| 14540 |
@property |
| 14541 |
def c3d_ca_key(self): |
| 14542 |
if self._values['c3d_ca_key'] in [None, 'none']: |
| 14543 |
return None |
| 14544 |
return self._values['c3d_ca_key'] |
| 14545 |
|
| 14546 |
@property |
| 14547 |
def ca_file(self): |
| 14548 |
if self._values['ca_file'] in [None, 'none']: |
| 14549 |
return None |
| 14550 |
return self._values['ca_file'] |
| 14551 |
|
| 14552 |
@property |
| 14553 |
def crl_file(self): |
| 14554 |
if self._values['crl_file'] in [None, 'none']: |
| 14555 |
return None |
| 14556 |
return self._values['crl_file'] |
| 14557 |
|
| 14558 |
@property |
| 14559 |
def authentication_frequency(self): |
| 14560 |
if self._values['authentication_frequency'] in [None, 'none']: |
| 14561 |
return None |
| 14562 |
return self._values['authentication_frequency'] |
| 14563 |
|
| 14564 |
@property |
| 14565 |
def description(self): |
| 14566 |
if self._values['description'] in [None, 'none']: |
| 14567 |
return None |
| 14568 |
return self._values['description'] |
| 14569 |
|
| 14570 |
@property |
| 14571 |
def proxy_ssl_passthrough(self): |
| 14572 |
return flatten_boolean(self._values['proxy_ssl_passthrough']) |
| 14573 |
|
| 14574 |
@property |
| 14575 |
def proxy_ssl(self): |
| 14576 |
return flatten_boolean(self._values['proxy_ssl']) |
| 14577 |
|
| 14578 |
@property |
| 14579 |
def generic_alert(self): |
| 14580 |
return flatten_boolean(self._values['generic_alert']) |
| 14581 |
|
| 14582 |
@property |
| 14583 |
def renegotiation(self): |
| 14584 |
return flatten_boolean(self._values['renegotiation']) |
| 14585 |
|
| 14586 |
@property |
| 14587 |
def bypass_on_handshake_alert(self): |
| 14588 |
return flatten_boolean(self._values['bypass_on_handshake_alert']) |
| 14589 |
|
| 14590 |
@property |
| 14591 |
def bypass_on_client_cert_fail(self): |
| 14592 |
return flatten_boolean(self._values['bypass_on_client_cert_fail']) |
| 14593 |
|
| 14594 |
@property |
| 14595 |
def mode(self): |
| 14596 |
return flatten_boolean(self._values['mode']) |
| 14597 |
|
| 14598 |
@property |
| 14599 |
def retain_certificate(self): |
| 14600 |
return flatten_boolean(self._values['retain_certificate']) |
| 14601 |
|
| 14602 |
@property |
| 14603 |
def allow_expired_crl(self): |
| 14604 |
return flatten_boolean(self._values['allow_expired_crl']) |
| 14605 |
|
| 14606 |
@property |
| 14607 |
def mod_ssl_methods(self): |
| 14608 |
return flatten_boolean(self._values['mod_ssl_methods']) |
| 14609 |
|
| 14610 |
@property |
| 14611 |
def session_ticket(self): |
| 14612 |
return flatten_boolean(self._values['session_ticket']) |
| 14613 |
|
| 14614 |
@property |
| 14615 |
def session_mirroring(self): |
| 14616 |
return flatten_boolean(self._values['session_mirroring']) |
| 14617 |
|
| 14618 |
@property |
| 14619 |
def unclean_shutdown(self): |
| 14620 |
return flatten_boolean(self._values['unclean_shutdown']) |
| 14621 |
|
| 14622 |
@property |
| 14623 |
def strict_resume(self): |
| 14624 |
return flatten_boolean(self._values['strict_resume']) |
| 14625 |
|
| 14626 |
@property |
| 14627 |
def ssl_forward_proxy_enabled(self): |
| 14628 |
return flatten_boolean(self._values['ssl_forward_proxy_enabled']) |
| 14629 |
|
| 14630 |
@property |
| 14631 |
def ssl_forward_proxy_bypass(self): |
| 14632 |
return flatten_boolean(self._values['ssl_forward_proxy_bypass']) |
| 14633 |
|
| 14634 |
@property |
| 14635 |
def sni_default(self): |
| 14636 |
return flatten_boolean(self._values['sni_default']) |
| 14637 |
|
| 14638 |
@property |
| 14639 |
def sni_require(self): |
| 14640 |
return flatten_boolean(self._values['sni_require']) |
| 14641 |
|
| 14642 |
@property |
| 14643 |
def ssl_c3d(self): |
| 14644 |
return flatten_boolean(self._values['ssl_c3d']) |
| 14645 |
|
| 14646 |
|
| 14647 |
class ServerSslProfilesFactManager(BaseManager): |
| 14648 |
def __init__(self, *args, **kwargs): |
| 14649 |
self.client = kwargs.get('client', None) |
| 14650 |
self.module = kwargs.get('module', None) |
| 14651 |
super(ServerSslProfilesFactManager, self).__init__(**kwargs) |
| 14652 |
|
| 14653 |
def exec_module(self): |
| 14654 |
facts = self._exec_module() |
| 14655 |
result = dict(server_ssl_profiles=facts) |
| 14656 |
return result |
| 14657 |
|
| 14658 |
def _exec_module(self): |
| 14659 |
results = [] |
| 14660 |
facts = self.read_facts() |
| 14661 |
for item in facts: |
| 14662 |
attrs = item.to_return() |
| 14663 |
results.append(attrs) |
| 14664 |
results = sorted(results, key=lambda k: k['full_path']) |
| 14665 |
return results |
| 14666 |
|
| 14667 |
def read_facts(self): |
| 14668 |
results = [] |
| 14669 |
collection = self.increment_read() |
| 14670 |
for resource in collection: |
| 14671 |
params = ServerSslProfilesParameters(params=resource) |
| 14672 |
results.append(params) |
| 14673 |
return results |
| 14674 |
|
| 14675 |
def increment_read(self): |
| 14676 |
n = 0 |
| 14677 |
result = [] |
| 14678 |
while True: |
| 14679 |
items = self.read_collection_from_device(skip=n) |
| 14680 |
if not items: |
| 14681 |
break |
| 14682 |
result.extend(items) |
| 14683 |
n = n + self.module.params['data_increment'] |
| 14684 |
return result |
| 14685 |
|
| 14686 |
def read_collection_from_device(self, skip=0): |
| 14687 |
uri = "https://{0}:{1}/mgmt/tm/ltm/profile/server-ssl".format( |
| 14688 |
self.client.provider['server'], |
| 14689 |
self.client.provider['server_port'], |
| 14690 |
) |
| 14691 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 14692 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 14693 |
) |
| 14694 |
resp = self.client.api.get(uri + query) |
| 14695 |
try: |
| 14696 |
response = resp.json() |
| 14697 |
except ValueError as ex: |
| 14698 |
raise F5ModuleError(str(ex)) |
| 14699 |
|
| 14700 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 14701 |
raise F5ModuleError(resp.content) |
| 14702 |
|
| 14703 |
if 'items' not in response: |
| 14704 |
return [] |
| 14705 |
result = response['items'] |
| 14706 |
return result |
| 14707 |
|
| 14708 |
|
| 14709 |
class SoftwareVolumesParameters(BaseParameters): |
| 14710 |
api_map = { |
| 14711 |
'fullPath': 'full_path', |
| 14712 |
'basebuild': 'base_build', |
| 14713 |
} |
| 14714 |
|
| 14715 |
returnables = [ |
| 14716 |
'full_path', |
| 14717 |
'name', |
| 14718 |
'active', |
| 14719 |
'base_build', |
| 14720 |
'build', |
| 14721 |
'product', |
| 14722 |
'status', |
| 14723 |
'version', |
| 14724 |
'install_volume', |
| 14725 |
'default_boot_location' |
| 14726 |
] |
| 14727 |
|
| 14728 |
@property |
| 14729 |
def install_volume(self): |
| 14730 |
if self._values['media'] is None: |
| 14731 |
return None |
| 14732 |
return self._values['media'].get('name', None) |
| 14733 |
|
| 14734 |
@property |
| 14735 |
def default_boot_location(self): |
| 14736 |
if self._values['media'] is None: |
| 14737 |
return None |
| 14738 |
return flatten_boolean(self._values['media'].get('defaultBootLocation', None)) |
| 14739 |
|
| 14740 |
@property |
| 14741 |
def active(self): |
| 14742 |
if self._values['active'] is True: |
| 14743 |
return 'yes' |
| 14744 |
return 'no' |
| 14745 |
|
| 14746 |
|
| 14747 |
class SoftwareVolumesFactManager(BaseManager): |
| 14748 |
def __init__(self, *args, **kwargs): |
| 14749 |
self.client = kwargs.get('client', None) |
| 14750 |
self.module = kwargs.get('module', None) |
| 14751 |
super(SoftwareVolumesFactManager, self).__init__(**kwargs) |
| 14752 |
|
| 14753 |
def exec_module(self): |
| 14754 |
facts = self._exec_module() |
| 14755 |
result = dict(software_volumes=facts) |
| 14756 |
return result |
| 14757 |
|
| 14758 |
def _exec_module(self): |
| 14759 |
results = [] |
| 14760 |
facts = self.read_facts() |
| 14761 |
for item in facts: |
| 14762 |
attrs = item.to_return() |
| 14763 |
results.append(attrs) |
| 14764 |
results = sorted(results, key=lambda k: k['full_path']) |
| 14765 |
return results |
| 14766 |
|
| 14767 |
def read_facts(self): |
| 14768 |
results = [] |
| 14769 |
collection = self.read_collection_from_device() |
| 14770 |
for resource in collection: |
| 14771 |
params = SoftwareVolumesParameters(params=resource) |
| 14772 |
results.append(params) |
| 14773 |
return results |
| 14774 |
|
| 14775 |
def read_collection_from_device(self): |
| 14776 |
uri = "https://{0}:{1}/mgmt/tm/sys/software/volume".format( |
| 14777 |
self.client.provider['server'], |
| 14778 |
self.client.provider['server_port'], |
| 14779 |
) |
| 14780 |
resp = self.client.api.get(uri) |
| 14781 |
try: |
| 14782 |
response = resp.json() |
| 14783 |
except ValueError as ex: |
| 14784 |
raise F5ModuleError(str(ex)) |
| 14785 |
|
| 14786 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 14787 |
raise F5ModuleError(resp.content) |
| 14788 |
|
| 14789 |
if 'items' not in response: |
| 14790 |
return [] |
| 14791 |
result = response['items'] |
| 14792 |
return result |
| 14793 |
|
| 14794 |
|
| 14795 |
class SoftwareHotfixesParameters(BaseParameters): |
| 14796 |
api_map = { |
| 14797 |
'fullPath': 'full_path', |
| 14798 |
} |
| 14799 |
|
| 14800 |
returnables = [ |
| 14801 |
'name', |
| 14802 |
'full_path', |
| 14803 |
'build', |
| 14804 |
'checksum', |
| 14805 |
'id', |
| 14806 |
'product', |
| 14807 |
'title', |
| 14808 |
'verified', |
| 14809 |
'version', |
| 14810 |
] |
| 14811 |
|
| 14812 |
|
| 14813 |
class SoftwareHotfixesFactManager(BaseManager): |
| 14814 |
def __init__(self, *args, **kwargs): |
| 14815 |
self.client = kwargs.get('client', None) |
| 14816 |
self.module = kwargs.get('module', None) |
| 14817 |
super(SoftwareHotfixesFactManager, self).__init__(**kwargs) |
| 14818 |
|
| 14819 |
def exec_module(self): |
| 14820 |
facts = self._exec_module() |
| 14821 |
result = dict(software_hotfixes=facts) |
| 14822 |
return result |
| 14823 |
|
| 14824 |
def _exec_module(self): |
| 14825 |
results = [] |
| 14826 |
facts = self.read_facts() |
| 14827 |
for item in facts: |
| 14828 |
attrs = item.to_return() |
| 14829 |
results.append(attrs) |
| 14830 |
results = sorted(results, key=lambda k: k['full_path']) |
| 14831 |
return results |
| 14832 |
|
| 14833 |
def read_facts(self): |
| 14834 |
results = [] |
| 14835 |
collection = self.read_collection_from_device() |
| 14836 |
for resource in collection: |
| 14837 |
params = SoftwareHotfixesParameters(params=resource) |
| 14838 |
results.append(params) |
| 14839 |
return results |
| 14840 |
|
| 14841 |
def read_collection_from_device(self): |
| 14842 |
uri = "https://{0}:{1}/mgmt/tm/sys/software/hotfix".format( |
| 14843 |
self.client.provider['server'], |
| 14844 |
self.client.provider['server_port'], |
| 14845 |
) |
| 14846 |
resp = self.client.api.get(uri) |
| 14847 |
try: |
| 14848 |
response = resp.json() |
| 14849 |
except ValueError as ex: |
| 14850 |
raise F5ModuleError(str(ex)) |
| 14851 |
|
| 14852 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 14853 |
raise F5ModuleError(resp.content) |
| 14854 |
|
| 14855 |
if 'items' not in response: |
| 14856 |
return [] |
| 14857 |
result = response['items'] |
| 14858 |
return result |
| 14859 |
|
| 14860 |
|
| 14861 |
class SoftwareImagesParameters(BaseParameters): |
| 14862 |
api_map = { |
| 14863 |
'fullPath': 'full_path', |
| 14864 |
'buildDate': 'build_date', |
| 14865 |
'fileSize': 'file_size', |
| 14866 |
'lastModified': 'last_modified', |
| 14867 |
} |
| 14868 |
|
| 14869 |
returnables = [ |
| 14870 |
'name', |
| 14871 |
'full_path', |
| 14872 |
'build', |
| 14873 |
'build_date', |
| 14874 |
'checksum', |
| 14875 |
'file_size', |
| 14876 |
'last_modified', |
| 14877 |
'product', |
| 14878 |
'verified', |
| 14879 |
'version', |
| 14880 |
] |
| 14881 |
|
| 14882 |
@property |
| 14883 |
def file_size(self): |
| 14884 |
if self._values['file_size'] is None: |
| 14885 |
return None |
| 14886 |
matches = re.match(r'\d+', self._values['file_size']) |
| 14887 |
if matches: |
| 14888 |
return int(matches.group(0)) |
| 14889 |
|
| 14890 |
@property |
| 14891 |
def build_date(self): |
| 14892 |
"""Normalizes the build_date string |
| 14893 |
|
| 14894 |
The ISOs usually ship with a broken format |
| 14895 |
|
| 14896 |
ex: Tue May 15 15 26 30 PDT 2018 |
| 14897 |
|
| 14898 |
This will re-format that time so that it looks like ISO 8601 without |
| 14899 |
microseconds |
| 14900 |
|
| 14901 |
ex: 2018-05-15T15:26:30 |
| 14902 |
|
| 14903 |
:return: |
| 14904 |
""" |
| 14905 |
if self._values['build_date'] is None: |
| 14906 |
return None |
| 14907 |
|
| 14908 |
d = self._values['build_date'].split(' ') |
| 14909 |
|
| 14910 |
|
| 14911 |
|
| 14912 |
|
| 14913 |
d.pop(6) |
| 14914 |
|
| 14915 |
result = datetime.datetime.strptime(' '.join(d), '%a %b %d %H %M %S %Y').isoformat() |
| 14916 |
return result |
| 14917 |
|
| 14918 |
@property |
| 14919 |
def last_modified(self): |
| 14920 |
"""Normalizes the last_modified string |
| 14921 |
|
| 14922 |
The strings that the system reports look like the following |
| 14923 |
|
| 14924 |
ex: Tue May 15 15:26:30 2018 |
| 14925 |
|
| 14926 |
This property normalizes this value to be isoformat |
| 14927 |
|
| 14928 |
ex: 2018-05-15T15:26:30 |
| 14929 |
|
| 14930 |
:return: |
| 14931 |
""" |
| 14932 |
if self._values['last_modified'] is None: |
| 14933 |
return None |
| 14934 |
result = datetime.datetime.strptime(self._values['last_modified'], '%a %b %d %H:%M:%S %Y').isoformat() |
| 14935 |
return result |
| 14936 |
|
| 14937 |
|
| 14938 |
class SoftwareImagesFactManager(BaseManager): |
| 14939 |
def __init__(self, *args, **kwargs): |
| 14940 |
self.client = kwargs.get('client', None) |
| 14941 |
self.module = kwargs.get('module', None) |
| 14942 |
super(SoftwareImagesFactManager, self).__init__(**kwargs) |
| 14943 |
|
| 14944 |
def exec_module(self): |
| 14945 |
facts = self._exec_module() |
| 14946 |
result = dict(software_images=facts) |
| 14947 |
return result |
| 14948 |
|
| 14949 |
def _exec_module(self): |
| 14950 |
results = [] |
| 14951 |
facts = self.read_facts() |
| 14952 |
for item in facts: |
| 14953 |
attrs = item.to_return() |
| 14954 |
results.append(attrs) |
| 14955 |
results = sorted(results, key=lambda k: k['full_path']) |
| 14956 |
return results |
| 14957 |
|
| 14958 |
def read_facts(self): |
| 14959 |
results = [] |
| 14960 |
collection = self.read_collection_from_device() |
| 14961 |
for resource in collection: |
| 14962 |
params = SoftwareImagesParameters(params=resource) |
| 14963 |
results.append(params) |
| 14964 |
return results |
| 14965 |
|
| 14966 |
def read_collection_from_device(self): |
| 14967 |
uri = "https://{0}:{1}/mgmt/tm/sys/software/image".format( |
| 14968 |
self.client.provider['server'], |
| 14969 |
self.client.provider['server_port'], |
| 14970 |
) |
| 14971 |
resp = self.client.api.get(uri) |
| 14972 |
try: |
| 14973 |
response = resp.json() |
| 14974 |
except ValueError as ex: |
| 14975 |
raise F5ModuleError(str(ex)) |
| 14976 |
|
| 14977 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 14978 |
raise F5ModuleError(resp.content) |
| 14979 |
|
| 14980 |
if 'items' not in response: |
| 14981 |
return [] |
| 14982 |
result = response['items'] |
| 14983 |
return result |
| 14984 |
|
| 14985 |
|
| 14986 |
class SslCertificatesParameters(BaseParameters): |
| 14987 |
api_map = { |
| 14988 |
'fullPath': 'full_path', |
| 14989 |
'keyType': 'key_type', |
| 14990 |
'certificateKeySize': 'key_size', |
| 14991 |
'systemPath': 'system_path', |
| 14992 |
'checksum': 'sha1_checksum', |
| 14993 |
'lastUpdateTime': 'last_update_time', |
| 14994 |
'isBundle': 'is_bundle', |
| 14995 |
'expirationString': 'expiration_date', |
| 14996 |
'expirationDate': 'expiration_timestamp', |
| 14997 |
'createTime': 'create_time', |
| 14998 |
'subjectAlternativeName': 'subject_alternative_name', |
| 14999 |
'serialNumber': 'serial_no', |
| 15000 |
} |
| 15001 |
|
| 15002 |
returnables = [ |
| 15003 |
'full_path', |
| 15004 |
'name', |
| 15005 |
'key_type', |
| 15006 |
'key_size', |
| 15007 |
'system_path', |
| 15008 |
'sha1_checksum', |
| 15009 |
'subject', |
| 15010 |
'last_update_time', |
| 15011 |
'issuer', |
| 15012 |
'is_bundle', |
| 15013 |
'fingerprint', |
| 15014 |
'expiration_date', |
| 15015 |
'expiration_timestamp', |
| 15016 |
'create_time', |
| 15017 |
'subject_alternative_name', |
| 15018 |
'serial_no', |
| 15019 |
] |
| 15020 |
|
| 15021 |
@property |
| 15022 |
def sha1_checksum(self): |
| 15023 |
if self._values['sha1_checksum'] is None: |
| 15024 |
return None |
| 15025 |
parts = self._values['sha1_checksum'].split(':') |
| 15026 |
return parts[2] |
| 15027 |
|
| 15028 |
@property |
| 15029 |
def is_bundle(self): |
| 15030 |
if self._values['sha1_checksum'] is None: |
| 15031 |
return None |
| 15032 |
if self._values['is_bundle'] in BOOLEANS_TRUE: |
| 15033 |
return 'yes' |
| 15034 |
return 'no' |
| 15035 |
|
| 15036 |
|
| 15037 |
class SslCertificatesFactManager(BaseManager): |
| 15038 |
def __init__(self, *args, **kwargs): |
| 15039 |
self.client = kwargs.get('client', None) |
| 15040 |
self.module = kwargs.get('module', None) |
| 15041 |
super(SslCertificatesFactManager, self).__init__(**kwargs) |
| 15042 |
|
| 15043 |
def exec_module(self): |
| 15044 |
facts = self._exec_module() |
| 15045 |
result = dict(ssl_certs=facts) |
| 15046 |
return result |
| 15047 |
|
| 15048 |
def _exec_module(self): |
| 15049 |
results = [] |
| 15050 |
facts = self.read_facts() |
| 15051 |
for item in facts: |
| 15052 |
attrs = item.to_return() |
| 15053 |
results.append(attrs) |
| 15054 |
results = sorted(results, key=lambda k: k['full_path']) |
| 15055 |
return results |
| 15056 |
|
| 15057 |
def read_facts(self): |
| 15058 |
results = [] |
| 15059 |
collection = self.increment_read() |
| 15060 |
for resource in collection: |
| 15061 |
params = SslCertificatesParameters(params=resource) |
| 15062 |
results.append(params) |
| 15063 |
return results |
| 15064 |
|
| 15065 |
def increment_read(self): |
| 15066 |
n = 0 |
| 15067 |
result = [] |
| 15068 |
while True: |
| 15069 |
items = self.read_collection_from_device(skip=n) |
| 15070 |
if not items: |
| 15071 |
break |
| 15072 |
result.extend(items) |
| 15073 |
n = n + self.module.params['data_increment'] |
| 15074 |
return result |
| 15075 |
|
| 15076 |
def read_collection_from_device(self, skip=0): |
| 15077 |
uri = "https://{0}:{1}/mgmt/tm/sys/file/ssl-cert".format( |
| 15078 |
self.client.provider['server'], |
| 15079 |
self.client.provider['server_port'], |
| 15080 |
) |
| 15081 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 15082 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 15083 |
) |
| 15084 |
resp = self.client.api.get(uri + query) |
| 15085 |
try: |
| 15086 |
response = resp.json() |
| 15087 |
except ValueError as ex: |
| 15088 |
raise F5ModuleError(str(ex)) |
| 15089 |
|
| 15090 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 15091 |
raise F5ModuleError(resp.content) |
| 15092 |
|
| 15093 |
if 'items' not in response: |
| 15094 |
return [] |
| 15095 |
result = response['items'] |
| 15096 |
return result |
| 15097 |
|
| 15098 |
|
| 15099 |
class SslKeysParameters(BaseParameters): |
| 15100 |
api_map = { |
| 15101 |
'fullPath': 'full_path', |
| 15102 |
'keyType': 'key_type', |
| 15103 |
'keySize': 'key_size', |
| 15104 |
'securityType': 'security_type', |
| 15105 |
'systemPath': 'system_path', |
| 15106 |
'checksum': 'sha1_checksum', |
| 15107 |
} |
| 15108 |
|
| 15109 |
returnables = [ |
| 15110 |
'full_path', |
| 15111 |
'name', |
| 15112 |
'key_type', |
| 15113 |
'key_size', |
| 15114 |
'security_type', |
| 15115 |
'system_path', |
| 15116 |
'sha1_checksum', |
| 15117 |
] |
| 15118 |
|
| 15119 |
@property |
| 15120 |
def sha1_checksum(self): |
| 15121 |
if self._values['sha1_checksum'] is None: |
| 15122 |
return None |
| 15123 |
parts = self._values['sha1_checksum'].split(':') |
| 15124 |
return parts[2] |
| 15125 |
|
| 15126 |
|
| 15127 |
class SslKeysFactManager(BaseManager): |
| 15128 |
def __init__(self, *args, **kwargs): |
| 15129 |
self.client = kwargs.get('client', None) |
| 15130 |
self.module = kwargs.get('module', None) |
| 15131 |
super(SslKeysFactManager, self).__init__(**kwargs) |
| 15132 |
|
| 15133 |
def exec_module(self): |
| 15134 |
facts = self._exec_module() |
| 15135 |
result = dict(ssl_keys=facts) |
| 15136 |
return result |
| 15137 |
|
| 15138 |
def _exec_module(self): |
| 15139 |
results = [] |
| 15140 |
facts = self.read_facts() |
| 15141 |
for item in facts: |
| 15142 |
attrs = item.to_return() |
| 15143 |
results.append(attrs) |
| 15144 |
results = sorted(results, key=lambda k: k['full_path']) |
| 15145 |
return results |
| 15146 |
|
| 15147 |
def read_facts(self): |
| 15148 |
results = [] |
| 15149 |
collection = self.increment_read() |
| 15150 |
for resource in collection: |
| 15151 |
params = SslKeysParameters(params=resource) |
| 15152 |
results.append(params) |
| 15153 |
return results |
| 15154 |
|
| 15155 |
def increment_read(self): |
| 15156 |
n = 0 |
| 15157 |
result = [] |
| 15158 |
while True: |
| 15159 |
items = self.read_collection_from_device(skip=n) |
| 15160 |
if not items: |
| 15161 |
break |
| 15162 |
result.extend(items) |
| 15163 |
n = n + self.module.params['data_increment'] |
| 15164 |
return result |
| 15165 |
|
| 15166 |
def read_collection_from_device(self, skip=0): |
| 15167 |
uri = "https://{0}:{1}/mgmt/tm/sys/file/ssl-key".format( |
| 15168 |
self.client.provider['server'], |
| 15169 |
self.client.provider['server_port'], |
| 15170 |
) |
| 15171 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 15172 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 15173 |
) |
| 15174 |
resp = self.client.api.get(uri + query) |
| 15175 |
try: |
| 15176 |
response = resp.json() |
| 15177 |
except ValueError as ex: |
| 15178 |
raise F5ModuleError(str(ex)) |
| 15179 |
|
| 15180 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 15181 |
raise F5ModuleError(resp.content) |
| 15182 |
|
| 15183 |
if 'items' not in response: |
| 15184 |
return [] |
| 15185 |
result = response['items'] |
| 15186 |
return result |
| 15187 |
|
| 15188 |
|
| 15189 |
class SystemDbParameters(BaseParameters): |
| 15190 |
api_map = { |
| 15191 |
'fullPath': 'full_path', |
| 15192 |
'defaultValue': 'default', |
| 15193 |
'scfConfig': 'scf_config', |
| 15194 |
'valueRange': 'value_range' |
| 15195 |
} |
| 15196 |
|
| 15197 |
returnables = [ |
| 15198 |
'name', |
| 15199 |
'full_path', |
| 15200 |
'default', |
| 15201 |
'scf_config', |
| 15202 |
'value', |
| 15203 |
'value_range' |
| 15204 |
] |
| 15205 |
|
| 15206 |
|
| 15207 |
class SyncStatusParameters(BaseParameters): |
| 15208 |
api_map = { |
| 15209 |
} |
| 15210 |
|
| 15211 |
returnables = [ |
| 15212 |
'color', |
| 15213 |
'details', |
| 15214 |
'mode', |
| 15215 |
'recommended_action', |
| 15216 |
'status', |
| 15217 |
'summary', |
| 15218 |
] |
| 15219 |
|
| 15220 |
@property |
| 15221 |
def color(self): |
| 15222 |
result = self._values.get('color', {}).get('description', "") |
| 15223 |
if result.strip(): |
| 15224 |
return result |
| 15225 |
return "" |
| 15226 |
|
| 15227 |
@property |
| 15228 |
def details(self): |
| 15229 |
result = [] |
| 15230 |
details = (self._values.get('https://localhost/mgmt/tm/cm/syncStatus/0/details', {}) |
| 15231 |
.get('nestedStats', {}) |
| 15232 |
.get('entries', {})) |
| 15233 |
for entry in details.keys(): |
| 15234 |
result.append( |
| 15235 |
details[entry].get('nestedStats', {}) |
| 15236 |
.get('entries', {}) |
| 15237 |
.get('details', {}) |
| 15238 |
.get('description', "") |
| 15239 |
) |
| 15240 |
result.reverse() |
| 15241 |
return result |
| 15242 |
|
| 15243 |
@property |
| 15244 |
def mode(self): |
| 15245 |
result = self._values.get('mode', {}).get('description', "") |
| 15246 |
if result.strip(): |
| 15247 |
return result |
| 15248 |
return "" |
| 15249 |
|
| 15250 |
@property |
| 15251 |
def status(self): |
| 15252 |
result = self._values.get('status', {}).get('description', "") |
| 15253 |
if result.strip(): |
| 15254 |
return result |
| 15255 |
return "" |
| 15256 |
|
| 15257 |
@property |
| 15258 |
def summary(self): |
| 15259 |
result = self._values.get('summary', {}).get('description', "") |
| 15260 |
if result.strip(): |
| 15261 |
return result |
| 15262 |
return "" |
| 15263 |
|
| 15264 |
@property |
| 15265 |
def recommended_action(self): |
| 15266 |
for entry in self.details: |
| 15267 |
match = re.match(r".*[Rr]ecommended action:\s(.*)$", entry) |
| 15268 |
if match: |
| 15269 |
return match.group(1) |
| 15270 |
return "" |
| 15271 |
|
| 15272 |
|
| 15273 |
class SyncStatusFactManager(BaseManager): |
| 15274 |
def __init__(self, *args, **kwargs): |
| 15275 |
self.client = kwargs.get('client', None) |
| 15276 |
self.module = kwargs.get('module', None) |
| 15277 |
super(SyncStatusFactManager, self).__init__(**kwargs) |
| 15278 |
|
| 15279 |
def exec_module(self): |
| 15280 |
facts = self._exec_module() |
| 15281 |
result = dict(sync_status=facts) |
| 15282 |
return result |
| 15283 |
|
| 15284 |
def _exec_module(self): |
| 15285 |
facts = self.read_facts() |
| 15286 |
attrs = facts.to_return() |
| 15287 |
result = [attrs] |
| 15288 |
return result |
| 15289 |
|
| 15290 |
def read_facts(self): |
| 15291 |
collection = self.read_collection_from_device() |
| 15292 |
return SyncStatusParameters(params=collection) |
| 15293 |
|
| 15294 |
def read_collection_from_device(self): |
| 15295 |
uri = "https://{0}:{1}/mgmt/tm/cm/sync-status".format( |
| 15296 |
self.client.provider['server'], |
| 15297 |
self.client.provider['server_port'], |
| 15298 |
) |
| 15299 |
resp = self.client.api.get(uri) |
| 15300 |
try: |
| 15301 |
response = resp.json() |
| 15302 |
except ValueError as ex: |
| 15303 |
raise F5ModuleError(str(ex)) |
| 15304 |
|
| 15305 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 15306 |
raise F5ModuleError(resp.content) |
| 15307 |
|
| 15308 |
result = response.get('entries', {}) \ |
| 15309 |
.get('https://localhost/mgmt/tm/cm/sync-status/0', {}) \ |
| 15310 |
.get('nestedStats', {}) \ |
| 15311 |
.get('entries') |
| 15312 |
return result |
| 15313 |
|
| 15314 |
|
| 15315 |
class SystemDbFactManager(BaseManager): |
| 15316 |
def __init__(self, *args, **kwargs): |
| 15317 |
self.client = kwargs.get('client', None) |
| 15318 |
self.module = kwargs.get('module', None) |
| 15319 |
super(SystemDbFactManager, self).__init__(**kwargs) |
| 15320 |
|
| 15321 |
def exec_module(self): |
| 15322 |
facts = self._exec_module() |
| 15323 |
result = dict(system_db=facts) |
| 15324 |
return result |
| 15325 |
|
| 15326 |
def _exec_module(self): |
| 15327 |
results = [] |
| 15328 |
facts = self.read_facts() |
| 15329 |
for item in facts: |
| 15330 |
attrs = item.to_return() |
| 15331 |
results.append(attrs) |
| 15332 |
results = sorted(results, key=lambda k: k['full_path']) |
| 15333 |
return results |
| 15334 |
|
| 15335 |
def read_facts(self): |
| 15336 |
results = [] |
| 15337 |
collection = self.read_collection_from_device() |
| 15338 |
for resource in collection: |
| 15339 |
params = SystemDbParameters(params=resource) |
| 15340 |
results.append(params) |
| 15341 |
return results |
| 15342 |
|
| 15343 |
def read_collection_from_device(self): |
| 15344 |
uri = "https://{0}:{1}/mgmt/tm/sys/db".format( |
| 15345 |
self.client.provider['server'], |
| 15346 |
self.client.provider['server_port'], |
| 15347 |
) |
| 15348 |
resp = self.client.api.get(uri) |
| 15349 |
try: |
| 15350 |
response = resp.json() |
| 15351 |
except ValueError as ex: |
| 15352 |
raise F5ModuleError(str(ex)) |
| 15353 |
|
| 15354 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 15355 |
raise F5ModuleError(resp.content) |
| 15356 |
|
| 15357 |
if 'items' not in response: |
| 15358 |
return [] |
| 15359 |
result = response['items'] |
| 15360 |
return result |
| 15361 |
|
| 15362 |
|
| 15363 |
class SystemInfoParameters(BaseParameters): |
| 15364 |
api_map = { |
| 15365 |
|
| 15366 |
} |
| 15367 |
|
| 15368 |
returnables = [ |
| 15369 |
'base_mac_address', |
| 15370 |
'marketing_name', |
| 15371 |
'time', |
| 15372 |
'hardware_information', |
| 15373 |
'product_information', |
| 15374 |
'package_edition', |
| 15375 |
'package_version', |
| 15376 |
'product_code', |
| 15377 |
'product_build', |
| 15378 |
'product_built', |
| 15379 |
'product_build_date', |
| 15380 |
'product_changelist', |
| 15381 |
'product_jobid', |
| 15382 |
'product_version', |
| 15383 |
'uptime', |
| 15384 |
'chassis_serial', |
| 15385 |
'host_board_part_revision', |
| 15386 |
'host_board_serial', |
| 15387 |
'platform', |
| 15388 |
'switch_board_part_revision', |
| 15389 |
'switch_board_serial' |
| 15390 |
] |
| 15391 |
|
| 15392 |
@property |
| 15393 |
def chassis_serial(self): |
| 15394 |
if self._values['system-info'] is None: |
| 15395 |
return None |
| 15396 |
if 'bigipChassisSerialNum' not in self._values['system-info'][0]: |
| 15397 |
return None |
| 15398 |
return self._values['system-info'][0]['bigipChassisSerialNum'] |
| 15399 |
|
| 15400 |
@property |
| 15401 |
def switch_board_serial(self): |
| 15402 |
if self._values['system-info'] is None: |
| 15403 |
return None |
| 15404 |
if 'switchBoardSerialNum' not in self._values['system-info'][0]: |
| 15405 |
return None |
| 15406 |
if self._values['system-info'][0]['switchBoardSerialNum'].strip() == '': |
| 15407 |
return None |
| 15408 |
return self._values['system-info'][0]['switchBoardSerialNum'] |
| 15409 |
|
| 15410 |
@property |
| 15411 |
def switch_board_part_revision(self): |
| 15412 |
if self._values['system-info'] is None: |
| 15413 |
return None |
| 15414 |
if 'switchBoardPartRevNum' not in self._values['system-info'][0]: |
| 15415 |
return None |
| 15416 |
if self._values['system-info'][0]['switchBoardPartRevNum'].strip() == '': |
| 15417 |
return None |
| 15418 |
return self._values['system-info'][0]['switchBoardPartRevNum'] |
| 15419 |
|
| 15420 |
@property |
| 15421 |
def platform(self): |
| 15422 |
if self._values['system-info'] is None: |
| 15423 |
return None |
| 15424 |
return self._values['system-info'][0]['platform'] |
| 15425 |
|
| 15426 |
@property |
| 15427 |
def host_board_serial(self): |
| 15428 |
if self._values['system-info'] is None: |
| 15429 |
return None |
| 15430 |
if 'hostBoardSerialNum' not in self._values['system-info'][0]: |
| 15431 |
return None |
| 15432 |
if self._values['system-info'][0]['hostBoardSerialNum'].strip() == '': |
| 15433 |
return None |
| 15434 |
return self._values['system-info'][0]['hostBoardSerialNum'] |
| 15435 |
|
| 15436 |
@property |
| 15437 |
def host_board_part_revision(self): |
| 15438 |
if self._values['system-info'] is None: |
| 15439 |
return None |
| 15440 |
if 'hostBoardPartRevNum' not in self._values['system-info'][0]: |
| 15441 |
return None |
| 15442 |
if self._values['system-info'][0]['hostBoardPartRevNum'].strip() == '': |
| 15443 |
return None |
| 15444 |
return self._values['system-info'][0]['hostBoardPartRevNum'] |
| 15445 |
|
| 15446 |
@property |
| 15447 |
def package_edition(self): |
| 15448 |
return self._values['Edition'] |
| 15449 |
|
| 15450 |
@property |
| 15451 |
def package_version(self): |
| 15452 |
return 'Build {0} - {1}'.format(self._values['Build'], self._values['Date']) |
| 15453 |
|
| 15454 |
@property |
| 15455 |
def product_build(self): |
| 15456 |
return self._values['Build'] |
| 15457 |
|
| 15458 |
@property |
| 15459 |
def product_build_date(self): |
| 15460 |
return self._values['Date'] |
| 15461 |
|
| 15462 |
@property |
| 15463 |
def product_built(self): |
| 15464 |
if 'Built' in self._values['version_info']: |
| 15465 |
return int(self._values['version_info']['Built']) |
| 15466 |
|
| 15467 |
@property |
| 15468 |
def product_changelist(self): |
| 15469 |
if 'Changelist' in self._values['version_info']: |
| 15470 |
return int(self._values['version_info']['Changelist']) |
| 15471 |
|
| 15472 |
@property |
| 15473 |
def product_jobid(self): |
| 15474 |
if 'JobID' in self._values['version_info']: |
| 15475 |
return int(self._values['version_info']['JobID']) |
| 15476 |
|
| 15477 |
@property |
| 15478 |
def product_code(self): |
| 15479 |
return self._values['Product'] |
| 15480 |
|
| 15481 |
@property |
| 15482 |
def product_version(self): |
| 15483 |
return self._values['Version'] |
| 15484 |
|
| 15485 |
@property |
| 15486 |
def hardware_information(self): |
| 15487 |
if self._values['hardware-version'] is None: |
| 15488 |
return None |
| 15489 |
self._transform_name_attribute(self._values['hardware-version']) |
| 15490 |
result = [v for k, v in iteritems(self._values['hardware-version'])] |
| 15491 |
return result |
| 15492 |
|
| 15493 |
def _transform_name_attribute(self, entry): |
| 15494 |
if isinstance(entry, dict): |
| 15495 |
for k, v in list(entry.items()): |
| 15496 |
if k == 'tmName': |
| 15497 |
entry['name'] = entry.pop('tmName') |
| 15498 |
self._transform_name_attribute(v) |
| 15499 |
elif isinstance(entry, list): |
| 15500 |
for k in entry: |
| 15501 |
if k == 'tmName': |
| 15502 |
entry['name'] = entry.pop('tmName') |
| 15503 |
self._transform_name_attribute(k) |
| 15504 |
else: |
| 15505 |
return |
| 15506 |
|
| 15507 |
@property |
| 15508 |
def time(self): |
| 15509 |
if self._values['fullDate'] is None: |
| 15510 |
return None |
| 15511 |
date = datetime.datetime.strptime(self._values['fullDate'], "%Y-%m-%dT%H:%M:%SZ") |
| 15512 |
result = dict( |
| 15513 |
day=date.day, |
| 15514 |
hour=date.hour, |
| 15515 |
minute=date.minute, |
| 15516 |
month=date.month, |
| 15517 |
second=date.second, |
| 15518 |
year=date.year |
| 15519 |
) |
| 15520 |
return result |
| 15521 |
|
| 15522 |
@property |
| 15523 |
def marketing_name(self): |
| 15524 |
if self._values['platform'] is None: |
| 15525 |
return None |
| 15526 |
return self._values['platform'][0]['marketingName'] |
| 15527 |
|
| 15528 |
@property |
| 15529 |
def base_mac_address(self): |
| 15530 |
if self._values['platform'] is None: |
| 15531 |
return None |
| 15532 |
return self._values['platform'][0]['baseMac'] |
| 15533 |
|
| 15534 |
|
| 15535 |
class SystemInfoFactManager(BaseManager): |
| 15536 |
def __init__(self, *args, **kwargs): |
| 15537 |
self.client = kwargs.get('client', None) |
| 15538 |
self.module = kwargs.get('module', None) |
| 15539 |
super(SystemInfoFactManager, self).__init__(**kwargs) |
| 15540 |
|
| 15541 |
def exec_module(self): |
| 15542 |
facts = self._exec_module() |
| 15543 |
result = dict(system_info=facts) |
| 15544 |
return result |
| 15545 |
|
| 15546 |
def _exec_module(self): |
| 15547 |
facts = self.read_facts() |
| 15548 |
results = facts.to_return() |
| 15549 |
return results |
| 15550 |
|
| 15551 |
def read_facts(self): |
| 15552 |
collection = self.read_collection_from_device() |
| 15553 |
params = SystemInfoParameters(params=collection) |
| 15554 |
return params |
| 15555 |
|
| 15556 |
def read_collection_from_device(self): |
| 15557 |
result = dict() |
| 15558 |
tmp = self.read_hardware_info_from_device() |
| 15559 |
if tmp: |
| 15560 |
result.update(tmp) |
| 15561 |
|
| 15562 |
tmp = self.read_clock_info_from_device() |
| 15563 |
if tmp: |
| 15564 |
result.update(tmp) |
| 15565 |
|
| 15566 |
tmp = self.read_version_info_from_device() |
| 15567 |
if tmp: |
| 15568 |
result.update(tmp) |
| 15569 |
|
| 15570 |
tmp = self.read_uptime_info_from_device() |
| 15571 |
if tmp: |
| 15572 |
result.update(tmp) |
| 15573 |
|
| 15574 |
tmp = self.read_version_file_info_from_device() |
| 15575 |
if tmp: |
| 15576 |
result.update(tmp) |
| 15577 |
|
| 15578 |
return result |
| 15579 |
|
| 15580 |
def read_version_file_info_from_device(self): |
| 15581 |
uri = "https://{0}:{1}/mgmt/tm/util/bash".format( |
| 15582 |
self.client.provider['server'], |
| 15583 |
self.client.provider['server_port'], |
| 15584 |
) |
| 15585 |
args = dict( |
| 15586 |
command='run', |
| 15587 |
utilCmdArgs='-c "cat /VERSION"' |
| 15588 |
) |
| 15589 |
resp = self.client.api.post(uri, json=args) |
| 15590 |
try: |
| 15591 |
response = resp.json() |
| 15592 |
except ValueError as ex: |
| 15593 |
raise F5ModuleError(str(ex)) |
| 15594 |
|
| 15595 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 15596 |
raise F5ModuleError(resp.content) |
| 15597 |
|
| 15598 |
try: |
| 15599 |
pattern = r'^(?P<key>(Product|Build|Sequence|BaseBuild|Edition|Date|Built|Changelist|JobID))\:(?P<value>.*)' |
| 15600 |
result = response['commandResult'].strip() |
| 15601 |
except KeyError: |
| 15602 |
return None |
| 15603 |
|
| 15604 |
if 'No such file or directory' in result: |
| 15605 |
return None |
| 15606 |
|
| 15607 |
lines = response['commandResult'].split("\n") |
| 15608 |
result = dict() |
| 15609 |
for line in lines: |
| 15610 |
if not line: |
| 15611 |
continue |
| 15612 |
matches = re.match(pattern, line) |
| 15613 |
if matches: |
| 15614 |
result[matches.group('key')] = matches.group('value').strip() |
| 15615 |
|
| 15616 |
if result: |
| 15617 |
return dict( |
| 15618 |
version_info=result |
| 15619 |
) |
| 15620 |
|
| 15621 |
def read_uptime_info_from_device(self): |
| 15622 |
uri = "https://{0}:{1}/mgmt/tm/util/bash".format( |
| 15623 |
self.client.provider['server'], |
| 15624 |
self.client.provider['server_port'], |
| 15625 |
) |
| 15626 |
args = dict( |
| 15627 |
command='run', |
| 15628 |
utilCmdArgs='-c "cat /proc/uptime"' |
| 15629 |
) |
| 15630 |
resp = self.client.api.post(uri, json=args) |
| 15631 |
try: |
| 15632 |
response = resp.json() |
| 15633 |
except ValueError as ex: |
| 15634 |
raise F5ModuleError(str(ex)) |
| 15635 |
|
| 15636 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 15637 |
raise F5ModuleError(resp.content) |
| 15638 |
|
| 15639 |
try: |
| 15640 |
parts = response['commandResult'].strip().split(' ') |
| 15641 |
return dict( |
| 15642 |
uptime=math.floor(float(parts[0])) |
| 15643 |
) |
| 15644 |
except KeyError: |
| 15645 |
pass |
| 15646 |
|
| 15647 |
def read_hardware_info_from_device(self): |
| 15648 |
uri = "https://{0}:{1}/mgmt/tm/sys/hardware".format( |
| 15649 |
self.client.provider['server'], |
| 15650 |
self.client.provider['server_port'], |
| 15651 |
) |
| 15652 |
resp = self.client.api.get(uri) |
| 15653 |
try: |
| 15654 |
response = resp.json() |
| 15655 |
except ValueError as ex: |
| 15656 |
raise F5ModuleError(str(ex)) |
| 15657 |
|
| 15658 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 15659 |
raise F5ModuleError(resp.content) |
| 15660 |
|
| 15661 |
result = parseStats(response) |
| 15662 |
return result |
| 15663 |
|
| 15664 |
def read_clock_info_from_device(self): |
| 15665 |
"""Parses clock info from the REST API |
| 15666 |
|
| 15667 |
The clock stat returned from the REST API (at the time of 13.1.0.7) |
| 15668 |
is similar to the following. |
| 15669 |
|
| 15670 |
{ |
| 15671 |
"kind": "tm:sys:clock:clockstats", |
| 15672 |
"selfLink": "https://localhost/mgmt/tm/sys/clock?ver=13.1.0.4", |
| 15673 |
"entries": { |
| 15674 |
"https://localhost/mgmt/tm/sys/clock/0": { |
| 15675 |
"nestedStats": { |
| 15676 |
"entries": { |
| 15677 |
"fullDate": { |
| 15678 |
"description": "2018-06-05T13:38:33Z" |
| 15679 |
} |
| 15680 |
} |
| 15681 |
} |
| 15682 |
} |
| 15683 |
} |
| 15684 |
} |
| 15685 |
|
| 15686 |
Parsing this data using the ``parseStats`` method, yields a list of |
| 15687 |
the clock stats in a format resembling that below. |
| 15688 |
|
| 15689 |
[{'fullDate': '2018-06-05T13:41:05Z'}] |
| 15690 |
|
| 15691 |
Therefore, this method cherry-picks the first entry from this list |
| 15692 |
and returns it. There can be no other items in this list. |
| 15693 |
|
| 15694 |
Returns: |
| 15695 |
A dict mapping keys to the corresponding clock stats. For |
| 15696 |
example: |
| 15697 |
|
| 15698 |
{'fullDate': '2018-06-05T13:41:05Z'} |
| 15699 |
|
| 15700 |
There should never not be a clock stat, unless by chance it |
| 15701 |
is removed from the API in the future, or changed to a different |
| 15702 |
API endpoint. |
| 15703 |
|
| 15704 |
Raises: |
| 15705 |
F5ModuleError: A non-successful HTTP code was returned or a JSON |
| 15706 |
response was not found. |
| 15707 |
""" |
| 15708 |
uri = "https://{0}:{1}/mgmt/tm/sys/clock".format( |
| 15709 |
self.client.provider['server'], |
| 15710 |
self.client.provider['server_port'], |
| 15711 |
) |
| 15712 |
resp = self.client.api.get(uri) |
| 15713 |
try: |
| 15714 |
response = resp.json() |
| 15715 |
except ValueError as ex: |
| 15716 |
raise F5ModuleError(str(ex)) |
| 15717 |
|
| 15718 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 15719 |
raise F5ModuleError(resp.content) |
| 15720 |
|
| 15721 |
result = parseStats(response) |
| 15722 |
return result[0] |
| 15723 |
|
| 15724 |
def read_version_info_from_device(self): |
| 15725 |
"""Parses version info from the REST API |
| 15726 |
|
| 15727 |
The version stat returned from the REST API (at the time of 13.1.0.7) |
| 15728 |
is similar to the following. |
| 15729 |
|
| 15730 |
{ |
| 15731 |
"kind": "tm:sys:version:versionstats", |
| 15732 |
"selfLink": "https://localhost/mgmt/tm/sys/version?ver=13.1.0.4", |
| 15733 |
"entries": { |
| 15734 |
"https://localhost/mgmt/tm/sys/version/0": { |
| 15735 |
"nestedStats": { |
| 15736 |
"entries": { |
| 15737 |
"Build": { |
| 15738 |
"description": "0.0.6" |
| 15739 |
}, |
| 15740 |
"Date": { |
| 15741 |
"description": "Tue Mar 13 20:10:42 PDT 2018" |
| 15742 |
}, |
| 15743 |
"Edition": { |
| 15744 |
"description": "Point Release 4" |
| 15745 |
}, |
| 15746 |
"Product": { |
| 15747 |
"description": "BIG-IP" |
| 15748 |
}, |
| 15749 |
"Title": { |
| 15750 |
"description": "Main Package" |
| 15751 |
}, |
| 15752 |
"Version": { |
| 15753 |
"description": "13.1.0.4" |
| 15754 |
} |
| 15755 |
} |
| 15756 |
} |
| 15757 |
} |
| 15758 |
} |
| 15759 |
} |
| 15760 |
|
| 15761 |
Parsing this data using the ``parseStats`` method, yields a list of |
| 15762 |
the clock stats in a format resembling that below. |
| 15763 |
|
| 15764 |
[{'Build': '0.0.6', 'Date': 'Tue Mar 13 20:10:42 PDT 2018', |
| 15765 |
'Edition': 'Point Release 4', 'Product': 'BIG-IP', 'Title': 'Main Package', |
| 15766 |
'Version': '13.1.0.4'}] |
| 15767 |
|
| 15768 |
Therefore, this method cherry-picks the first entry from this list |
| 15769 |
and returns it. There can be no other items in this list. |
| 15770 |
|
| 15771 |
Returns: |
| 15772 |
A dict mapping keys to the corresponding clock stats. For |
| 15773 |
example: |
| 15774 |
|
| 15775 |
{'Build': '0.0.6', 'Date': 'Tue Mar 13 20:10:42 PDT 2018', |
| 15776 |
'Edition': 'Point Release 4', 'Product': 'BIG-IP', 'Title': 'Main Package', |
| 15777 |
'Version': '13.1.0.4'} |
| 15778 |
|
| 15779 |
There should never not be a version stat, unless by chance it |
| 15780 |
is removed from the API in the future, or changed to a different |
| 15781 |
API endpoint. |
| 15782 |
|
| 15783 |
Raises: |
| 15784 |
F5ModuleError: A non-successful HTTP code was returned or a JSON |
| 15785 |
response was not found. |
| 15786 |
""" |
| 15787 |
uri = "https://{0}:{1}/mgmt/tm/sys/version".format( |
| 15788 |
self.client.provider['server'], |
| 15789 |
self.client.provider['server_port'], |
| 15790 |
) |
| 15791 |
resp = self.client.api.get(uri) |
| 15792 |
try: |
| 15793 |
response = resp.json() |
| 15794 |
except ValueError as ex: |
| 15795 |
raise F5ModuleError(str(ex)) |
| 15796 |
|
| 15797 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 15798 |
raise F5ModuleError(resp.content) |
| 15799 |
|
| 15800 |
result = parseStats(response) |
| 15801 |
return result[0] |
| 15802 |
|
| 15803 |
|
| 15804 |
class TSParameters(BaseParameters): |
| 15805 |
api_map = { |
| 15806 |
} |
| 15807 |
|
| 15808 |
returnables = [ |
| 15809 |
|
| 15810 |
] |
| 15811 |
|
| 15812 |
|
| 15813 |
class TSFactManager(BaseManager): |
| 15814 |
def __init__(self, *args, **kwargs): |
| 15815 |
self.client = kwargs.get('client', None) |
| 15816 |
self.module = kwargs.get('module', None) |
| 15817 |
self.installed_packages = packages_installed(self.client) |
| 15818 |
super(TSFactManager, self).__init__(**kwargs) |
| 15819 |
|
| 15820 |
def exec_module(self): |
| 15821 |
facts = self._exec_module() |
| 15822 |
result = dict(ts_config=facts) |
| 15823 |
return result |
| 15824 |
|
| 15825 |
def _exec_module(self): |
| 15826 |
if 'ts' not in self.installed_packages: |
| 15827 |
return [] |
| 15828 |
facts = self.read_facts() |
| 15829 |
return facts |
| 15830 |
|
| 15831 |
def read_facts(self): |
| 15832 |
collection = self.read_collection_from_device() |
| 15833 |
return collection |
| 15834 |
|
| 15835 |
def read_collection_from_device(self): |
| 15836 |
uri = "https://{0}:{1}/mgmt/shared/telemetry/declare".format( |
| 15837 |
self.client.provider['server'], |
| 15838 |
self.client.provider['server_port'], |
| 15839 |
) |
| 15840 |
resp = self.client.api.get(uri) |
| 15841 |
try: |
| 15842 |
response = resp.json() |
| 15843 |
except ValueError as ex: |
| 15844 |
raise F5ModuleError(str(ex)) |
| 15845 |
|
| 15846 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 15847 |
raise F5ModuleError(resp.content) |
| 15848 |
|
| 15849 |
if 'message' not in response: |
| 15850 |
return [] |
| 15851 |
result = dict() |
| 15852 |
result['declaration'] = response['declaration'] |
| 15853 |
return result |
| 15854 |
|
| 15855 |
|
| 15856 |
class TcpMonitorsParameters(BaseParameters): |
| 15857 |
api_map = { |
| 15858 |
'fullPath': 'full_path', |
| 15859 |
'defaultsFrom': 'parent', |
| 15860 |
'adaptiveDivergenceType': 'adaptive_divergence_type', |
| 15861 |
'adaptiveDivergenceValue': 'adaptive_divergence_value', |
| 15862 |
'adaptiveLimit': 'adaptive_limit', |
| 15863 |
'adaptiveSamplingTimespan': 'adaptive_sampling_timespan', |
| 15864 |
'ipDscp': 'ip_dscp', |
| 15865 |
'manualResume': 'manual_resume', |
| 15866 |
'timeUntilUp': 'time_until_up', |
| 15867 |
'upInterval': 'up_interval', |
| 15868 |
} |
| 15869 |
|
| 15870 |
returnables = [ |
| 15871 |
'full_path', |
| 15872 |
'name', |
| 15873 |
'parent', |
| 15874 |
'description', |
| 15875 |
'adaptive', |
| 15876 |
'adaptive_divergence_type', |
| 15877 |
'adaptive_divergence_value', |
| 15878 |
'adaptive_limit', |
| 15879 |
'adaptive_sampling_timespan', |
| 15880 |
'destination', |
| 15881 |
'interval', |
| 15882 |
'ip_dscp', |
| 15883 |
'manual_resume', |
| 15884 |
'reverse', |
| 15885 |
'time_until_up', |
| 15886 |
'timeout', |
| 15887 |
'transparent', |
| 15888 |
'up_interval', |
| 15889 |
] |
| 15890 |
|
| 15891 |
@property |
| 15892 |
def description(self): |
| 15893 |
if self._values['description'] in [None, 'none']: |
| 15894 |
return None |
| 15895 |
return self._values['description'] |
| 15896 |
|
| 15897 |
@property |
| 15898 |
def transparent(self): |
| 15899 |
return flatten_boolean(self._values['transparent']) |
| 15900 |
|
| 15901 |
@property |
| 15902 |
def manual_resume(self): |
| 15903 |
return flatten_boolean(self._values['manual_resume']) |
| 15904 |
|
| 15905 |
@property |
| 15906 |
def adaptive(self): |
| 15907 |
return flatten_boolean(self._values['adaptive']) |
| 15908 |
|
| 15909 |
@property |
| 15910 |
def reverse(self): |
| 15911 |
return flatten_boolean(self._values['reverse']) |
| 15912 |
|
| 15913 |
|
| 15914 |
class TcpMonitorsFactManager(BaseManager): |
| 15915 |
def __init__(self, *args, **kwargs): |
| 15916 |
self.client = kwargs.get('client', None) |
| 15917 |
self.module = kwargs.get('module', None) |
| 15918 |
super(TcpMonitorsFactManager, self).__init__(**kwargs) |
| 15919 |
|
| 15920 |
def exec_module(self): |
| 15921 |
facts = self._exec_module() |
| 15922 |
result = dict(tcp_monitors=facts) |
| 15923 |
return result |
| 15924 |
|
| 15925 |
def _exec_module(self): |
| 15926 |
results = [] |
| 15927 |
facts = self.read_facts() |
| 15928 |
for item in facts: |
| 15929 |
attrs = item.to_return() |
| 15930 |
results.append(attrs) |
| 15931 |
results = sorted(results, key=lambda k: k['full_path']) |
| 15932 |
return results |
| 15933 |
|
| 15934 |
def read_facts(self): |
| 15935 |
results = [] |
| 15936 |
collection = self.increment_read() |
| 15937 |
for resource in collection: |
| 15938 |
params = TcpMonitorsParameters(params=resource) |
| 15939 |
results.append(params) |
| 15940 |
return results |
| 15941 |
|
| 15942 |
def increment_read(self): |
| 15943 |
n = 0 |
| 15944 |
result = [] |
| 15945 |
while True: |
| 15946 |
items = self.read_collection_from_device(skip=n) |
| 15947 |
if not items: |
| 15948 |
break |
| 15949 |
result.extend(items) |
| 15950 |
n = n + self.module.params['data_increment'] |
| 15951 |
return result |
| 15952 |
|
| 15953 |
def read_collection_from_device(self, skip=0): |
| 15954 |
uri = "https://{0}:{1}/mgmt/tm/ltm/monitor/tcp".format( |
| 15955 |
self.client.provider['server'], |
| 15956 |
self.client.provider['server_port'], |
| 15957 |
) |
| 15958 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 15959 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 15960 |
) |
| 15961 |
resp = self.client.api.get(uri + query) |
| 15962 |
try: |
| 15963 |
response = resp.json() |
| 15964 |
except ValueError as ex: |
| 15965 |
raise F5ModuleError(str(ex)) |
| 15966 |
|
| 15967 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 15968 |
raise F5ModuleError(resp.content) |
| 15969 |
|
| 15970 |
if 'items' not in response: |
| 15971 |
return [] |
| 15972 |
result = response['items'] |
| 15973 |
return result |
| 15974 |
|
| 15975 |
|
| 15976 |
class TcpHalfOpenMonitorsParameters(BaseParameters): |
| 15977 |
api_map = { |
| 15978 |
'fullPath': 'full_path', |
| 15979 |
'defaultsFrom': 'parent', |
| 15980 |
'manualResume': 'manual_resume', |
| 15981 |
'timeUntilUp': 'time_until_up', |
| 15982 |
'upInterval': 'up_interval', |
| 15983 |
} |
| 15984 |
|
| 15985 |
returnables = [ |
| 15986 |
'full_path', |
| 15987 |
'name', |
| 15988 |
'parent', |
| 15989 |
'description', |
| 15990 |
'destination', |
| 15991 |
'interval', |
| 15992 |
'manual_resume', |
| 15993 |
'time_until_up', |
| 15994 |
'timeout', |
| 15995 |
'transparent', |
| 15996 |
'up_interval', |
| 15997 |
] |
| 15998 |
|
| 15999 |
@property |
| 16000 |
def description(self): |
| 16001 |
if self._values['description'] in [None, 'none']: |
| 16002 |
return None |
| 16003 |
return self._values['description'] |
| 16004 |
|
| 16005 |
@property |
| 16006 |
def transparent(self): |
| 16007 |
return flatten_boolean(self._values['transparent']) |
| 16008 |
|
| 16009 |
@property |
| 16010 |
def manual_resume(self): |
| 16011 |
return flatten_boolean(self._values['manual_resume']) |
| 16012 |
|
| 16013 |
|
| 16014 |
class TcpHalfOpenMonitorsFactManager(BaseManager): |
| 16015 |
def __init__(self, *args, **kwargs): |
| 16016 |
self.client = kwargs.get('client', None) |
| 16017 |
self.module = kwargs.get('module', None) |
| 16018 |
super(TcpHalfOpenMonitorsFactManager, self).__init__(**kwargs) |
| 16019 |
|
| 16020 |
def exec_module(self): |
| 16021 |
facts = self._exec_module() |
| 16022 |
result = dict(tcp_half_open_monitors=facts) |
| 16023 |
return result |
| 16024 |
|
| 16025 |
def _exec_module(self): |
| 16026 |
results = [] |
| 16027 |
facts = self.read_facts() |
| 16028 |
for item in facts: |
| 16029 |
attrs = item.to_return() |
| 16030 |
results.append(attrs) |
| 16031 |
results = sorted(results, key=lambda k: k['full_path']) |
| 16032 |
return results |
| 16033 |
|
| 16034 |
def read_facts(self): |
| 16035 |
results = [] |
| 16036 |
collection = self.increment_read() |
| 16037 |
for resource in collection: |
| 16038 |
params = TcpHalfOpenMonitorsParameters(params=resource) |
| 16039 |
results.append(params) |
| 16040 |
return results |
| 16041 |
|
| 16042 |
def increment_read(self): |
| 16043 |
n = 0 |
| 16044 |
result = [] |
| 16045 |
while True: |
| 16046 |
items = self.read_collection_from_device(skip=n) |
| 16047 |
if not items: |
| 16048 |
break |
| 16049 |
result.extend(items) |
| 16050 |
n = n + self.module.params['data_increment'] |
| 16051 |
return result |
| 16052 |
|
| 16053 |
def read_collection_from_device(self, skip=0): |
| 16054 |
uri = "https://{0}:{1}/mgmt/tm/ltm/monitor/tcp-half-open".format( |
| 16055 |
self.client.provider['server'], |
| 16056 |
self.client.provider['server_port'], |
| 16057 |
) |
| 16058 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 16059 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 16060 |
) |
| 16061 |
resp = self.client.api.get(uri + query) |
| 16062 |
try: |
| 16063 |
response = resp.json() |
| 16064 |
except ValueError as ex: |
| 16065 |
raise F5ModuleError(str(ex)) |
| 16066 |
|
| 16067 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 16068 |
raise F5ModuleError(resp.content) |
| 16069 |
|
| 16070 |
if 'items' not in response: |
| 16071 |
return [] |
| 16072 |
result = response['items'] |
| 16073 |
return result |
| 16074 |
|
| 16075 |
|
| 16076 |
class TcpProfilesParameters(BaseParameters): |
| 16077 |
api_map = { |
| 16078 |
'fullPath': 'full_path', |
| 16079 |
'defaultsFrom': 'parent', |
| 16080 |
'ackOnPush': 'ack_on_push', |
| 16081 |
'autoProxyBufferSize': 'auto_proxy_buffer', |
| 16082 |
'autoReceiveWindowSize': 'auto_receive_window', |
| 16083 |
'autoSendBufferSize': 'auto_send_buffer', |
| 16084 |
'closeWaitTimeout': 'close_wait', |
| 16085 |
'cmetricsCache': 'congestion_metrics_cache', |
| 16086 |
'cmetricsCacheTimeout': 'congestion_metrics_cache_timeout', |
| 16087 |
'congestionControl': 'congestion_control', |
| 16088 |
'deferredAccept': 'deferred_accept', |
| 16089 |
'delayWindowControl': 'delay_window_control', |
| 16090 |
'delayedAcks': 'delayed_acks', |
| 16091 |
'earlyRetransmit': 'early_retransmit', |
| 16092 |
'ecn': 'explicit_congestion_notification', |
| 16093 |
'enhancedLossRecovery': 'enhanced_loss_recovery', |
| 16094 |
'fastOpen': 'fast_open', |
| 16095 |
'fastOpenCookieExpiration': 'fast_open_cookie_expiration', |
| 16096 |
'finWaitTimeout': 'fin_wait_1', |
| 16097 |
'finWait_2Timeout': 'fin_wait_2', |
| 16098 |
'idleTimeout': 'idle_timeout', |
| 16099 |
'initCwnd': 'initial_congestion_window_size', |
| 16100 |
'initRwnd': 'initial_receive_window_size', |
| 16101 |
'ipDfMode': 'dont_fragment_flag', |
| 16102 |
'ipTosToClient': 'ip_tos', |
| 16103 |
'ipTtlMode': 'time_to_live', |
| 16104 |
'ipTtlV4': 'time_to_live_v4', |
| 16105 |
'ipTtlV6': 'time_to_live_v6', |
| 16106 |
'keepAliveInterval': 'keep_alive_interval', |
| 16107 |
'limitedTransmit': 'limited_transmit_recovery', |
| 16108 |
'linkQosToClient': 'link_qos', |
| 16109 |
'maxRetrans': 'max_segment_retrans', |
| 16110 |
'synMaxRetrans': 'max_syn_retrans', |
| 16111 |
'rexmtThresh': 'retransmit_threshold', |
| 16112 |
'maxSegmentSize': 'max_segment_size', |
| 16113 |
'md5Signature': 'md5_signature', |
| 16114 |
'minimumRto': 'minimum_rto', |
| 16115 |
'mptcp': 'multipath_tcp', |
| 16116 |
'mptcpCsum': 'mptcp_checksum', |
| 16117 |
'mptcpCsumVerify': 'mptcp_checksum_verify', |
| 16118 |
'mptcpFallback': 'mptcp_fallback', |
| 16119 |
'mptcpFastjoin': 'mptcp_fast_join', |
| 16120 |
'mptcpIdleTimeout': 'mptcp_idle_timeout', |
| 16121 |
'mptcpJoinMax': 'mptcp_join_max', |
| 16122 |
'mptcpMakeafterbreak': 'mptcp_make_after_break', |
| 16123 |
'mptcpNojoindssack': 'mptcp_no_join_dss_ack', |
| 16124 |
'mptcpRtomax': 'mptcp_rto_max', |
| 16125 |
'mptcpRxmitmin': 'mptcp_retransmit_min', |
| 16126 |
'mptcpSubflowmax': 'mptcp_subflow_max', |
| 16127 |
'mptcpTimeout': 'mptcp_timeout', |
| 16128 |
'nagle': 'nagle_algorithm', |
| 16129 |
'pktLossIgnoreBurst': 'pkt_loss_ignore_burst', |
| 16130 |
'pktLossIgnoreRate': 'pkt_loss_ignore_rate', |
| 16131 |
'proxyBufferHigh': 'proxy_buffer_high', |
| 16132 |
'proxyBufferLow': 'proxy_buffer_low', |
| 16133 |
'proxyMss': 'proxy_max_segment', |
| 16134 |
'proxyOptions': 'proxy_options', |
| 16135 |
'pushFlag': 'push_flag', |
| 16136 |
'ratePace': 'rate_pace', |
| 16137 |
'ratePaceMaxRate': 'rate_pace_max_rate', |
| 16138 |
'receiveWindowSize': 'receive_window', |
| 16139 |
'resetOnTimeout': 'reset_on_timeout', |
| 16140 |
'selectiveAcks': 'selective_acks', |
| 16141 |
'selectiveNack': 'selective_nack', |
| 16142 |
'sendBufferSize': 'send_buffer', |
| 16143 |
'slowStart': 'slow_start', |
| 16144 |
'synCookieEnable': 'syn_cookie_enable', |
| 16145 |
'synCookieWhitelist': 'syn_cookie_white_list', |
| 16146 |
'synRtoBase': 'syn_retrans_to_base', |
| 16147 |
'tailLossProbe': 'tail_loss_probe', |
| 16148 |
'timeWaitRecycle': 'time_wait_recycle', |
| 16149 |
'timeWaitTimeout': 'time_wait', |
| 16150 |
'verifiedAccept': 'verified_accept', |
| 16151 |
'zeroWindowTimeout': 'zero_window_timeout', |
| 16152 |
} |
| 16153 |
|
| 16154 |
returnables = [ |
| 16155 |
'full_path', |
| 16156 |
'name', |
| 16157 |
'parent', |
| 16158 |
'description', |
| 16159 |
'abc', |
| 16160 |
'ack_on_push', |
| 16161 |
'auto_proxy_buffer', |
| 16162 |
'auto_receive_window', |
| 16163 |
'auto_send_buffer', |
| 16164 |
'close_wait', |
| 16165 |
'congestion_metrics_cache', |
| 16166 |
'congestion_metrics_cache_timeout', |
| 16167 |
'congestion_control', |
| 16168 |
'deferred_accept', |
| 16169 |
'delay_window_control', |
| 16170 |
'delayed_acks', |
| 16171 |
'dsack', |
| 16172 |
'early_retransmit', |
| 16173 |
'explicit_congestion_notification', |
| 16174 |
'enhanced_loss_recovery', |
| 16175 |
'fast_open', |
| 16176 |
'fast_open_cookie_expiration', |
| 16177 |
'fin_wait_1', |
| 16178 |
'fin_wait_2', |
| 16179 |
'idle_timeout', |
| 16180 |
'initial_congestion_window_size', |
| 16181 |
'initial_receive_window_size', |
| 16182 |
'dont_fragment_flag', |
| 16183 |
'ip_tos', |
| 16184 |
'time_to_live', |
| 16185 |
'time_to_live_v4', |
| 16186 |
'time_to_live_v6', |
| 16187 |
'keep_alive_interval', |
| 16188 |
'limited_transmit_recovery', |
| 16189 |
'link_qos', |
| 16190 |
'max_segment_retrans', |
| 16191 |
'max_syn_retrans', |
| 16192 |
'max_segment_size', |
| 16193 |
'md5_signature', |
| 16194 |
'minimum_rto', |
| 16195 |
'multipath_tcp', |
| 16196 |
'mptcp_checksum', |
| 16197 |
'mptcp_checksum_verify', |
| 16198 |
'mptcp_fallback', |
| 16199 |
'mptcp_fast_join', |
| 16200 |
'mptcp_idle_timeout', |
| 16201 |
'mptcp_join_max', |
| 16202 |
'mptcp_make_after_break', |
| 16203 |
'mptcp_no_join_dss_ack', |
| 16204 |
'mptcp_rto_max', |
| 16205 |
'mptcp_retransmit_min', |
| 16206 |
'mptcp_subflow_max', |
| 16207 |
'mptcp_timeout', |
| 16208 |
'nagle_algorithm', |
| 16209 |
'pkt_loss_ignore_burst', |
| 16210 |
'pkt_loss_ignore_rate', |
| 16211 |
'proxy_buffer_high', |
| 16212 |
'proxy_buffer_low', |
| 16213 |
'proxy_max_segment', |
| 16214 |
'proxy_options', |
| 16215 |
'push_flag', |
| 16216 |
'rate_pace', |
| 16217 |
'rate_pace_max_rate', |
| 16218 |
'receive_window', |
| 16219 |
'reset_on_timeout', |
| 16220 |
'retransmit_threshold', |
| 16221 |
'selective_acks', |
| 16222 |
'selective_nack', |
| 16223 |
'send_buffer', |
| 16224 |
'slow_start', |
| 16225 |
'syn_cookie_enable', |
| 16226 |
'syn_cookie_white_list', |
| 16227 |
'syn_retrans_to_base', |
| 16228 |
'tail_loss_probe', |
| 16229 |
'time_wait_recycle', |
| 16230 |
'time_wait', |
| 16231 |
'timestamps', |
| 16232 |
'verified_accept', |
| 16233 |
'zero_window_timeout', |
| 16234 |
] |
| 16235 |
|
| 16236 |
@property |
| 16237 |
def description(self): |
| 16238 |
if self._values['description'] in [None, 'none']: |
| 16239 |
return None |
| 16240 |
return self._values['description'] |
| 16241 |
|
| 16242 |
@property |
| 16243 |
def time_wait(self): |
| 16244 |
if self._values['time_wait'] is None: |
| 16245 |
return None |
| 16246 |
if self._values['time_wait'] == 0: |
| 16247 |
return "immediate" |
| 16248 |
if self._values['time_wait'] == 4294967295: |
| 16249 |
return 'indefinite' |
| 16250 |
return self._values['time_wait'] |
| 16251 |
|
| 16252 |
@property |
| 16253 |
def close_wait(self): |
| 16254 |
if self._values['close_wait'] is None: |
| 16255 |
return None |
| 16256 |
if self._values['close_wait'] == 0: |
| 16257 |
return "immediate" |
| 16258 |
if self._values['close_wait'] == 4294967295: |
| 16259 |
return 'indefinite' |
| 16260 |
return self._values['close_wait'] |
| 16261 |
|
| 16262 |
@property |
| 16263 |
def fin_wait_1(self): |
| 16264 |
if self._values['fin_wait_1'] is None: |
| 16265 |
return None |
| 16266 |
if self._values['fin_wait_1'] == 0: |
| 16267 |
return "immediate" |
| 16268 |
if self._values['fin_wait_1'] == 4294967295: |
| 16269 |
return 'indefinite' |
| 16270 |
return self._values['fin_wait_1'] |
| 16271 |
|
| 16272 |
@property |
| 16273 |
def fin_wait_2(self): |
| 16274 |
if self._values['fin_wait_2'] is None: |
| 16275 |
return None |
| 16276 |
if self._values['fin_wait_2'] == 0: |
| 16277 |
return "immediate" |
| 16278 |
if self._values['fin_wait_2'] == 4294967295: |
| 16279 |
return 'indefinite' |
| 16280 |
return self._values['fin_wait_2'] |
| 16281 |
|
| 16282 |
@property |
| 16283 |
def zero_window_timeout(self): |
| 16284 |
if self._values['zero_window_timeout'] is None: |
| 16285 |
return None |
| 16286 |
if self._values['zero_window_timeout'] == 4294967295: |
| 16287 |
return 'indefinite' |
| 16288 |
return self._values['zero_window_timeout'] |
| 16289 |
|
| 16290 |
@property |
| 16291 |
def idle_timeout(self): |
| 16292 |
if self._values['idle_timeout'] is None: |
| 16293 |
return None |
| 16294 |
if self._values['idle_timeout'] == 4294967295: |
| 16295 |
return 'indefinite' |
| 16296 |
return self._values['idle_timeout'] |
| 16297 |
|
| 16298 |
@property |
| 16299 |
def keep_alive_interval(self): |
| 16300 |
if self._values['keep_alive_interval'] is None: |
| 16301 |
return None |
| 16302 |
if self._values['keep_alive_interval'] == 4294967295: |
| 16303 |
return 'indefinite' |
| 16304 |
return self._values['keep_alive_interval'] |
| 16305 |
|
| 16306 |
@property |
| 16307 |
def verified_accept(self): |
| 16308 |
return flatten_boolean(self._values['verified_accept']) |
| 16309 |
|
| 16310 |
@property |
| 16311 |
def timestamps(self): |
| 16312 |
return flatten_boolean(self._values['timestamps']) |
| 16313 |
|
| 16314 |
@property |
| 16315 |
def time_wait_recycle(self): |
| 16316 |
return flatten_boolean(self._values['time_wait_recycle']) |
| 16317 |
|
| 16318 |
@property |
| 16319 |
def tail_loss_probe(self): |
| 16320 |
return flatten_boolean(self._values['tail_loss_probe']) |
| 16321 |
|
| 16322 |
@property |
| 16323 |
def syn_cookie_white_list(self): |
| 16324 |
return flatten_boolean(self._values['syn_cookie_white_list']) |
| 16325 |
|
| 16326 |
@property |
| 16327 |
def syn_cookie_enable(self): |
| 16328 |
return flatten_boolean(self._values['syn_cookie_enable']) |
| 16329 |
|
| 16330 |
@property |
| 16331 |
def slow_start(self): |
| 16332 |
return flatten_boolean(self._values['slow_start']) |
| 16333 |
|
| 16334 |
@property |
| 16335 |
def selective_nack(self): |
| 16336 |
return flatten_boolean(self._values['selective_nack']) |
| 16337 |
|
| 16338 |
@property |
| 16339 |
def selective_acks(self): |
| 16340 |
return flatten_boolean(self._values['selective_acks']) |
| 16341 |
|
| 16342 |
@property |
| 16343 |
def reset_on_timeout(self): |
| 16344 |
return flatten_boolean(self._values['reset_on_timeout']) |
| 16345 |
|
| 16346 |
@property |
| 16347 |
def rate_pace(self): |
| 16348 |
return flatten_boolean(self._values['rate_pace']) |
| 16349 |
|
| 16350 |
@property |
| 16351 |
def proxy_options(self): |
| 16352 |
return flatten_boolean(self._values['proxy_options']) |
| 16353 |
|
| 16354 |
@property |
| 16355 |
def proxy_max_segment(self): |
| 16356 |
return flatten_boolean(self._values['proxy_max_segment']) |
| 16357 |
|
| 16358 |
@property |
| 16359 |
def nagle_algorithm(self): |
| 16360 |
return flatten_boolean(self._values['nagle_algorithm']) |
| 16361 |
|
| 16362 |
@property |
| 16363 |
def mptcp_no_join_dss_ack(self): |
| 16364 |
return flatten_boolean(self._values['mptcp_no_join_dss_ack']) |
| 16365 |
|
| 16366 |
@property |
| 16367 |
def mptcp_make_after_break(self): |
| 16368 |
return flatten_boolean(self._values['mptcp_make_after_break']) |
| 16369 |
|
| 16370 |
@property |
| 16371 |
def mptcp_fast_join(self): |
| 16372 |
return flatten_boolean(self._values['mptcp_fast_join']) |
| 16373 |
|
| 16374 |
@property |
| 16375 |
def mptcp_checksum_verify(self): |
| 16376 |
return flatten_boolean(self._values['mptcp_checksum_verify']) |
| 16377 |
|
| 16378 |
@property |
| 16379 |
def mptcp_checksum(self): |
| 16380 |
return flatten_boolean(self._values['mptcp_checksum']) |
| 16381 |
|
| 16382 |
@property |
| 16383 |
def multipath_tcp(self): |
| 16384 |
return flatten_boolean(self._values['multipath_tcp']) |
| 16385 |
|
| 16386 |
@property |
| 16387 |
def md5_signature(self): |
| 16388 |
return flatten_boolean(self._values['md5_signature']) |
| 16389 |
|
| 16390 |
@property |
| 16391 |
def limited_transmit_recovery(self): |
| 16392 |
return flatten_boolean(self._values['limited_transmit_recovery']) |
| 16393 |
|
| 16394 |
@property |
| 16395 |
def fast_open(self): |
| 16396 |
return flatten_boolean(self._values['fast_open']) |
| 16397 |
|
| 16398 |
@property |
| 16399 |
def enhanced_loss_recovery(self): |
| 16400 |
return flatten_boolean(self._values['enhanced_loss_recovery']) |
| 16401 |
|
| 16402 |
@property |
| 16403 |
def explicit_congestion_notification(self): |
| 16404 |
return flatten_boolean(self._values['explicit_congestion_notification']) |
| 16405 |
|
| 16406 |
@property |
| 16407 |
def early_retransmit(self): |
| 16408 |
return flatten_boolean(self._values['early_retransmit']) |
| 16409 |
|
| 16410 |
@property |
| 16411 |
def dsack(self): |
| 16412 |
return flatten_boolean(self._values['dsack']) |
| 16413 |
|
| 16414 |
@property |
| 16415 |
def delayed_acks(self): |
| 16416 |
return flatten_boolean(self._values['delayed_acks']) |
| 16417 |
|
| 16418 |
@property |
| 16419 |
def delay_window_control(self): |
| 16420 |
return flatten_boolean(self._values['delay_window_control']) |
| 16421 |
|
| 16422 |
@property |
| 16423 |
def deferred_accept(self): |
| 16424 |
return flatten_boolean(self._values['deferred_accept']) |
| 16425 |
|
| 16426 |
@property |
| 16427 |
def congestion_metrics_cache(self): |
| 16428 |
return flatten_boolean(self._values['congestion_metrics_cache']) |
| 16429 |
|
| 16430 |
@property |
| 16431 |
def auto_send_buffer(self): |
| 16432 |
return flatten_boolean(self._values['auto_send_buffer']) |
| 16433 |
|
| 16434 |
@property |
| 16435 |
def auto_receive_window(self): |
| 16436 |
return flatten_boolean(self._values['auto_receive_window']) |
| 16437 |
|
| 16438 |
@property |
| 16439 |
def auto_proxy_buffer(self): |
| 16440 |
return flatten_boolean(self._values['auto_proxy_buffer']) |
| 16441 |
|
| 16442 |
@property |
| 16443 |
def abc(self): |
| 16444 |
return flatten_boolean(self._values['abc']) |
| 16445 |
|
| 16446 |
@property |
| 16447 |
def ack_on_push(self): |
| 16448 |
return flatten_boolean(self._values['ack_on_push']) |
| 16449 |
|
| 16450 |
|
| 16451 |
class TcpProfilesFactManager(BaseManager): |
| 16452 |
def __init__(self, *args, **kwargs): |
| 16453 |
self.client = kwargs.get('client', None) |
| 16454 |
self.module = kwargs.get('module', None) |
| 16455 |
super(TcpProfilesFactManager, self).__init__(**kwargs) |
| 16456 |
|
| 16457 |
def exec_module(self): |
| 16458 |
facts = self._exec_module() |
| 16459 |
result = dict(tcp_profiles=facts) |
| 16460 |
return result |
| 16461 |
|
| 16462 |
def _exec_module(self): |
| 16463 |
results = [] |
| 16464 |
facts = self.read_facts() |
| 16465 |
for item in facts: |
| 16466 |
attrs = item.to_return() |
| 16467 |
results.append(attrs) |
| 16468 |
results = sorted(results, key=lambda k: k['full_path']) |
| 16469 |
return results |
| 16470 |
|
| 16471 |
def read_facts(self): |
| 16472 |
results = [] |
| 16473 |
collection = self.increment_read() |
| 16474 |
for resource in collection: |
| 16475 |
params = TcpProfilesParameters(params=resource) |
| 16476 |
results.append(params) |
| 16477 |
return results |
| 16478 |
|
| 16479 |
def increment_read(self): |
| 16480 |
n = 0 |
| 16481 |
result = [] |
| 16482 |
while True: |
| 16483 |
items = self.read_collection_from_device(skip=n) |
| 16484 |
if not items: |
| 16485 |
break |
| 16486 |
result.extend(items) |
| 16487 |
n = n + self.module.params['data_increment'] |
| 16488 |
return result |
| 16489 |
|
| 16490 |
def read_collection_from_device(self, skip=0): |
| 16491 |
uri = "https://{0}:{1}/mgmt/tm/ltm/profile/tcp".format( |
| 16492 |
self.client.provider['server'], |
| 16493 |
self.client.provider['server_port'], |
| 16494 |
) |
| 16495 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 16496 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 16497 |
) |
| 16498 |
resp = self.client.api.get(uri + query) |
| 16499 |
try: |
| 16500 |
response = resp.json() |
| 16501 |
except ValueError as ex: |
| 16502 |
raise F5ModuleError(str(ex)) |
| 16503 |
|
| 16504 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 16505 |
raise F5ModuleError(resp.content) |
| 16506 |
|
| 16507 |
if 'items' not in response: |
| 16508 |
return [] |
| 16509 |
result = response['items'] |
| 16510 |
return result |
| 16511 |
|
| 16512 |
|
| 16513 |
class TrafficGroupsParameters(BaseParameters): |
| 16514 |
api_map = { |
| 16515 |
'fullPath': 'full_path', |
| 16516 |
'autoFailbackEnabled': 'auto_failback_enabled', |
| 16517 |
'autoFailbackTime': 'auto_failback_time', |
| 16518 |
'haLoadFactor': 'ha_load_factor', |
| 16519 |
'haOrder': 'ha_order', |
| 16520 |
'isFloating': 'is_floating', |
| 16521 |
'mac': 'mac_masquerade_address' |
| 16522 |
} |
| 16523 |
|
| 16524 |
returnables = [ |
| 16525 |
'full_path', |
| 16526 |
'name', |
| 16527 |
'description', |
| 16528 |
'auto_failback_enabled', |
| 16529 |
'auto_failback_time', |
| 16530 |
'ha_load_factor', |
| 16531 |
'ha_order', |
| 16532 |
'is_floating', |
| 16533 |
'mac_masquerade_address' |
| 16534 |
] |
| 16535 |
|
| 16536 |
@property |
| 16537 |
def auto_failback_time(self): |
| 16538 |
if self._values['auto_failback_time'] is None: |
| 16539 |
return None |
| 16540 |
return int(self._values['auto_failback_time']) |
| 16541 |
|
| 16542 |
@property |
| 16543 |
def auto_failback_enabled(self): |
| 16544 |
if self._values['auto_failback_enabled'] is None: |
| 16545 |
return None |
| 16546 |
elif self._values['auto_failback_enabled'] == 'false': |
| 16547 |
|
| 16548 |
return 'no' |
| 16549 |
return 'yes' |
| 16550 |
|
| 16551 |
@property |
| 16552 |
def is_floating(self): |
| 16553 |
if self._values['is_floating'] is None: |
| 16554 |
return None |
| 16555 |
elif self._values['is_floating'] == 'true': |
| 16556 |
|
| 16557 |
return 'yes' |
| 16558 |
return 'no' |
| 16559 |
|
| 16560 |
@property |
| 16561 |
def mac_masquerade_address(self): |
| 16562 |
if self._values['mac_masquerade_address'] in [None, 'none']: |
| 16563 |
return None |
| 16564 |
return self._values['mac_masquerade_address'] |
| 16565 |
|
| 16566 |
|
| 16567 |
class TrafficGroupsFactManager(BaseManager): |
| 16568 |
def __init__(self, *args, **kwargs): |
| 16569 |
self.client = kwargs.get('client', None) |
| 16570 |
self.module = kwargs.get('module', None) |
| 16571 |
super(TrafficGroupsFactManager, self).__init__(**kwargs) |
| 16572 |
|
| 16573 |
def exec_module(self): |
| 16574 |
facts = self._exec_module() |
| 16575 |
result = dict(traffic_groups=facts) |
| 16576 |
return result |
| 16577 |
|
| 16578 |
def _exec_module(self): |
| 16579 |
results = [] |
| 16580 |
facts = self.read_facts() |
| 16581 |
for item in facts: |
| 16582 |
attrs = item.to_return() |
| 16583 |
results.append(attrs) |
| 16584 |
results = sorted(results, key=lambda k: k['full_path']) |
| 16585 |
return results |
| 16586 |
|
| 16587 |
def read_facts(self): |
| 16588 |
results = [] |
| 16589 |
collection = self.increment_read() |
| 16590 |
for resource in collection: |
| 16591 |
attrs = resource |
| 16592 |
attrs['stats'] = self.read_stats_from_device(attrs['fullPath']) |
| 16593 |
params = TrafficGroupsParameters(params=attrs) |
| 16594 |
results.append(params) |
| 16595 |
return results |
| 16596 |
|
| 16597 |
def increment_read(self): |
| 16598 |
n = 0 |
| 16599 |
result = [] |
| 16600 |
while True: |
| 16601 |
items = self.read_collection_from_device(skip=n) |
| 16602 |
if not items: |
| 16603 |
break |
| 16604 |
result.extend(items) |
| 16605 |
n = n + self.module.params['data_increment'] |
| 16606 |
return result |
| 16607 |
|
| 16608 |
def read_collection_from_device(self, skip=0): |
| 16609 |
uri = "https://{0}:{1}/mgmt/tm/cm/traffic-group".format( |
| 16610 |
self.client.provider['server'], |
| 16611 |
self.client.provider['server_port'], |
| 16612 |
) |
| 16613 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 16614 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 16615 |
) |
| 16616 |
resp = self.client.api.get(uri + query) |
| 16617 |
try: |
| 16618 |
response = resp.json() |
| 16619 |
except ValueError as ex: |
| 16620 |
raise F5ModuleError(str(ex)) |
| 16621 |
|
| 16622 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 16623 |
raise F5ModuleError(resp.content) |
| 16624 |
|
| 16625 |
if 'items' not in response: |
| 16626 |
return [] |
| 16627 |
result = response['items'] |
| 16628 |
return result |
| 16629 |
|
| 16630 |
def read_stats_from_device(self, full_path): |
| 16631 |
uri = "https://{0}:{1}/mgmt/tm/cm/traffic-group/{2}/stats".format( |
| 16632 |
self.client.provider['server'], |
| 16633 |
self.client.provider['server_port'], |
| 16634 |
transform_name(name=full_path) |
| 16635 |
) |
| 16636 |
resp = self.client.api.get(uri) |
| 16637 |
try: |
| 16638 |
response = resp.json() |
| 16639 |
except ValueError as ex: |
| 16640 |
raise F5ModuleError(str(ex)) |
| 16641 |
|
| 16642 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 16643 |
raise F5ModuleError(resp.content) |
| 16644 |
|
| 16645 |
result = parseStats(response) |
| 16646 |
try: |
| 16647 |
return result['stats'] |
| 16648 |
except KeyError: |
| 16649 |
return {} |
| 16650 |
|
| 16651 |
|
| 16652 |
class TrunksParameters(BaseParameters): |
| 16653 |
api_map = { |
| 16654 |
'fullPath': 'full_path', |
| 16655 |
'media': 'media_speed', |
| 16656 |
'lacpMode': 'lacp_mode', |
| 16657 |
'lacp': 'lacp_state', |
| 16658 |
'lacpTimeout': 'lacp_timeout', |
| 16659 |
'stp': 'stp_enabled', |
| 16660 |
'workingMbrCount': 'operational_member_count', |
| 16661 |
'linkSelectPolicy': 'link_selection_policy', |
| 16662 |
'distributionHash': 'distribution_hash', |
| 16663 |
'cfgMbrCount': 'configured_member_count' |
| 16664 |
} |
| 16665 |
|
| 16666 |
returnables = [ |
| 16667 |
'full_path', |
| 16668 |
'name', |
| 16669 |
'description', |
| 16670 |
'media_speed', |
| 16671 |
'lacp_mode', |
| 16672 |
'lacp_enabled', |
| 16673 |
'stp_enabled', |
| 16674 |
'operational_member_count', |
| 16675 |
'media_status', |
| 16676 |
'link_selection_policy', |
| 16677 |
'lacp_timeout', |
| 16678 |
'interfaces', |
| 16679 |
'distribution_hash', |
| 16680 |
'configured_member_count' |
| 16681 |
] |
| 16682 |
|
| 16683 |
@property |
| 16684 |
def lacp_enabled(self): |
| 16685 |
if self._values['lacp_enabled'] is None: |
| 16686 |
return None |
| 16687 |
elif self._values['lacp_enabled'] == 'disabled': |
| 16688 |
return 'no' |
| 16689 |
return 'yes' |
| 16690 |
|
| 16691 |
@property |
| 16692 |
def stp_enabled(self): |
| 16693 |
if self._values['stp_enabled'] is None: |
| 16694 |
return None |
| 16695 |
elif self._values['stp_enabled'] == 'disabled': |
| 16696 |
return 'no' |
| 16697 |
return 'yes' |
| 16698 |
|
| 16699 |
@property |
| 16700 |
def media_status(self): |
| 16701 |
return self._values['stats']['status'] |
| 16702 |
|
| 16703 |
|
| 16704 |
class TrunksFactManager(BaseManager): |
| 16705 |
def __init__(self, *args, **kwargs): |
| 16706 |
self.client = kwargs.get('client', None) |
| 16707 |
self.module = kwargs.get('module', None) |
| 16708 |
super(TrunksFactManager, self).__init__(**kwargs) |
| 16709 |
|
| 16710 |
def exec_module(self): |
| 16711 |
facts = self._exec_module() |
| 16712 |
result = dict(trunks=facts) |
| 16713 |
return result |
| 16714 |
|
| 16715 |
def _exec_module(self): |
| 16716 |
results = [] |
| 16717 |
facts = self.read_facts() |
| 16718 |
for item in facts: |
| 16719 |
attrs = item.to_return() |
| 16720 |
results.append(attrs) |
| 16721 |
results = sorted(results, key=lambda k: k['full_path']) |
| 16722 |
return results |
| 16723 |
|
| 16724 |
def read_facts(self): |
| 16725 |
results = [] |
| 16726 |
collection = self.increment_read() |
| 16727 |
for resource in collection: |
| 16728 |
attrs = resource |
| 16729 |
attrs['stats'] = self.read_stats_from_device(attrs['fullPath']) |
| 16730 |
params = TrunksParameters(params=attrs) |
| 16731 |
results.append(params) |
| 16732 |
return results |
| 16733 |
|
| 16734 |
def increment_read(self): |
| 16735 |
n = 0 |
| 16736 |
result = [] |
| 16737 |
while True: |
| 16738 |
items = self.read_collection_from_device(skip=n) |
| 16739 |
if not items: |
| 16740 |
break |
| 16741 |
result.extend(items) |
| 16742 |
n = n + self.module.params['data_increment'] |
| 16743 |
return result |
| 16744 |
|
| 16745 |
def read_collection_from_device(self, skip=0): |
| 16746 |
uri = "https://{0}:{1}/mgmt/tm/net/trunk".format( |
| 16747 |
self.client.provider['server'], |
| 16748 |
self.client.provider['server_port'], |
| 16749 |
) |
| 16750 |
query = "?$top={0}&$skip={1}".format(self.module.params['data_increment'], skip) |
| 16751 |
resp = self.client.api.get(uri + query) |
| 16752 |
try: |
| 16753 |
response = resp.json() |
| 16754 |
except ValueError as ex: |
| 16755 |
raise F5ModuleError(str(ex)) |
| 16756 |
|
| 16757 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 16758 |
raise F5ModuleError(resp.content) |
| 16759 |
|
| 16760 |
if 'items' not in response: |
| 16761 |
return [] |
| 16762 |
result = response['items'] |
| 16763 |
return result |
| 16764 |
|
| 16765 |
def read_stats_from_device(self, full_path): |
| 16766 |
uri = "https://{0}:{1}/mgmt/tm/net/trunk/{2}/stats".format( |
| 16767 |
self.client.provider['server'], |
| 16768 |
self.client.provider['server_port'], |
| 16769 |
transform_name(name=full_path) |
| 16770 |
) |
| 16771 |
resp = self.client.api.get(uri) |
| 16772 |
try: |
| 16773 |
response = resp.json() |
| 16774 |
except ValueError as ex: |
| 16775 |
raise F5ModuleError(str(ex)) |
| 16776 |
if 'code' in response and response['code'] == 400: |
| 16777 |
if 'message' in response: |
| 16778 |
raise F5ModuleError(response['message']) |
| 16779 |
else: |
| 16780 |
raise F5ModuleError(resp.content) |
| 16781 |
result = parseStats(response) |
| 16782 |
try: |
| 16783 |
return result['stats'] |
| 16784 |
except KeyError: |
| 16785 |
return {} |
| 16786 |
|
| 16787 |
|
| 16788 |
class UCSParameters(BaseParameters): |
| 16789 |
api_map = { |
| 16790 |
'filename': 'file_name', |
| 16791 |
'encrypted': 'encrypted', |
| 16792 |
'file_size': 'file_size', |
| 16793 |
'apiRawValues': 'variables' |
| 16794 |
} |
| 16795 |
|
| 16796 |
returnables = [ |
| 16797 |
'file_name', |
| 16798 |
'encrypted', |
| 16799 |
'file_size', |
| 16800 |
'file_created_date' |
| 16801 |
] |
| 16802 |
|
| 16803 |
@property |
| 16804 |
def file_name(self): |
| 16805 |
name = self._values['variables']['filename'].split("/")[-1] |
| 16806 |
return name |
| 16807 |
|
| 16808 |
@property |
| 16809 |
def encrypted(self): |
| 16810 |
return self._values['variables']['encrypted'] |
| 16811 |
|
| 16812 |
@property |
| 16813 |
def file_size(self): |
| 16814 |
val = self._values['variables']['file_size'] |
| 16815 |
size = re.findall(r'\d+', val)[0] |
| 16816 |
return size |
| 16817 |
|
| 16818 |
@property |
| 16819 |
def file_created_date(self): |
| 16820 |
date = self._values['variables']['file_created_date'] |
| 16821 |
return date |
| 16822 |
|
| 16823 |
|
| 16824 |
class UCSFactManager(BaseManager): |
| 16825 |
def __init__(self, *args, **kwargs): |
| 16826 |
self.client = kwargs.get('client', None) |
| 16827 |
self.module = kwargs.get('module', None) |
| 16828 |
super(UCSFactManager, self).__init__(**kwargs) |
| 16829 |
|
| 16830 |
def exec_module(self): |
| 16831 |
facts = self._exec_module() |
| 16832 |
result = dict(ucs_files=facts) |
| 16833 |
return result |
| 16834 |
|
| 16835 |
def _exec_module(self): |
| 16836 |
results = [] |
| 16837 |
facts = self.read_facts() |
| 16838 |
for item in facts: |
| 16839 |
attrs = item.to_return() |
| 16840 |
results.append(attrs) |
| 16841 |
results = sorted(results, key=lambda k: k['file_name']) |
| 16842 |
return results |
| 16843 |
|
| 16844 |
def read_facts(self): |
| 16845 |
results = [] |
| 16846 |
collection = self.increment_read() |
| 16847 |
for resource in collection: |
| 16848 |
attrs = resource |
| 16849 |
params = UCSParameters(params=attrs) |
| 16850 |
results.append(params) |
| 16851 |
return results |
| 16852 |
|
| 16853 |
def increment_read(self): |
| 16854 |
n = 0 |
| 16855 |
result = [] |
| 16856 |
while True: |
| 16857 |
items = self.read_collection_from_device(skip=n) |
| 16858 |
if not items: |
| 16859 |
break |
| 16860 |
result.extend(items) |
| 16861 |
n = n + self.module.params['data_increment'] |
| 16862 |
return result |
| 16863 |
|
| 16864 |
def read_collection_from_device(self, skip=0): |
| 16865 |
uri = "https://{0}:{1}/mgmt/tm/sys/ucs".format( |
| 16866 |
self.client.provider['server'], |
| 16867 |
self.client.provider['server_port'], |
| 16868 |
) |
| 16869 |
query = "?$top={0}&$skip={1}".format(self.module.params['data_increment'], skip) |
| 16870 |
resp = self.client.api.get(uri + query) |
| 16871 |
try: |
| 16872 |
response = resp.json() |
| 16873 |
except ValueError as ex: |
| 16874 |
raise F5ModuleError(str(ex)) |
| 16875 |
|
| 16876 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 16877 |
raise F5ModuleError(resp.content) |
| 16878 |
|
| 16879 |
if 'items' not in response: |
| 16880 |
return [] |
| 16881 |
result = response['items'] |
| 16882 |
return result |
| 16883 |
|
| 16884 |
|
| 16885 |
class UsersParameters(BaseParameters): |
| 16886 |
api_map = { |
| 16887 |
'fullPath': 'full_path', |
| 16888 |
'partitionAccess': 'partition_access', |
| 16889 |
} |
| 16890 |
|
| 16891 |
returnables = [ |
| 16892 |
'full_path', |
| 16893 |
'name', |
| 16894 |
'description', |
| 16895 |
'partition_access', |
| 16896 |
'shell', |
| 16897 |
] |
| 16898 |
|
| 16899 |
@property |
| 16900 |
def partition_access(self): |
| 16901 |
result = [] |
| 16902 |
if self._values['partition_access'] is None: |
| 16903 |
return [] |
| 16904 |
for partition in self._values['partition_access']: |
| 16905 |
del partition['nameReference'] |
| 16906 |
result.append(partition) |
| 16907 |
return result |
| 16908 |
|
| 16909 |
@property |
| 16910 |
def shell(self): |
| 16911 |
if self._values['shell'] in [None, 'none']: |
| 16912 |
return None |
| 16913 |
return self._values['shell'] |
| 16914 |
|
| 16915 |
|
| 16916 |
class UsersFactManager(BaseManager): |
| 16917 |
def __init__(self, *args, **kwargs): |
| 16918 |
self.client = kwargs.get('client', None) |
| 16919 |
self.module = kwargs.get('module', None) |
| 16920 |
super(UsersFactManager, self).__init__(**kwargs) |
| 16921 |
|
| 16922 |
def exec_module(self): |
| 16923 |
facts = self._exec_module() |
| 16924 |
result = dict(users=facts) |
| 16925 |
return result |
| 16926 |
|
| 16927 |
def _exec_module(self): |
| 16928 |
results = [] |
| 16929 |
facts = self.read_facts() |
| 16930 |
for item in facts: |
| 16931 |
attrs = item.to_return() |
| 16932 |
results.append(attrs) |
| 16933 |
results = sorted(results, key=lambda k: k['full_path']) |
| 16934 |
return results |
| 16935 |
|
| 16936 |
def read_facts(self): |
| 16937 |
results = [] |
| 16938 |
collection = self.read_collection_from_device() |
| 16939 |
for resource in collection: |
| 16940 |
attrs = resource |
| 16941 |
params = UsersParameters(params=attrs) |
| 16942 |
results.append(params) |
| 16943 |
return results |
| 16944 |
|
| 16945 |
def read_collection_from_device(self): |
| 16946 |
uri = "https://{0}:{1}/mgmt/tm/auth/user".format( |
| 16947 |
self.client.provider['server'], |
| 16948 |
self.client.provider['server_port'], |
| 16949 |
) |
| 16950 |
resp = self.client.api.get(uri) |
| 16951 |
try: |
| 16952 |
response = resp.json() |
| 16953 |
except ValueError as ex: |
| 16954 |
raise F5ModuleError(str(ex)) |
| 16955 |
|
| 16956 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 16957 |
raise F5ModuleError(resp.content) |
| 16958 |
|
| 16959 |
if 'items' not in response: |
| 16960 |
return [] |
| 16961 |
result = response['items'] |
| 16962 |
return result |
| 16963 |
|
| 16964 |
|
| 16965 |
class UdpProfilesParameters(BaseParameters): |
| 16966 |
api_map = { |
| 16967 |
'fullPath': 'full_path', |
| 16968 |
'allowNoPayload': 'allow_no_payload', |
| 16969 |
'bufferMaxBytes': 'buffer_max_bytes', |
| 16970 |
'bufferMaxPackets': 'buffer_max_packets', |
| 16971 |
'datagramLoadBalancing': 'datagram_load_balancing', |
| 16972 |
'defaultsFrom': 'parent', |
| 16973 |
'idleTimeout': 'idle_timeout', |
| 16974 |
'ipDfMode': 'ip_df_mode', |
| 16975 |
'ipTosToClient': 'ip_tos_to_client', |
| 16976 |
'ipTtlMode': 'ip_ttl_mode', |
| 16977 |
'ipTtlV4': 'ip_ttl_v4', |
| 16978 |
'ipTtlV6': 'ip_ttl_v6', |
| 16979 |
'linkQosToClient': 'link_qos_to_client', |
| 16980 |
'noChecksum': 'no_checksum', |
| 16981 |
'proxyMss': 'proxy_mss', |
| 16982 |
} |
| 16983 |
|
| 16984 |
returnables = [ |
| 16985 |
'full_path', |
| 16986 |
'name', |
| 16987 |
'parent', |
| 16988 |
'description', |
| 16989 |
'allow_no_payload', |
| 16990 |
'buffer_max_bytes', |
| 16991 |
'buffer_max_packets', |
| 16992 |
'datagram_load_balancing', |
| 16993 |
'idle_timeout', |
| 16994 |
'ip_df_mode', |
| 16995 |
'ip_tos_to_client', |
| 16996 |
'ip_ttl_mode', |
| 16997 |
'ip_ttl_v4', |
| 16998 |
'ip_ttl_v6', |
| 16999 |
'link_qos_to_client', |
| 17000 |
'no_checksum', |
| 17001 |
'proxy_mss', |
| 17002 |
] |
| 17003 |
|
| 17004 |
@property |
| 17005 |
def description(self): |
| 17006 |
if self._values['description'] in [None, 'none']: |
| 17007 |
return None |
| 17008 |
return self._values['description'] |
| 17009 |
|
| 17010 |
@property |
| 17011 |
def allow_no_payload(self): |
| 17012 |
return flatten_boolean(self._values['allow_no_payload']) |
| 17013 |
|
| 17014 |
@property |
| 17015 |
def datagram_load_balancing(self): |
| 17016 |
return flatten_boolean(self._values['datagram_load_balancing']) |
| 17017 |
|
| 17018 |
@property |
| 17019 |
def proxy_mss(self): |
| 17020 |
return flatten_boolean(self._values['proxy_mss']) |
| 17021 |
|
| 17022 |
@property |
| 17023 |
def no_checksum(self): |
| 17024 |
return flatten_boolean(self._values['no_checksum']) |
| 17025 |
|
| 17026 |
|
| 17027 |
class UdpProfilesFactManager(BaseManager): |
| 17028 |
def __init__(self, *args, **kwargs): |
| 17029 |
self.client = kwargs.get('client', None) |
| 17030 |
self.module = kwargs.get('module', None) |
| 17031 |
super(UdpProfilesFactManager, self).__init__(**kwargs) |
| 17032 |
|
| 17033 |
def exec_module(self): |
| 17034 |
facts = self._exec_module() |
| 17035 |
result = dict(udp_profiles=facts) |
| 17036 |
return result |
| 17037 |
|
| 17038 |
def _exec_module(self): |
| 17039 |
results = [] |
| 17040 |
facts = self.read_facts() |
| 17041 |
for item in facts: |
| 17042 |
attrs = item.to_return() |
| 17043 |
results.append(attrs) |
| 17044 |
results = sorted(results, key=lambda k: k['full_path']) |
| 17045 |
return results |
| 17046 |
|
| 17047 |
def read_facts(self): |
| 17048 |
results = [] |
| 17049 |
collection = self.increment_read() |
| 17050 |
for resource in collection: |
| 17051 |
params = UdpProfilesParameters(params=resource) |
| 17052 |
results.append(params) |
| 17053 |
return results |
| 17054 |
|
| 17055 |
def increment_read(self): |
| 17056 |
n = 0 |
| 17057 |
result = [] |
| 17058 |
while True: |
| 17059 |
items = self.read_collection_from_device(skip=n) |
| 17060 |
if not items: |
| 17061 |
break |
| 17062 |
result.extend(items) |
| 17063 |
n = n + self.module.params['data_increment'] |
| 17064 |
return result |
| 17065 |
|
| 17066 |
def read_collection_from_device(self, skip=0): |
| 17067 |
uri = "https://{0}:{1}/mgmt/tm/ltm/profile/udp".format( |
| 17068 |
self.client.provider['server'], |
| 17069 |
self.client.provider['server_port'], |
| 17070 |
) |
| 17071 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 17072 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 17073 |
) |
| 17074 |
resp = self.client.api.get(uri + query) |
| 17075 |
try: |
| 17076 |
response = resp.json() |
| 17077 |
except ValueError as ex: |
| 17078 |
raise F5ModuleError(str(ex)) |
| 17079 |
|
| 17080 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 17081 |
raise F5ModuleError(resp.content) |
| 17082 |
|
| 17083 |
if 'items' not in response: |
| 17084 |
return [] |
| 17085 |
result = response['items'] |
| 17086 |
return result |
| 17087 |
|
| 17088 |
|
| 17089 |
class VcmpGuestsParameters(BaseParameters): |
| 17090 |
api_map = { |
| 17091 |
'fullPath': 'full_path', |
| 17092 |
'allowedSlots': 'allowed_slots', |
| 17093 |
'assignedSlots': 'assigned_slots', |
| 17094 |
'bootPriority': 'boot_priority', |
| 17095 |
'coresPerSlot': 'cores_per_slot', |
| 17096 |
'initialImage': 'initial_image', |
| 17097 |
'initialHotfix': 'hotfix_image', |
| 17098 |
'managementGw': 'mgmt_route', |
| 17099 |
'managementIp': 'mgmt_address', |
| 17100 |
'managementNetwork': 'mgmt_network', |
| 17101 |
'minSlots': 'min_number_of_slots', |
| 17102 |
'slots': 'number_of_slots', |
| 17103 |
'sslMode': 'ssl_mode', |
| 17104 |
'virtualDisk': 'virtual_disk' |
| 17105 |
} |
| 17106 |
|
| 17107 |
returnables = [ |
| 17108 |
'name', |
| 17109 |
'full_path', |
| 17110 |
'allowed_slots', |
| 17111 |
'assigned_slots', |
| 17112 |
'boot_priority', |
| 17113 |
'cores_per_slot', |
| 17114 |
'hostname', |
| 17115 |
'hotfix_image', |
| 17116 |
'initial_image', |
| 17117 |
'mgmt_route', |
| 17118 |
'mgmt_address', |
| 17119 |
'mgmt_network', |
| 17120 |
'vlans', |
| 17121 |
'min_number_of_slots', |
| 17122 |
'number_of_slots', |
| 17123 |
'ssl_mode', |
| 17124 |
'state', |
| 17125 |
'virtual_disk', |
| 17126 |
] |
| 17127 |
|
| 17128 |
|
| 17129 |
class VcmpGuestsFactManager(BaseManager): |
| 17130 |
def __init__(self, *args, **kwargs): |
| 17131 |
self.client = kwargs.get('client', None) |
| 17132 |
self.module = kwargs.get('module', None) |
| 17133 |
super(VcmpGuestsFactManager, self).__init__(**kwargs) |
| 17134 |
|
| 17135 |
def exec_module(self): |
| 17136 |
facts = self._exec_module() |
| 17137 |
result = dict(vcmp_guests=facts) |
| 17138 |
return result |
| 17139 |
|
| 17140 |
def _exec_module(self): |
| 17141 |
if 'vcmp' not in self.provisioned_modules: |
| 17142 |
return [] |
| 17143 |
results = [] |
| 17144 |
facts = self.read_facts() |
| 17145 |
for item in facts: |
| 17146 |
attrs = item.to_return() |
| 17147 |
results.append(attrs) |
| 17148 |
results = sorted(results, key=lambda k: k['full_path']) |
| 17149 |
return results |
| 17150 |
|
| 17151 |
def read_facts(self): |
| 17152 |
results = [] |
| 17153 |
collection = self.read_collection_from_device() |
| 17154 |
for resource in collection: |
| 17155 |
params = VcmpGuestsParameters(params=resource) |
| 17156 |
results.append(params) |
| 17157 |
return results |
| 17158 |
|
| 17159 |
def read_collection_from_device(self): |
| 17160 |
uri = "https://{0}:{1}/mgmt/tm/vcmp/guest".format( |
| 17161 |
self.client.provider['server'], |
| 17162 |
self.client.provider['server_port'], |
| 17163 |
) |
| 17164 |
resp = self.client.api.get(uri) |
| 17165 |
try: |
| 17166 |
response = resp.json() |
| 17167 |
except ValueError as ex: |
| 17168 |
raise F5ModuleError(str(ex)) |
| 17169 |
|
| 17170 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 17171 |
raise F5ModuleError(resp.content) |
| 17172 |
|
| 17173 |
if 'items' not in response: |
| 17174 |
return [] |
| 17175 |
result = response['items'] |
| 17176 |
return result |
| 17177 |
|
| 17178 |
|
| 17179 |
class VirtualAddressesParameters(BaseParameters): |
| 17180 |
api_map = { |
| 17181 |
'fullPath': 'full_path', |
| 17182 |
'arp': 'arp_enabled', |
| 17183 |
'autoDelete': 'auto_delete_enabled', |
| 17184 |
'connectionLimit': 'connection_limit', |
| 17185 |
'icmpEcho': 'icmp_echo', |
| 17186 |
'mask': 'netmask', |
| 17187 |
'routeAdvertisement': 'route_advertisement', |
| 17188 |
'trafficGroup': 'traffic_group', |
| 17189 |
'inheritedTrafficGroup': 'inherited_traffic_group' |
| 17190 |
} |
| 17191 |
|
| 17192 |
returnables = [ |
| 17193 |
'full_path', |
| 17194 |
'name', |
| 17195 |
'address', |
| 17196 |
'arp_enabled', |
| 17197 |
'auto_delete_enabled', |
| 17198 |
'connection_limit', |
| 17199 |
'description', |
| 17200 |
'enabled', |
| 17201 |
'icmp_echo', |
| 17202 |
'floating', |
| 17203 |
'netmask', |
| 17204 |
'route_advertisement', |
| 17205 |
'traffic_group', |
| 17206 |
'spanning', |
| 17207 |
'inherited_traffic_group' |
| 17208 |
] |
| 17209 |
|
| 17210 |
@property |
| 17211 |
def spanning(self): |
| 17212 |
return flatten_boolean(self._values['spanning']) |
| 17213 |
|
| 17214 |
@property |
| 17215 |
def arp_enabled(self): |
| 17216 |
return flatten_boolean(self._values['arp_enabled']) |
| 17217 |
|
| 17218 |
@property |
| 17219 |
def route_advertisement(self): |
| 17220 |
return flatten_boolean(self._values['route_advertisement']) |
| 17221 |
|
| 17222 |
@property |
| 17223 |
def auto_delete_enabled(self): |
| 17224 |
return flatten_boolean(self._values['auto_delete_enabled']) |
| 17225 |
|
| 17226 |
@property |
| 17227 |
def inherited_traffic_group(self): |
| 17228 |
return flatten_boolean(self._values['inherited_traffic_group']) |
| 17229 |
|
| 17230 |
@property |
| 17231 |
def icmp_echo(self): |
| 17232 |
return flatten_boolean(self._values['icmp_echo']) |
| 17233 |
|
| 17234 |
@property |
| 17235 |
def floating(self): |
| 17236 |
return flatten_boolean(self._values['floating']) |
| 17237 |
|
| 17238 |
@property |
| 17239 |
def enabled(self): |
| 17240 |
return flatten_boolean(self._values['enabled']) |
| 17241 |
|
| 17242 |
|
| 17243 |
class VirtualAddressesFactManager(BaseManager): |
| 17244 |
def __init__(self, *args, **kwargs): |
| 17245 |
self.client = kwargs.get('client', None) |
| 17246 |
self.module = kwargs.get('module', None) |
| 17247 |
super(VirtualAddressesFactManager, self).__init__(**kwargs) |
| 17248 |
|
| 17249 |
def exec_module(self): |
| 17250 |
facts = self._exec_module() |
| 17251 |
result = dict(virtual_addresses=facts) |
| 17252 |
return result |
| 17253 |
|
| 17254 |
def _exec_module(self): |
| 17255 |
results = [] |
| 17256 |
facts = self.read_facts() |
| 17257 |
for item in facts: |
| 17258 |
attrs = item.to_return() |
| 17259 |
results.append(attrs) |
| 17260 |
results = sorted(results, key=lambda k: k['full_path']) |
| 17261 |
return results |
| 17262 |
|
| 17263 |
def read_facts(self): |
| 17264 |
results = [] |
| 17265 |
collection = self.increment_read() |
| 17266 |
for resource in collection: |
| 17267 |
params = VirtualAddressesParameters(params=resource) |
| 17268 |
results.append(params) |
| 17269 |
return results |
| 17270 |
|
| 17271 |
def increment_read(self): |
| 17272 |
n = 0 |
| 17273 |
result = [] |
| 17274 |
while True: |
| 17275 |
items = self.read_collection_from_device(skip=n) |
| 17276 |
if not items: |
| 17277 |
break |
| 17278 |
result.extend(items) |
| 17279 |
n = n + self.module.params['data_increment'] |
| 17280 |
return result |
| 17281 |
|
| 17282 |
def read_collection_from_device(self, skip=0): |
| 17283 |
uri = "https://{0}:{1}/mgmt/tm/ltm/virtual-address".format( |
| 17284 |
self.client.provider['server'], |
| 17285 |
self.client.provider['server_port'], |
| 17286 |
) |
| 17287 |
query = "?$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 17288 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 17289 |
) |
| 17290 |
resp = self.client.api.get(uri + query) |
| 17291 |
try: |
| 17292 |
response = resp.json() |
| 17293 |
except ValueError as ex: |
| 17294 |
raise F5ModuleError(str(ex)) |
| 17295 |
|
| 17296 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 17297 |
raise F5ModuleError(resp.content) |
| 17298 |
|
| 17299 |
if 'items' not in response: |
| 17300 |
return [] |
| 17301 |
result = response['items'] |
| 17302 |
return result |
| 17303 |
|
| 17304 |
|
| 17305 |
class VirtualServersParameters(BaseParameters): |
| 17306 |
api_map = { |
| 17307 |
'fullPath': 'full_path', |
| 17308 |
'autoLasthop': 'auto_lasthop', |
| 17309 |
'bwcPolicy': 'bw_controller_policy', |
| 17310 |
'cmpEnabled': 'cmp_enabled', |
| 17311 |
'connectionLimit': 'connection_limit', |
| 17312 |
'fallbackPersistence': 'fallback_persistence_profile', |
| 17313 |
'persist': 'persistence_profile', |
| 17314 |
'translatePort': 'translate_port', |
| 17315 |
'translateAddress': 'translate_address', |
| 17316 |
'lastHopPool': 'last_hop_pool', |
| 17317 |
'nat64': 'nat64_enabled', |
| 17318 |
'sourcePort': 'source_port_behavior', |
| 17319 |
'ipIntelligencePolicy': 'ip_intelligence_policy', |
| 17320 |
'ipProtocol': 'protocol', |
| 17321 |
'pool': 'default_pool', |
| 17322 |
'rateLimitMode': 'rate_limit_mode', |
| 17323 |
'rateLimitSrcMask': 'rate_limit_source_mask', |
| 17324 |
'rateLimitDstMask': 'rate_limit_destination_mask', |
| 17325 |
'rateLimit': 'rate_limit', |
| 17326 |
'serversslUseSni': 'serverssl_use_sni', |
| 17327 |
'sourceAddressTranslation': 'snat_type', |
| 17328 |
'gtmScore': 'gtm_score', |
| 17329 |
'rateClass': 'rate_class', |
| 17330 |
'source': 'source_address', |
| 17331 |
'auth': 'authentication_profile', |
| 17332 |
'mirror': 'connection_mirror_enabled', |
| 17333 |
'rules': 'irules', |
| 17334 |
'securityLogProfiles': 'security_log_profiles', |
| 17335 |
'profilesReference': 'profiles', |
| 17336 |
'policiesReference': 'policies', |
| 17337 |
'perFlowRequestAccessPolicy': 'per_flow_request_access_policy', |
| 17338 |
} |
| 17339 |
|
| 17340 |
returnables = [ |
| 17341 |
'full_path', |
| 17342 |
'name', |
| 17343 |
'auto_lasthop', |
| 17344 |
'bw_controller_policy', |
| 17345 |
'cmp_enabled', |
| 17346 |
'connection_limit', |
| 17347 |
'description', |
| 17348 |
'enabled', |
| 17349 |
'fallback_persistence_profile', |
| 17350 |
'persistence_profile', |
| 17351 |
'translate_port', |
| 17352 |
'translate_address', |
| 17353 |
'vlans', |
| 17354 |
'destination', |
| 17355 |
'last_hop_pool', |
| 17356 |
'nat64_enabled', |
| 17357 |
'source_port_behavior', |
| 17358 |
'ip_intelligence_policy', |
| 17359 |
'protocol', |
| 17360 |
'default_pool', |
| 17361 |
'rate_limit_mode', |
| 17362 |
'rate_limit_source_mask', |
| 17363 |
'rate_limit', |
| 17364 |
'snat_type', |
| 17365 |
'snat_pool', |
| 17366 |
'serverssl_use_sni', |
| 17367 |
'gtm_score', |
| 17368 |
'rate_class', |
| 17369 |
'rate_limit_destination_mask', |
| 17370 |
'source_address', |
| 17371 |
'authentication_profile', |
| 17372 |
'connection_mirror_enabled', |
| 17373 |
'irules', |
| 17374 |
'security_log_profiles', |
| 17375 |
'type', |
| 17376 |
'policies', |
| 17377 |
'profiles', |
| 17378 |
'per_flow_request_access_policy', |
| 17379 |
'destination_address', |
| 17380 |
'destination_port', |
| 17381 |
'availability_status', |
| 17382 |
'status_reason', |
| 17383 |
'total_requests', |
| 17384 |
'client_side_bits_in', |
| 17385 |
'client_side_bits_out', |
| 17386 |
'client_side_current_connections', |
| 17387 |
'client_side_evicted_connections', |
| 17388 |
'client_side_max_connections', |
| 17389 |
'client_side_pkts_in', |
| 17390 |
'client_side_pkts_out', |
| 17391 |
'client_side_slow_killed', |
| 17392 |
'client_side_total_connections', |
| 17393 |
'cmp_mode', |
| 17394 |
'ephemeral_bits_in', |
| 17395 |
'ephemeral_bits_out', |
| 17396 |
'ephemeral_current_connections', |
| 17397 |
'ephemeral_evicted_connections', |
| 17398 |
'ephemeral_max_connections', |
| 17399 |
'ephemeral_pkts_in', |
| 17400 |
'ephemeral_pkts_out', |
| 17401 |
'ephemeral_slow_killed', |
| 17402 |
'ephemeral_total_connections', |
| 17403 |
'total_software_accepted_syn_cookies', |
| 17404 |
'total_hardware_accepted_syn_cookies', |
| 17405 |
'total_hardware_syn_cookies', |
| 17406 |
'hardware_syn_cookie_instances', |
| 17407 |
'total_software_rejected_syn_cookies', |
| 17408 |
'software_syn_cookie_instances', |
| 17409 |
'current_syn_cache', |
| 17410 |
'syn_cache_overflow', |
| 17411 |
'total_software_syn_cookies', |
| 17412 |
'syn_cookies_status', |
| 17413 |
'max_conn_duration', |
| 17414 |
'mean_conn_duration', |
| 17415 |
'min_conn_duration', |
| 17416 |
'cpu_usage_ratio_last_5_min', |
| 17417 |
'cpu_usage_ratio_last_5_sec', |
| 17418 |
'cpu_usage_ratio_last_1_min', |
| 17419 |
] |
| 17420 |
|
| 17421 |
@property |
| 17422 |
def max_conn_duration(self): |
| 17423 |
return self._values['stats']['csMaxConnDur'] |
| 17424 |
|
| 17425 |
@property |
| 17426 |
def mean_conn_duration(self): |
| 17427 |
return self._values['stats']['csMeanConnDur'] |
| 17428 |
|
| 17429 |
@property |
| 17430 |
def min_conn_duration(self): |
| 17431 |
return self._values['stats']['csMinConnDur'] |
| 17432 |
|
| 17433 |
@property |
| 17434 |
def cpu_usage_ratio_last_5_min(self): |
| 17435 |
return self._values['stats']['fiveMinAvgUsageRatio'] |
| 17436 |
|
| 17437 |
@property |
| 17438 |
def cpu_usage_ratio_last_5_sec(self): |
| 17439 |
return self._values['stats']['fiveSecAvgUsageRatio'] |
| 17440 |
|
| 17441 |
@property |
| 17442 |
def cpu_usage_ratio_last_1_min(self): |
| 17443 |
return self._values['stats']['oneMinAvgUsageRatio'] |
| 17444 |
|
| 17445 |
@property |
| 17446 |
def cmp_mode(self): |
| 17447 |
return self._values['stats']['cmpEnableMode'] |
| 17448 |
|
| 17449 |
@property |
| 17450 |
def availability_status(self): |
| 17451 |
return self._values['stats']['status']['availabilityState'] |
| 17452 |
|
| 17453 |
@property |
| 17454 |
def status_reason(self): |
| 17455 |
return self._values['stats']['status']['statusReason'] |
| 17456 |
|
| 17457 |
@property |
| 17458 |
def total_requests(self): |
| 17459 |
return self._values['stats']['totRequests'] |
| 17460 |
|
| 17461 |
@property |
| 17462 |
def ephemeral_bits_in(self): |
| 17463 |
return self._values['stats']['ephemeral']['bitsIn'] |
| 17464 |
|
| 17465 |
@property |
| 17466 |
def ephemeral_bits_out(self): |
| 17467 |
return self._values['stats']['ephemeral']['bitsOut'] |
| 17468 |
|
| 17469 |
@property |
| 17470 |
def ephemeral_current_connections(self): |
| 17471 |
return self._values['stats']['ephemeral']['curConns'] |
| 17472 |
|
| 17473 |
@property |
| 17474 |
def ephemeral_evicted_connections(self): |
| 17475 |
return self._values['stats']['ephemeral']['evictedConns'] |
| 17476 |
|
| 17477 |
@property |
| 17478 |
def ephemeral_max_connections(self): |
| 17479 |
return self._values['stats']['ephemeral']['maxConns'] |
| 17480 |
|
| 17481 |
@property |
| 17482 |
def ephemeral_pkts_in(self): |
| 17483 |
return self._values['stats']['ephemeral']['pktsIn'] |
| 17484 |
|
| 17485 |
@property |
| 17486 |
def ephemeral_pkts_out(self): |
| 17487 |
return self._values['stats']['ephemeral']['pktsOut'] |
| 17488 |
|
| 17489 |
@property |
| 17490 |
def ephemeral_slow_killed(self): |
| 17491 |
return self._values['stats']['ephemeral']['slowKilled'] |
| 17492 |
|
| 17493 |
@property |
| 17494 |
def ephemeral_total_connections(self): |
| 17495 |
return self._values['stats']['ephemeral']['totConns'] |
| 17496 |
|
| 17497 |
@property |
| 17498 |
def client_side_bits_in(self): |
| 17499 |
return self._values['stats']['clientside']['bitsIn'] |
| 17500 |
|
| 17501 |
@property |
| 17502 |
def client_side_bits_out(self): |
| 17503 |
return self._values['stats']['clientside']['bitsOut'] |
| 17504 |
|
| 17505 |
@property |
| 17506 |
def client_side_current_connections(self): |
| 17507 |
return self._values['stats']['clientside']['curConns'] |
| 17508 |
|
| 17509 |
@property |
| 17510 |
def client_side_evicted_connections(self): |
| 17511 |
return self._values['stats']['clientside']['evictedConns'] |
| 17512 |
|
| 17513 |
@property |
| 17514 |
def client_side_max_connections(self): |
| 17515 |
return self._values['stats']['clientside']['maxConns'] |
| 17516 |
|
| 17517 |
@property |
| 17518 |
def client_side_pkts_in(self): |
| 17519 |
return self._values['stats']['clientside']['pktsIn'] |
| 17520 |
|
| 17521 |
@property |
| 17522 |
def client_side_pkts_out(self): |
| 17523 |
return self._values['stats']['clientside']['pktsOut'] |
| 17524 |
|
| 17525 |
@property |
| 17526 |
def client_side_slow_killed(self): |
| 17527 |
return self._values['stats']['clientside']['slowKilled'] |
| 17528 |
|
| 17529 |
@property |
| 17530 |
def client_side_total_connections(self): |
| 17531 |
return self._values['stats']['clientside']['totConns'] |
| 17532 |
|
| 17533 |
@property |
| 17534 |
def total_software_accepted_syn_cookies(self): |
| 17535 |
return self._values['stats']['syncookie']['accepts'] |
| 17536 |
|
| 17537 |
@property |
| 17538 |
def total_hardware_accepted_syn_cookies(self): |
| 17539 |
return self._values['stats']['syncookie']['hwAccepts'] |
| 17540 |
|
| 17541 |
@property |
| 17542 |
def total_hardware_syn_cookies(self): |
| 17543 |
return self._values['stats']['syncookie']['hwSyncookies'] |
| 17544 |
|
| 17545 |
@property |
| 17546 |
def hardware_syn_cookie_instances(self): |
| 17547 |
return self._values['stats']['syncookie']['hwsyncookieInstance'] |
| 17548 |
|
| 17549 |
@property |
| 17550 |
def total_software_rejected_syn_cookies(self): |
| 17551 |
return self._values['stats']['syncookie']['rejects'] |
| 17552 |
|
| 17553 |
@property |
| 17554 |
def software_syn_cookie_instances(self): |
| 17555 |
return self._values['stats']['syncookie']['swsyncookieInstance'] |
| 17556 |
|
| 17557 |
@property |
| 17558 |
def current_syn_cache(self): |
| 17559 |
return self._values['stats']['syncookie']['syncacheCurr'] |
| 17560 |
|
| 17561 |
@property |
| 17562 |
def syn_cache_overflow(self): |
| 17563 |
return self._values['stats']['syncookie']['syncacheOver'] |
| 17564 |
|
| 17565 |
@property |
| 17566 |
def total_software_syn_cookies(self): |
| 17567 |
return self._values['stats']['syncookie']['syncookies'] |
| 17568 |
|
| 17569 |
@property |
| 17570 |
def syn_cookies_status(self): |
| 17571 |
return self._values['stats']['syncookieStatus'] |
| 17572 |
|
| 17573 |
@property |
| 17574 |
def destination_address(self): |
| 17575 |
if self._values['destination'] is None: |
| 17576 |
return None |
| 17577 |
tup = self.destination_tuple |
| 17578 |
return tup.ip |
| 17579 |
|
| 17580 |
@property |
| 17581 |
def destination_port(self): |
| 17582 |
if self._values['destination'] is None: |
| 17583 |
return None |
| 17584 |
tup = self.destination_tuple |
| 17585 |
return tup.port |
| 17586 |
|
| 17587 |
@property |
| 17588 |
def type(self): |
| 17589 |
"""Attempt to determine the current server type |
| 17590 |
|
| 17591 |
This check is very unscientific. It turns out that this information is not |
| 17592 |
exactly available anywhere on a BIG-IP. Instead, we rely on a semi-reliable |
| 17593 |
means for determining what the type of the virtual server is. Hopefully it |
| 17594 |
always works. |
| 17595 |
|
| 17596 |
There are a handful of attributes that can be used to determine a specific |
| 17597 |
type. There are some types though that can only be determined by looking at |
| 17598 |
the profiles that are assigned to them. We follow that method for those |
| 17599 |
complicated types; message-routing, fasthttp, and fastl4. |
| 17600 |
|
| 17601 |
Because type determination is an expensive operation, we cache the result |
| 17602 |
from the operation. |
| 17603 |
|
| 17604 |
Returns: |
| 17605 |
string: The server type. |
| 17606 |
""" |
| 17607 |
if self._values['l2Forward'] is True: |
| 17608 |
result = 'forwarding-l2' |
| 17609 |
elif self._values['ipForward'] is True: |
| 17610 |
result = 'forwarding-ip' |
| 17611 |
elif self._values['stateless'] is True: |
| 17612 |
result = 'stateless' |
| 17613 |
elif self._values['reject'] is True: |
| 17614 |
result = 'reject' |
| 17615 |
elif self._values['dhcpRelay'] is True: |
| 17616 |
result = 'dhcp' |
| 17617 |
elif self._values['internal'] is True: |
| 17618 |
result = 'internal' |
| 17619 |
elif self.has_fasthttp_profiles: |
| 17620 |
result = 'performance-http' |
| 17621 |
elif self.has_fastl4_profiles: |
| 17622 |
result = 'performance-l4' |
| 17623 |
elif self.has_message_routing_profiles: |
| 17624 |
result = 'message-routing' |
| 17625 |
else: |
| 17626 |
result = 'standard' |
| 17627 |
return result |
| 17628 |
|
| 17629 |
@property |
| 17630 |
def profiles(self): |
| 17631 |
"""Returns a list of profiles from the API |
| 17632 |
|
| 17633 |
The profiles are formatted so that they are usable in this module and |
| 17634 |
are able to be compared by the Difference engine. |
| 17635 |
|
| 17636 |
Returns: |
| 17637 |
list (:obj:`list` of :obj:`dict`): List of profiles. |
| 17638 |
|
| 17639 |
Each dictionary in the list contains the following three (3) keys. |
| 17640 |
|
| 17641 |
* name |
| 17642 |
* context |
| 17643 |
* fullPath |
| 17644 |
|
| 17645 |
Raises: |
| 17646 |
F5ModuleError: If the specified context is a value other that |
| 17647 |
``all``, ``server-side``, or ``client-side``. |
| 17648 |
""" |
| 17649 |
if 'items' not in self._values['profiles']: |
| 17650 |
return None |
| 17651 |
result = [] |
| 17652 |
for item in self._values['profiles']['items']: |
| 17653 |
context = item['context'] |
| 17654 |
if context == 'serverside': |
| 17655 |
context = 'server-side' |
| 17656 |
elif context == 'clientside': |
| 17657 |
context = 'client-side' |
| 17658 |
name = item['name'] |
| 17659 |
if context in ['all', 'server-side', 'client-side']: |
| 17660 |
result.append(dict(name=name, context=context, full_path=item['fullPath'])) |
| 17661 |
else: |
| 17662 |
raise F5ModuleError( |
| 17663 |
"Unknown profile context found: '{0}'".format(context) |
| 17664 |
) |
| 17665 |
return result |
| 17666 |
|
| 17667 |
@property |
| 17668 |
def has_message_routing_profiles(self): |
| 17669 |
if self.profiles is None: |
| 17670 |
return None |
| 17671 |
current = self._read_current_message_routing_profiles_from_device() |
| 17672 |
result = [x['name'] for x in self.profiles if x['name'] in current] |
| 17673 |
if len(result) > 0: |
| 17674 |
return True |
| 17675 |
return False |
| 17676 |
|
| 17677 |
@property |
| 17678 |
def has_fastl4_profiles(self): |
| 17679 |
if self.profiles is None: |
| 17680 |
return None |
| 17681 |
current = self._read_current_fastl4_profiles_from_device() |
| 17682 |
result = [x['name'] for x in self.profiles if x['name'] in current] |
| 17683 |
if len(result) > 0: |
| 17684 |
return True |
| 17685 |
return False |
| 17686 |
|
| 17687 |
@property |
| 17688 |
def has_fasthttp_profiles(self): |
| 17689 |
"""Check if ``fasthttp`` profile is in API profiles |
| 17690 |
|
| 17691 |
This method is used to determine the server type when doing comparisons |
| 17692 |
in the Difference class. |
| 17693 |
|
| 17694 |
Returns: |
| 17695 |
bool: True if server has ``fasthttp`` profiles. False otherwise. |
| 17696 |
""" |
| 17697 |
if self.profiles is None: |
| 17698 |
return None |
| 17699 |
current = self._read_current_fasthttp_profiles_from_device() |
| 17700 |
result = [x['name'] for x in self.profiles if x['name'] in current] |
| 17701 |
if len(result) > 0: |
| 17702 |
return True |
| 17703 |
return False |
| 17704 |
|
| 17705 |
def _read_current_message_routing_profiles_from_device(self): |
| 17706 |
result = [] |
| 17707 |
result += self._read_diameter_profiles_from_device() |
| 17708 |
result += self._read_sip_profiles_from_device() |
| 17709 |
return result |
| 17710 |
|
| 17711 |
def _read_diameter_profiles_from_device(self): |
| 17712 |
uri = "https://{0}:{1}/mgmt/tm/ltm/profile/diameter/".format( |
| 17713 |
self.client.provider['server'], |
| 17714 |
self.client.provider['server_port'], |
| 17715 |
) |
| 17716 |
resp = self.client.api.get(uri) |
| 17717 |
try: |
| 17718 |
response = resp.json() |
| 17719 |
except ValueError as ex: |
| 17720 |
raise F5ModuleError(str(ex)) |
| 17721 |
|
| 17722 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 17723 |
raise F5ModuleError(resp.content) |
| 17724 |
|
| 17725 |
result = [x['name'] for x in response['items']] |
| 17726 |
return result |
| 17727 |
|
| 17728 |
def _read_sip_profiles_from_device(self): |
| 17729 |
uri = "https://{0}:{1}/mgmt/tm/ltm/profile/sip/".format( |
| 17730 |
self.client.provider['server'], |
| 17731 |
self.client.provider['server_port'], |
| 17732 |
) |
| 17733 |
resp = self.client.api.get(uri) |
| 17734 |
try: |
| 17735 |
response = resp.json() |
| 17736 |
except ValueError as ex: |
| 17737 |
raise F5ModuleError(str(ex)) |
| 17738 |
|
| 17739 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 17740 |
raise F5ModuleError(resp.content) |
| 17741 |
|
| 17742 |
result = [x['name'] for x in response['items']] |
| 17743 |
return result |
| 17744 |
|
| 17745 |
def _read_current_fastl4_profiles_from_device(self): |
| 17746 |
uri = "https://{0}:{1}/mgmt/tm/ltm/profile/fastl4/".format( |
| 17747 |
self.client.provider['server'], |
| 17748 |
self.client.provider['server_port'], |
| 17749 |
) |
| 17750 |
resp = self.client.api.get(uri) |
| 17751 |
try: |
| 17752 |
response = resp.json() |
| 17753 |
except ValueError as ex: |
| 17754 |
raise F5ModuleError(str(ex)) |
| 17755 |
|
| 17756 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 17757 |
raise F5ModuleError(resp.content) |
| 17758 |
result = [x['name'] for x in response['items']] |
| 17759 |
return result |
| 17760 |
|
| 17761 |
def _read_current_fasthttp_profiles_from_device(self): |
| 17762 |
uri = "https://{0}:{1}/mgmt/tm/ltm/profile/fasthttp/".format( |
| 17763 |
self.client.provider['server'], |
| 17764 |
self.client.provider['server_port'], |
| 17765 |
) |
| 17766 |
resp = self.client.api.get(uri) |
| 17767 |
try: |
| 17768 |
response = resp.json() |
| 17769 |
except ValueError as ex: |
| 17770 |
raise F5ModuleError(str(ex)) |
| 17771 |
|
| 17772 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 17773 |
raise F5ModuleError(resp.content) |
| 17774 |
|
| 17775 |
result = [x['name'] for x in response['items']] |
| 17776 |
return result |
| 17777 |
|
| 17778 |
@property |
| 17779 |
def security_log_profiles(self): |
| 17780 |
if self._values['security_log_profiles'] is None: |
| 17781 |
return None |
| 17782 |
result = list(set([x.strip('"') for x in self._values['security_log_profiles']])) |
| 17783 |
result.sort() |
| 17784 |
return result |
| 17785 |
|
| 17786 |
@property |
| 17787 |
def snat_type(self): |
| 17788 |
if self._values['snat_type'] is None: |
| 17789 |
return None |
| 17790 |
if 'type' in self._values['snat_type']: |
| 17791 |
if self._values['snat_type']['type'] == 'automap': |
| 17792 |
return 'automap' |
| 17793 |
elif self._values['snat_type']['type'] == 'none': |
| 17794 |
return 'none' |
| 17795 |
elif self._values['snat_type']['type'] == 'snat': |
| 17796 |
return 'snat' |
| 17797 |
|
| 17798 |
@property |
| 17799 |
def snat_pool(self): |
| 17800 |
if self._values['snat_type'] is None: |
| 17801 |
return None |
| 17802 |
if 'type' in self._values['snat_type']: |
| 17803 |
if self._values['snat_type']['type'] == 'automap': |
| 17804 |
return 'none' |
| 17805 |
elif self._values['snat_type']['type'] == 'none': |
| 17806 |
return 'none' |
| 17807 |
elif self._values['snat_type']['type'] == 'snat': |
| 17808 |
return self._values['snat_type']["pool"] |
| 17809 |
|
| 17810 |
@property |
| 17811 |
def serverssl_use_sni(self): |
| 17812 |
if self._values['serverssl_use_sni'] is None: |
| 17813 |
return None |
| 17814 |
if self._values['serverssl_use_sni'] == 'enabled': |
| 17815 |
return 'enabled' |
| 17816 |
return 'disabled' |
| 17817 |
|
| 17818 |
@property |
| 17819 |
def connection_mirror_enabled(self): |
| 17820 |
if self._values['connection_mirror_enabled'] is None: |
| 17821 |
return None |
| 17822 |
elif self._values['connection_mirror_enabled'] == 'enabled': |
| 17823 |
return 'yes' |
| 17824 |
return 'no' |
| 17825 |
|
| 17826 |
@property |
| 17827 |
def rate_limit(self): |
| 17828 |
if self._values['rate_limit'] is None: |
| 17829 |
return None |
| 17830 |
elif self._values['rate_limit'] == 'disabled': |
| 17831 |
return -1 |
| 17832 |
return int(self._values['rate_limit']) |
| 17833 |
|
| 17834 |
@property |
| 17835 |
def nat64_enabled(self): |
| 17836 |
if self._values['nat64_enabled'] is None: |
| 17837 |
return None |
| 17838 |
elif self._values['nat64_enabled'] == 'enabled': |
| 17839 |
return 'yes' |
| 17840 |
return 'no' |
| 17841 |
|
| 17842 |
@property |
| 17843 |
def enabled(self): |
| 17844 |
if self._values['enabled'] is None: |
| 17845 |
return 'no' |
| 17846 |
elif self._values['enabled'] is True: |
| 17847 |
return 'yes' |
| 17848 |
return 'no' |
| 17849 |
|
| 17850 |
@property |
| 17851 |
def translate_port(self): |
| 17852 |
if self._values['translate_port'] is None: |
| 17853 |
return None |
| 17854 |
elif self._values['translate_port'] == 'enabled': |
| 17855 |
return 'yes' |
| 17856 |
return 'no' |
| 17857 |
|
| 17858 |
@property |
| 17859 |
def translate_address(self): |
| 17860 |
if self._values['translate_address'] is None: |
| 17861 |
return None |
| 17862 |
elif self._values['translate_address'] == 'enabled': |
| 17863 |
return 'yes' |
| 17864 |
return 'no' |
| 17865 |
|
| 17866 |
@property |
| 17867 |
def persistence_profile(self): |
| 17868 |
"""Return persistence profile in a consumable form |
| 17869 |
|
| 17870 |
I don't know why the persistence profile is stored this way, but below is the |
| 17871 |
general format of it. |
| 17872 |
|
| 17873 |
"persist": [ |
| 17874 |
{ |
| 17875 |
"name": "msrdp", |
| 17876 |
"partition": "Common", |
| 17877 |
"tmDefault": "yes", |
| 17878 |
"nameReference": { |
| 17879 |
"link": "https://localhost/mgmt/tm/ltm/persistence/msrdp/~Common~msrdp?ver=13.1.0.4" |
| 17880 |
} |
| 17881 |
} |
| 17882 |
], |
| 17883 |
|
| 17884 |
As you can see, this is quite different from something like the fallback |
| 17885 |
persistence profile which is just simply |
| 17886 |
|
| 17887 |
/Common/fallback1 |
| 17888 |
|
| 17889 |
This method makes the persistence profile look like the fallback profile. |
| 17890 |
|
| 17891 |
Returns: |
| 17892 |
string: The persistence profile configured on the virtual. |
| 17893 |
""" |
| 17894 |
if self._values['persistence_profile'] is None: |
| 17895 |
return None |
| 17896 |
profile = self._values['persistence_profile'][0] |
| 17897 |
result = fq_name(profile['partition'], profile['name']) |
| 17898 |
return result |
| 17899 |
|
| 17900 |
@property |
| 17901 |
def destination_tuple(self): |
| 17902 |
Destination = namedtuple('Destination', ['ip', 'port', 'route_domain', 'mask']) |
| 17903 |
|
| 17904 |
|
| 17905 |
if self._values['destination'] is None: |
| 17906 |
result = Destination(ip=None, port=None, route_domain=None, mask=None) |
| 17907 |
return result |
| 17908 |
destination = re.sub(r'^/[a-zA-Z0-9_.-]+/([a-zA-Z0-9_.-]+\/)?', '', self._values['destination']) |
| 17909 |
|
| 17910 |
|
| 17911 |
|
| 17912 |
|
| 17913 |
|
| 17914 |
|
| 17915 |
|
| 17916 |
|
| 17917 |
|
| 17918 |
pattern = r'(?P<ip>[^%]+)%(?P<route_domain>[0-9]+)[:.](?P<port>[0-9]+|any)' |
| 17919 |
matches = re.search(pattern, destination) |
| 17920 |
if matches: |
| 17921 |
try: |
| 17922 |
port = int(matches.group('port')) |
| 17923 |
except ValueError: |
| 17924 |
|
| 17925 |
port = matches.group('port') |
| 17926 |
if port == 'any': |
| 17927 |
port = 0 |
| 17928 |
result = Destination( |
| 17929 |
ip=matches.group('ip'), |
| 17930 |
port=port, |
| 17931 |
route_domain=int(matches.group('route_domain')), |
| 17932 |
mask=self.mask |
| 17933 |
) |
| 17934 |
return result |
| 17935 |
|
| 17936 |
pattern = r'(?P<ip>[^%]+)%(?P<route_domain>[0-9]+)' |
| 17937 |
matches = re.search(pattern, destination) |
| 17938 |
if matches: |
| 17939 |
result = Destination( |
| 17940 |
ip=matches.group('ip'), |
| 17941 |
port=None, |
| 17942 |
route_domain=int(matches.group('route_domain')), |
| 17943 |
mask=self.mask |
| 17944 |
) |
| 17945 |
return result |
| 17946 |
|
| 17947 |
|
| 17948 |
pattern = r'^(?P<ip>(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4]' \ |
| 17949 |
r'[0-9]|25[0-5])):(?P<port>[0-9]+)' |
| 17950 |
|
| 17951 |
matches = re.search(pattern, destination) |
| 17952 |
if matches: |
| 17953 |
result = Destination( |
| 17954 |
ip=matches.group('ip'), |
| 17955 |
port=int(matches.group('port')), |
| 17956 |
route_domain=None, |
| 17957 |
mask=self.mask |
| 17958 |
) |
| 17959 |
return result |
| 17960 |
|
| 17961 |
|
| 17962 |
pattern = r'^([0-9a-f]{0,4}:){2,7}(:|[0-9a-f]{1,4})$' |
| 17963 |
matches = re.search(pattern, destination) |
| 17964 |
if matches: |
| 17965 |
result = Destination( |
| 17966 |
ip=destination, |
| 17967 |
port=None, |
| 17968 |
route_domain=None, |
| 17969 |
mask=self.mask |
| 17970 |
) |
| 17971 |
return result |
| 17972 |
|
| 17973 |
|
| 17974 |
pattern = r'(?P<ip>([0-9a-f]{0,4}:){2,7}(:|[0-9a-f]{1,4}).(?P<port>[0-9]+|any))' |
| 17975 |
matches = re.search(pattern, destination) |
| 17976 |
if matches: |
| 17977 |
ip = matches.group('ip').split('.')[0] |
| 17978 |
try: |
| 17979 |
port = int(matches.group('port')) |
| 17980 |
except ValueError: |
| 17981 |
|
| 17982 |
port = matches.group('port') |
| 17983 |
if port == 'any': |
| 17984 |
port = 0 |
| 17985 |
result = Destination( |
| 17986 |
ip=ip, |
| 17987 |
port=port, |
| 17988 |
route_domain=None, |
| 17989 |
mask=self.mask |
| 17990 |
) |
| 17991 |
return result |
| 17992 |
|
| 17993 |
|
| 17994 |
pattern = r'(?P<name>^[a-zA-Z0-9_.-]+):(?P<port>[0-9]+)' |
| 17995 |
matches = re.search(pattern, destination) |
| 17996 |
if matches: |
| 17997 |
result = Destination( |
| 17998 |
ip=matches.group('name'), |
| 17999 |
port=int(matches.group('port')), |
| 18000 |
route_domain=None, |
| 18001 |
mask=self.mask |
| 18002 |
) |
| 18003 |
return result |
| 18004 |
|
| 18005 |
|
| 18006 |
pattern = r'(?P<name>^[a-zA-Z0-9_.-]+)' |
| 18007 |
matches = re.search(pattern, destination) |
| 18008 |
if matches: |
| 18009 |
result = Destination( |
| 18010 |
ip=matches.group('name'), |
| 18011 |
port=None, |
| 18012 |
route_domain=None, |
| 18013 |
mask=self.mask |
| 18014 |
) |
| 18015 |
return result |
| 18016 |
|
| 18017 |
|
| 18018 |
pattern = r'(?P<ip>[^.]+).(?P<port>[0-9]+|any)' |
| 18019 |
matches = re.search(pattern, destination) |
| 18020 |
if matches: |
| 18021 |
result = Destination( |
| 18022 |
ip=matches.group('ip'), |
| 18023 |
port=matches.group('port'), |
| 18024 |
route_domain=None, |
| 18025 |
mask=self.mask |
| 18026 |
) |
| 18027 |
return result |
| 18028 |
|
| 18029 |
result = Destination(ip=None, port=None, route_domain=None, mask=None) |
| 18030 |
return result |
| 18031 |
|
| 18032 |
@property |
| 18033 |
def policies(self): |
| 18034 |
if 'items' not in self._values['policies']: |
| 18035 |
return None |
| 18036 |
results = [] |
| 18037 |
for item in self._values['policies']['items']: |
| 18038 |
results.append(item['fullPath']) |
| 18039 |
return results |
| 18040 |
|
| 18041 |
|
| 18042 |
|
| 18043 |
|
| 18044 |
import concurrent.futures |
| 18045 |
|
| 18046 |
|
| 18047 |
|
| 18048 |
|
| 18049 |
|
| 18050 |
|
| 18051 |
|
| 18052 |
|
| 18053 |
|
| 18054 |
|
| 18055 |
|
| 18056 |
|
| 18057 |
class VirtualServersFactManager(BaseManager): |
| 18058 |
def __init__(self, *args, **kwargs): |
| 18059 |
self.client = kwargs.get('client', None) |
| 18060 |
self.module = kwargs.get('module', None) |
| 18061 |
super(VirtualServersFactManager, self).__init__(**kwargs) |
| 18062 |
|
| 18063 |
def exec_module(self): |
| 18064 |
facts = self._exec_module() |
| 18065 |
result = dict(virtual_servers=facts) |
| 18066 |
return result |
| 18067 |
|
| 18068 |
def _exec_module(self): |
| 18069 |
|
| 18070 |
results = self.read_facts() |
| 18071 |
|
| 18072 |
|
| 18073 |
|
| 18074 |
|
| 18075 |
results = sorted(results, key=lambda k: k['full_path']) |
| 18076 |
return results |
| 18077 |
|
| 18078 |
def read_facts(self): |
| 18079 |
results = [] |
| 18080 |
collection = self.increment_read() |
| 18081 |
|
| 18082 |
|
| 18083 |
fullpath_to_resource = {resource['fullPath']: resource for resource in collection} |
| 18084 |
|
| 18085 |
|
| 18086 |
stats_results = {} |
| 18087 |
with concurrent.futures.ThreadPoolExecutor(max_workers=8) as executor: |
| 18088 |
future_to_fullpath = { |
| 18089 |
executor.submit(self.read_stats_from_device, full_path): full_path |
| 18090 |
for full_path in fullpath_to_resource |
| 18091 |
} |
| 18092 |
for future in concurrent.futures.as_completed(future_to_fullpath): |
| 18093 |
full_path = future_to_fullpath[future] |
| 18094 |
try: |
| 18095 |
stats_results[full_path] = future.result() |
| 18096 |
except Exception as exc: |
| 18097 |
stats_results[full_path] = {} |
| 18098 |
|
| 18099 |
|
| 18100 |
def process_resource(full_path, resource): |
| 18101 |
resource['stats'] = stats_results.get(full_path, {}) |
| 18102 |
params = VirtualServersParameters(client=self.client, params=resource) |
| 18103 |
return params.to_return() |
| 18104 |
|
| 18105 |
|
| 18106 |
with concurrent.futures.ThreadPoolExecutor(max_workers=8) as executor: |
| 18107 |
future_to_fullpath = { |
| 18108 |
executor.submit(process_resource, full_path, resource): full_path |
| 18109 |
for full_path, resource in fullpath_to_resource.items() |
| 18110 |
} |
| 18111 |
for future in concurrent.futures.as_completed(future_to_fullpath): |
| 18112 |
try: |
| 18113 |
results.append(future.result()) |
| 18114 |
except Exception as exc: |
| 18115 |
full_path = future_to_fullpath[future] |
| 18116 |
return results |
| 18117 |
|
| 18118 |
|
| 18119 |
|
| 18120 |
|
| 18121 |
|
| 18122 |
|
| 18123 |
|
| 18124 |
|
| 18125 |
|
| 18126 |
|
| 18127 |
|
| 18128 |
|
| 18129 |
|
| 18130 |
|
| 18131 |
|
| 18132 |
def increment_read(self): |
| 18133 |
n = 0 |
| 18134 |
result = [] |
| 18135 |
while True: |
| 18136 |
items = self.read_collection_from_device(skip=n) |
| 18137 |
if not items: |
| 18138 |
break |
| 18139 |
result.extend(items) |
| 18140 |
n = n + self.module.params['data_increment'] |
| 18141 |
return result |
| 18142 |
|
| 18143 |
def read_collection_from_device(self, skip=0): |
| 18144 |
uri = "https://{0}:{1}/mgmt/tm/ltm/virtual".format( |
| 18145 |
self.client.provider['server'], |
| 18146 |
self.client.provider['server_port'], |
| 18147 |
) |
| 18148 |
if self.module.params['partition'] == 'all': |
| 18149 |
query = "?expandSubcollections=true&$top={0}&$skip={1}".format( |
| 18150 |
self.module.params['data_increment'], skip |
| 18151 |
) |
| 18152 |
else: |
| 18153 |
query = "?expandSubcollections=true&$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 18154 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 18155 |
) |
| 18156 |
resp = self.client.api.get(uri + query) |
| 18157 |
try: |
| 18158 |
response = resp.json() |
| 18159 |
except ValueError as ex: |
| 18160 |
raise F5ModuleError(str(ex)) |
| 18161 |
|
| 18162 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 18163 |
raise F5ModuleError(resp.content) |
| 18164 |
|
| 18165 |
if 'items' not in response: |
| 18166 |
return [] |
| 18167 |
result = response['items'] |
| 18168 |
return result |
| 18169 |
|
| 18170 |
def read_stats_from_device(self, full_path): |
| 18171 |
uri = "https://{0}:{1}/mgmt/tm/ltm/virtual/{2}/stats".format( |
| 18172 |
self.client.provider['server'], |
| 18173 |
self.client.provider['server_port'], |
| 18174 |
transform_name(name=full_path) |
| 18175 |
) |
| 18176 |
resp = self.client.api.get(uri) |
| 18177 |
try: |
| 18178 |
response = resp.json() |
| 18179 |
except ValueError as ex: |
| 18180 |
raise F5ModuleError(str(ex)) |
| 18181 |
|
| 18182 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 18183 |
raise F5ModuleError(resp.content) |
| 18184 |
|
| 18185 |
result = parseStats(response) |
| 18186 |
try: |
| 18187 |
return result['stats'] |
| 18188 |
except KeyError: |
| 18189 |
return {} |
| 18190 |
|
| 18191 |
|
| 18192 |
class VlansParameters(BaseParameters): |
| 18193 |
api_map = { |
| 18194 |
'autoLasthop': 'auto_lasthop', |
| 18195 |
'cmpHash': 'cmp_hash_algorithm', |
| 18196 |
'failsafeAction': 'failsafe_action', |
| 18197 |
'failsafe': 'failsafe_enabled', |
| 18198 |
'failsafeTimeout': 'failsafe_timeout', |
| 18199 |
'ifIndex': 'if_index', |
| 18200 |
'learning': 'learning_mode', |
| 18201 |
'interfacesReference': 'interfaces', |
| 18202 |
'sourceChecking': 'source_check_enabled', |
| 18203 |
'fullPath': 'full_path' |
| 18204 |
} |
| 18205 |
|
| 18206 |
returnables = [ |
| 18207 |
'full_path', |
| 18208 |
'name', |
| 18209 |
'auto_lasthop', |
| 18210 |
'cmp_hash_algorithm', |
| 18211 |
'description', |
| 18212 |
'failsafe_action', |
| 18213 |
'failsafe_enabled', |
| 18214 |
'failsafe_timeout', |
| 18215 |
'if_index', |
| 18216 |
'learning_mode', |
| 18217 |
'interfaces', |
| 18218 |
'mtu', |
| 18219 |
'sflow_poll_interval', |
| 18220 |
'sflow_poll_interval_global', |
| 18221 |
'sflow_sampling_rate', |
| 18222 |
'sflow_sampling_rate_global', |
| 18223 |
'source_check_enabled', |
| 18224 |
'true_mac_address', |
| 18225 |
'tag', |
| 18226 |
] |
| 18227 |
|
| 18228 |
@property |
| 18229 |
def interfaces(self): |
| 18230 |
if self._values['interfaces'] is None: |
| 18231 |
return None |
| 18232 |
if 'items' not in self._values['interfaces']: |
| 18233 |
return None |
| 18234 |
result = [] |
| 18235 |
for item in self._values['interfaces']['items']: |
| 18236 |
tmp = dict( |
| 18237 |
name=item['name'], |
| 18238 |
full_path=item['fullPath'] |
| 18239 |
) |
| 18240 |
if 'tagged' in item: |
| 18241 |
tmp['tagged'] = 'yes' |
| 18242 |
else: |
| 18243 |
tmp['tagged'] = 'no' |
| 18244 |
result.append(tmp) |
| 18245 |
return result |
| 18246 |
|
| 18247 |
@property |
| 18248 |
def sflow_poll_interval(self): |
| 18249 |
return int(self._values['sflow']['pollInterval']) |
| 18250 |
|
| 18251 |
@property |
| 18252 |
def sflow_poll_interval_global(self): |
| 18253 |
return flatten_boolean(self._values['sflow']['pollIntervalGlobal']) |
| 18254 |
|
| 18255 |
@property |
| 18256 |
def sflow_sampling_rate(self): |
| 18257 |
return int(self._values['sflow']['samplingRate']) |
| 18258 |
|
| 18259 |
@property |
| 18260 |
def sflow_sampling_rate_global(self): |
| 18261 |
return flatten_boolean(self._values['sflow']['samplingRateGlobal']) |
| 18262 |
|
| 18263 |
@property |
| 18264 |
def source_check_state(self): |
| 18265 |
return flatten_boolean(self._values['source_check_state']) |
| 18266 |
|
| 18267 |
@property |
| 18268 |
def true_mac_address(self): |
| 18269 |
|
| 18270 |
return self._values['stats']['macTrue'] |
| 18271 |
|
| 18272 |
@property |
| 18273 |
def tag(self): |
| 18274 |
|
| 18275 |
return self._values['stats']['id'] |
| 18276 |
|
| 18277 |
@property |
| 18278 |
def failsafe_enabled(self): |
| 18279 |
return flatten_boolean(self._values['failsafe_enabled']) |
| 18280 |
|
| 18281 |
|
| 18282 |
class VlansFactManager(BaseManager): |
| 18283 |
def __init__(self, *args, **kwargs): |
| 18284 |
self.client = kwargs.get('client', None) |
| 18285 |
self.module = kwargs.get('module', None) |
| 18286 |
super(VlansFactManager, self).__init__(**kwargs) |
| 18287 |
|
| 18288 |
def exec_module(self): |
| 18289 |
facts = self._exec_module() |
| 18290 |
result = dict(vlans=facts) |
| 18291 |
return result |
| 18292 |
|
| 18293 |
def _exec_module(self): |
| 18294 |
results = [] |
| 18295 |
facts = self.read_facts() |
| 18296 |
for item in facts: |
| 18297 |
attrs = item.to_return() |
| 18298 |
results.append(attrs) |
| 18299 |
results = sorted(results, key=lambda k: k['full_path']) |
| 18300 |
return results |
| 18301 |
|
| 18302 |
def read_facts(self): |
| 18303 |
results = [] |
| 18304 |
collection = self.increment_read() |
| 18305 |
for resource in collection: |
| 18306 |
attrs = resource |
| 18307 |
attrs['stats'] = self.read_stats_from_device(attrs['fullPath']) |
| 18308 |
params = VlansParameters(params=attrs) |
| 18309 |
results.append(params) |
| 18310 |
return results |
| 18311 |
|
| 18312 |
def increment_read(self): |
| 18313 |
n = 0 |
| 18314 |
result = [] |
| 18315 |
while True: |
| 18316 |
items = self.read_collection_from_device(skip=n) |
| 18317 |
if not items: |
| 18318 |
break |
| 18319 |
result.extend(items) |
| 18320 |
n = n + self.module.params['data_increment'] |
| 18321 |
return result |
| 18322 |
|
| 18323 |
def read_collection_from_device(self, skip=0): |
| 18324 |
uri = "https://{0}:{1}/mgmt/tm/net/vlan".format( |
| 18325 |
self.client.provider['server'], |
| 18326 |
self.client.provider['server_port'], |
| 18327 |
) |
| 18328 |
query = "?expandSubcollections=true&$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 18329 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 18330 |
) |
| 18331 |
resp = self.client.api.get(uri + query) |
| 18332 |
try: |
| 18333 |
response = resp.json() |
| 18334 |
except ValueError as ex: |
| 18335 |
raise F5ModuleError(str(ex)) |
| 18336 |
|
| 18337 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 18338 |
raise F5ModuleError(resp.content) |
| 18339 |
|
| 18340 |
if 'items' not in response: |
| 18341 |
return [] |
| 18342 |
result = response['items'] |
| 18343 |
return result |
| 18344 |
|
| 18345 |
def read_stats_from_device(self, full_path): |
| 18346 |
uri = "https://{0}:{1}/mgmt/tm/net/vlan/{2}/stats".format( |
| 18347 |
self.client.provider['server'], |
| 18348 |
self.client.provider['server_port'], |
| 18349 |
transform_name(name=full_path) |
| 18350 |
) |
| 18351 |
resp = self.client.api.get(uri) |
| 18352 |
try: |
| 18353 |
response = resp.json() |
| 18354 |
except ValueError as ex: |
| 18355 |
raise F5ModuleError(str(ex)) |
| 18356 |
|
| 18357 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 18358 |
raise F5ModuleError(resp.content) |
| 18359 |
|
| 18360 |
result = parseStats(response) |
| 18361 |
try: |
| 18362 |
return result['stats'] |
| 18363 |
except KeyError: |
| 18364 |
return {} |
| 18365 |
|
| 18366 |
|
| 18367 |
class ManagementRouteParameters(BaseParameters): |
| 18368 |
api_map = { |
| 18369 |
'fullPath': 'full_path', |
| 18370 |
} |
| 18371 |
|
| 18372 |
returnables = [ |
| 18373 |
'full_path', |
| 18374 |
'name', |
| 18375 |
'description', |
| 18376 |
'gateway', |
| 18377 |
'mtu', |
| 18378 |
'network', |
| 18379 |
] |
| 18380 |
|
| 18381 |
|
| 18382 |
class ManagementRouteFactManager(BaseManager): |
| 18383 |
def __init__(self, *args, **kwargs): |
| 18384 |
self.client = kwargs.get('client', None) |
| 18385 |
self.module = kwargs.get('module', None) |
| 18386 |
super(ManagementRouteFactManager, self).__init__(**kwargs) |
| 18387 |
|
| 18388 |
def exec_module(self): |
| 18389 |
facts = self._exec_module() |
| 18390 |
result = dict(management_routes=facts) |
| 18391 |
return result |
| 18392 |
|
| 18393 |
def _exec_module(self): |
| 18394 |
results = [] |
| 18395 |
facts = self.read_facts() |
| 18396 |
for item in facts: |
| 18397 |
attrs = item.to_return() |
| 18398 |
results.append(attrs) |
| 18399 |
results = sorted(results, key=lambda k: k['full_path']) |
| 18400 |
return results |
| 18401 |
|
| 18402 |
def read_facts(self): |
| 18403 |
results = [] |
| 18404 |
collection = self.increment_read() |
| 18405 |
for resource in collection: |
| 18406 |
attrs = resource |
| 18407 |
params = ManagementRouteParameters(params=attrs) |
| 18408 |
results.append(params) |
| 18409 |
return results |
| 18410 |
|
| 18411 |
def increment_read(self): |
| 18412 |
n = 0 |
| 18413 |
result = [] |
| 18414 |
while True: |
| 18415 |
items = self.read_collection_from_device(skip=n) |
| 18416 |
if not items: |
| 18417 |
break |
| 18418 |
result.extend(items) |
| 18419 |
n = n + self.module.params['data_increment'] |
| 18420 |
return result |
| 18421 |
|
| 18422 |
def read_collection_from_device(self, skip=0): |
| 18423 |
uri = "https://{0}:{1}/mgmt/tm/sys/management-route".format( |
| 18424 |
self.client.provider['server'], |
| 18425 |
self.client.provider['server_port'], |
| 18426 |
) |
| 18427 |
query = "?expandSubcollections=true&$top={0}&$skip={1}&$filter=partition+eq+{2}".format( |
| 18428 |
self.module.params['data_increment'], skip, self.module.params['partition'] |
| 18429 |
) |
| 18430 |
resp = self.client.api.get(uri + query) |
| 18431 |
try: |
| 18432 |
response = resp.json() |
| 18433 |
except ValueError as ex: |
| 18434 |
raise F5ModuleError(str(ex)) |
| 18435 |
|
| 18436 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 18437 |
raise F5ModuleError(resp.content) |
| 18438 |
|
| 18439 |
if 'items' not in response: |
| 18440 |
return [] |
| 18441 |
result = response['items'] |
| 18442 |
return result |
| 18443 |
|
| 18444 |
|
| 18445 |
class RemoteSyslogParameters(BaseParameters): |
| 18446 |
api_map = { |
| 18447 |
'remoteServers': 'servers', |
| 18448 |
} |
| 18449 |
|
| 18450 |
returnables = [ |
| 18451 |
'servers', |
| 18452 |
] |
| 18453 |
|
| 18454 |
def _morph_keys(self, key_map, item): |
| 18455 |
for k, v in iteritems(key_map): |
| 18456 |
item[v] = item.pop(k, None) |
| 18457 |
result = self._filter_params(item) |
| 18458 |
return result |
| 18459 |
|
| 18460 |
def _format_servers(self, items): |
| 18461 |
result = list() |
| 18462 |
key_map = { |
| 18463 |
'name': 'name', |
| 18464 |
'remotePort': 'remote_port', |
| 18465 |
'localIp': 'local_ip', |
| 18466 |
'host': 'remote_host' |
| 18467 |
} |
| 18468 |
for item in items: |
| 18469 |
output = self._morph_keys(key_map, item) |
| 18470 |
result.append(output) |
| 18471 |
return result |
| 18472 |
|
| 18473 |
@property |
| 18474 |
def servers(self): |
| 18475 |
if self._values['servers'] is None: |
| 18476 |
return None |
| 18477 |
return self._format_servers(self._values['servers']) |
| 18478 |
|
| 18479 |
|
| 18480 |
class RemoteSyslogFactManager(BaseManager): |
| 18481 |
def __init__(self, *args, **kwargs): |
| 18482 |
self.client = kwargs.get('client', None) |
| 18483 |
self.module = kwargs.get('module', None) |
| 18484 |
super(RemoteSyslogFactManager, self).__init__(**kwargs) |
| 18485 |
|
| 18486 |
def exec_module(self): |
| 18487 |
facts = self._exec_module() |
| 18488 |
result = dict(remote_syslog=facts) |
| 18489 |
return result |
| 18490 |
|
| 18491 |
def _exec_module(self): |
| 18492 |
facts = self.read_collection_from_device() |
| 18493 |
params = RemoteSyslogParameters(params=facts) |
| 18494 |
results = params.to_return() |
| 18495 |
return results |
| 18496 |
|
| 18497 |
def read_collection_from_device(self): |
| 18498 |
uri = "https://{0}:{1}/mgmt/tm/sys/syslog/".format( |
| 18499 |
self.client.provider['server'], |
| 18500 |
self.client.provider['server_port'], |
| 18501 |
) |
| 18502 |
resp = self.client.api.get(uri) |
| 18503 |
try: |
| 18504 |
response = resp.json() |
| 18505 |
except ValueError as ex: |
| 18506 |
raise F5ModuleError(str(ex)) |
| 18507 |
|
| 18508 |
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]: |
| 18509 |
raise F5ModuleError(resp.content) |
| 18510 |
return response |
| 18511 |
|
| 18512 |
|
| 18513 |
class ModuleManager(object): |
| 18514 |
def __init__(self, *args, **kwargs): |
| 18515 |
self.module = kwargs.get('module', None) |
| 18516 |
self.client = kwargs.get('client', None) |
| 18517 |
self.kwargs = kwargs |
| 18518 |
self.want = Parameters(params=self.module.params) |
| 18519 |
self.managers = { |
| 18520 |
'apm-access-profiles': ApmAccessProfileFactManager, |
| 18521 |
'apm-access-policies': ApmAccessPolicyFactManager, |
| 18522 |
'as3': As3FactManager, |
| 18523 |
'asm-policy-stats': AsmPolicyStatsFactManager, |
| 18524 |
'asm-policies': AsmPolicyFactManager, |
| 18525 |
'asm-server-technologies': AsmServerTechnologyFactManager, |
| 18526 |
'asm-signature-sets': AsmSignatureSetsFactManager, |
| 18527 |
'client-ssl-profiles': ClientSslProfilesFactManager, |
| 18528 |
'cfe': CFEFactManager, |
| 18529 |
'devices': DevicesFactManager, |
| 18530 |
'device-groups': DeviceGroupsFactManager, |
| 18531 |
'do': DOFactManager, |
| 18532 |
'external-monitors': ExternalMonitorsFactManager, |
| 18533 |
'fasthttp-profiles': FastHttpProfilesFactManager, |
| 18534 |
'fastl4-profiles': FastL4ProfilesFactManager, |
| 18535 |
'gateway-icmp-monitors': GatewayIcmpMonitorsFactManager, |
| 18536 |
'gtm-a-pools': GtmAPoolsFactManager, |
| 18537 |
'gtm-servers': GtmServersFactManager, |
| 18538 |
'gtm-a-wide-ips': GtmAWideIpsFactManager, |
| 18539 |
'gtm-aaaa-pools': GtmAaaaPoolsFactManager, |
| 18540 |
'gtm-aaaa-wide-ips': GtmAaaaWideIpsFactManager, |
| 18541 |
'gtm-cname-pools': GtmCnamePoolsFactManager, |
| 18542 |
'gtm-cname-wide-ips': GtmCnameWideIpsFactManager, |
| 18543 |
'gtm-mx-pools': GtmMxPoolsFactManager, |
| 18544 |
'gtm-mx-wide-ips': GtmMxWideIpsFactManager, |
| 18545 |
'gtm-naptr-pools': GtmNaptrPoolsFactManager, |
| 18546 |
'gtm-naptr-wide-ips': GtmNaptrWideIpsFactManager, |
| 18547 |
'gtm-srv-pools': GtmSrvPoolsFactManager, |
| 18548 |
'gtm-srv-wide-ips': GtmSrvWideIpsFactManager, |
| 18549 |
'gtm-topology-regions': GtmTopologyRegionFactManager, |
| 18550 |
'http-monitors': HttpMonitorsFactManager, |
| 18551 |
'https-monitors': HttpsMonitorsFactManager, |
| 18552 |
'http-profiles': HttpProfilesFactManager, |
| 18553 |
'iapp-services': IappServicesFactManager, |
| 18554 |
'iapplx-packages': IapplxPackagesFactManager, |
| 18555 |
'icmp-monitors': IcmpMonitorsFactManager, |
| 18556 |
'interfaces': InterfacesFactManager, |
| 18557 |
'internal-data-groups': InternalDataGroupsFactManager, |
| 18558 |
'irules': IrulesFactManager, |
| 18559 |
'license': LicenseFactManager, |
| 18560 |
'ltm-pools': LtmPoolsFactManager, |
| 18561 |
'snat-pools': SnatPoolsFactManager, |
| 18562 |
'ltm-policies': LtmPolicyFactManager, |
| 18563 |
'management-routes': ManagementRouteFactManager, |
| 18564 |
'nodes': NodesFactManager, |
| 18565 |
'oneconnect-profiles': OneConnectProfilesFactManager, |
| 18566 |
'partitions': PartitionFactManager, |
| 18567 |
'provision-info': ProvisionInfoFactManager, |
| 18568 |
'route-domains': RouteDomainFactManager, |
| 18569 |
'remote-syslog': RemoteSyslogFactManager, |
| 18570 |
'self-ips': SelfIpsFactManager, |
| 18571 |
'server-ssl-profiles': ServerSslProfilesFactManager, |
| 18572 |
'software-volumes': SoftwareVolumesFactManager, |
| 18573 |
'software-images': SoftwareImagesFactManager, |
| 18574 |
'software-hotfixes': SoftwareHotfixesFactManager, |
| 18575 |
'ssl-certs': SslCertificatesFactManager, |
| 18576 |
'ssl-keys': SslKeysFactManager, |
| 18577 |
'sync-status': SyncStatusFactManager, |
| 18578 |
'system-db': SystemDbFactManager, |
| 18579 |
'system-info': SystemInfoFactManager, |
| 18580 |
'ts': TSFactManager, |
| 18581 |
'tcp-monitors': TcpMonitorsFactManager, |
| 18582 |
'tcp-half-open-monitors': TcpHalfOpenMonitorsFactManager, |
| 18583 |
'tcp-profiles': TcpProfilesFactManager, |
| 18584 |
'traffic-groups': TrafficGroupsFactManager, |
| 18585 |
'trunks': TrunksFactManager, |
| 18586 |
'ucs': UCSFactManager, |
| 18587 |
'udp-profiles': UdpProfilesFactManager, |
| 18588 |
'users': UsersFactManager, |
| 18589 |
'vcmp-guests': VcmpGuestsFactManager, |
| 18590 |
'virtual-addresses': VirtualAddressesFactManager, |
| 18591 |
'virtual-servers': VirtualServersFactManager, |
| 18592 |
'vlans': VlansFactManager, |
| 18593 |
} |
| 18594 |
|
| 18595 |
def exec_module(self): |
| 18596 |
start = datetime.datetime.now().isoformat() |
| 18597 |
client = F5RestClient(**self.module.params) |
| 18598 |
version = tmos_version(client) |
| 18599 |
self.handle_all_keyword() |
| 18600 |
self.handle_profiles_keyword() |
| 18601 |
self.handle_monitors_keyword() |
| 18602 |
self.handle_gtm_pools_keyword() |
| 18603 |
self.handle_gtm_wide_ips_keyword() |
| 18604 |
self.handle_packages_keyword() |
| 18605 |
self.filter_excluded_meta_facts() |
| 18606 |
res = self.check_valid_gather_subset(self.want.gather_subset) |
| 18607 |
if res: |
| 18608 |
invalid = ','.join(res) |
| 18609 |
raise F5ModuleError( |
| 18610 |
"The specified 'gather_subset' options are invalid: {0}".format(invalid) |
| 18611 |
) |
| 18612 |
result = self.filter_excluded_facts() |
| 18613 |
|
| 18614 |
managers = [] |
| 18615 |
for name in result: |
| 18616 |
manager = self.get_manager(name) |
| 18617 |
if manager: |
| 18618 |
managers.append(manager) |
| 18619 |
|
| 18620 |
if not managers: |
| 18621 |
result = dict( |
| 18622 |
queried=False |
| 18623 |
) |
| 18624 |
return result |
| 18625 |
|
| 18626 |
result = self.execute_managers(managers) |
| 18627 |
if result: |
| 18628 |
result['queried'] = True |
| 18629 |
else: |
| 18630 |
result['queried'] = False |
| 18631 |
send_teem(start, client, self.module, version) |
| 18632 |
return result |
| 18633 |
|
| 18634 |
def filter_excluded_facts(self): |
| 18635 |
|
| 18636 |
exclude = [x[1:] for x in self.want.gather_subset if x[0] == '!'] |
| 18637 |
include = [x for x in self.want.gather_subset if x[0] != '!'] |
| 18638 |
result = [x for x in include if x not in exclude] |
| 18639 |
return result |
| 18640 |
|
| 18641 |
def filter_excluded_meta_facts(self): |
| 18642 |
gather_subset = set(self.want.gather_subset) |
| 18643 |
gather_subset -= {'!all', '!profiles', '!monitors', '!gtm-pools', '!gtm-wide-ips', '!packages'} |
| 18644 |
keys = self.managers.keys() |
| 18645 |
|
| 18646 |
if '!all' in self.want.gather_subset: |
| 18647 |
gather_subset.clear() |
| 18648 |
if '!profiles' in self.want.gather_subset: |
| 18649 |
gather_subset -= {x for x in keys if '-profiles' in x} |
| 18650 |
if '!monitors' in self.want.gather_subset: |
| 18651 |
gather_subset -= {x for x in keys if '-monitors' in x} |
| 18652 |
if '!gtm-pools' in self.want.gather_subset: |
| 18653 |
gather_subset -= {x for x in keys if x.startswith('gtm-') and x.endswith('-pools')} |
| 18654 |
if '!gtm-wide-ips' in self.want.gather_subset: |
| 18655 |
gather_subset -= {x for x in keys if x.startswith('gtm-') and x.endswith('-wide-ips')} |
| 18656 |
if '!packages' in self.want.gather_subset: |
| 18657 |
gather_subset -= {'as3', 'do', 'cfe', 'ts'} |
| 18658 |
|
| 18659 |
self.want.update({'gather_subset': list(gather_subset)}) |
| 18660 |
|
| 18661 |
def handle_all_keyword(self): |
| 18662 |
if 'all' not in self.want.gather_subset: |
| 18663 |
return |
| 18664 |
managers = list(self.managers.keys()) + self.want.gather_subset |
| 18665 |
managers.remove('all') |
| 18666 |
self.want.update({'gather_subset': managers}) |
| 18667 |
|
| 18668 |
def handle_profiles_keyword(self): |
| 18669 |
if 'profiles' not in self.want.gather_subset: |
| 18670 |
return |
| 18671 |
managers = [x for x in self.managers.keys() if '-profiles' in x] + self.want.gather_subset |
| 18672 |
managers.remove('profiles') |
| 18673 |
self.want.update({'gather_subset': managers}) |
| 18674 |
|
| 18675 |
def handle_monitors_keyword(self): |
| 18676 |
if 'monitors' not in self.want.gather_subset: |
| 18677 |
return |
| 18678 |
managers = [x for x in self.managers.keys() if '-monitors' in x] + self.want.gather_subset |
| 18679 |
managers.remove('monitors') |
| 18680 |
self.want.update({'gather_subset': managers}) |
| 18681 |
|
| 18682 |
def handle_gtm_pools_keyword(self): |
| 18683 |
if 'gtm-pools' not in self.want.gather_subset: |
| 18684 |
return |
| 18685 |
keys = self.managers.keys() |
| 18686 |
managers = [x for x in keys if x.startswith('gtm-') and x.endswith('-pools')] |
| 18687 |
managers += self.want.gather_subset |
| 18688 |
managers.remove('gtm-pools') |
| 18689 |
self.want.update({'gather_subset': managers}) |
| 18690 |
|
| 18691 |
def handle_gtm_wide_ips_keyword(self): |
| 18692 |
if 'gtm-wide-ips' not in self.want.gather_subset: |
| 18693 |
return |
| 18694 |
keys = self.managers.keys() |
| 18695 |
managers = [x for x in keys if x.startswith('gtm-') and x.endswith('-wide-ips')] |
| 18696 |
managers += self.want.gather_subset |
| 18697 |
managers.remove('gtm-wide-ips') |
| 18698 |
self.want.update({'gather_subset': managers}) |
| 18699 |
|
| 18700 |
def handle_packages_keyword(self): |
| 18701 |
if 'packages' not in self.want.gather_subset: |
| 18702 |
return |
| 18703 |
managers = ['as3', 'do', 'cfe', 'ts'] |
| 18704 |
managers += self.want.gather_subset |
| 18705 |
managers.remove('packages') |
| 18706 |
self.want.update({'gather_subset': managers}) |
| 18707 |
|
| 18708 |
def check_valid_gather_subset(self, includes): |
| 18709 |
"""Check that the specified subset is valid |
| 18710 |
|
| 18711 |
The ``gather_subset`` parameter is specified as a "raw" field which means that |
| 18712 |
any Python type could technically be provided |
| 18713 |
|
| 18714 |
:param includes: |
| 18715 |
:return: |
| 18716 |
""" |
| 18717 |
keys = self.managers.keys() |
| 18718 |
result = [] |
| 18719 |
for x in includes: |
| 18720 |
if x not in keys: |
| 18721 |
if x[0] == '!': |
| 18722 |
if x[1:] not in keys: |
| 18723 |
result.append(x) |
| 18724 |
else: |
| 18725 |
result.append(x) |
| 18726 |
return result |
| 18727 |
|
| 18728 |
def execute_managers(self, managers): |
| 18729 |
results = dict() |
| 18730 |
client = F5RestClient(**self.module.params) |
| 18731 |
prov = modules_provisioned(client) |
| 18732 |
for manager in managers: |
| 18733 |
manager.provisioned_modules = prov |
| 18734 |
result = manager.exec_module() |
| 18735 |
results.update(result) |
| 18736 |
return results |
| 18737 |
|
| 18738 |
def get_manager(self, which): |
| 18739 |
result = {} |
| 18740 |
manager = self.managers.get(which, None) |
| 18741 |
if not manager: |
| 18742 |
return result |
| 18743 |
kwargs = dict() |
| 18744 |
kwargs.update(self.kwargs) |
| 18745 |
|
| 18746 |
kwargs['client'] = F5RestClient(**self.module.params) |
| 18747 |
result = manager(**kwargs) |
| 18748 |
return result |
| 18749 |
|
| 18750 |
|
| 18751 |
class ArgumentSpec(object): |
| 18752 |
def __init__(self): |
| 18753 |
self.supports_check_mode = True |
| 18754 |
argument_spec = dict( |
| 18755 |
data_increment=dict( |
| 18756 |
type='int', |
| 18757 |
default=10 |
| 18758 |
), |
| 18759 |
partition=dict( |
| 18760 |
default='Common', |
| 18761 |
fallback=(env_fallback, ['F5_PARTITION']) |
| 18762 |
), |
| 18763 |
gather_subset=dict( |
| 18764 |
type='list', |
| 18765 |
elements='str', |
| 18766 |
required=True, |
| 18767 |
aliases=['include'], |
| 18768 |
choices=[ |
| 18769 |
|
| 18770 |
'all', |
| 18771 |
'monitors', |
| 18772 |
'profiles', |
| 18773 |
'gtm-pools', |
| 18774 |
'gtm-wide-ips', |
| 18775 |
'packages', |
| 18776 |
|
| 18777 |
|
| 18778 |
'apm-access-profiles', |
| 18779 |
'apm-access-policies', |
| 18780 |
'as3', |
| 18781 |
'asm-policies', |
| 18782 |
'asm-policy-stats', |
| 18783 |
'asm-server-technologies', |
| 18784 |
'asm-signature-sets', |
| 18785 |
'client-ssl-profiles', |
| 18786 |
'cfe', |
| 18787 |
'devices', |
| 18788 |
'device-groups', |
| 18789 |
'do', |
| 18790 |
'external-monitors', |
| 18791 |
'fasthttp-profiles', |
| 18792 |
'fastl4-profiles', |
| 18793 |
'gateway-icmp-monitors', |
| 18794 |
'gtm-a-pools', |
| 18795 |
'gtm-servers', |
| 18796 |
'gtm-a-wide-ips', |
| 18797 |
'gtm-aaaa-pools', |
| 18798 |
'gtm-aaaa-wide-ips', |
| 18799 |
'gtm-cname-pools', |
| 18800 |
'gtm-cname-wide-ips', |
| 18801 |
'gtm-mx-pools', |
| 18802 |
'gtm-mx-wide-ips', |
| 18803 |
'gtm-naptr-pools', |
| 18804 |
'gtm-naptr-wide-ips', |
| 18805 |
'gtm-srv-pools', |
| 18806 |
'gtm-srv-wide-ips', |
| 18807 |
'gtm-topology-regions', |
| 18808 |
'http-profiles', |
| 18809 |
'http-monitors', |
| 18810 |
'https-monitors', |
| 18811 |
'iapp-services', |
| 18812 |
'iapplx-packages', |
| 18813 |
'icmp-monitors', |
| 18814 |
'interfaces', |
| 18815 |
'internal-data-groups', |
| 18816 |
'irules', |
| 18817 |
'license', |
| 18818 |
'ltm-pools', |
| 18819 |
'snat-pools', |
| 18820 |
'ltm-policies', |
| 18821 |
'management-routes', |
| 18822 |
'nodes', |
| 18823 |
'oneconnect-profiles', |
| 18824 |
'partitions', |
| 18825 |
'provision-info', |
| 18826 |
'remote-syslog', |
| 18827 |
'route-domains', |
| 18828 |
'self-ips', |
| 18829 |
'server-ssl-profiles', |
| 18830 |
'software-volumes', |
| 18831 |
'software-images', |
| 18832 |
'software-hotfixes', |
| 18833 |
'ssl-certs', |
| 18834 |
'ssl-keys', |
| 18835 |
'sync-status', |
| 18836 |
'system-db', |
| 18837 |
'system-info', |
| 18838 |
'ts', |
| 18839 |
'tcp-monitors', |
| 18840 |
'tcp-half-open-monitors', |
| 18841 |
'tcp-profiles', |
| 18842 |
'traffic-groups', |
| 18843 |
'trunks', |
| 18844 |
'udp-profiles', |
| 18845 |
'users', |
| 18846 |
'ucs', |
| 18847 |
'vcmp-guests', |
| 18848 |
'virtual-addresses', |
| 18849 |
'virtual-servers', |
| 18850 |
'vlans', |
| 18851 |
|
| 18852 |
|
| 18853 |
'!all', |
| 18854 |
"!monitors", |
| 18855 |
'!profiles', |
| 18856 |
'!gtm-pools', |
| 18857 |
'!gtm-wide-ips', |
| 18858 |
'!packages', |
| 18859 |
|
| 18860 |
|
| 18861 |
'!apm-access-profiles', |
| 18862 |
'!apm-access-policies', |
| 18863 |
'!as3', |
| 18864 |
'!do', |
| 18865 |
'!ts', |
| 18866 |
'!cfe', |
| 18867 |
'!asm-policy-stats', |
| 18868 |
'!asm-policies', |
| 18869 |
'!asm-server-technologies', |
| 18870 |
'!asm-signature-sets', |
| 18871 |
'!client-ssl-profiles', |
| 18872 |
'!devices', |
| 18873 |
'!device-groups', |
| 18874 |
'!external-monitors', |
| 18875 |
'!fasthttp-profiles', |
| 18876 |
'!fastl4-profiles', |
| 18877 |
'!gateway-icmp-monitors', |
| 18878 |
'!gtm-a-pools', |
| 18879 |
'!gtm-servers', |
| 18880 |
'!gtm-a-wide-ips', |
| 18881 |
'!gtm-aaaa-pools', |
| 18882 |
'!gtm-aaaa-wide-ips', |
| 18883 |
'!gtm-cname-pools', |
| 18884 |
'!gtm-cname-wide-ips', |
| 18885 |
'!gtm-mx-pools', |
| 18886 |
'!gtm-mx-wide-ips', |
| 18887 |
'!gtm-naptr-pools', |
| 18888 |
'!gtm-naptr-wide-ips', |
| 18889 |
'!gtm-srv-pools', |
| 18890 |
'!gtm-srv-wide-ips', |
| 18891 |
'!gtm-topology-regions', |
| 18892 |
'!http-profiles', |
| 18893 |
'!http-monitors', |
| 18894 |
'!https-monitors', |
| 18895 |
'!iapp-services', |
| 18896 |
'!iapplx-packages', |
| 18897 |
'!icmp-monitors', |
| 18898 |
'!interfaces', |
| 18899 |
'!internal-data-groups', |
| 18900 |
'!irules', |
| 18901 |
'!license', |
| 18902 |
'!ltm-pools', |
| 18903 |
'!snat-pools', |
| 18904 |
'!ltm-policies', |
| 18905 |
'!management-routes', |
| 18906 |
'!nodes', |
| 18907 |
'!oneconnect-profiles', |
| 18908 |
'!partitions', |
| 18909 |
'!provision-info', |
| 18910 |
'!remote-syslog', |
| 18911 |
'!route-domains', |
| 18912 |
'!self-ips', |
| 18913 |
'!server-ssl-profiles', |
| 18914 |
'!software-volumes', |
| 18915 |
'!software-images', |
| 18916 |
'!software-hotfixes', |
| 18917 |
'!ssl-certs', |
| 18918 |
'!ssl-keys', |
| 18919 |
'!sync-status', |
| 18920 |
'!system-db', |
| 18921 |
'!system-info', |
| 18922 |
'!tcp-monitors', |
| 18923 |
'!tcp-half-open-monitors', |
| 18924 |
'!tcp-profiles', |
| 18925 |
'!traffic-groups', |
| 18926 |
'!trunks', |
| 18927 |
'!udp-profiles', |
| 18928 |
'!users', |
| 18929 |
'!ucs', |
| 18930 |
'!vcmp-guests', |
| 18931 |
'!virtual-addresses', |
| 18932 |
'!virtual-servers', |
| 18933 |
'!vlans', |
| 18934 |
] |
| 18935 |
), |
| 18936 |
) |
| 18937 |
self.argument_spec = {} |
| 18938 |
self.argument_spec.update(f5_argument_spec) |
| 18939 |
self.argument_spec.update(argument_spec) |
| 18940 |
|
| 18941 |
|
| 18942 |
def main(): |
| 18943 |
spec = ArgumentSpec() |
| 18944 |
|
| 18945 |
module = AnsibleModule( |
| 18946 |
argument_spec=spec.argument_spec, |
| 18947 |
supports_check_mode=spec.supports_check_mode |
| 18948 |
) |
| 18949 |
|
| 18950 |
if not HAS_PACKAGING: |
| 18951 |
module.fail_json( |
| 18952 |
msg=missing_required_lib('packaging'), |
| 18953 |
exception=PACKAGING_IMPORT_ERROR |
| 18954 |
) |
| 18955 |
|
| 18956 |
try: |
| 18957 |
mm = ModuleManager(module=module) |
| 18958 |
results = mm.exec_module() |
| 18959 |
|
| 18960 |
|
| 18961 |
|
| 18962 |
ansible_facts = dict() |
| 18963 |
|
| 18964 |
for key, value in iteritems(results): |
| 18965 |
key = 'ansible_net_%s' % key |
| 18966 |
ansible_facts[key] = value |
| 18967 |
|
| 18968 |
module.exit_json(ansible_facts=ansible_facts, **results) |
| 18969 |
except F5ModuleError as ex: |
| 18970 |
module.fail_json(msg=str(ex)) |
| 18971 |
|
| 18972 |
|
| 18973 |
if __name__ == '__main__': |
| 18974 |
main() |