← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1298818] [NEW] DATETIME expression in api_samples_test_base.py format is not sufficient

 

Public bug reported:

In Nova API Sample file testing, https://github.com/openstack/nova/blob/master/nova/tests/integrated/api_samples_test_base.py#L272  file has the expression for DATETIME in 'timestamp' variable as mentioned below- 
                         '\d{4}-[0,1]\d-[0-3]\d[ ,T]'
                         '\d{2}:\d{2}:\d{2}'
                         '(Z|(\+|-)\d{2}:\d{2}|\.\d{6}|)',
Which is right enough to check the existing written API test. But It needs to be extended where DATETIME can come in below format-
                             "2014-03-28 07:05:11.726547+00:00"
where Time Zone can come with microseconds also (.726547+00:00). This combination is not supported in existing expression.

Currently above mentioned DATETIME format comes in NOVA V2 GET
/keypairs/<key_name> API XML response. Its API sample file and their
test is not written yet thats why no failure in test results.

We need to extend the DATETIME expression to accompalish the format
return by above API.

** Affects: nova
     Importance: Undecided
     Assignee: Ghanshyam (ghanshyammann)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => Ghanshyam (ghanshyammann)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1298818

Title:
  DATETIME expression in api_samples_test_base.py format is not
  sufficient

Status in OpenStack Compute (Nova):
  New

Bug description:
  In Nova API Sample file testing, https://github.com/openstack/nova/blob/master/nova/tests/integrated/api_samples_test_base.py#L272  file has the expression for DATETIME in 'timestamp' variable as mentioned below- 
                           '\d{4}-[0,1]\d-[0-3]\d[ ,T]'
                           '\d{2}:\d{2}:\d{2}'
                           '(Z|(\+|-)\d{2}:\d{2}|\.\d{6}|)',
  Which is right enough to check the existing written API test. But It needs to be extended where DATETIME can come in below format-
                               "2014-03-28 07:05:11.726547+00:00"
  where Time Zone can come with microseconds also (.726547+00:00). This combination is not supported in existing expression.

  Currently above mentioned DATETIME format comes in NOVA V2 GET
  /keypairs/<key_name> API XML response. Its API sample file and their
  test is not written yet thats why no failure in test results.

  We need to extend the DATETIME expression to accompalish the format
  return by above API.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1298818/+subscriptions


Follow ups

References