~ubuntu-branches/ubuntu/saucy/nova/saucy-proposed

« back to all changes in this revision

Viewing changes to nova/tests/api/openstack/compute/test_images.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-05-24 13:12:53 UTC
  • mfrom: (1.1.55)
  • Revision ID: package-import@ubuntu.com-20120524131253-ommql08fg1en06ut
Tags: 2012.2~f1-0ubuntu1
* New upstream release.
* Prepare for quantal:
  - Dropped debian/patches/upstream/0006-Use-project_id-in-ec2.cloud._format_image.patch
  - Dropped debian/patches/upstream/0005-Populate-image-properties-with-project_id-again.patch
  - Dropped debian/patches/upstream/0004-Fixed-bug-962840-added-a-test-case.patch
  - Dropped debian/patches/upstream/0003-Allow-unprivileged-RADOS-users-to-access-rbd-volumes.patch
  - Dropped debian/patches/upstream/0002-Stop-libvirt-test-from-deleting-instances-dir.patch
  - Dropped debian/patches/upstream/0001-fix-bug-where-nova-ignores-glance-host-in-imageref.patch 
  - Dropped debian/patches/0001-fix-useexisting-deprecation-warnings.patch
* debian/control: Add python-keystone as a dependency. (LP: #907197)
* debian/patches/kombu_tests_timeout.patch: Refreshed.
* debian/nova.conf, debian/nova-common.postinst: Convert to new ini
  file configuration
* debian/patches/nova-manage_flagfile_location.patch: Refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
from lxml import etree
26
26
import webob
27
27
 
28
 
from nova import exception
29
 
from nova import flags
30
28
from nova.api.openstack.compute import images
31
29
from nova.api.openstack.compute.views import images as images_view
32
30
from nova.api.openstack import xmlutil
 
31
from nova import exception
 
32
from nova import flags
33
33
from nova import test
 
34
from nova.tests.api.openstack import fakes
34
35
from nova import utils
35
 
from nova.tests.api.openstack import fakes
36
36
 
37
37
 
38
38
FLAGS = flags.FLAGS
68
68
        bookmark = "http://localhost/fake/images/124"
69
69
        alternate = "%s/fake/images/124" % utils.generate_glance_url()
70
70
        server_uuid = "aa640691-d1a7-4a67-9d3c-d35ee6b3cc74"
71
 
        server_href = "http://localhost/v2/servers/" + server_uuid
72
 
        server_bookmark = "http://localhost/servers/" + server_uuid
 
71
        server_href = "http://localhost/v2/fake/servers/" + server_uuid
 
72
        server_bookmark = "http://localhost/fake/servers/" + server_uuid
73
73
 
74
74
        expected_image = {
75
75
            "image": {
123
123
        bookmark = "https://zoo.com:42/fake/images/124"
124
124
        alternate = "http://circus.com:34/fake/images/124"
125
125
        server_uuid = "aa640691-d1a7-4a67-9d3c-d35ee6b3cc74"
126
 
        server_href = "https://zoo.com:42/v2/servers/" + server_uuid
127
 
        server_bookmark = "https://zoo.com:42/servers/" + server_uuid
 
126
        server_href = "https://zoo.com:42/v2/fake/servers/" + server_uuid
 
127
        server_bookmark = "https://zoo.com:42/fake/servers/" + server_uuid
128
128
 
129
129
        expected_image = {
130
130
            "image": {
449
449
        response_list = response["images"]
450
450
 
451
451
        server_uuid = "aa640691-d1a7-4a67-9d3c-d35ee6b3cc74"
452
 
        server_href = "http://localhost/v2/servers/" + server_uuid
453
 
        server_bookmark = "http://localhost/servers/" + server_uuid
 
452
        server_href = "http://localhost/v2/fake/servers/" + server_uuid
 
453
        server_bookmark = "http://localhost/fake/servers/" + server_uuid
454
454
        alternate = "%s/fake/images/%s"
455
455
 
456
456
        expected = [{
740
740
        response_links = response["images_links"]
741
741
 
742
742
        server_uuid = "aa640691-d1a7-4a67-9d3c-d35ee6b3cc74"
743
 
        server_href = "http://localhost/v2/servers/" + server_uuid
744
 
        server_bookmark = "http://localhost/servers/" + server_uuid
 
743
        server_href = "http://localhost/v2/fake/servers/" + server_uuid
 
744
        server_bookmark = "http://localhost/fake/servers/" + server_uuid
745
745
        alternate = "%s/fake/images/%s"
746
746
 
747
747
        expected = [{
1063
1063
 
1064
1064
    TIMESTAMP = "2010-10-11T10:30:22Z"
1065
1065
    SERVER_UUID = 'aa640691-d1a7-4a67-9d3c-d35ee6b3cc74'
1066
 
    SERVER_HREF = 'http://localhost/v2/servers/' + SERVER_UUID
1067
 
    SERVER_BOOKMARK = 'http://localhost/servers/' + SERVER_UUID
 
1066
    SERVER_HREF = 'http://localhost/v2/fake/servers/' + SERVER_UUID
 
1067
    SERVER_BOOKMARK = 'http://localhost/fake/servers/' + SERVER_UUID
1068
1068
    IMAGE_HREF = 'http://localhost/v2/fake/images/%s'
1069
1069
    IMAGE_NEXT = 'http://localhost/v2/fake/images?limit=%s&marker=%s'
1070
1070
    IMAGE_BOOKMARK = 'http://localhost/fake/images/%s'