cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
932
Views
0
Helpful
2
Replies

Reserve IP Subpool

Regan.D
Level 1
Level 1

Hello Team,

 

I'm trying to use the "Reserve IP Subpool" REST API call. I've provided all the "required" parameters, however, i'm not having any luck.

https://developer.cisco.com/docs/dna-center/#!reserve-ip-subpool

 

Has anyone had any luck using this API and can provide some guidance as what i'm doing incorrectly?

 

payload = {
"name": "branch-2-iotav-vn-pool-1",
"type": "Generic",
"ipv4GlobalPool": "10.20.0.0/16",
"ipv4Prefix": True,
"ipv4PrefixLength": 25,
"ipv4Subnet": "10.20.12.0",
"ipv4GateWay": "10.20.12.1",
"ipv4DhcpServers": ["10.2.11.12"],
"ipv4DnsServers": [
"10.127.181.22",
"10.127.201.228"
],
"ipv6AddressSpace": False,
"ipv6Prefix": False, << (also tried without... no luck)
"ipv6TotalHost": 0, << (also tried without... no luck)
}

 

[POST://] 

https://10.7.16.19:443/dna/intent/api/v1/reserve-ip-subpool/894ac510-cd9d-4908-8b8c-8b590b405d69

 

[Results]

{
"executionId" : "67e1261a-d0e0-4b0d-8e1a-6e1758c7785a",
"executionStatusUrl" : "/dna/platform/management/business-api/v1/execution-status/67e1261a-d0e0-4b0d-8e1a-6e1758c7785a",
"message" : "The request has been accepted for execution"
}

 

https://10.7.16.19:443/dna/platform/management/business-api/v1/execution-status/02b2028c-5dd8-42d2-89b1-ffba792d2932
{'bapiKey': '429f-aa81-4d3b-960a', 'bapiName': 'Reserve IP Subpool', 'bapiExecutionId': '02b2028c-5dd8-42d2-89b1-ffba792d2932', 'startTime': 'Sun Sep 26 16:20:49 UTC 2021', 'startTimeEpoch': 1632673249859, 'endTime': 'Sun Sep 26 16:20:49 UTC 2021', 'endTimeEpoch': 1632673249895, 'timeDuration': 36, 'status': 'FAILURE', 'bapiError': '02b2028c-5dd8-42d2-89b1-ffba792d2932 | cb78104c-313a-4279-b084-25432d2b3f95 | 429f-aa81-4d3b-960a : ScriptProcessor Execution Failed with error: ReferenceError: "iinput_json_detail" is not defined in at line number : 237 ', 'runtimeInstanceId': 'DNACP_Runtime_335eb44b-1499-4dc2-8bea-1150497bb73c'}

 

Thanks for any guidance or direction.

Regards,

Regan

 

 

1 Accepted Solution

Accepted Solutions

Regan.D
Level 1
Level 1

resolved.

 

need to add the ipv6 details.

payload = {
"name": "branch-2-iotav-vn-pool-1",
"type": "Generic",
"ipv6AddressSpace": False,
"ipv4GlobalPool": "10.20.0.0/16",
"ipv4Prefix": True,
"ipv4PrefixLength": 25,
"ipv4Subnet": "10.20.12.0",
"ipv4GateWay": "10.20.12.1",
"ipv6Prefix": True, <<< add
"ipv6GlobalPool": "2001:10:20::/48", <<< add
"ipv6PrefixLength": 64, <<< add
"ipv6Subnet": "2001:10:20:12::" <<< add
}

View solution in original post

2 Replies 2

Regan.D
Level 1
Level 1

resolved.

 

need to add the ipv6 details.

payload = {
"name": "branch-2-iotav-vn-pool-1",
"type": "Generic",
"ipv6AddressSpace": False,
"ipv4GlobalPool": "10.20.0.0/16",
"ipv4Prefix": True,
"ipv4PrefixLength": 25,
"ipv4Subnet": "10.20.12.0",
"ipv4GateWay": "10.20.12.1",
"ipv6Prefix": True, <<< add
"ipv6GlobalPool": "2001:10:20::/48", <<< add
"ipv6PrefixLength": 64, <<< add
"ipv6Subnet": "2001:10:20:12::" <<< add
}

Were you able to get this to work with DHCP and DNS Servers? It doesn't work even with the IPv6 fields for me. Any help would be appreciated.