summaryrefslogtreecommitdiffstats
path: root/ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_vpnmgr_vpntable.py
blob: f5894707dd2c609bc36e811c70246f7925d8ce2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
#!/usr/bin/python
from __future__ import absolute_import, division, print_function
# Copyright 2019-2024 Fortinet, Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

__metaclass__ = type

ANSIBLE_METADATA = {'status': ['preview'],
                    'supported_by': 'community',
                    'metadata_version': '1.1'}

DOCUMENTATION = '''
---
module: fmgr_vpnmgr_vpntable
short_description: no description
description:
    - This module is able to configure a FortiManager device.
    - Examples include all parameters and values which need to be adjusted to data sources before usage.

version_added: "2.0.0"
author:
    - Xinwei Du (@dux-fortinet)
    - Xing Li (@lix-fortinet)
    - Jie Xue (@JieX19)
    - Link Zheng (@chillancezen)
    - Frank Shen (@fshen01)
    - Hongbin Lu (@fgtdev-hblu)
notes:
    - Starting in version 2.4.0, all input arguments are named using the underscore naming convention (snake_case).
      Please change the arguments such as "var-name" to "var_name".
      Old argument names are still available yet you will receive deprecation warnings.
      You can ignore this warning by setting deprecation_warnings=False in ansible.cfg.
    - Running in workspace locking mode is supported in this FortiManager module, the top
      level parameters workspace_locking_adom and workspace_locking_timeout help do the work.
    - To create or update an object, use state present directive.
    - To delete an object, use state absent directive.
    - Normally, running one module can fail when a non-zero rc is returned. you can also override
      the conditions to fail or succeed with parameters rc_failed and rc_succeeded
options:
    access_token:
        description: The token to access FortiManager without using username and password.
        type: str
    bypass_validation:
        description: Only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters.
        type: bool
        default: false
    enable_log:
        description: Enable/Disable logging for task.
        type: bool
        default: false
    forticloud_access_token:
        description: Authenticate Ansible client with forticloud API access token.
        type: str
    proposed_method:
        description: The overridden method for the underlying Json RPC request.
        type: str
        choices:
          - update
          - set
          - add
    rc_succeeded:
        description: The rc codes list with which the conditions to succeed will be overriden.
        type: list
        elements: int
    rc_failed:
        description: The rc codes list with which the conditions to fail will be overriden.
        type: list
        elements: int
    state:
        description: The directive to create, update or delete an object.
        type: str
        required: true
        choices:
          - present
          - absent
    workspace_locking_adom:
        description: The adom to lock for FortiManager running in workspace mode, the value can be global and others including root.
        type: str
    workspace_locking_timeout:
        description: The maximum time in seconds to wait for other user to release the workspace lock.
        type: int
        default: 300
    adom:
        description: The parameter (adom) in requested url.
        type: str
        required: true
    vpnmgr_vpntable:
        description: The top level parameters set.
        required: false
        type: dict
        suboptions:
            authmethod:
                type: str
                description: Authmethod.
                choices:
                    - 'psk'
                    - 'rsa-signature'
                    - 'signature'
            auto-zone-policy:
                type: str
                description: Deprecated, please rename it to auto_zone_policy. Auto-Zone-Policy.
                choices:
                    - 'disable'
                    - 'enable'
            certificate:
                type: raw
                description: (list or str) Certificate.
            description:
                type: str
                description: Description.
            dpd:
                type: str
                description: Dpd.
                choices:
                    - 'disable'
                    - 'enable'
                    - 'on-idle'
                    - 'on-demand'
            dpd-retrycount:
                type: int
                description: Deprecated, please rename it to dpd_retrycount. Dpd-Retrycount.
            dpd-retryinterval:
                type: raw
                description: (list) Deprecated, please rename it to dpd_retryinterval. Dpd-Retryinterval.
            fcc-enforcement:
                type: str
                description: Deprecated, please rename it to fcc_enforcement. Fcc-Enforcement.
                choices:
                    - 'disable'
                    - 'enable'
            hub2spoke-zone:
                type: raw
                description: (list or str) Deprecated, please rename it to hub2spoke_zone. Hub2Spoke-Zone.
            ike-version:
                type: str
                description: Deprecated, please rename it to ike_version. Ike-Version.
                choices:
                    - '1'
                    - '2'
            ike1dhgroup:
                type: list
                elements: str
                description: Ike1Dhgroup.
                choices:
                    - '1'
                    - '2'
                    - '5'
                    - '14'
                    - '15'
                    - '16'
                    - '17'
                    - '18'
                    - '19'
                    - '20'
                    - '21'
                    - '27'
                    - '28'
                    - '29'
                    - '30'
                    - '31'
                    - '32'
            ike1dpd:
                type: str
                description: Ike1Dpd.
                choices:
                    - 'disable'
                    - 'enable'
            ike1keylifesec:
                type: int
                description: Ike1Keylifesec.
            ike1localid:
                type: str
                description: Ike1Localid.
            ike1mode:
                type: str
                description: Ike1Mode.
                choices:
                    - 'main'
                    - 'aggressive'
            ike1natkeepalive:
                type: int
                description: Ike1Natkeepalive.
            ike1nattraversal:
                type: str
                description: Ike1Nattraversal.
                choices:
                    - 'disable'
                    - 'enable'
                    - 'forced'
            ike1proposal:
                type: str
                description: Ike1Proposal.
                choices:
                    - 'des-md5'
                    - 'des-sha1'
                    - '3des-md5'
                    - '3des-sha1'
                    - 'aes128-md5'
                    - 'aes128-sha1'
                    - 'aes192-md5'
                    - 'aes192-sha1'
                    - 'aes256-md5'
                    - 'aes256-sha1'
                    - 'des-sha256'
                    - '3des-sha256'
                    - 'aes128-sha256'
                    - 'aes192-sha256'
                    - 'aes256-sha256'
                    - 'des-sha384'
                    - 'des-sha512'
                    - '3des-sha384'
                    - '3des-sha512'
                    - 'aes128-sha384'
                    - 'aes128-sha512'
                    - 'aes192-sha384'
                    - 'aes192-sha512'
                    - 'aes256-sha384'
                    - 'aes256-sha512'
                    - 'aria128-md5'
                    - 'aria128-sha1'
                    - 'aria128-sha256'
                    - 'aria128-sha384'
                    - 'aria128-sha512'
                    - 'aria192-md5'
                    - 'aria192-sha1'
                    - 'aria192-sha256'
                    - 'aria192-sha384'
                    - 'aria192-sha512'
                    - 'aria256-md5'
                    - 'aria256-sha1'
                    - 'aria256-sha256'
                    - 'aria256-sha384'
                    - 'aria256-sha512'
                    - 'seed-md5'
                    - 'seed-sha1'
                    - 'seed-sha256'
                    - 'seed-sha384'
                    - 'seed-sha512'
                    - 'aes128gcm-prfsha1'
                    - 'aes128gcm-prfsha256'
                    - 'aes128gcm-prfsha384'
                    - 'aes128gcm-prfsha512'
                    - 'aes256gcm-prfsha1'
                    - 'aes256gcm-prfsha256'
                    - 'aes256gcm-prfsha384'
                    - 'aes256gcm-prfsha512'
                    - 'chacha20poly1305-prfsha1'
                    - 'chacha20poly1305-prfsha256'
                    - 'chacha20poly1305-prfsha384'
                    - 'chacha20poly1305-prfsha512'
            ike2autonego:
                type: str
                description: Ike2Autonego.
                choices:
                    - 'disable'
                    - 'enable'
            ike2dhgroup:
                type: list
                elements: str
                description: Ike2Dhgroup.
                choices:
                    - '1'
                    - '2'
                    - '5'
                    - '14'
                    - '15'
                    - '16'
                    - '17'
                    - '18'
                    - '19'
                    - '20'
                    - '21'
                    - '27'
                    - '28'
                    - '29'
                    - '30'
                    - '31'
                    - '32'
            ike2keepalive:
                type: str
                description: Ike2Keepalive.
                choices:
                    - 'disable'
                    - 'enable'
            ike2keylifekbs:
                type: int
                description: Ike2Keylifekbs.
            ike2keylifesec:
                type: int
                description: Ike2Keylifesec.
            ike2keylifetype:
                type: str
                description: Ike2Keylifetype.
                choices:
                    - 'seconds'
                    - 'kbs'
                    - 'both'
            ike2proposal:
                type: str
                description: Ike2Proposal.
                choices:
                    - 'null-md5'
                    - 'null-sha1'
                    - 'des-null'
                    - '3des-null'
                    - 'des-md5'
                    - 'des-sha1'
                    - '3des-md5'
                    - '3des-sha1'
                    - 'aes128-md5'
                    - 'aes128-sha1'
                    - 'aes192-md5'
                    - 'aes192-sha1'
                    - 'aes256-md5'
                    - 'aes256-sha1'
                    - 'aes128-null'
                    - 'aes192-null'
                    - 'aes256-null'
                    - 'null-sha256'
                    - 'des-sha256'
                    - '3des-sha256'
                    - 'aes128-sha256'
                    - 'aes192-sha256'
                    - 'aes256-sha256'
                    - 'des-sha384'
                    - 'des-sha512'
                    - '3des-sha384'
                    - '3des-sha512'
                    - 'aes128-sha384'
                    - 'aes128-sha512'
                    - 'aes192-sha384'
                    - 'aes192-sha512'
                    - 'aes256-sha384'
                    - 'aes256-sha512'
                    - 'null-sha384'
                    - 'null-sha512'
                    - 'aria128-null'
                    - 'aria128-md5'
                    - 'aria128-sha1'
                    - 'aria128-sha256'
                    - 'aria128-sha384'
                    - 'aria128-sha512'
                    - 'aria192-null'
                    - 'aria192-md5'
                    - 'aria192-sha1'
                    - 'aria192-sha256'
                    - 'aria192-sha384'
                    - 'aria192-sha512'
                    - 'aria256-null'
                    - 'aria256-md5'
                    - 'aria256-sha1'
                    - 'aria256-sha256'
                    - 'aria256-sha384'
                    - 'aria256-sha512'
                    - 'seed-null'
                    - 'seed-md5'
                    - 'seed-sha1'
                    - 'seed-sha256'
                    - 'seed-sha384'
                    - 'seed-sha512'
                    - 'aes128gcm'
                    - 'aes256gcm'
                    - 'chacha20poly1305'
            inter-vdom:
                type: str
                description: Deprecated, please rename it to inter_vdom. Inter-Vdom.
                choices:
                    - 'disable'
                    - 'enable'
            intf-mode:
                type: str
                description: Deprecated, please rename it to intf_mode. Intf-Mode.
                choices:
                    - 'off'
                    - 'on'
            localid-type:
                type: str
                description: Deprecated, please rename it to localid_type. Localid-Type.
                choices:
                    - 'auto'
                    - 'fqdn'
                    - 'user-fqdn'
                    - 'keyid'
                    - 'address'
                    - 'asn1dn'
            name:
                type: str
                description: Name.
                required: true
            negotiate-timeout:
                type: int
                description: Deprecated, please rename it to negotiate_timeout. Negotiate-Timeout.
            npu-offload:
                type: str
                description: Deprecated, please rename it to npu_offload. Npu-Offload.
                choices:
                    - 'disable'
                    - 'enable'
            pfs:
                type: str
                description: Pfs.
                choices:
                    - 'disable'
                    - 'enable'
            psk-auto-generate:
                type: str
                description: Deprecated, please rename it to psk_auto_generate. Psk-Auto-Generate.
                choices:
                    - 'disable'
                    - 'enable'
            psksecret:
                type: raw
                description: (list) Psksecret.
            replay:
                type: str
                description: Replay.
                choices:
                    - 'disable'
                    - 'enable'
            rsa-certificate:
                type: str
                description: Deprecated, please rename it to rsa_certificate. Rsa-Certificate.
            spoke2hub-zone:
                type: raw
                description: (list or str) Deprecated, please rename it to spoke2hub_zone. Spoke2Hub-Zone.
            topology:
                type: str
                description: Topology.
                choices:
                    - 'meshed'
                    - 'star'
                    - 'dialup'
            vpn-zone:
                type: raw
                description: (list or str) Deprecated, please rename it to vpn_zone. Vpn-Zone.
            network-id:
                type: int
                description: Deprecated, please rename it to network_id. Network-Id.
            network-overlay:
                type: str
                description: Deprecated, please rename it to network_overlay. Network-Overlay.
                choices:
                    - 'disable'
                    - 'enable'
'''

EXAMPLES = '''
- name: Example playbook (generated based on argument schema)
  hosts: fortimanagers
  connection: httpapi
  vars:
    ansible_httpapi_use_ssl: true
    ansible_httpapi_validate_certs: false
    ansible_httpapi_port: 443
  tasks:
    - name: No description
      fortinet.fortimanager.fmgr_vpnmgr_vpntable:
        # bypass_validation: false
        workspace_locking_adom: <value in [global, custom adom including root]>
        workspace_locking_timeout: 300
        # rc_succeeded: [0, -2, -3, ...]
        # rc_failed: [-2, -3, ...]
        adom: <your own value>
        state: present # <value in [present, absent]>
        vpnmgr_vpntable:
          authmethod: <value in [psk, rsa-signature, signature]>
          auto_zone_policy: <value in [disable, enable]>
          certificate: <list or string>
          description: <string>
          dpd: <value in [disable, enable, on-idle, ...]>
          dpd_retrycount: <integer>
          dpd_retryinterval: <list or integer>
          fcc_enforcement: <value in [disable, enable]>
          hub2spoke_zone: <list or string>
          ike_version: <value in [1, 2]>
          ike1dhgroup:
            - 1
            - 2
            - 5
            - 14
            - 15
            - 16
            - 17
            - 18
            - 19
            - 20
            - 21
            - 27
            - 28
            - 29
            - 30
            - 31
            - 32
          ike1dpd: <value in [disable, enable]>
          ike1keylifesec: <integer>
          ike1localid: <string>
          ike1mode: <value in [main, aggressive]>
          ike1natkeepalive: <integer>
          ike1nattraversal: <value in [disable, enable, forced]>
          ike1proposal: <value in [des-md5, des-sha1, 3des-md5, ...]>
          ike2autonego: <value in [disable, enable]>
          ike2dhgroup:
            - 1
            - 2
            - 5
            - 14
            - 15
            - 16
            - 17
            - 18
            - 19
            - 20
            - 21
            - 27
            - 28
            - 29
            - 30
            - 31
            - 32
          ike2keepalive: <value in [disable, enable]>
          ike2keylifekbs: <integer>
          ike2keylifesec: <integer>
          ike2keylifetype: <value in [seconds, kbs, both]>
          ike2proposal: <value in [null-md5, null-sha1, des-null, ...]>
          inter_vdom: <value in [disable, enable]>
          intf_mode: <value in [off, on]>
          localid_type: <value in [auto, fqdn, user-fqdn, ...]>
          name: <string>
          negotiate_timeout: <integer>
          npu_offload: <value in [disable, enable]>
          pfs: <value in [disable, enable]>
          psk_auto_generate: <value in [disable, enable]>
          psksecret: <list or string>
          replay: <value in [disable, enable]>
          rsa_certificate: <string>
          spoke2hub_zone: <list or string>
          topology: <value in [meshed, star, dialup]>
          vpn_zone: <list or string>
          network_id: <integer>
          network_overlay: <value in [disable, enable]>
'''

