xenapi: speedup test_wait_for_instance_to_start

Speed up the above test by mocking out greenthread.sleep

Change-Id: Ie5637842bade28d7ed01cbfe39ed2a46edc6e919
xenapi: Speedup vm_util and vmops tests

* Uses NODBTestCase in more places

* Also, adds VMUtilsTestBase so that all new test cases in test_vm_utils will,
by default, not use the database.

Speed up observed from running:

nosetests nova/tests/virt/xenapi/test_vm_utils.py
          nova/tests/virt/xenapi/test_vmops.py

BEFORE: Ran 113 tests in 7.674s
AFTER: Ran 113 tests in 1.873s

Change-Id: Id05ecac90201fba27cbae7480d3119cacd92ec24
Fix the image name of a shelved server

The shelve feature powers a server off, and creates a snapshot of the
server. The snapshot image name is "instance-XXXXXXXXX-shelved" and it
doesn't contain a server name like the following:

  $ nova list
  +----+------+--------+------------+-------------+------------------+
  | ID | Name | Status | Task State | Power State | Networks         |
  +----+------+--------+------------+-------------+------------------+
  | .. | vm01 | ACTIVE | None       | Running     | private=10.0.0.5 |
  +----+------+--------+------------+-------------+------------------+
  $ nova shelve vm01
  $ nova image-list
  +----+---------------------------------+--------+--------+
  | ID | Name                            | Status | Server |
  +----+---------------------------------+--------+--------+
  | .. | instance-00000004-shelved       | ACTIVE | ..     |
  +----+---------------------------------+--------+--------+
  $

"instance-XXXXXXXXX" is OS-EXT-SRV-ATTR:instance_name, and a non-admin
cannot see it.

This patch changes the name to "<server name>-shelved", so that a non-
admin user can know the server name of a shelved image:

  $ nova image-list
  +----+--------------------+--------+--------+
  | ID | Name               | Status | Server |
  +----+--------------------+--------+--------+
  | .. | vm01-shelved       | ACTIVE | ..     |
  +----+--------------------+--------+--------+
  $

Closes-Bug: 1232991

Change-Id: Idc73658e29cb77dfcc8b046535a36affc1831605
Merge "Fix the image name of a shelved server"
Updates OpenStack Style Commandments link

The current link in the HACKING file is broken. This references the
correct location for contributors to view.

Change-Id: I3cd4841035400d09a3e3e3369bb3a2a8c4bdee30
Merge "xenapi: speedup test_wait_for_instance_to_start"
Merge "xenapi: Speedup vm_util and vmops tests"
Merge "Updates OpenStack Style Commandments link"
xenapi: post install scriptlet to rpm

A freshly installed XenServer requires some modifications in order to be
able to run OpenStack. Nova contains an rpm specification to create a
package with the dom0 plugins, however installing the rpm is not enough.
Some more actions need to be taken:
 - create /images, link to a directory within the local SR
 - setup an ssh keypair, and authenticate it with the host
This change adds a post script to the nova plugins rpm spec file, so
by installing the rpm on a XenServer, it is ready to run OpenStack, no
further manual actions needed.

Change-Id: Id57e3a3ab2782550468c6aa4c01059ceb7cc81ab