Convert v3 ExtendedAvailabilityZone api to v2.1

This patch changes v3 ExtendedAvailabilityZone API to v2.1
and makes v2 unit tests share between v2 and v2.1.

The differences between v2 and v3 are described on the wiki page
https://wiki.openstack.org/wiki/NovaAPIv2tov3.

Partially implements blueprint v2-on-v3-api

Change-Id: I49baff38b7a9dabd40550267c2119fe84137594f
compute: add get_serial_console in manager.py

Adds method get_serial_console and updates
validate_console_port to refer the new method in
virt/driver get_serial_console

Co-Authored-By: Ian Wells <iawells@cisco.com>
Co-Authored-By: Sushma Korati <sushma_korati@persistent.co.in>
Co-Authored-By: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@redhat.com>

Partial-Implements: blueprint serial-ports
Change-Id: Id1153e2d370463872eedd3988503457435b228f5
compute: add get_serial_console rpc and cells api calls

Co-Authored-By: Ian Wells <iawells@cisco.com>
Co-Authored-By: Sushma Korati <sushma_korati@persistent.co.in>
Co-Authored-By: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@redhat.com>

Partial-Implements: blueprint serial-ports
Change-Id: If79255be351e76fb4c4f671c929b71ce822a9db2
api: add serial console API calls v2

Adds a new REST APIv2 to call service serial console

Co-Authored-By: Ian Wells <iawells@cisco.com>
Co-Authored-By: Sushma Korati <sushma_korati@persistent.co.in>
Co-Authored-By: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@redhat.com>

Patial-Implements: blueprint serial-ports
Change-Id: I35d94c1924caa9cbc0fcdd9c637d28e95ff31ab2
Move to oslo.db

Replace common oslo code nova.openstack.common.db by usage
of oslo.db library and remove common code.

Replaced catching of raw sqlalchemy exceptions by catches
of oslo.db exceptions(such as DBError, DBDuplicateEntry, etc).

Co-Authored-By: Eugeniya Kudryashova  <ekudryashova@mirantis.com>

Closes-Bug: #1364986
Closes-Bug: #1353131
Closes-Bug: #1283987
Closes-Bug: #1274523
Change-Id: I0649539e071b2318ec85ed5d70259c949408e64b
Import Ironic Driver & supporting files - part 2

Import the Ironic virt driver and supporting files (patcher), as
well as relevant unit tests, as of commit
da967d77894be6f23d81fb5cc948f9d13898ba84

This is the dicing up of review/103167 into smaller chunks
ready for review.

Co-authored-by: Adam Gandelman <adamg@ubuntu.com>
Co-authored-by: Andrey Kurilin <akurilin@mirantis.com>
Co-authored-by: ChangBo Guo(gcb) <eric.guo@easystack.cn>
Co-authored-by: Chris Behrens <cbehrens@codestud.com>
Co-authored-by: Chris Krelle <nobodycam@gmail.com>
Co-authored-by: David Shrewsbury <shrewsbury.dave@gmail.com>
Co-authored-by: Devananda van der Veen <devananda.vdv@gmail.com>
Co-authored-by: Dmitry Tantsur <dtantsur@redhat.com>
Co-authored-by: Jim Rollenhagen <jim@jimrollenhagen.com>
Co-authored-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Co-authored-by: Matthew Gilliard <matthew.gilliard@hp.com>
Co-authored-by: Mikhail Durnosvistov <mdurnosvistov@mirantis.com>
Co-authored-by: Pablo Fernando Cargnelutti <pablo.fernando.cargnelutti@intel.com>
Co-authored-by: Robert Collins <rbtcollins@hp.com>
Co-authored-by: ryo.kurahashi <kurahashi-rxa@necst.nec.co.jp>

Change-Id: I50fdaa333959c5bad124c3791f48948beed1d439
Import Ironic Driver & supporting files - part 3

Import the Ironic virt driver and supporting files (driver part 1 -
infrastructure, list functions, power functions), as
well as relevant unit tests, as of commit
da967d77894be6f23d81fb5cc948f9d13898ba84

This is the dicing up of review/103167 into smaller chunks
ready for review.

Also added in the new power_off function signature as per
https://review.openstack.org/#/c/116093

Change-Id: I7cb9066564f939ec5d873d86915ad17d03983dc5
Co-authored-by: Adam Gandelman <adamg@ubuntu.com>
Co-authored-by: Andrey Kurilin <akurilin@mirantis.com>
Co-authored-by: ChangBo Guo(gcb) <eric.guo@easystack.cn>
Co-authored-by: Chris Behrens <cbehrens@codestud.com>
Co-authored-by: Chris Krelle <nobodycam@gmail.com>
Co-authored-by: David Shrewsbury <shrewsbury.dave@gmail.com>
Co-authored-by: Devananda van der Veen <devananda.vdv@gmail.com>
Co-authored-by: Dmitry Tantsur <dtantsur@redhat.com>
Co-authored-by: Jim Rollenhagen <jim@jimrollenhagen.com>
Co-authored-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Co-authored-by: Matthew Gilliard <matthew.gilliard@hp.com>
Co-authored-by: Mikhail Durnosvistov <mdurnosvistov@mirantis.com>
Co-authored-by: Pablo Fernando Cargnelutti <pablo.fernando.cargnelutti@intel.com>
Co-authored-by: Robert Collins <rbtcollins@hp.com>
Co-authored-by: ryo.kurahashi <kurahashi-rxa@necst.nec.co.jp>
Import Ironic Driver & supporting files - part 4

Import the Ironic virt driver and supporting files (driver part 2 -
validation, spawn, destroy, further getters), as well as relevant
unit tests, as of commit da967d77894be6f23d81fb5cc948f9d13898ba84

This is the dicing up of review/103167 into smaller chunks
ready for review.

Incorporating the bug fix https://review.openstack.org/#/c/118189

Change-Id: If1d966c937c56a8dbf27588b94462c0a71759cca
Co-authored-by: Adam Gandelman <adamg@ubuntu.com>
Co-authored-by: Andrey Kurilin <akurilin@mirantis.com>
Co-authored-by: ChangBo Guo(gcb) <eric.guo@easystack.cn>
Co-authored-by: Chris Behrens <cbehrens@codestud.com>
Co-authored-by: Chris Krelle <nobodycam@gmail.com>
Co-authored-by: David Shrewsbury <shrewsbury.dave@gmail.com>
Co-authored-by: Devananda van der Veen <devananda.vdv@gmail.com>
Co-authored-by: Dmitry Tantsur <dtantsur@redhat.com>
Co-authored-by: Jim Rollenhagen <jim@jimrollenhagen.com>
Co-authored-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Co-authored-by: Matthew Gilliard <matthew.gilliard@hp.com>
Co-authored-by: Mikhail Durnosvistov <mdurnosvistov@mirantis.com>
Co-authored-by: Pablo Fernando Cargnelutti <pablo.fernando.cargnelutti@intel.com>
Co-authored-by: Robert Collins <rbtcollins@hp.com>
Co-authored-by: ryo.kurahashi <kurahashi-rxa@necst.nec.co.jp>
Merge "Move to oslo.db"
Merge "compute: add get_serial_console in manager.py"
Merge "compute: add get_serial_console rpc and cells api calls"
Merge "api: add serial console API calls v2"
Merge "Convert v3 ExtendedAvailabilityZone api to v2.1"
Merge "Import Ironic Driver & supporting files - part 2"
Merge "Import Ironic Driver & supporting files - part 3"
Merge "Import Ironic Driver & supporting files - part 4"