packngo
packngo copied to clipboard
Type mismatch when converting network type of n2.xlarge device from Hybrid to Layer2-bonded
When converting network type of n2.xlarge device from Hybrid to Layer2-bonded, it sometimes happen that the API returns HTTP success, but the network type of the bond interface is not changed.
i.e. a successful API reponse on convert/layer-2 API call returns port resource with network_type=layer3.
I don't think that this is caching issue because it shows the same in Portal and over the API, and it stays "layer3", even the overall device network type is reported as layer3.
020/10/08 18:29:01
=======[REQUEST]=============
POST /metal/v1/ports/95519d25-9096-495b-9fb2-4a75564d425f/convert/layer-2 HTTP/1.1
Host: api.equinix.com
User-Agent: packngo/0.4.0
Connection: close
Content-Length: 0
Accept: application/json
Content-Type: application/json
X-Auth-Token: --------------------------------
X-Consumer-Token: packngo test
Accept-Encoding: gzip
2020/10/08 18:29:01 [DEBUG] POST https://api.equinix.com/metal/v1/ports/95519d25-9096-495b-9fb2-4a75564d425f/convert/layer-2
2020/10/08 18:29:02
=======[RESPONSE]============
HTTP/1.1 200 OK
Connection: close
Content-Length: 346
Cache-Control: max-age=0, private, must-revalidate
Content-Type: application/json; charset=utf-8
Date: Thu, 08 Oct 2020 15:29:01 GMT
Etag: W/"9bf15f20d35ccd31292d38792ab149b8"
X-Request-Id: ef455b54-e337-4919-8b72-fe62b8cd2022
{"id":"95519d25-9096-495b-9fb2-4a75564d425f","type":"NetworkBondPort","name":"bond0","data":{"bonded":true},"network_type":"layer3","native_virtual_network":null,"hardware":{"href":"/metal/v1/hardware/06f58205-010b-4f44-818a-0f586f54d6bb"},"virtual_networks":[],"connected_port":null,"href":"/metal/v1/ports/95519d25-9096-495b-9fb2-4a75564d425f"}