Cannot create a loadbalance healthmonitor by openstack sdk
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack SDK |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I can't create a loadbalance healthmonitor with a pool id by openstack sdk.There is an error with the message "Failed to parse request. Required attribute 'pool_id' not specified"
The openstacksdk version is 0.9.17
This is my test case:
test_sdk.py
from openstack import connection
from openstack import profile
def create_
prof = profile.Profile()
prof.
return connection.
)
def healthmonitor_
kwargs = {
}
try:
res = conn.network.
print "create health"
except Exception as e:
print e
conn = create_connection('http://
[root@vs-controller env(keystone)]$ python test_sdk.py
HttpException: Bad Request (HTTP 400) (Request-ID: req-b57adb0f-
Then I change the 'pool_id': 'e84f5634-
Neither pools nor pool_id are documented in the HealthMonitor resource: https:/ /developer. openstack. org/sdks/ python/ openstacksdk/ users/resources /network/ v2/health_ monitor. html#openstack. network. v2.health_ monitor. HealthMonitor
You can't just add arbitrary fields, so you changing your code isn't changing what's sent. It seems like the resource just needs to be switch the pool_ids field to be singular pool_id and only accept one value.