Baremetal driver: remove unused states

NULL and INIT were not used since commit c20110d15be37948ddd9ef5f38001328aabf5b1d

Change-Id: I25c34872b100807d691e7e15f7b70be7ad1912b9
Fix extra metadata didn't assign into snapshot image

create_image action API accept metadata parameter to add extra
metadata into snapshot image. But the current code doesn't work
for snapshot of volume based instance. This error is because the
code use var 'props' to store extra metadatas, and the code use
same var to store root bdm metadata later, then the extra metadata
is overwritten by root bdm metadata. This patch use another var
'properties' to store root bdm metadata to avoid overwrite the
extra metadata.

Change-Id: I2224905f596690e22aa71dc6541284f005ebba9d
Closes-Bug: #1347355
Live migration is broken for NFS shared storage

One of the new checks, introduced in
I2755c59b4db736151000dae351fd776d3c15ca39
is missing a check against filebased shared storage,
leading to live migration being broken.

Closes-Bug: #1346385
Change-Id: I096ecd6eadc3b13ef918ca1e6c98acdd01556c0d
Allow to unshelve instance booted from volume

When we shelve an instance, volumes are not detached from cinder to kept
them 'In-Use' in cinder
But when you unshelve this instance, nova ask cinder the reattach theses
volumes. This fails, because volume cannot be attached twice.

This patch permits when we ask the libvirt DriverBlockDevice to attach a
device to the instance to bypass the cinder attachement code that is not needed
when we unshelve an instance, because the cinder volume is kept 'In-use'
during the 'shelved' state.

Co-Authored-By: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
Closes-bug: #1305399
Change-Id: I780a9407feeb48ecd3e295508ce3e6bc3b09d3e6
Update scheduler after instance delete

Previously deleting an instance would update the scheduler resources
fairly quickly. There is now a delay when deleting an instance until the
scheduler makes the resources available again. This appears to be due to
the fact that the delete code path used to call resource tracker to
update the compute_node record but this no longer happens.

Closes-Bug: 1336080
Change-Id: I837b70ce06843ff83481d4985c9c08b74d20cab0
docs - Fix doc build errors with SQLAlchemy 0.9

The Nova docs failed to build when using SQLAlchemy 0.9. Among
the errors that are reported is this one:

nova/db/sqlalchemy/api.py:docstring of nova.db.sqlalchemy.api.select:12:
WARNING: undefined label: coretutorial_selecting (if the link has no
caption the label must precede a section header)

nova/openstack/common/db/sqlalchemy/utils.py:docstring of
nova.openstack.common.db.sqlalchemy.utils.or_:26: WARNING: more than one target found for
cross-reference u'and_': nova.db.sqlalchemy.api.and_,
nova.virt.baremetal.db.sqlalchemy.migrate_repo.versions.006_move_prov_mac_address.and_

nova/virt/baremetal/db/sqlalchemy/migrate_repo/versions/006_move_prov_mac_address.py:
docstring of nova.virt.baremetal.db.sqlalchemy.migrate_repo.versions.
006_move_prov_mac_address.and_:35: WARNING: more than one target found for cross-reference
u'or_': nova.db.sqlalchemy.api.or_, nova.openstack.common.db.sqlalchemy.utils.or_

nova/virt/baremetal/db/sqlalchemy/migrate_repo/versions/006_move_prov_mac_address.py:
docstring of nova.virt.baremetal.db.sqlalchemy.migrate_repo.versions.
006_move_prov_mac_address.select:12: WARNING: undefined label: coretutorial_selecting
(if the link has no caption the label must precede a section header)

To fix this, the imports causing breaks were removed and changed to more specific/better
imports

Change-Id: I83cf38c03cef8bb3186160a660d30979cc303839
Handle NetworkAmbiguous error when booting a new instance with v3 api

Catch exception.NetworkAmbiguous error and map it to exc.HttpConflict when
using v3 api to create a new instance.

Change-Id: I18b6b9f0d8612a3757f6489dada41b5cd8eca758
Closes-Bug: 1350800
Merge "Baremetal driver: remove unused states"
Merge "Handle NetworkAmbiguous error when booting a new instance with v3 api"
Merge "Live migration is broken for NFS shared storage"
Merge "Update scheduler after instance delete"
Merge "docs - Fix doc build errors with SQLAlchemy 0.9"
Merge "Allow to unshelve instance booted from volume"
Merge "Fix extra metadata didn't assign into snapshot image"