~rackspace-ozone/rackspace-nova/development

« back to all changes in this revision

Viewing changes to nova/api/openstack/contrib/flavorextradata.py

  • Committer: paul at openstack
  • Date: 2011-09-26 18:57:03 UTC
  • mfrom: (1098.1.519 nova)
  • Revision ID: paul@openstack.org-20110926185703-ad3bthrj309itbrw
merging Diablo

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright 2011 Canonical Ltd.
 
2
# All Rights Reserved.
 
3
#
 
4
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
 
5
#    not use this file except in compliance with the License. You may obtain
 
6
#    a copy of the License at
 
7
#
 
8
#         http://www.apache.org/licenses/LICENSE-2.0
 
9
#
 
10
#    Unless required by applicable law or agreed to in writing, software
 
11
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 
12
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 
13
#    License for the specific language governing permissions and limitations
 
14
#    under the License.
 
15
 
 
16
"""
 
17
The Flavor extra data extension
 
18
Openstack API version 1.1 lists "name", "ram", "disk", "vcpus" as flavor
 
19
attributes.  This extension adds to that list:
 
20
   rxtx_cap
 
21
   rxtx_quota
 
22
   swap
 
23
"""
 
24
 
 
25
from nova.api.openstack import extensions
 
26
 
 
27
 
 
28
class Flavorextradata(extensions.ExtensionDescriptor):
 
29
    """The Flavor extra data extension for the OpenStack API."""
 
30
 
 
31
    def get_name(self):
 
32
        return "FlavorExtraData"
 
33
 
 
34
    def get_alias(self):
 
35
        return "os-flavor-extra-data"
 
36
 
 
37
    def get_description(self):
 
38
        return "Provide additional data for flavors"
 
39
 
 
40
    def get_namespace(self):
 
41
        return "http://docs.openstack.org/ext/flavor_extra_data/api/v1.1"
 
42
 
 
43
    def get_updated(self):
 
44
        return "2011-09-14T00:00:00+00:00"
 
45
 
 
46
# vim: tabstop=4 shiftwidth=4 softtabstop=4