Currently, we only log the image ID and attempted URL. Now, we log the
status code recieved and detailed information about how and when things
failed.
Change-Id: I718c7facbe1500d98be78b7b6137e92fdfb2fdf1
Closes-bug: 1420981
Depends-On: I69f6f6eef4ad573f406d64d579a9811c70ac5d28
Currently several IPA error classes inherit from Exception. This
patch makes the base class of those classes RESTError. These
error classes are also restructured to initialize in the same
manner as other classes which inherit from RESTError. Additionally
test cases are added for these error classes.
Change-Id: Ie6235e4cc25f072b789b2e72e4592d4cf02bfedc
Closes-bug: #1410372
This fixes and cleans up (making it consistent) how error
instances set their details value. The base class RESTError
will set the details value; all subclasses should call their
parent's __init__().
Unit tests were added to test that the Error instances are
initialized correctly.
Change-Id: I2390fa0012f8e4e6d73cbfb188f1733dfe85e65a
Closes-Bug: #1408817
This fixes some Error classes so that they are correcting invoking
their parent's __init__() method instead of some other ancestor's
method.
Change-Id: I7cb2fc56792f7516222baf75f76b50509deefcf5
Closes-Bug: 1408813
If this exception is called, it should contain a method argument. If
not, allow the incorrect call to bubble up rather than setting it to
None. This will ensure this error is never called without the method
argument.
Change-Id: Iedc82b3446d1ee41d6ae94ee43391e12ef4899a7
Currently we pick the most specific manager and use it. Instead, call
each method on each hardware manager in priority order, and consider the
call successful if the method exists and doesn't throw
IncompatibleHardwareMethodError.
This is an API breaking change for anyone with out-of-tree
HardwareManagers.
Closes-bug: 1408469
Change-Id: I30c65c9259acd4f200cb554e7d688344b7486a58
This commit fixes an exception that was not properly raised, and
also makes the exception more relevant.
This also fixes an outstanding bug where, if the agent
was not associated with a node, get_node_uuid() would fail in an
unexpected manner.
Change-Id: Ifca474a73dd50b5fd2242e5b7e938a5db04f27a8
This commit adds support for booting IPA from virtual
media cdrom. When IPA is booted over virtual media cdrom,
the parameters to the IPA are passed in a text file within
the virtual media floppy.
Change-Id: Ia04585416aada85022af73fb2b945bd3895606f0
Closes-Bug: #1358723
The previous implementation of list_block_devices used blockdev,
which would list partitions, software RAID and other devices as block devices.
By switching to lsblk, the agent can filter down to only physical block
devices, which is all the agent cares about for any of its operations.
This change adds two new fields to the BlockDevice class: model, a string of
the block devices reported model, and rotational, a boolean representing a
spinning disk (True) or a solid state disk (False). This data can be useful
for vendor hardware managers.
Change-Id: I385c3bb378c2c49385bca14a1d7efa074933becf
Closes-Bug: 1344351
During the first heartbeat, the heartbeater asks the agent to check
its advertised address; if the advertised IP is still the default
(None), the agent tries to replace it with the IP of the first network
interface it finds. If it fails to find either a network interface or
an IP address, the agent raises an exception.
Change-Id: I6d435d39e99ed0ff5c8b4883b6aa0b356f6cb4ae
Closes-Bug: #1309110
Add erase_devices method to the HardwareManager class. By default this
method iterates block devices, and calls a new abstract
erase_block_device method for each device. This patch includes a
simple implementation of erase_block_device on the
GenericHardwareManager which attempts to issue an ATA secure erase on
supported devices.
Change-Id: I81da065395b8785f636f1b0a0d60c9f1c045441e
Removed creating separate extension manager for flow extension.
Instead, have made flow extension using the same extension manager
instance which is initialized in agent. It fixes circular
extension loading in stevedore.
Closes-Bug: #1316145
Change-Id: Id339f1876168a41ca43ba7473f3ff6949a233ef3
Introduce `serializable_fields` to express which class attributes
to be serialized.
Get rid of OrderedDict. Just replacing it with regular dict.
Change-Id: I3f7639dab171d3d62e92d0d1bb6d7b071cf963ad