~hudson-openstack/nova/trunk

« back to all changes in this revision

Viewing changes to nova/tests/integrated/test_extensions.py

  • Committer: Tarmac
  • Author(s): Justin Santa Barbara
  • Date: 2011-03-30 02:46:57 UTC
  • mfrom: (786.4.40 volumes-api)
  • Revision ID: tarmac-20110330024657-6xsfuv6p6xql9sw3
Support for volumes in the OpenStack API

Two new endpoints: /volumes and /servers/<id>/volume_attachments

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# vim: tabstop=4 shiftwidth=4 softtabstop=4
 
2
 
 
3
# Copyright 2011 Justin Santa Barbara
 
4
# All Rights Reserved.
 
5
#
 
6
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
 
7
#    not use this file except in compliance with the License. You may obtain
 
8
#    a copy of the License at
 
9
#
 
10
#         http://www.apache.org/licenses/LICENSE-2.0
 
11
#
 
12
#    Unless required by applicable law or agreed to in writing, software
 
13
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 
14
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 
15
#    License for the specific language governing permissions and limitations
 
16
#    under the License.
 
17
 
 
18
import os
 
19
 
 
20
from nova import flags
 
21
from nova.log import logging
 
22
from nova.tests.integrated import integrated_helpers
 
23
 
 
24
 
 
25
LOG = logging.getLogger('nova.tests.integrated')
 
26
 
 
27
 
 
28
FLAGS = flags.FLAGS
 
29
FLAGS.verbose = True
 
30
 
 
31
 
 
32
class ExtensionsTest(integrated_helpers._IntegratedTestBase):
 
33
    def _get_flags(self):
 
34
        f = super(ExtensionsTest, self)._get_flags()
 
35
        f['osapi_extensions_path'] = os.path.join(os.path.dirname(__file__),
 
36
                                                "../api/openstack/extensions")
 
37
        return f
 
38
 
 
39
    def test_get_foxnsocks(self):
 
40
        """Simple check that fox-n-socks works."""
 
41
        response = self.api.api_request('/foxnsocks')
 
42
        foxnsocks = response.read()
 
43
        LOG.debug("foxnsocks: %s" % foxnsocks)
 
44
        self.assertEqual('Try to say this Mr. Knox, sir...', foxnsocks)