I tried by following request body for portt creation and port is successfully created -
curl -i http://<ip>:9696/v2.0/ports.xml -X POST -H "X-Auth-Token: <id> -H "Content-Type: application/xml" -H "Accept: application/xml" -H "User-Agent: python-neutronclient" -d '<port ><network_id >id</network_id></port>'
Thus required body is like -
'<port ><network_id >network_id_here</network_id></port>
I tried by following request body for portt creation and port is successfully created -
curl -i http://<ip>:9696/ v2.0/ports. xml -X POST -H "X-Auth-Token: <id> -H "Content-Type: application/xml" -H "Accept: application/xml" -H "User-Agent: python- neutronclient" -d '<port ><network_id >id</network_ id></port> '
Thus required body is like -
'<port ><network_id >network_ id_here< /network_ id></port>