cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tony_caot...@163.com
Subject Fwd: Re: new timestamp format for API in ACS 4.5.1
Date Tue, 18 Aug 2015 10:08:37 GMT

Copy thread from @users, as I am not sure where is the right place to 
find right people for helping.


-------- Forwarded Message --------
Subject: 	Re: new timestamp format for API in ACS 4.5.1
Date: 	Tue, 18 Aug 2015 18:04:56 +0800
From: 	tony_caotong@163.com
Reply-To: 	users@cloudstack.apache.org
To: 	users@cloudstack.apache.org



In ParamProcessWorker::setFieldValue() I found this lins:

            case DATE:
                 // This piece of code is for maintaining backward
compatibility
                 // and support both the date formats(Bug 9724)

Is it related to my problem?  Where can I found the descriptions about
BUG9724 ?

-----------
Cao Tong

On 08/18/2015 05:54 PM, tony_caotong@163.com wrote:
>
> Hello,
>
> When I use timestamp format startdate="2015-07-31", it works find.
> When I use it like this startdate="2015-07-31 13:00:00".
> It return a error
> IOError: ('http error', 401, 'Unauthorized', <httplib.HTTPMessage
> instance at 0x16dca70>)
>
> Could anyone tell me why ?
>
> I have read the code "DefaultLoginAPIAuthenticatorCmd::authenticate()"
> , but I am still not understand what was happening,
> it seems authenticate failed, but why??
>
> -----------
> Cao Tong
>
> On 07/31/2015 07:07 PM, tony_caotong@163.com wrote:
>>
>> Hi,
>>
>>     was this format is enabled in ACS 4.5.1 like /"yyyy-MM-dd HH:mm:ss"
>>
>>
>> /    I found it in 4.5.0 API doc, but it seems not enabled.
>>
>> http://cloudstack.apache.org/api/apidocs-4.5/user/listEvents.html
>>
>>     >>> api.listEvents(startdate="2015-07-31 13:00:00")
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in <module>
>>   File "call.py", line 48, in handlerFunction
>>     return self._make_request(name, kwargs)
>>   File "call.py", line 60, in _make_request
>>     data = self._http_get(self.value)
>>   File "call.py", line 53, in _http_get
>>     response = urllib.urlopen(url)
>>   File "/usr/lib64/python2.7/urllib.py", line 87, in urlopen
>>     return opener.open(url)
>>   File "/usr/lib64/python2.7/urllib.py", line 208, in open
>>     return getattr(self, name)(url)
>>   File "/usr/lib64/python2.7/urllib.py", line 359, in open_http
>>     return self.http_error(url, fp, errcode, errmsg, headers)
>>   File "/usr/lib64/python2.7/urllib.py", line 372, in http_error
>>     result = method(url, fp, errcode, errmsg, headers)
>>   File "/usr/lib64/python2.7/urllib.py", line 683, in http_error_401
>>     errcode, errmsg, headers)
>>   File "/usr/lib64/python2.7/urllib.py", line 381, in http_error_default
>>     raise IOError, ('http error', errcode, errmsg, headers)
>> IOError: ('http error', 401, 'Unauthorized', <httplib.HTTPMessage
>> instance at 0x16dca70>)
>> >>>
>>
>>
>> my ACS version:
>>
>> [root@cs ~]# rpm -qa |grep cloud
>> cloudstack-management-4.5.1-shapeblue0.el6.x86_64
>> cloudstack-awsapi-4.5.1-shapeblue0.el6.x86_64
>> cloudstack-agent-4.5.1-shapeblue0.el6.x86_64
>> cloudstack-common-4.5.1-shapeblue0.el6.x86_64
>>
>>
>
>





Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message