Skip to content

Instantly share code, notes, and snippets.

@nati
Created April 8, 2014 01:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nati/10080957 to your computer and use it in GitHub Desktop.
Save nati/10080957 to your computer and use it in GitHub Desktop.
DEBUG: neutronclient.client
REQ: curl -i http://216.69.95.13:9696/v2.0/ports.json -X POST -H "X-Auth-Token: TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-neutronclient" -d '{"port": {"network_id": "43135eec-e573-4526-8139-0fbbff50f8e5", "fixed_ips": [{"subnet_id": "32f09db6-9bf3-4e15-bbcc-ee4baca4bd62"}], "admin_state_up": true}}'
DEBUG: neutronclient.client RESP:{'date': 'Tue, 08 Apr 2014 00:58:25 GMT', 'status': '201', 'content-length': '503', 'content-type': 'application/json; charset=UTF-8', 'x-openstack-request-id': 'req-532033b4-39f6-4cf0-b9bb-8d865bfa24d7'} {"port": {"status": "DOWN", "name": "", "allowed_address_pairs": [], "admin_state_up": true, "network_id": "43135eec-e573-4526-8139-0fbbff50f8e5", "tenant_id": "9b2cba10b406405681f148b5a6b99ada", "binding:vnic_type": "normal", "device_owner": "", "mac_address": "fa:16:3e:72:27:df", "fixed_ips": [{"subnet_id": "32f09db6-9bf3-4e15-bbcc-ee4baca4bd62", "ip_address": "10.1.0.8"}], "id": "0145a78f-a383-4129-aeeb-0f967437c7f6", "security_groups": ["4a8eee1b-d80c-4d25-8d8c-b88806948cdc"], "device_id": ""}}
Created a new port:
+-----------------------+---------------------------------------------------------------------------------+
| Field | Value |
+-----------------------+---------------------------------------------------------------------------------+
| admin_state_up | True |
| allowed_address_pairs | |
| binding:vnic_type | normal |
| device_id | |
| device_owner | |
| fixed_ips | {"subnet_id": "32f09db6-9bf3-4e15-bbcc-ee4baca4bd62", "ip_address": "10.1.0.8"} |
| id | 0145a78f-a383-4129-aeeb-0f967437c7f6 |
| mac_address | fa:16:3e:72:27:df |
| name | |
| network_id | 43135eec-e573-4526-8139-0fbbff50f8e5 |
| security_groups | 4a8eee1b-d80c-4d25-8d8c-b88806948cdc |
| status | DOWN |
| tenant_id | 9b2cba10b406405681f148b5a6b99ada |
+-----------------------+---------------------------------------------------------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment