[ 
https://issues.apache.org/jira/browse/JCLOUDS-910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14556563#comment-14556563
 ] 

Pierre Souchay commented on JCLOUDS-910:
----------------------------------------

The exact stack message :
{code}
org.jclouds.http.HttpResponseException: command: GET 
https://compute.fr1.cloudwatt.com/v2/81789c2469f1466485749fbd251fe2f0/servers/detail?changes-since=1420099200
 HTTP/1.1 failed with response: HTTP/1.1 400 Bad Request; content: 
[{"badRequest": {"message": "Invalid changes-since value", "code": 400}}]
{code}

> Openstack Nova listing details fails when using changes-since
> -------------------------------------------------------------
>
>                 Key: JCLOUDS-910
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-910
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-labs-openstack
>    Affects Versions: 1.8.1, 1.9.0
>         Environment: Vanilla Openstack Cloud
>            Reporter: Pierre Souchay
>
> When using code to limit the results from Nova, the argument changes since is 
> sent as a long as a query parameter.
> This attribute is not and was never supported by Nova with such format, date 
> must be an ISO date as seen here: 
> https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/servers.py#L163
>  
> Problem can be reproduced that way :
> {code}
>   nova.getNovaApi()
>              .getServerApiForZone(defaultZone)
>                 .listInDetail(PaginationOptions.Builder.changesSince(new 
> Date()))
>                                                          .iterator()
> {code}
> This code fails with HTTP 400 since format for changes-since is incorrect (at 
> least with Openstack Icehouse and Later)
> The problem may probably be fixed here :
> apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/options/ListOptions.java
>  at line 64 where
> {code}
> this.queryParameters.put("changes-since", checkNotNull(changesSince, 
> "changesSince").getTime() / 1000 + "");
> {code} is simply using long conversion instead of sending ISO format date



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

Reply via email to