yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #60136
[Bug 1653240] [NEW] Compute API in Compute API Reference
Public bug reported:
To get all the details of a particular instance
GET /servers/{}
This works fine,
curl http://172.25.1.35:8774/v2/f59cdfc4eac44febb09e607866a379e4/servers/{fddea708-eca3-47f4-a352-6e5cd9f7a03f} -H 'X-Auth-Token: 79cbbc39db3e401ba590529fddfba82c'
But for API request via python, we don't require {} over the server id
import requests
url =
"http://172.25.1.35:8774/v2/f59cdfc4eac44febb09e607866a379e4/servers/fddea708-eca3-47f4-a352-6e5cd9f7a03f"
payload = "{\"auth\":{\"passwordCredentials\":{\"username\":\"admin\",\"password\":\"5b95c040f5844a98\"}, \"tenantName\":\"admin\"}}"
headers = {
'x-auth-token': "79cbbc39db3e401ba590529fddfba82c",
}
response = requests.request("GET", url, data=payload, headers=headers)
print(response.text)
Why is that?
-----------------------------------
Release: 15.0.0.0b3.dev117 on 'Wed Dec 28 13:38:01 2016, commit a74d3ae'
SHA:
Source: Can't derive source file URL
URL: http://developer.openstack.org/api-ref/compute/
** Affects: nova
Importance: Undecided
Status: New
** Tags: api-ref
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1653240
Title:
Compute API in Compute API Reference
Status in OpenStack Compute (nova):
New
Bug description:
To get all the details of a particular instance
GET /servers/{}
This works fine,
curl http://172.25.1.35:8774/v2/f59cdfc4eac44febb09e607866a379e4/servers/{fddea708-eca3-47f4-a352-6e5cd9f7a03f} -H 'X-Auth-Token: 79cbbc39db3e401ba590529fddfba82c'
But for API request via python, we don't require {} over the server id
import requests
url =
"http://172.25.1.35:8774/v2/f59cdfc4eac44febb09e607866a379e4/servers/fddea708-eca3-47f4-a352-6e5cd9f7a03f"
payload = "{\"auth\":{\"passwordCredentials\":{\"username\":\"admin\",\"password\":\"5b95c040f5844a98\"}, \"tenantName\":\"admin\"}}"
headers = {
'x-auth-token': "79cbbc39db3e401ba590529fddfba82c",
}
response = requests.request("GET", url, data=payload, headers=headers)
print(response.text)
Why is that?
-----------------------------------
Release: 15.0.0.0b3.dev117 on 'Wed Dec 28 13:38:01 2016, commit a74d3ae'
SHA:
Source: Can't derive source file URL
URL: http://developer.openstack.org/api-ref/compute/
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1653240/+subscriptions
Follow ups