[ 
https://issues.apache.org/jira/browse/JCLOUDS-1126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zack Shoylev resolved JCLOUDS-1126.
-----------------------------------
       Resolution: Fixed
    Fix Version/s: 2.0.0
                   1.9.

https://github.com/jclouds/jclouds/pull/974

> Jclouds needs to use either legacy compute or update validation to account 
> for 2.1 API
> --------------------------------------------------------------------------------------
>
>                 Key: JCLOUDS-1126
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1126
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-compute
>    Affects Versions: 1.9.2
>         Environment: Openstack Liberty+
>            Reporter: Arvind Nadendla
>            Priority: Minor
>             Fix For: 1.9., 2.0.0
>
>
> As part of Openstack releases(Kilo+), V2.1 of the API's are being exposed.
> 2.1 supports stronger input validation. see here
> Another impact is strong input validation of JSON-Schema. JSON-Schema 
> contains the “additionalProperties” feature which can deny undefined 
> properties in an input request. V2 API just ignored undefined properties if a 
> request contain, but V2.1 API denies the request and returns a BadRequest 
> response to a client.
> During V2.1 development, we found that Tempest also passed undefined 
> properties to Nova API, and Nova V2 API just ignored them then tests 
> succeeded. However Nova V2.1 API rejected these requests and tests failed. So 
> that was Tempest bug, but we imagined this kind of problem would happen on 
> the other SDKs. Before fixing this Tempest bug, we investigated major 
> SDKs(fog, jclouds)’s code and we confirmed these SDKs send a valid request 
> without undefined properties and they don’t contain this kind of problem.
> For creating flavors in openstack, Jcloud includes the links properties which 
> were safely ignored in V2 API but causing issues in V2.1 API
> Jclouds needs to use either legacy compute URL or update validation to 
> account for 2.1 API.
> I see this as a general problem, not sure why the tests are not failing to 
> indicate this problem
> POST http://172.19.46.39:8774/v2.1/8d0578a052814946b2115e72a026bf44/flavors
> HTTP/1.1 failed with response: HTTP/1.1 400 Bad Request; content: 
> [{"badRequest": {"message": "Invalid input for field/attribute flavor. Value: 
> {u'name': 
> u'SNORT-0.2-0.2.0.20150626002613-IPS-1-snort_disk-20150626002613.qcow2', 
> u'links': [], u'ram': 2048, u'vcpus': 2, u'disk': 50, u'id': 
> u'IPS-1_RegionOne'}. Additional properties are not allowed (u'links' was 
> unexpected)", "code": 400}}]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to