01-20-2021 07:31 AM
Hello,
Looking for best practices for leveraging the resource manager with an external api call. I am using ISE to populate a list of VLAN Names that i use resource manager to populate the Vlan ID itself based on a location specified. I am running into an issue when redeploying or adding a new location to the service, it will delete the old allocations and then change on redeploy based on return from ISE which is alphabetical. If i add in a location into the service, it will reprocess the existing vlan names and change their original allocation. See code below
Here is an example where it changes the IDs
admin@ncs(config-ise-server-NA)# commit dry-run cli { local-node { data resource-pools { + id-pool VLANS-ID-POOL-Austin { + range { + start 300; + end 400; + } + allocation Austin-Contractors { + username admin; + allocating-service /ise-server[name='NA']; + redeploy-type default; + request { + sync false; + } + } + } - id-pool VLANS-ID-POOL-Campus { - range { - start 30; - end 40; - } - allocation Campus-AAdmin { - username admin; - allocating-service /ise-server[name='NA']; - redeploy-type default; - request { - sync false; - } - } - allocation Campus-Admins { - username admin; - allocating-service /ise-server[name='NA']; - redeploy-type default; - request { - sync false;
admin@ncs# show resource-pools NAME ID ERROR ID ------------------------------------------------------------- VLANS-ID-POOL-Campus Campus-AAdmin - 36 Campus-Admins - 30 Campus-Contractors - 31 Campus-Employees - 32 Campus-IOT - 33 Campus-Multimedia-Devices - - After Deployment admin@ncs# show resource-pools NAME ID ERROR ID ------------------------------------------------------------- VLANS-ID-POOL-Austin Austin-Contractors - 300 Austin-Employees - 301 Austin-IOT - 302 Austin-Multimedia-Devices - 303 Austin-Voice - 304 VLANS-ID-POOL-Campus Campus-AAdmin - 30 Campus-Admins - 31 Campus-Contractors - 32 Campus-Employees - 33 Campus-IOT - 34 Campus-Multimedia-Devices - 35 Campus-Voice - 36
01-21-2021 04:04 AM
From what you share, you made a change that removed the campus-aadmin and campus-admins request. That would cause the allocated value to be removed/forgotten, then you show the before and after state, and there we see the allocation is still there, so maybe there was a separate commit that caused those requests to be recreated.
If you want a stable values you have to ensure that after each commit the requests are still all in cdb.
If there is a service - its create logic needs to create the requests. you must not have anything like 'if i have not already requested then request'. The requests need to be created every time it runs to keep the stable value.
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