Debian Codegraph @

ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_fsp_vlan_dhcpserver.py

raw symbols SCIP
1 #!/usr/bin/python
2 from __future__ import absolute_import, division, print_function
3 # Copyright 2019-2024 Fortinet, Inc.
4 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
5
6 __metaclass__ = type
7
8 ANSIBLE_METADATA = {'status': ['preview'],
9 'supported_by': 'community',
10 'metadata_version': '1.1'}
11
12 DOCUMENTATION = '''
13 ---
14 module: fmgr_fsp_vlan_dhcpserver
15 short_description: Configure DHCP servers.
16 version_added: "2.0.0"
17 extends_documentation_fragment:
18 - fortinet.fortimanager.general
19 - fortinet.fortimanager.general.partial_crud
20 options:
21 revision_note:
22 description: The change note that can be specified when an object is created or updated.
23 type: str
24 adom:
25 description: The parameter (adom) in requested url.
26 type: str
27 required: true
28 vlan:
29 description: The parameter (vlan) in requested url.
30 type: str
31 required: true
32 fsp_vlan_dhcpserver:
33 description: The top level parameters set.
34 required: false
35 type: dict
36 suboptions:
37 auto_configuration:
38 aliases: ['auto-configuration']
39 type: str
40 description: Auto configuration.
41 choices: ['disable', 'enable']
42 conflicted_ip_timeout:
43 aliases: ['conflicted-ip-timeout']
44 type: int
45 description: Conflicted ip timeout.
46 ddns_auth:
47 aliases: ['ddns-auth']
48 type: str
49 description: Ddns auth.
50 choices: ['disable', 'tsig']
51 ddns_key:
52 aliases: ['ddns-key']
53 type: raw
54 description: (list or str) Ddns key.
55 ddns_keyname:
56 aliases: ['ddns-keyname']
57 type: str
58 description: Ddns keyname.
59 ddns_server_ip:
60 aliases: ['ddns-server-ip']
61 type: str
62 description: Ddns server ip.
63 ddns_ttl:
64 aliases: ['ddns-ttl']
65 type: int
66 description: Ddns ttl.
67 ddns_update:
68 aliases: ['ddns-update']
69 type: str
70 description: Ddns update.
71 choices: ['disable', 'enable']
72 ddns_update_override:
73 aliases: ['ddns-update-override']
74 type: str
75 description: Ddns update override.
76 choices: ['disable', 'enable']
77 ddns_zone:
78 aliases: ['ddns-zone']
79 type: str
80 description: Ddns zone.
81 default_gateway:
82 aliases: ['default-gateway']
83 type: str
84 description: Default gateway.
85 dns_server1:
86 aliases: ['dns-server1']
87 type: str
88 description: Dns server1.
89 dns_server2:
90 aliases: ['dns-server2']
91 type: str
92 description: Dns server2.
93 dns_server3:
94 aliases: ['dns-server3']
95 type: str
96 description: Dns server3.
97 dns_service:
98 aliases: ['dns-service']
99 type: str
100 description: Dns service.
101 choices: ['default', 'specify', 'local']
102 domain:
103 type: str
104 description: Domain.
105 enable:
106 type: str
107 description: Enable.
108 choices: ['disable', 'enable']
109 exclude_range:
110 aliases: ['exclude-range']
111 type: list
112 elements: dict
113 description: Exclude range.
114 suboptions:
115 end_ip:
116 aliases: ['end-ip']
117 type: str
118 description: End ip.
119 id:
120 type: int
121 description: Id.
122 start_ip:
123 aliases: ['start-ip']
124 type: str
125 description: Start ip.
126 vci_match:
127 aliases: ['vci-match']
128 type: str
129 description: Enable/disable vendor class identifier
130 choices: ['disable', 'enable']
131 vci_string:
132 aliases: ['vci-string']
133 type: raw
134 description: (list) One or more VCI strings in quotes separated by spaces.
135 lease_time:
136 aliases: ['lease-time']
137 type: int
138 description: Lease time in seconds, 0 means default lease time.
139 uci_match:
140 aliases: ['uci-match']
141 type: str
142 description: Enable/disable user class identifier
143 choices: ['disable', 'enable']
144 uci_string:
145 aliases: ['uci-string']
146 type: raw
147 description: (list) One or more UCI strings in quotes separated by spaces.
148 filename:
149 type: str
150 description: Filename.
151 forticlient_on_net_status:
152 aliases: ['forticlient-on-net-status']
153 type: str
154 description: Forticlient on net status.
155 choices: ['disable', 'enable']
156 id:
157 type: int
158 description: Id.
159 interface:
160 type: str
161 description: Interface.
162 ip_mode:
163 aliases: ['ip-mode']
164 type: str
165 description: Ip mode.
166 choices: ['range', 'usrgrp']
167 ip_range:
168 aliases: ['ip-range']
169 type: list
170 elements: dict
171 description: Ip range.
172 suboptions:
173 end_ip:
174 aliases: ['end-ip']
175 type: str
176 description: End ip.
177 id:
178 type: int
179 description: Id.
180 start_ip:
181 aliases: ['start-ip']
182 type: str
183 description: Start ip.
184 vci_match:
185 aliases: ['vci-match']
186 type: str
187 description: Enable/disable vendor class identifier
188 choices: ['disable', 'enable']
189 vci_string:
190 aliases: ['vci-string']
191 type: raw
192 description: (list) One or more VCI strings in quotes separated by spaces.
193 lease_time:
194 aliases: ['lease-time']
195 type: int
196 description: Lease time in seconds, 0 means default lease time.
197 uci_match:
198 aliases: ['uci-match']
199 type: str
200 description: Enable/disable user class identifier
201 choices: ['disable', 'enable']
202 uci_string:
203 aliases: ['uci-string']
204 type: raw
205 description: (list) One or more UCI strings in quotes separated by spaces.
206 ipsec_lease_hold:
207 aliases: ['ipsec-lease-hold']
208 type: int
209 description: Ipsec lease hold.
210 lease_time:
211 aliases: ['lease-time']
212 type: int
213 description: Lease time.
214 mac_acl_default_action:
215 aliases: ['mac-acl-default-action']
216 type: str
217 description: Mac acl default action.
218 choices: ['assign', 'block']
219 netmask:
220 type: str
221 description: Netmask.
222 next_server:
223 aliases: ['next-server']
224 type: str
225 description: Next server.
226 ntp_server1:
227 aliases: ['ntp-server1']
228 type: str
229 description: Ntp server1.
230 ntp_server2:
231 aliases: ['ntp-server2']
232 type: str
233 description: Ntp server2.
234 ntp_server3:
235 aliases: ['ntp-server3']
236 type: str
237 description: Ntp server3.
238 ntp_service:
239 aliases: ['ntp-service']
240 type: str
241 description: Ntp service.
242 choices: ['default', 'specify', 'local']
243 option1:
244 type: raw
245 description: (list) Option1.
246 option2:
247 type: raw
248 description: (list) Option2.
249 option3:
250 type: raw
251 description: (list) Option3.
252 option4:
253 type: str
254 description: Option4.
255 option5:
256 type: str
257 description: Option5.
258 option6:
259 type: str
260 description: Option6.
261 options:
262 type: list
263 elements: dict
264 description: Options.
265 suboptions:
266 code:
267 type: int
268 description: Code.
269 id:
270 type: int
271 description: Id.
272 ip:
273 type: raw
274 description: (list) Ip.
275 type:
276 type: str
277 description: Type.
278 choices: ['hex', 'string', 'ip', 'fqdn']
279 value:
280 type: str
281 description: Value.
282 vci_match:
283 aliases: ['vci-match']
284 type: str
285 description: Enable/disable vendor class identifier
286 choices: ['disable', 'enable']
287 vci_string:
288 aliases: ['vci-string']
289 type: raw
290 description: (list) One or more VCI strings in quotes separated by spaces.
291 uci_match:
292 aliases: ['uci-match']
293 type: str
294 description: Enable/disable user class identifier
295 choices: ['disable', 'enable']
296 uci_string:
297 aliases: ['uci-string']
298 type: raw
299 description: (list) One or more UCI strings in quotes separated by spaces.
300 reserved_address:
301 aliases: ['reserved-address']
302 type: list
303 elements: dict
304 description: Reserved address.
305 suboptions:
306 action:
307 type: str
308 description: Action.
309 choices: ['assign', 'block', 'reserved']
310 circuit_id:
311 aliases: ['circuit-id']
312 type: str
313 description: Circuit id.
314 circuit_id_type:
315 aliases: ['circuit-id-type']
316 type: str
317 description: Circuit id type.
318 choices: ['hex', 'string']
319 description:
320 type: str
321 description: Description.
322 id:
323 type: int
324 description: Id.
325 ip:
326 type: str
327 description: Ip.
328 mac:
329 type: str
330 description: Mac.
331 remote_id:
332 aliases: ['remote-id']
333 type: str
334 description: Remote id.
335 remote_id_type:
336 aliases: ['remote-id-type']
337 type: str
338 description: Remote id type.
339 choices: ['hex', 'string']
340 type:
341 type: str
342 description: Type.
343 choices: ['mac', 'option82']
344 server_type:
345 aliases: ['server-type']
346 type: str
347 description: Server type.
348 choices: ['regular', 'ipsec']
349 status:
350 type: str
351 description: Status.
352 choices: ['disable', 'enable']
353 tftp_server:
354 aliases: ['tftp-server']
355 type: raw
356 description: (list) Tftp server.
357 timezone:
358 type: str
359 description: Timezone.
360 choices: ['00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11',
361 '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23',
362 '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35',
363 '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47',
364 '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59',
365 '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71',
366 '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83',
367 '84', '85', '86', '87']
368 timezone_option:
369 aliases: ['timezone-option']
370 type: str
371 description: Timezone option.
372 choices: ['disable', 'default', 'specify']
373 vci_match:
374 aliases: ['vci-match']
375 type: str
376 description: Vci match.
377 choices: ['disable', 'enable']
378 vci_string:
379 aliases: ['vci-string']
380 type: raw
381 description: (list) Vci string.
382 wifi_ac1:
383 aliases: ['wifi-ac1']
384 type: str
385 description: Wifi ac1.
386 wifi_ac2:
387 aliases: ['wifi-ac2']
388 type: str
389 description: Wifi ac2.
390 wifi_ac3:
391 aliases: ['wifi-ac3']
392 type: str
393 description: Wifi ac3.
394 wins_server1:
395 aliases: ['wins-server1']
396 type: str
397 description: Wins server1.
398 wins_server2:
399 aliases: ['wins-server2']
400 type: str
401 description: Wins server2.
402 dns_server4:
403 aliases: ['dns-server4']
404 type: str
405 description: Dns server4.
406 wifi_ac_service:
407 aliases: ['wifi-ac-service']
408 type: str
409 description: Wifi ac service.
410 choices: ['specify', 'local']
411 auto_managed_status:
412 aliases: ['auto-managed-status']
413 type: str
414 description: Auto managed status.
415 choices: ['disable', 'enable']
416 dhcp_settings_from_fortiipam:
417 aliases: ['dhcp-settings-from-fortiipam']
418 type: str
419 description: Dhcp settings from fortiipam.
420 choices: ['disable', 'enable']
421 relay_agent:
422 aliases: ['relay-agent']
423 type: str
424 description: Relay agent IP.
425 shared_subnet:
426 aliases: ['shared-subnet']
427 type: str
428 description: Enable/disable shared subnet.
429 choices: ['disable', 'enable']
430 '''
431
432 EXAMPLES = '''
433 - name: Example playbook (generated based on argument schema)
434 hosts: fortimanagers
435 connection: httpapi
436 gather_facts: false
437 tasks:
438 - name: Configure DHCP servers.
439 fortinet.fortimanager.fmgr_fsp_vlan_dhcpserver:
440 # workspace_locking_adom: <global or your adom name>
441 adom: <your own value>
442 vlan: <your own value>
443 fsp_vlan_dhcpserver:
444 # auto_configuration: <value in [disable, enable]>
445 # conflicted_ip_timeout: <integer>
446 # ddns_auth: <value in [disable, tsig]>
447 # ddns_key: <list or string>
448 # ddns_keyname: <string>
449 # ddns_server_ip: <string>
450 # ddns_ttl: <integer>
451 # ddns_update: <value in [disable, enable]>
452 # ddns_update_override: <value in [disable, enable]>
453 # ddns_zone: <string>
454 # default_gateway: <string>
455 # dns_server1: <string>
456 # dns_server2: <string>
457 # dns_server3: <string>
458 # dns_service: <value in [default, specify, local]>
459 # domain: <string>
460 # enable: <value in [disable, enable]>
461 # exclude_range:
462 # - end_ip: <string>
463 # id: <integer>
464 # start_ip: <string>
465 # vci_match: <value in [disable, enable]>
466 # vci_string: <list or string>
467 # lease_time: <integer>
468 # uci_match: <value in [disable, enable]>
469 # uci_string: <list or string>
470 # filename: <string>
471 # forticlient_on_net_status: <value in [disable, enable]>
472 # id: <integer>
473 # interface: <string>
474 # ip_mode: <value in [range, usrgrp]>
475 # ip_range:
476 # - end_ip: <string>
477 # id: <integer>
478 # start_ip: <string>
479 # vci_match: <value in [disable, enable]>
480 # vci_string: <list or string>
481 # lease_time: <integer>
482 # uci_match: <value in [disable, enable]>
483 # uci_string: <list or string>
484 # ipsec_lease_hold: <integer>
485 # lease_time: <integer>
486 # mac_acl_default_action: <value in [assign, block]>
487 # netmask: <string>
488 # next_server: <string>
489 # ntp_server1: <string>
490 # ntp_server2: <string>
491 # ntp_server3: <string>
492 # ntp_service: <value in [default, specify, local]>
493 # option1: <list or string>
494 # option2: <list or string>
495 # option3: <list or string>
496 # option4: <string>
497 # option5: <string>
498 # option6: <string>
499 # options:
500 # - code: <integer>
501 # id: <integer>
502 # ip: <list or string>
503 # type: <value in [hex, string, ip, ...]>
504 # value: <string>
505 # vci_match: <value in [disable, enable]>
506 # vci_string: <list or string>
507 # uci_match: <value in [disable, enable]>
508 # uci_string: <list or string>
509 # reserved_address:
510 # - action: <value in [assign, block, reserved]>
511 # circuit_id: <string>
512 # circuit_id_type: <value in [hex, string]>
513 # description: <string>
514 # id: <integer>
515 # ip: <string>
516 # mac: <string>
517 # remote_id: <string>
518 # remote_id_type: <value in [hex, string]>
519 # type: <value in [mac, option82]>
520 # server_type: <value in [regular, ipsec]>
521 # status: <value in [disable, enable]>
522 # tftp_server: <list or string>
523 # timezone: <value in [00, 01, 02, ...]>
524 # timezone_option: <value in [disable, default, specify]>
525 # vci_match: <value in [disable, enable]>
526 # vci_string: <list or string>
527 # wifi_ac1: <string>
528 # wifi_ac2: <string>
529 # wifi_ac3: <string>
530 # wins_server1: <string>
531 # wins_server2: <string>
532 # dns_server4: <string>
533 # wifi_ac_service: <value in [specify, local]>
534 # auto_managed_status: <value in [disable, enable]>
535 # dhcp_settings_from_fortiipam: <value in [disable, enable]>
536 # relay_agent: <string>
537 # shared_subnet: <value in [disable, enable]>
538 '''
539
540 RETURN = '''
541 meta:
542 description: The result of the request.
543 type: dict
544 returned: always
545 contains:
546 request_url:
547 description: The full url requested.
548 returned: always
549 type: str
550 sample: /sys/login/user
551 response_code:
552 description: The status of api request.
553 returned: always
554 type: int
555 sample: 0
556 response_data:
557 description: The api response.
558 type: list
559 returned: always
560 response_message:
561 description: The descriptive message of the api response.
562 type: str
563 returned: always
564 sample: OK.
565 system_information:
566 description: The information of the target system.
567 type: dict
568 returned: always
569 rc:
570 description: The status the request.
571 type: int
572 returned: always
573 sample: 0
574 version_check_warning:
575 description: Warning if the parameters used in the playbook are not supported by the current FortiManager version.
576 type: list
577 returned: complex
578 '''
579 from ansible.module_utils.basic import AnsibleModule
580 from ansible.module_utils.connection import Connection
581 from ansible_collections.fortinet.fortimanager.plugins.module_utils.napi import NAPIManager, check_galaxy_version, check_parameter_bypass
582 from ansible_collections.fortinet.fortimanager.plugins.module_utils.common import get_module_arg_spec
583
584
585 def main():
586 urls_list = [
587 '/pm/config/adom/{adom}/obj/fsp/vlan/{vlan}/dhcp-server',
588 '/pm/config/global/obj/fsp/vlan/{vlan}/dhcp-server'
589 ]
590 module_arg_spec = {
591 'adom': {'required': True, 'type': 'str'},
592 'vlan': {'required': True, 'type': 'str'},
593 'revision_note': {'type': 'str'},
594 'fsp_vlan_dhcpserver': {
595 'type': 'dict', 'v_range': [['6.0.0', '']],
596 'options': {
597 'auto-configuration': {'choices': ['disable', 'enable'], 'type': 'str'},
598 'conflicted-ip-timeout': {'type': 'int'},
599 'ddns-auth': {'choices': ['disable', 'tsig'], 'type': 'str'},
600 'ddns-key': {'no_log': True, 'type': 'raw'},
601 'ddns-keyname': {'no_log': True, 'type': 'str'},
602 'ddns-server-ip': {'type': 'str'},
603 'ddns-ttl': {'type': 'int'},
604 'ddns-update': {'choices': ['disable', 'enable'], 'type': 'str'},
605 'ddns-update-override': {'choices': ['disable', 'enable'], 'type': 'str'},
606 'ddns-zone': {'type': 'str'},
607 'default-gateway': {'type': 'str'},
608 'dns-server1': {'type': 'str'},
609 'dns-server2': {'type': 'str'},
610 'dns-server3': {'type': 'str'},
611 'dns-service': {'choices': ['default', 'specify', 'local'], 'type': 'str'},
612 'domain': {'type': 'str'},
613 'enable': {'choices': ['disable', 'enable'], 'type': 'str'},
614 'exclude-range': {
615 'type': 'list',
616 'options': {
617 'end-ip': {'type': 'str'},
618 'id': {'type': 'int'},
619 'start-ip': {'type': 'str'},
620 'vci-match': {'v_range': [['7.2.1', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
621 'vci-string': {'v_range': [['7.2.1', '']], 'type': 'raw'},
622 'lease-time': {'v_range': [['7.2.2', '']], 'type': 'int'},
623 'uci-match': {'v_range': [['7.2.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
624 'uci-string': {'v_range': [['7.2.2', '']], 'type': 'raw'}
625 },
626 'elements': 'dict'
627 },
628 'filename': {'type': 'str'},
629 'forticlient-on-net-status': {'choices': ['disable', 'enable'], 'type': 'str'},
630 'id': {'type': 'int'},
631 'interface': {'v_range': [['6.0.0', '6.2.1']], 'type': 'str'},
632 'ip-mode': {'choices': ['range', 'usrgrp'], 'type': 'str'},
633 'ip-range': {
634 'type': 'list',
635 'options': {
636 'end-ip': {'type': 'str'},
637 'id': {'type': 'int'},
638 'start-ip': {'type': 'str'},
639 'vci-match': {'v_range': [['7.2.1', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
640 'vci-string': {'v_range': [['7.2.1', '']], 'type': 'raw'},
641 'lease-time': {'v_range': [['7.2.2', '']], 'type': 'int'},
642 'uci-match': {'v_range': [['7.2.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
643 'uci-string': {'v_range': [['7.2.2', '']], 'type': 'raw'}
644 },
645 'elements': 'dict'
646 },
647 'ipsec-lease-hold': {'type': 'int'},
648 'lease-time': {'type': 'int'},
649 'mac-acl-default-action': {'choices': ['assign', 'block'], 'type': 'str'},
650 'netmask': {'type': 'str'},
651 'next-server': {'type': 'str'},
652 'ntp-server1': {'type': 'str'},
653 'ntp-server2': {'type': 'str'},
654 'ntp-server3': {'type': 'str'},
655 'ntp-service': {'choices': ['default', 'specify', 'local'], 'type': 'str'},
656 'option1': {'type': 'raw'},
657 'option2': {'type': 'raw'},
658 'option3': {'type': 'raw'},
659 'option4': {'type': 'str'},
660 'option5': {'type': 'str'},
661 'option6': {'type': 'str'},
662 'options': {
663 'type': 'list',
664 'options': {
665 'code': {'type': 'int'},
666 'id': {'type': 'int'},
667 'ip': {'type': 'raw'},
668 'type': {'choices': ['hex', 'string', 'ip', 'fqdn'], 'type': 'str'},
669 'value': {'type': 'str'},
670 'vci-match': {'v_range': [['7.2.1', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
671 'vci-string': {'v_range': [['7.2.1', '']], 'type': 'raw'},
672 'uci-match': {'v_range': [['7.2.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
673 'uci-string': {'v_range': [['7.2.2', '']], 'type': 'raw'}
674 },
675 'elements': 'dict'
676 },
677 'reserved-address': {
678 'type': 'list',
679 'options': {
680 'action': {'choices': ['assign', 'block', 'reserved'], 'type': 'str'},
681 'circuit-id': {'type': 'str'},
682 'circuit-id-type': {'choices': ['hex', 'string'], 'type': 'str'},
683 'description': {'type': 'str'},
684 'id': {'type': 'int'},
685 'ip': {'type': 'str'},
686 'mac': {'type': 'str'},
687 'remote-id': {'type': 'str'},
688 'remote-id-type': {'choices': ['hex', 'string'], 'type': 'str'},
689 'type': {'choices': ['mac', 'option82'], 'type': 'str'}
690 },
691 'elements': 'dict'
692 },
693 'server-type': {'choices': ['regular', 'ipsec'], 'type': 'str'},
694 'status': {'choices': ['disable', 'enable'], 'type': 'str'},
695 'tftp-server': {'type': 'raw'},
696 'timezone': {
697 'choices': [
698 '00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20',
699 '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41',
700 '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62',
701 '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83',
702 '84', '85', '86', '87'
703 ],
704 'type': 'str'
705 },
706 'timezone-option': {'choices': ['disable', 'default', 'specify'], 'type': 'str'},
707 'vci-match': {'choices': ['disable', 'enable'], 'type': 'str'},
708 'vci-string': {'type': 'raw'},
709 'wifi-ac1': {'type': 'str'},
710 'wifi-ac2': {'type': 'str'},
711 'wifi-ac3': {'type': 'str'},
712 'wins-server1': {'type': 'str'},
713 'wins-server2': {'type': 'str'},
714 'dns-server4': {'v_range': [['6.2.2', '']], 'type': 'str'},
715 'wifi-ac-service': {'v_range': [['6.2.2', '']], 'choices': ['specify', 'local'], 'type': 'str'},
716 'auto-managed-status': {'v_range': [['6.4.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
717 'dhcp-settings-from-fortiipam': {'v_range': [['6.4.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
718 'relay-agent': {'v_range': [['7.4.0', '']], 'type': 'str'},
719 'shared-subnet': {'v_range': [['7.4.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'}
720 }
721 }
722 }
723
724 module_option_spec = get_module_arg_spec('partial crud')
725 module_arg_spec.update(module_option_spec)
726 check_galaxy_version(module_arg_spec)
727 module = AnsibleModule(argument_spec=check_parameter_bypass(module_arg_spec, 'fsp_vlan_dhcpserver'),
728 supports_check_mode=True)
729 if not module._socket_path:
730 module.fail_json(msg='MUST RUN IN HTTPAPI MODE')
731 connection = Connection(module._socket_path)
732 fmgr = NAPIManager('partial crud', module_arg_spec, urls_list,
733 None, 'data', module, connection)
734 fmgr.process_partial_crud()
735 module.exit_json(meta=module.params)
736
737
738 if __name__ == '__main__':
739 main()