~vladimir.p/nova/volume_type_extradata

« back to all changes in this revision

Viewing changes to nova/tests/api/openstack/test_extensions.py

  • Committer: Tarmac
  • Author(s): Jake Dahn
  • Date: 2011-08-16 16:39:45 UTC
  • mfrom: (1443.1.13 rebasetest)
  • Revision ID: tarmac-20110816163945-eshog11d5o3804u6
This branch implements a nova api extension which allows you to manage and update tenant/project quotas.

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
            "Hosts",
92
92
            "Keypairs",
93
93
            "Multinic",
 
94
            "Quotas",
94
95
            "SecurityGroups",
95
96
            "Volumes",
96
97
            ]
110
111
        self.assertEqual(names, self.ext_list)
111
112
 
112
113
        # Make sure that at least Fox in Sox is correct.
113
 
        (fox_ext,) = [
 
114
        (fox_ext, ) = [
114
115
            x for x in data['extensions'] if x['alias'] == 'FOXNSOX']
115
116
        self.assertEqual(fox_ext, {
116
117
                'namespace': 'http://www.fox.in.socks/api/ext/pie/v1.0',
155
156
        self.assertEqual(len(exts), len(self.ext_list))
156
157
 
157
158
        # Make sure that at least Fox in Sox is correct.
158
 
        (fox_ext,) = [x for x in exts if x.get('alias') == 'FOXNSOX']
 
159
        (fox_ext, ) = [x for x in exts if x.get('alias') == 'FOXNSOX']
159
160
        self.assertEqual(fox_ext.get('name'), 'Fox In Socks')
160
161
        self.assertEqual(fox_ext.get('namespace'),
161
162
            'http://www.fox.in.socks/api/ext/pie/v1.0')
227
228
 
228
229
 
229
230
class InvalidExtension(object):
 
231
 
230
232
    def get_alias(self):
231
233
        return "THIRD"
232
234