Files
monasca-api/monasca_api/v2/reference/version_2_0.py
LiuNanke be8ea6c826 Clean up removed hacking rule from [flake8] ignore lists
We bump hacking>=0.10.0, and hacking removed some rules, for
the full list of rules please see [1]. So don't need them any more.

Hacking related commits:
Remove H904 in commit b1fe19ebebe47a36b905d709467f5e82521bbd96
Remove H803 in commit f01ce4fd822546cbd52a0aedc49184bddbfe1b10
Remove H307 in commit ec4833b206c23b0b6f9c6b101c70ab925a5e9c67
Remove H305 in commit 8f1fcbdb9aa4fc61349e5e879153c722195b1233

[1]https://github.com/openstack-dev/hacking/blob/master/setup.cfg#L30

Change-Id: Ia20b3570c1a28b3431a9115599a4a11366489edc
2016-01-24 20:45:08 +08:00

33 lines
1.0 KiB
Python

# Copyright 2016 Hewlett Packard Enterprise Development Company, L.P.
#
# 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.
import json
class Version2(object):
def __init__(self):
super(Version2, self).__init__()
def on_get(self, req, res):
result = {
'id': 'v2.0',
'links': [{
'rel': 'self',
'href': req.uri.decode('utf-8')
}],
'status': 'CURRENT',
'updated': "2013-03-06T00:00:00.000Z"
}
res.body = json.dumps(result)