I tried by following request body for subnet creation and subnet is successfully created -
curl -i http://<ip>:9696/v2.0/subnets.xml -X POST -H "X-Auth-Token: <id> -H "Content-Type: application/xml" -H "Accept: application/xml" -H "User-Agent: python-neutronclient" -d '<subnet ><network_id >id</network_id><ip_version >4</ip_version><cidr >cidr</cidr></subnet>'
Thus required body is like -
<subnet ><network_id >network_id_here</network_id><cidr >required_cidr_here</cidr></subnet>
I tried by following request body for subnet creation and subnet is successfully created -
curl -i http://<ip>:9696/ v2.0/subnets. xml -X POST -H "X-Auth-Token: <id> -H "Content-Type: application/xml" -H "Accept: application/xml" -H "User-Agent: python- neutronclient" -d '<subnet ><network_id >id</network_ id><ip_ version >4</ip_ version> <cidr >cidr</ cidr></ subnet> '
Thus required body is like -
<subnet ><network_id >network_ id_here< /network_ id><cidr >required_ cidr_here< /cidr>< /subnet>