nova/nova/api/openstack/compute/contrib/baremetal_ext_status.py
Mark McLoughlin 3409c0e26d Normalize API extension updated timestamp format
It's unusual to include a '+00:00' offset in an ISO8601 timestamp
rather than just using the 'Z' suffix. It's also very weird for our
API to be returning timestamps which aren't in UTC.

Let's make these timestamps consistent with other timestamps by
using UTC always and representing that with a 'Z' suffix. Also,
enforce this in the API sample tests by using a new 'isotime' regexp.

A small number of the extensions in the API sample templates
specified the exact timestamp, so templatize those before regenerating
the API samples for GET /extensions.

Full context here:

  http://lists.openstack.org/pipermail/openstack-dev/2014-April/033971.html

Change-Id: Idf429e55e4ae13738ac531a25ce54b20d395410d
2014-04-29 14:50:33 +01:00

26 lines
988 B
Python

# Copyright 2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from nova.api.openstack import extensions
class Baremetal_ext_status(extensions.ExtensionDescriptor):
"""Add extended status in Baremetal Nodes v2 API."""
name = "BareMetalExtStatus"
alias = "os-baremetal-ext-status"
namespace = ("http://docs.openstack.org/compute/ext/"
"baremetal_ext_status/api/v2")
updated = "2013-08-27T00:00:00Z"