07-19-2023 07:11 AM - edited 07-20-2023 11:29 AM
Hi,
I am doing automation with creating BD with DHCP relay policy config, via REST API. We had to put the DHCP relay policy on APIC, instead of the MSO. So, after creating the BD in MSO, a template deployment on MSO, the BD appears on the APIC. Then after successfully associating the BD with a DHCP relay policy config on the APIC, I tried to have PATCH REST API call, with 'op' = 'replace' back to the MSO, to update the BD with the same DHCP policy config. Maybe I used the patch call incorrectly.
Basing on Cisco's documentation (below), I am suspecting it's not possible. Especially, since the DHCP Relay policy is on APIC, it's not a MO in MSO, so MSO can't see it and thus I can't make the update. Am I correct?
Also, if DHCP Relay policy is only on APIC, but not in MSO, would the DHCP relay still work for hosts being creating within the BD that has DHCP relay policy? There is no config drift reported on the MSO side.
Much thanks in advance!
Solved! Go to Solution.
07-24-2023 09:50 AM
I found out the issue. There was a bug in our code. dhcpLabels is the right field to be updated, not dhcp_labels. Should have caught this bug earlier, so not to waste all of this time
Thanks Robert for your time and feedbacks!
07-20-2023 06:27 AM
Which version of MSO and ACI are you running?
Rober
07-20-2023 07:11 AM
APIC/ACI: 5.2(5c)
MSO: 2.3(2b)
Orchestrator: 3.7(2e)
07-21-2023 06:25 AM
To keep the product names straight:
Nexus Dashboard (not MSO) is 2.3(2b)
NDO - (aka Orchestraotr) which runs on Nexus Dashboard is the new name of MSO
Is there any reason you can't create the DHCP Policy on NDO directly?
The API only supports Get/Post/Delete/Put operations. If you want to update, then you'd use PUT.
To your second question, you can leverage an NDO-managed object like a BD from a DHCP policy created locally on the APIC. No problems there. Where we advise caution is modifying any NDO-managed object locally on the APIC, as any changes will not be persistent next time NDO deploys that Template (it will revert any locally performanced changes).
Robert
07-24-2023 09:50 AM
I found out the issue. There was a bug in our code. dhcpLabels is the right field to be updated, not dhcp_labels. Should have caught this bug earlier, so not to waste all of this time
Thanks Robert for your time and feedbacks!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide