Pierre Souchay created JCLOUDS-910:
--------------------------------------

             Summary: 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.9.0, 1.8.1
         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