RETURN = '''
meta:
    description: The result of the request.
    type: dict
    returned: always
    contains:
        request_url:
            description: The full url requested.
            returned: always
            type: str
            sample: /sys/login/user
        response_code:
            description: The status of api request.
            returned: always
            type: int
            sample: 0
        response_data:
            description: The api response.
            type: list
            returned: always
        response_message:
            description: The descriptive message of the api response.
            type: str
            returned: always
            sample: OK.
        system_information:
            description: The information of the target system.
            type: dict
            returned: always
rc:
    description: The status the request.
    type: int
    returned: always
    sample: 0
version_check_warning:
    description: Warning if the parameters used in the playbook are not supported by the current FortiManager version.
    type: list
    returned: complex
'''
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.connection import Connection
from ansible_collections.fortinet.fortimanager.plugins.module_utils.napi import NAPIManager
from ansible_collections.fortinet.fortimanager.plugins.module_utils.napi import check_galaxy_version
from ansible_collections.fortinet.fortimanager.plugins.module_utils.napi import check_parameter_bypass
from ansible_collections.fortinet.fortimanager.plugins.module_utils.common import get_module_arg_spec


def main():
    jrpc_urls = [
        '/pm/config/adom/{adom}/obj/vpnmgr/vpntable',
        '/pm/config/global/obj/vpnmgr/vpntable'
    ]

    perobject_jrpc_urls = [
        '/pm/config/adom/{adom}/obj/vpnmgr/vpntable/{vpntable}',
        '/pm/config/global/obj/vpnmgr/vpntable/{vpntable}'
    ]

    url_params = ['adom']
    module_primary_key = 'name'
    module_arg_spec = {
        'adom': {'required': True, 'type': 'str'},
        'vpnmgr_vpntable': {
            'type': 'dict',
            'v_range': [['6.0.0', '']],
            'options': {
                'authmethod': {'choices': ['psk', 'rsa-signature', 'signature'], 'type': 'str'},
                'auto-zone-policy': {'choices': ['disable', 'enable'], 'type': 'str'},
                'certificate': {'type': 'raw'},
                'description': {'type': 'str'},
                'dpd': {'choices': ['disable', 'enable', 'on-idle', 'on-demand'], 'type': 'str'},
                'dpd-retrycount': {'type': 'int'},
                'dpd-retryinterval': {'type': 'raw'},
                'fcc-enforcement': {'choices': ['disable', 'enable'], 'type': 'str'},
                'hub2spoke-zone': {'type': 'raw'},
                'ike-version': {'choices': ['1', '2'], 'type': 'str'},
                'ike1dhgroup': {
                    'type': 'list',
                    'choices': ['1', '2', '5', '14', '15', '16', '17', '18', '19', '20', '21', '27', '28', '29', '30', '31', '32'],
                    'elements': 'str'
                },
                'ike1dpd': {'choices': ['disable', 'enable'], 'type': 'str'},
                'ike1keylifesec': {'no_log': True, 'type': 'int'},
                'ike1localid': {'type': 'str'},
                'ike1mode': {'choices': ['main', 'aggressive'], 'type': 'str'},
                'ike1natkeepalive': {'type': 'int'},
                'ike1nattraversal': {'choices': ['disable', 'enable', 'forced'], 'type': 'str'},
                'ike1proposal': {
                    'choices': [
                        'des-md5', 'des-sha1', '3des-md5', '3des-sha1', 'aes128-md5', 'aes128-sha1', 'aes192-md5', 'aes192-sha1', 'aes256-md5',
                        'aes256-sha1', 'des-sha256', '3des-sha256', 'aes128-sha256', 'aes192-sha256', 'aes256-sha256', 'des-sha384', 'des-sha512',
                        '3des-sha384', '3des-sha512', 'aes128-sha384', 'aes128-sha512', 'aes192-sha384', 'aes192-sha512', 'aes256-sha384',
                        'aes256-sha512', 'aria128-md5', 'aria128-sha1', 'aria128-sha256', 'aria128-sha384', 'aria128-sha512', 'aria192-md5',
                        'aria192-sha1', 'aria192-sha256', 'aria192-sha384', 'aria192-sha512', 'aria256-md5', 'aria256-sha1', 'aria256-sha256',
                        'aria256-sha384', 'aria256-sha512', 'seed-md5', 'seed-sha1', 'seed-sha256', 'seed-sha384', 'seed-sha512', 'aes128gcm-prfsha1',
                        'aes128gcm-prfsha256', 'aes128gcm-prfsha384', 'aes128gcm-prfsha512', 'aes256gcm-prfsha1', 'aes256gcm-prfsha256',
                        'aes256gcm-prfsha384', 'aes256gcm-prfsha512', 'chacha20poly1305-prfsha1', 'chacha20poly1305-prfsha256',
                        'chacha20poly1305-prfsha384', 'chacha20poly1305-prfsha512'
                    ],
                    'type': 'str'
                },
                'ike2autonego': {'choices': ['disable', 'enable'], 'type': 'str'},
                'ike2dhgroup': {
                    'type': 'list',
                    'choices': ['1', '2', '5', '14', '15', '16', '17', '18', '19', '20', '21', '27', '28', '29', '30', '31', '32'],
                    'elements': 'str'
                },
                'ike2keepalive': {'choices': ['disable', 'enable'], 'type': 'str'},
                'ike2keylifekbs': {'no_log': True, 'type': 'int'},
                'ike2keylifesec': {'no_log': True, 'type': 'int'},
                'ike2keylifetype': {'choices': ['seconds', 'kbs', 'both'], 'type': 'str'},
                'ike2proposal': {
                    'choices': [
                        'null-md5', 'null-sha1', 'des-null', '3des-null', 'des-md5', 'des-sha1', '3des-md5', '3des-sha1', 'aes128-md5', 'aes128-sha1',
                        'aes192-md5', 'aes192-sha1', 'aes256-md5', 'aes256-sha1', 'aes128-null', 'aes192-null', 'aes256-null', 'null-sha256',
                        'des-sha256', '3des-sha256', 'aes128-sha256', 'aes192-sha256', 'aes256-sha256', 'des-sha384', 'des-sha512', '3des-sha384',
                        '3des-sha512', 'aes128-sha384', 'aes128-sha512', 'aes192-sha384', 'aes192-sha512', 'aes256-sha384', 'aes256-sha512',
                        'null-sha384', 'null-sha512', 'aria128-null', 'aria128-md5', 'aria128-sha1', 'aria128-sha256', 'aria128-sha384',
                        'aria128-sha512', 'aria192-null', 'aria192-md5', 'aria192-sha1', 'aria192-sha256', 'aria192-sha384', 'aria192-sha512',
                        'aria256-null', 'aria256-md5', 'aria256-sha1', 'aria256-sha256', 'aria256-sha384', 'aria256-sha512', 'seed-null', 'seed-md5',
                        'seed-sha1', 'seed-sha256', 'seed-sha384', 'seed-sha512', 'aes128gcm', 'aes256gcm', 'chacha20poly1305'
                    ],
                    'type': 'str'
                },
                'inter-vdom': {'choices': ['disable', 'enable'], 'type': 'str'},
                'intf-mode': {'choices': ['off', 'on'], 'type': 'str'},
                'localid-type': {'choices': ['auto', 'fqdn', 'user-fqdn', 'keyid', 'address', 'asn1dn'], 'type': 'str'},
                'name': {'required': True, 'type': 'str'},
                'negotiate-timeout': {'type': 'int'},
                'npu-offload': {'choices': ['disable', 'enable'], 'type': 'str'},
                'pfs': {'choices': ['disable', 'enable'], 'type': 'str'},
                'psk-auto-generate': {'choices': ['disable', 'enable'], 'type': 'str'},
                'psksecret': {'no_log': True, 'type': 'raw'},
                'replay': {'choices': ['disable', 'enable'], 'type': 'str'},
                'rsa-certificate': {'type': 'str'},
                'spoke2hub-zone': {'type': 'raw'},
                'topology': {'choices': ['meshed', 'star', 'dialup'], 'type': 'str'},
                'vpn-zone': {'type': 'raw'},
                'network-id': {'v_range': [['6.2.5', '']], 'type': 'int'},
                'network-overlay': {'v_range': [['6.2.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'}
            }

        }
    }

    module_option_spec = get_module_arg_spec('full crud')
    module_arg_spec.update(module_option_spec)
    params_validation_blob = []
    check_galaxy_version(module_arg_spec)
    module = AnsibleModule(argument_spec=check_parameter_bypass(module_arg_spec, 'vpnmgr_vpntable'),
                           supports_check_mode=False)

    if not module._socket_path:
        module.fail_json(msg='MUST RUN IN HTTPAPI MODE')
    connection = Connection(module._socket_path)
    connection.set_option('access_token', module.params.get('access_token', None))
    connection.set_option('enable_log', module.params.get('enable_log', False))
    connection.set_option('forticloud_access_token', module.params.get('forticloud_access_token', None))
    fmgr = NAPIManager(jrpc_urls, perobject_jrpc_urls, module_primary_key, url_params, module, connection, top_level_schema_name='data')
    fmgr.validate_parameters(params_validation_blob)
    fmgr.process_curd(argument_specs=module_arg_spec)

    module.exit_json(meta=module.params)


if __name__ == '__main__':
    main()