Update openstack/common/periodic_task

The following commits are in this update:

1771a77 Adjust import order according to PEP8 imports rule
4bfb7a2 Apply six for metaclass
0ea069e Removed calls to locals()
1a2df89 Enable H302 hacking check

Change-Id: I5d15d9772002a2f764acef16e28bcfa16a9760c0
Initialize iptables rules on initialization of MetadataManager

To avoid multiple initialization of iptables rules if there are a few
workers for metadata service, perform iptables configuration in
__init__() of MetadataManager.

Change-Id: I674c04f973318f06cbb98693f0a884c824af8748
Closes-Bug: #1097999
Setting the xen vm device id on vm record

Currently, while setting the device_id, the hypervisor
version is being incorrectly handled since the method
get_major_minor_version expects either an int, float,
or string format. However, the xen hypervisor
version is stored in the session product_version as a tuple.
This fix correctly uses the version to set the appropriate
device_id on the vm record. Also, removing the method
get_major_minor_version as it is not needed anymore.

Closes-bug: #1260178

Change-Id: I6b1353cdb7cc856b34f02e3d3679c142ba032533
Object-ify build_and_run_instance

The code for build_and_run_instance was put in place before the switch
to using Instance objects.  This updates the new boot process code to
use objects rather than dictionaries for instances.

bp remove-cast-to-schedule-run-instance

Change-Id: I47866536e924510d0d89d24336e0b690733c19e1
pass the empty body into the controller

This allows POST and PUT reqeusts without content-body. The
default body: None will be passed into the controller, and
will be validated in the controller, so it fixes the bug 1253089.

When the request method is GET or DELETE, the content-type
and body in the request will be ignored
.
When POST or PUT a request with body but without content-type,
it will return "unsupported the content-type provided" with
response code 400.

side-effect: The method which handle the request method: POST
or PUT must have the parameter: body. Otherwise, it will raise:
"got an unexpected keyword argument 'body'"

And some tests are updated due to this change.
The parameter: body are also added for some actions which are
mapped to the method: POST or PUT.

Closes-bug: 1253089

Change-Id: Icda59feed439625bbbe079444feeda57576ef131
Merge "Object-ify build_and_run_instance"
Merge "Update openstack/common/periodic_task"
Merge "pass the empty body into the controller"
Merge "Setting the xen vm device id on vm record"
Merge "Initialize iptables rules on initialization of MetadataManager"