Re: [openstack-dev] [oslo] question about oslo_utils and oslo_versonedobjects

2017-03-09 Thread zengchen
Hi jay: Understand you. It is a good method! I will try to update my codes. Really appreciate your reply. Thanks! Best Wishes! zeng chen At 2017-03-10 02:52:55, "Jay Pipes" wrote: >On 03/09/2017 01:37 AM, zengchen wrote: >> I'm contributing on Karbor

Re: [openstack-dev] [oslo] question about oslo_utils and oslo_versonedobjects

2017-03-09 Thread Jay Pipes
On 03/09/2017 01:37 AM, zengchen wrote: I'm contributing on Karbor (https://wiki.openstack.org/wiki/Karbor). Recently, I find a bug in the following codes. def resume_operation(self, operation_id, **kwargs): end_time = kwargs.get('end_time_for_run') now = datetime.utcnow() Instead of

Re: [openstack-dev] [oslo] question about oslo_utils and oslo_versonedobjects

2017-03-08 Thread zengchen
I'm contributing on Karbor (https://wiki.openstack.org/wiki/Karbor). Recently, I find a bug in the following codes. def resume_operation(self, operation_id, **kwargs): end_time = kwargs.get('end_time_for_run') now = datetime.utcnow() if not isinstance(end_time, datetime) or now >

Re: [openstack-dev] [oslo] question about oslo_utils and oslo_versonedobjects

2017-03-08 Thread Jay Pipes
On 03/08/2017 09:07 PM, zengchen wrote: Hi, jay Thanks for your reply. Do you means it is no need to do that optimization? In my opinion, It is better if do some change. Thanks again. I'm not quite following you. I don't believe there's any need to change anything nor any need to optimize

Re: [openstack-dev] [oslo] question about oslo_utils and oslo_versonedobjects

2017-03-08 Thread zengchen
Hi, jayThanks for your reply. Do you means it is no need to do that optimization?In my opinion, It is better if do some change. Thanks again. Best Wishes zeng chen At 2017-03-08 00:57:51, "Jay Pipes" wrote: >On 03/07/2017 01:34 AM, zengchen wrote: >> Hi, guys: >>

Re: [openstack-dev] [oslo] question about oslo_utils and oslo_versonedobjects

2017-03-07 Thread Jay Pipes
On 03/07/2017 01:34 AM, zengchen wrote: Hi, guys: I find a non-coincidence definition in Oslo, oslo_utils.timeutils.utcnow is defined like this: def utcnow(with_timezone=False): oslo_versonedobjects.fields.DateTimeField is defined like this

[openstack-dev] [oslo] question about oslo_utils and oslo_versonedobjects

2017-03-06 Thread zengchen
Hi, guys: I find a non-coincidence definition in Oslo, oslo_utils.timeutils.utcnow is defined like this: def utcnow(with_timezone=False): oslo_versonedobjects.fields.DateTimeField is defined like this class DateTimeField(AutoTypedField): def __init__(self,