Commit Graph

27437 Commits

Author SHA1 Message Date
Jenkins e990d9f0e1 Merge "Remove unnecessary passing of task_state to check_instance_state" 2014-05-06 13:07:00 +00:00
Jenkins 9fdc2de700 Merge "Include pending task in log message on skip sync_power_state" 2014-05-06 12:27:48 +00:00
Jenkins f9bb7be91f Merge "objects: remove unused utils module" 2014-05-06 09:56:17 +00:00
Jenkins aa18ed084d Merge "Don't translate debug level logs in objectstore, pci, rdp, servicegroup" 2014-05-06 05:48:31 +00:00
Jenkins df69ef4aa0 Merge "Don't translate debug level logs in cloudpipe, hacking, ipv6, keymgr" 2014-05-06 05:48:19 +00:00
Jenkins 6cd9c4753e Merge "Fix calls to mock.assert_not_called()" 2014-05-06 05:42:31 +00:00
Jenkins 4c8386cc85 Merge "libvirt: Stub O_DIRECT in test if not supported" 2014-05-06 04:44:26 +00:00
Jenkins 6b5f59d77b Merge "VMware: reduce unit test times" 2014-05-06 03:04:16 +00:00
Jenkins 50af33499a Merge "Improve hacking rule to avoid author markers" 2014-05-06 03:04:03 +00:00
Jenkins c5c0b764b3 Merge "Update block_device_info to contain swap and ephemeral disks" 2014-05-06 01:31:45 +00:00
Jenkins a1a9d7b78f Merge "Remove duplicated import in unit test" 2014-05-05 23:29:15 +00:00
Jenkins 325657801e Merge "Raise HTTPForbidden from os-floating-ips API rather than 404" 2014-05-05 22:02:08 +00:00
Jenkins daec6c39b0 Merge "Raise descriptive error for over volume quota" 2014-05-05 21:23:32 +00:00
Jenkins 3cb31d9441 Merge "Add fault wrapper for rescue function" 2014-05-05 20:20:18 +00:00
Jenkins 61c5b29c35 Merge "Don't translate debug level logs in nova.cert, console and consoleauth" 2014-05-05 17:16:57 +00:00
Jenkins 2080e1ca5b Merge "Don't translate debug level logs in nova.cmd and nova.db" 2014-05-05 17:16:44 +00:00
Jenkins d41c3573d2 Merge "Don't translate debug level logs in nova.objects" 2014-05-05 17:16:32 +00:00
Jenkins 9d999e77e2 Merge "Don't translate debug level logs in nova.compute" 2014-05-05 17:14:06 +00:00
Matt Riedemann 50f743d1ee Raise HTTPForbidden from os-floating-ips API rather than 404
The os-floating-ips extension was catching and handling a 404
and 403 in the same block and raising HTTPNotFound for both.

This change separates the 404 and 403 cases so HTTPForbidden
is returned in the 403 case.  For the 404 case, the test is
updated to raise the proper NovaException and a new test is
added for the 403 Forbidden case.

Change-Id: Id0daf2d61c6960d845d3b7980f96228fece41128
2014-05-05 13:47:12 +00:00
Sahid Orentino Ferdjaoui 18938d283c Improve hacking rule to avoid author markers
The case with the tag "moduleauthor" is not handled when
checking to avoid author makers.
Also fix the position when the tag Author is used.

Change-Id: I17b07b9f5448f9cbb4c5705f655c5392316a6239
Closes-Bug: #1314176
2014-05-05 14:35:20 +02:00
Matt Riedemann 92d92c7fe1 Fix calls to mock.assert_not_called()
There is no assert_not_called() method in mock, as described here:

https://code.google.com/p/mock/issues/detail?id=159

Fix these calls to use the mock.called attribute instead.

Closes-Bug: #1316167

Change-Id: I865463244ebfc45e1f940c74e1afbb9084930bb3
2014-05-04 19:05:44 -07:00
Gary Kotton 25e5ba09f2 VMware: reduce unit test times
A number of tests would take longer than a second.

Closes-bug: #1315870

Change-Id: I4d5c9fac460278135ab1c2c7876f3ac6e6f3d4a6
2014-05-04 06:14:27 -07:00
Jenkins 89fd077042 Merge "Deprecate instance_fault_create() from conductor" 2014-05-03 00:25:47 +00:00
Leandro I. Costantino aff26ba2ca Remove duplicated import in unit test
A couple of unit tests were importing twice mock or mox.
This patch just remove the duplicated import.

Change-Id: I0c66746348e184a3846cadd40d7d7cbb7d594564
2014-05-02 20:31:25 -03:00
Joe Gordon affbbca5af Include pending task in log message on skip sync_power_state
To better understand why sync_power_state is being skipped include the
pending task name in the log message.

Change-Id: I832a3d5820efab301e12610b28ca2a1e5cfd946a
2014-05-02 12:41:48 -07:00
Jenkins 6df520049d Merge "Remove conductor usage from add_instance_fault_from_exc()" 2014-05-02 18:20:44 +00:00
Jenkins e495afb6ed Merge "Add create() method to InstanceFault object" 2014-05-02 18:20:31 +00:00
Jenkins 1614f03ebb Merge "Remove use of service_* conductor calls from xenapi host.py" 2014-05-02 18:20:18 +00:00
Rick Harris 63b0accd89 libvirt: Stub O_DIRECT in test if not supported
`os.O_DIRECT` is only defined on platforms that support direct I/O. On
Macs, which don't support direct I/O in this way, `os.O_DIRECT` will
raise an `AttributeError`.

