yosshy / oscurl Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
When compute endpoint is http://172.27.201.206:8774/v2.1
and servers
is specified in -p
option, the requested URL is expected to be http://172.27.201.206:8774/v2.1 /servers
but actually http://172.27.201.206:8774/servers
is sent. urlparse.urljoin drops /v2.1
part.
ubuntu@sheep6:~/tmp/oscurl (master) [OS:demo/[email protected]][13:45:18]$ openstack catalog show compute
+-----------+-------------------------------------------+
| Field | Value |
+-----------+-------------------------------------------+
| endpoints | RegionOne |
| | public: http://172.27.201.206:8774/v2.1 |
| | |
| id | ab70cb9473b946aaa60970cac0dc6713 |
| name | nova |
| type | compute |
+-----------+-------------------------------------------+
ubuntu@sheep6:~/tmp/oscurl (master) [OS:demo/[email protected]][13:45:27]$ oscurl --version
0.4.0
ubuntu@sheep6:~/tmp/oscurl (master) [OS:demo/[email protected]][13:45:37]$ oscurl --debug -p /servers
DEBUG:keystoneauth.session:REQ: curl -g -i -X GET http://172.27.201.206:8774/servers -H "User-Agent: oscurl keystoneauth1/2.18.0 python-requests/2.12.5 CPython/2.7.12" -H "X-Auth-Token: {SHA1}fb1f77ba6d1ca4018adf63f056b9e74fd308f058"
DEBUG:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 172.27.201.206
DEBUG:requests.packages.urllib3.connectionpool:http://172.27.201.206:8774 "GET /servers HTTP/1.1" 300 461
DEBUG:keystoneauth.session:RESP: [300] Content-Length: 461 Content-Type: application/json Date: Mon, 20 Mar 2017 13:45:53 GMT Connection: keep-alive
RESP BODY: {"choices": [{"status": "SUPPORTED", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.compute+json;version=2"}], "id": "v2.0", "links": [{"href": "http://172.27.201.206:8774/v2/servers", "rel": "self"}]}, {"status": "CURRENT", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.compute+json;version=2.1"}], "id": "v2.1", "links": [{"href": "http://172.27.201.206:8774/v2.1/servers", "rel": "self"}]}]}
HTTP/1.1 300 Multiple Choices
Content-Length: 461
Content-Type: application/json
Date: Mon, 20 Mar 2017 13:45:53 GMT
Connection: keep-alive
{"choices": [{"status": "SUPPORTED", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.compute+json;version=2"}], "id": "v2.0", "links": [{"href": "http://172.27.201.206:8774/v2/servers", "rel": "self"}]}, {"status": "CURRENT", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.compute+json;version=2.1"}], "id": "v2.1", "links": [{"href": "http://172.27.201.206:8774/v2.1/servers", "rel": "self"}]}]}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.