In fixed_ip object, we use IPV4AndV6Address, which is a FieldType
instead of Field.
Create a Field for IPV4AndV6Address and use it in the fixed_ip object.
Change-Id: I0f369a70f755bc7e290edb96656c7c0cb2f3a00a
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
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
This commit handles different cases when the key 'shelved_image_id'
is not defined or None. Also it tries to improve the error messages.
Closes-Bug: #1307416
Change-Id: Ia2d0a183eefccdfd6f612d86f60cd2930c1a4b23
We already have a document on how to run unit tests, so
development.environment should just point to that document instead of
trying to summarize it. Keeping this information in one less places
makes it easier to make sure the page is up to date (which
development.environment is not -- no mention of tox).
Change-Id: I9aecf439b6145b035b3457559ddb187058f5057b
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
A couple of unit tests were importing twice mock or mox.
This patch just remove the duplicated import.
Change-Id: I0c66746348e184a3846cadd40d7d7cbb7d594564
To better understand why sync_power_state is being skipped include the
pending task name in the log message.
Change-Id: I832a3d5820efab301e12610b28ca2a1e5cfd946a
Add support into InstanceFault.create() to handle where we need to
duplicate any faults in the API cells. Convert the cells code to use
InstanceFault.create()
NOTE: This happens to fix an oversight where we accidentally left the
update_cells=False kwarg off of the db call in the cells code.
Change-Id: Iec11b8259aaecba055a6d5636ab60dfa0dbb6c83
`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
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
This allows creating InstanceFaults through the object interface.
Related to blueprint virt-objects-juno
Change-Id: Iedde2e220127778fa6252d310f9e73c8506f605e
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