We can still test the code-path, however, by just stubbing out the
value on platforms where it's not supported.

Closes-Bug: 1286958

Change-Id: I8f10d6dfc4a63b6a961006b029b828e703870e46
2014-05-02 12:23:33 -05:00
Jenkins 9aee382c5b Merge "Remove unnecessary wrapper for 5 compute APIs" 2014-05-02 17:21:22 +00:00
Dan Smith 38fdd8e6b2 Deprecate instance_fault_create() from conductor
This method is no longer used and is deprecated for Juno.

Related to blueprint virt-objects-juno

Change-Id: Ib7feb215e0c79524be272315a235a4745339860d
2014-05-02 07:41:06 -07:00
Dan Smith f23498d7a2 Remove conductor usage from add_instance_fault_from_exc()
This makes add_instance_fault_from_exc() use the InstanceFault
object instead of a raw conductor call. This is actually a
minor change except that all callers of this method must now
stop passing the conductor API, and tests must return something
valid from the mocked call.

Related to blueprint virt-objects-juno

Change-Id: I49b17c1ef3d14fd36f016c37d88287e62126bf68
2014-05-02 07:41:02 -07:00
Jenkins 473bf13762 Merge "objects: restore some datetime field comments" 2014-05-02 14:24:05 +00:00
Dan Smith cf6b0fdbff Add create() method to InstanceFault object
This allows creating InstanceFaults through the object interface.

Related to blueprint virt-objects-juno

Change-Id: Iedde2e220127778fa6252d310f9e73c8506f605e
2014-05-02 07:10:47 -07:00
Dan Smith 5c58a69910 Remove use of service_* conductor calls from xenapi host.py
This removes use of some service calls in the conductor by xenapi's
host.py module and replaces them with object usage. Existing tests
are sufficient to confirm the same behavior remains.

Related to blueprint virt-objects-juno

Change-Id: I908cca4fa1d297c5c9b1d84ae7ebe7452a30ba12
2014-05-02 07:02:29 -07:00
Jenkins e03a2c84cb Merge "Optimize validate_networks to query neutron only when needed" 2014-05-02 13:21:15 +00:00
Jenkins 173b850f06 Merge "ec2utils: Use VolumeMapping object" 2014-05-02 12:18:48 +00:00
Jenkins 7b36bf0459 Merge "ec2: create volume mapping using nova object" 2014-05-02 12:18:36 +00:00
Jenkins 848b34477c Merge "Add VolumeMapping object for use in EC2" 2014-05-02 12:12:06 +00:00
Jenkins 19d98e6a3f Merge "VMware: spawn refactor - phase 1 - execute_create_vm" 2014-05-02 10:18:14 +00:00
Aaron Rosen 6e5f6041a3 Optimize validate_networks to query neutron only when needed
This patch optimizes validate_networks so that it only queries neutron
when needed. Previously, this method would perform an additional net_list,
list_ports, and show_quota regardless if a request contains only
port_ids. If a request only contains port ids we do not need to check neutron
for quota as these ports are already allocated.

Change-Id: Ia7abc7d95b663f165fc95385dda3bab13b7a43e6
Closes-bug: #1291565
2014-05-01 17:33:20 -07:00
Jenkins 2590c5b985 Merge "Add warning to periodic_task with interval 0" 2014-05-01 22:19:56 +00:00
Ryan Hsu cebcb28357 VMware: spawn refactor - phase 1 - execute_create_vm
Moves the inner function "execute_create_vm" from the spawn method
to vm_util. Additionally, return the vm_ref after VM creation so
an extra call to retrieve the vm_ref does not need to take place
after the fact.

partial blueprint vmware-spawn-refactor
Co-authored-by: Tracy Jones <tjones@vmware.com>

Change-Id: I67c3c8c14b6c01b160611cc001d51f1da29ffb24
2014-05-01 11:59:49 -07:00
Jenkins bef55b21ad Merge "wrap_check_security_groups_policy is already defined" 2014-05-01 17:21:46 +00:00
Jenkins 0e479b516c Merge "xenapi: fixup agent tests" 2014-05-01 16:42:09 +00:00
Jenkins 8b82285e37 Merge "VMware: remove unused variable" 2014-05-01 16:38:33 +00:00
John Garbutt 6def27b434 xenapi: fixup agent tests
The root cause of the slow agent tests was not mocking this method:
compute_utils.add_instance_fault_from_exc

This cleans up the tests to share a bit more code, and ensures they
actually check that the appropriate exception is raised.

This change adds a log message to report errors that could occur in
running systems that also helped identify this issue in the unit tests.

test_spawn_fails_agent_not_implemented was a duplicate test and has been
removed.

Change-Id: I6fd31520fffd5e888ce0c2b58af2715f0d929ce1
Closes-Bug: #1279317
2014-05-01 13:17:46 +00:00
Jenkins d0b7b6d73c Merge "Fix bad Mock calls to assert_called_once()" 2014-05-01 10:47:42 +00:00
Jenkins 1d51543b23 Merge "Use datetime object for fake network timestamps" 2014-05-01 10:10:02 +00:00
Jenkins 807a861ab7 Merge "Use datetime object for stub created_at timestamp" 2014-05-01 10:09:49 +00:00