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

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Adam Gandelman, Chuck Short
  • Date: 2012-09-25 10:54:59 UTC
  • mfrom: (1.1.63)
  • Revision ID: package-import@ubuntu.com-20120925105459-fr27butcb6p498gp
Tags: 2012.2~rc2-0ubuntu1
[ Adam Gandelman ]
* debian/control: Add python-cinderclient to python-nova Depends.
* wrap-and-sort.

[ Chuck Short ]
* debian/nova-common.postinst: Change root_helper to rootwrap_config
  when upgrading from precise
* debian/pydist-overrides: dont try to install babel.
* New upstream version.
* debian/rules: FTBFS if testsuite fails.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3370
3370
                }}
3371
3371
        self.assertEquals(request['body'], expected)
3372
3372
 
 
3373
    def test_request_with_block_device_mapping(self):
 
3374
        serial_request = """
 
3375
    <server xmlns="http://docs.openstack.org/compute/api/v2"
 
3376
     name="new-server-test" imageRef="1" flavorRef="1">
 
3377
       <block_device_mapping>
 
3378
         <mapping volume_id="7329b667-50c7-46a6-b913-cb2a09dfeee0"
 
3379
          device_name="/dev/vda" virtual_name="root"
 
3380
          delete_on_termination="False" />
 
3381
         <mapping snapshot_id="f31efb24-34d2-43e1-8b44-316052956a39"
 
3382
          device_name="/dev/vdb" virtual_name="ephemeral0"
 
3383
          delete_on_termination="False" />
 
3384
         <mapping device_name="/dev/vdc" no_device="True" />
 
3385
       </block_device_mapping>
 
3386
    </server>"""
 
3387
        request = self.deserializer.deserialize(serial_request)
 
3388
        expected = {"server": {
 
3389
                "name": "new-server-test",
 
3390
                "imageRef": "1",
 
3391
                "flavorRef": "1",
 
3392
                "block_device_mapping": [
 
3393
                    {
 
3394
                        "volume_id": "7329b667-50c7-46a6-b913-cb2a09dfeee0",
 
3395
                        "device_name": "/dev/vda",
 
3396
                        "virtual_name": "root",
 
3397
                        "delete_on_termination": False,
 
3398
                    },
 
3399
                    {
 
3400
                        "snapshot_id": "f31efb24-34d2-43e1-8b44-316052956a39",
 
3401
                        "device_name": "/dev/vdb",
 
3402
                        "virtual_name": "ephemeral0",
 
3403
                        "delete_on_termination": False,
 
3404
                    },
 
3405
                    {
 
3406
                        "device_name": "/dev/vdc",
 
3407
                        "no_device": True,
 
3408
                    },
 
3409
                ]
 
3410
                }}
 
3411
        self.assertEquals(request['body'], expected)
 
3412
 
3373
3413
 
3374
3414
class TestAddressesXMLSerialization(test.TestCase):
3375
3415