- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Add existing MS Dhcp Failover Association to DHCP range
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2022 06:36 AM
The following code returns a 400 when ran. I think it may have something to do with the ms_server fields. Does anyone know what these should be?
I know the server_association_type is correct as thats clearly documented, however im not sure if for the ms_server fields, do i need to specify the "name" of the failover assoation etc ...
dhcp_range_payload = json.dumps({"start_addr": dhcp_ib_range_prefix + '100',
"end_addr": dhcp_ib_range_prefix + '245',
"server_association_type": "MS_FAILOVER",
"network_view": "default",
"name": comment_dict[ib_subnet],
"ms_server": {"_struct": "msdhcpserver",
"ipv4addr": "dcedhcp02.insightglobal.net"},
"ms_options":
[{"name": "routers",
"num": 3,
"value": ib_gateway_ip}],
})
Re: Add existing MS Dhcp Failover Association to DHCP range
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2022 10:58 AM
I found a field i was missing for "failover associtation" With this code i am not getting:
{ "Error": "AdmConDataError: expected single object, got 2"}
# Add DHCP ranges to subnets
dhcp_clean_ip_address_list = ib_subnet.replace(' ', '').split('.')
dhcp_clean_ip_address_list.pop(3)
dhcp_clean_ip_address_list.append('')
dhcp_ib_range_prefix = '.'.join(dhcp_clean_ip_address_list)
ranges_url = "https://172.18.101.100/wapi/v2.7/range"
dhcp_range_payload = json.dumps({"start_addr": dhcp_ib_range_prefix + '100',
"end_addr": dhcp_ib_range_prefix + '245',
"server_association_type": "MS_FAILOVER",
"failover_association": "dcedhcp02.insightglobal.net-dcwdhcp02.insightglobal.net",
"network_view": "default",
"name": comment_dict[ib_subnet],
"ms_options":
[{"name": "routers",
"num": 3,
"value": ib_gateway_ip}],
})
ib_dhcp_response = requests.request("POST", ranges_url, headers=headers, data=dhcp_range_payload, verify=False)
bar.finish()
print(ib_dhcp_response.content)
Any ideas ??
Re: Add existing MS Dhcp Failover Association to DHCP range
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2022 02:10 PM
I'm getting the same error message. It works through the NIOS GUI. It works when I assign the range to a single MS server. But not when I try to assign the range to the failover association. It appears to be a defect. Can you please open a support case and give them the details, along with your NIOS and Windows Server versions. You're welcome to refer to this forum post also, when you open the case.
Re: Add existing MS Dhcp Failover Association to DHCP range
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2022 02:50 AM
Hi,
This is a known bug: NIOS-85974. Support told me it it is targeted to be fixed in 8.6.3 and 9.0. In the meantime you can work around generating a CSV import file and using a CSV upload over WAPI.
Regards,
Christina.
Re: Add existing MS Dhcp Failover Association to DHCP range
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2023 11:12 PM
Hi Christina,
I have 8.6.3, but still having issue in python code. It works fine in postman. Can you help shred some light, please?
Peter
Re: Add existing MS Dhcp Failover Association to DHCP range
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2023 08:21 AM