~ubuntu-branches/ubuntu/quantal/nova/quantal-proposed

« back to all changes in this revision

Viewing changes to nova/tests/api/ec2/test_cloud.py

  • Committer: Package Import Robot
  • Author(s): Adam Gandelman
  • Date: 2013-04-25 17:49:15 UTC
  • mfrom: (1.1.68)
  • Revision ID: package-import@ubuntu.com-20130425174915-dgx0ic0fwu4yp1b9
Tags: 2012.2.4-0ubuntu1
* Dropped patches, applied upstream:
  - debian/patches/CVE-2013-1838.patch: [9561484]
  - debian/patches/CVE-2013-0335.patch: [05a3374]
  - debian/patches/CVE-2013-1664.patch: [2ae74f8]
* Resynchronize with stable/folsom (9ecd965e) (LP: #1179707):
  - [975a312] Creating network failed with message handling via REST API
    LP: 1143584
  - [056a7df] live-migration to an invalid host should exist gracefully.
    Currently, it throws a stack trace LP: 1159755
  - [8f8ef21] Add a format_message method to the Exceptions
  - [2dd8f3e] Quantum Hybrid OVS driver does not set STP values correctly
    LP: 1129055
  - [c4c417e] Fixed IPs quota can break upgrades LP: 1161190
  - [c85683e] A default /24 netmask is used by dnsmasq instead of the
    configured netmasks (in netmasks table) LP: 1154929
  - [50dece6] Support external gateways in VLAN mode LP: 1012443
  - [524a5a3] Expected exception on volume attach leaves traceback in the
    logs. LP: 1155315
  - [67eb495] ec2 id mapping can be incorrect during attach volume LP: 1145490
  - [69ba489] PowerVM driver spawn failed due to missing attribute
    supported_instances LP: 1155498
  - [28aacf6] Log statement improperly output in nova-manage LP: 1018431
  - [53626bf] fixed_ips cannot reliably be released on instance termination
    LP: 1103260
  - [f8c5492] libvirt driver connection validation causes unnecessary process
    execution with libvirt/qemu LP: 1100446
  - [5b43cef] comparing datetime to None in update-time handling LP: 1096719
  - [549879d] Quantum:  DHCP request fails with IptablesFirewallDriver and
    default rule as DISCARD LP: 1131223
  - [46d2060] soft_reboot followed by hard_reboot can lead to double reboot
    LP: 1046356
  - [cdc2386] libvirt: nova should enable apic setting for xen or kvm guest
    LP: 1086352
  - [9561484] DOS by allocating all fixed ips LP: 1125468
  - [d6b9d33] Affinity filter checks erroneously includes deleted instances
    LP: 1107156
  - [cb843f7] Instance is sometimes shutdown without any operation and report
    the message "Instance shutdown by itself. Calling the stop API"
    LP: 1085771
  - [05a3374] VNC proxy can be made to connect to wrong VM LP: 1125378
  - [889e9c0] nova leaves stale .part files on disk when downloading non raw
    VM images LP: 1125068
  - [2029427] Instance vm_state remains 'migrating' if source compute node
    goes down during migration LP: 973393
  - [8289d6c] rc.local editing wrong. LP: 1089668
  - [d5e7f55] nova-compute fails to start if an instance has no ip LP: 1131330
  - [7ace55f] VMs paused unbeknownst to nova compute are destroyed LP: 1097806
  - [ecd98d2] LibvirtBridgeDriver crashes when spawning an instance with
    NoopFirewallDriver LP: 1050433
  - [2ae74f8] DoS through XML entity expansion (CVE-2013-1664) LP: 1100282
  - [21d5e90] Instance stuck in task state image_snapshot LP: 1101136

Show diffs side-by-side

added added

removed removed

Lines of Context:
270
270
                                                 project_id=project_id)
271
271
 
272
272
        fixed_ips = nw_info.fixed_ips()
273
 
        ec2_id = ec2utils.id_to_ec2_inst_id(inst['id'])
 
273
        ec2_id = ec2utils.id_to_ec2_inst_id(inst['uuid'])
274
274
 
275
275
        self.stubs.Set(ec2utils, 'get_ip_info_for_instance',
276
276
                       lambda *args: {'fixed_ips': ['10.0.0.1'],
2128
2128
                                            'delete_on_termination': True},
2129
2129
                                           ]}
2130
2130
        ec2_instance_id = self._run_instance(**kwargs)
2131
 
        instance_uuid = ec2utils.ec2_instance_id_to_uuid(self.context,
2132
 
                                                         ec2_instance_id)
 
2131
        instance_uuid = ec2utils.ec2_inst_id_to_uuid(self.context,
 
2132
                                                     ec2_instance_id)
2133
2133
        instance_id = ec2utils.ec2_id_to_id(ec2_instance_id)
2134
2134
 
2135
2135
        vols = db.volume_get_all_by_instance_uuid(self.context, instance_uuid)
2192
2192
                                            'delete_on_termination': True}]}
2193
2193
        ec2_instance_id = self._run_instance(**kwargs)
2194
2194
        instance_id = ec2utils.ec2_id_to_id(ec2_instance_id)
2195
 
        instance_uuid = ec2utils.ec2_instance_id_to_uuid(self.context,
2196
 
                                                         ec2_instance_id)
 
2195
        instance_uuid = ec2utils.ec2_inst_id_to_uuid(self.context,
 
2196
                                                     ec2_instance_id)
2197
2197
 
2198
2198
        vols = db.volume_get_all_by_instance_uuid(self.context, instance_uuid)
2199
2199
        self.assertEqual(len(vols), 1)
2269
2269
                                            'delete_on_termination': True}]}
2270
2270
        ec2_instance_id = self._run_instance(**kwargs)
2271
2271
        instance_id = ec2utils.ec2_vol_id_to_uuid(ec2_instance_id)
2272
 
        instance_uuid = ec2utils.ec2_instance_id_to_uuid(self.context,
2273
 
                                                         ec2_instance_id)
 
2272
        instance_uuid = ec2utils.ec2_inst_id_to_uuid(self.context,
 
2273
                                                     ec2_instance_id)
2274
2274
 
2275
2275
        vols = db.volume_get_all_by_instance_uuid(self.context, instance_uuid)
2276
2276
        self.assertEqual(len(vols), 2)
2525
2525
            raise exception.VolumeNotFound(volume_id=volume_id)
2526
2526
        self.stubs.Set(db, 'volume_get', fake_volume_get)
2527
2527
 
 
2528
        def fake_get_instance_uuid_by_ec2_id(ctxt, int_id):
 
2529
            if int_id == 305419896:
 
2530
                return 'e5fe5518-0288-4fa3-b0c4-c79764101b85'
 
2531
            raise exception.InstanceNotFound(instance_id=int_id)
 
2532
        self.stubs.Set(db, 'get_instance_uuid_by_ec2_id',
 
2533
                       fake_get_instance_uuid_by_ec2_id)
 
2534
 
2528
2535
        get_attribute = functools.partial(
2529
2536
            self.cloud.describe_instance_attribute,
2530
2537
            self.context, 'i-12345678')