Make encoding.serialize() more programmatical

Introduce `serializable_fields` to express which class attributes
to be serialized.

Get rid of OrderedDict. Just replacing it with regular dict.

Change-Id: I3f7639dab171d3d62e92d0d1bb6d7b071cf963ad
Switch to oslo.config for CLI parsing

Use oslo.config instead of argparse for CLI parsing. As a side effect,
a bunch of logging arguments including --debug become available with
this change.

Change-Id: Ia8c4e91448f2a8cb15eb570125ac9c236e13274c
Merge "Switch to oslo.config for CLI parsing"
Merge "Make encoding.serialize() more programmatical"
Flow extension uses extension manager from agent

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
Readme should point to Openstack, not travis-ci

The readme, leftover from when this was teeth-agent, was still pointing
at the travis-ci build. I removed that build status and added a link to
Openstack How to Contribute wiki page, so people visiting the mirror on
Github know not to create pull requests.

Change-Id: I8a82eb0e04cc35425f7856b16568f191c4c54770
Allow configdrive partition to be precreated

This adds support for copying configdrives to disks that already have
partitions enabled and labeled for configdrives. This is neccessary for
supporting configdrives on partitioning schemes we don't support yet
(like GPT) or for some future agent iteration where we create partitions
separately.

Change-Id: Iee5b87d82be08febc495aaef3272ced4f2f32235
Merge "Allow configdrive partition to be precreated"
Merge "Readme should point to Openstack, not travis-ci"
Add missing methods to base HardwareManager class

The HardwareManager class was missing a few abstract method
declarations which it is expected to have. Add those.

Change-Id: I1d07b7f08a4fc23929bc09f65b897fdfa0da1770
Use processutils properly

Previously this code was calling processutils.execute incorrectly,
expecting it to return the exit code. This change:

* fixes calls to processutils.execute
* fixes related tests
* changes exceptions triggered by shell command failure to
  subclass processutils.ProcessExecutionError, to properly capture
  commands, stdout, stderr, etc. from processutils.execute().

Change-Id: I3343f104a5a8200d53bd87a8799ff918e375b17f
(cherry picked from commit 160d42debb62cb64d40915177d4c05e175abe1b6)
Add a HardwareManager method to erase devices

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
(cherry picked from commit dff46583d354ced83a056d404abc70fd3ac92de3)
Expose decom.erase_hardware command via API

Expose an async decom.erase_hardware command in the API. Executing
this command simply calls erase_hardware on the loaded HardwareManager
implementation.

Change-Id: I238264a4d5903200ad6a30d82b61804c1e3f5916
(cherry picked from commit ce0a644b8f557475afdcdb9f474ec1c3159d913f)