server.action does not work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack SDK |
Fix Committed
|
Undecided
|
Haifeng.Yan |
Bug Description
Calling server.action results in a 404 error.
Looking at the OpenStack API documentation (http://
The issue can be resolved by replacing:
resp = session.put(url, service=
with:
resp = session.post(url, service=
However, then an exception is thrown on line 271 of /openstack/
To reproduce this, use code similar to the following:
from openstack import connection
conn = connection.
actionBody = {"reboot": {"type": "SOFT"}}
#actionBody = {"suspend": None}
#actionBody = {"resume": None}
servers = conn.compute.
for server in servers:
server.
(Note: I'm fairly sure this is the incorrect usage of server.action in that I'm passing in a 'session' that has already been used in a previous request. I can't find documentation on the proper usage of server.action or how to generate a new session.)
Changed in python-openstacksdk: | |
assignee: | yan.haifeng (yanheven) → nobody |
status: | In Progress → Confirmed |
I found that all of server actions get no response body, so we should make some change to this method.