Merge "Cleaned up the requirements of Ironic Tempest plugin"
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index c0c5259..fa05b86 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -1,14 +1,14 @@
If you would like to contribute to the development of OpenStack, you must
follow the steps in this page:
- http://docs.openstack.org/infra/manual/developers.html
+ https://docs.openstack.org/infra/manual/developers.html
If you already have a good understanding of how the system works and your
OpenStack accounts are set up, you can skip to the development workflow
section of this documentation to learn how changes to OpenStack should be
submitted for review via the Gerrit tool:
- http://docs.openstack.org/infra/manual/developers.html#development-workflow
+ https://docs.openstack.org/infra/manual/developers.html#development-workflow
Pull requests submitted through GitHub will be ignored.
diff --git a/README.rst b/README.rst
index f6db1b1..80be9d5 100644
--- a/README.rst
+++ b/README.rst
@@ -1,19 +1,15 @@
-===============================
-ironic-tempest-plugin
-===============================
+==============================================
+Tempest plugin for ironic and ironic-inspector
+==============================================
-Tempest plugin for ironic
-
-Please fill here a long description which must be at least 3 lines wrapped on
-80 cols, so that distribution package maintainers can use it in their packages.
-Note that this is a hard requirement.
+This repository contains a Tempest_ plugin for OpenStack `Bare Metal`_ and
+`Bare Metal Introspection`_ projects.
* Free software: Apache license
-* Documentation: http://docs.openstack.org/developer/ironic-tempest-plugin
-* Source: http://git.openstack.org/cgit/openstack/ironic-tempest-plugin
-* Bugs: http://bugs.launchpad.net/ironic
+* Documentation: https://docs.openstack.org/ironic-tempest-plugin
+* Source: https://git.openstack.org/cgit/openstack/ironic-tempest-plugin
+* Bugs: https://bugs.launchpad.net/ironic
-Features
---------
-
-* TODO
+.. _Tempest: https://docs.openstack.org/tempest/latest/
+.. _Bare Metal: https://docs.openstack.org/ironic/latest/
+.. _Bare Metal Introspection: https://docs.openstack.org/ironic-inspector/latest/
diff --git a/doc/source/index.rst b/doc/source/index.rst
index f13db7a..b036a93 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -1,17 +1,10 @@
-.. ironic-tempest-plugin documentation master file, created by
- sphinx-quickstart on Tue Jul 9 22:26:36 2013.
- You can adapt this file completely to your liking, but it should at least
- contain the root `toctree` directive.
-
-Welcome to ironic-tempest-plugin's documentation!
-========================================================
+.. include:: ../../README.rst
Contents:
.. toctree::
:maxdepth: 2
- readme
installation
usage
contributing
diff --git a/doc/source/readme.rst b/doc/source/readme.rst
deleted file mode 100644
index a6210d3..0000000
--- a/doc/source/readme.rst
+++ /dev/null
@@ -1 +0,0 @@
-.. include:: ../../README.rst
diff --git a/doc/source/usage.rst b/doc/source/usage.rst
index b608111..8ab88eb 100644
--- a/doc/source/usage.rst
+++ b/doc/source/usage.rst
@@ -1,7 +1,41 @@
-========
+=====
Usage
-========
+=====
-To use ironic-tempest-plugin in a project::
+Configuring
+-----------
- import ironic_tempest_plugin
+Update your `Tempest configuration`_ to enable support for ironic:
+
+.. code-block:: ini
+
+ [service_enabled]
+ ironic = True
+
+If introspection tests are needed, also enable support for ironic-inspector:
+
+.. code-block:: ini
+
+ [service_enabled]
+ ironic_inspector = True
+
+.. TODO(dtantsur): I'm pretty sure more configuration is required, fill it in
+
+.. _Tempest configuration: https://docs.openstack.org/tempest/latest/configuration.html
+
+Running
+-------
+
+Run tests as described in the `Tempest documentation`_. The following patterns
+can be used with ``--regex`` option to only run bare metal tests:
+
+``ironic``
+ all bare metal tests
+``ironic_standalone``
+ standalone bare metal tests that do not use the Compute service
+``InspectorBasicTest``
+ basic introspection tests
+``InspectorDiscoveryTest``
+ introspection auto-discovery tests
+
+.. _Tempest documentation: https://docs.openstack.org/tempest/latest/run.html
diff --git a/ironic_tempest_plugin/config.py b/ironic_tempest_plugin/config.py
index 96a7f74..f9fefc4 100644
--- a/ironic_tempest_plugin/config.py
+++ b/ironic_tempest_plugin/config.py
@@ -113,6 +113,9 @@
cfg.ListOpt('enabled_hardware_types',
default=['ipmi'],
help="List of Ironic enabled hardware types."),
+ cfg.ListOpt('enabled_deploy_interfaces',
+ default=['iscsi', 'direct'],
+ help="List of Ironic enabled deploy interfaces."),
cfg.IntOpt('adjusted_root_disk_size_gb',
min=0,
help="Ironic adjusted disk size to use in the standalone tests "
diff --git a/ironic_tempest_plugin/services/baremetal/v1/json/baremetal_client.py b/ironic_tempest_plugin/services/baremetal/v1/json/baremetal_client.py
index 9712dba..c03b49b 100644
--- a/ironic_tempest_plugin/services/baremetal/v1/json/baremetal_client.py
+++ b/ironic_tempest_plugin/services/baremetal/v1/json/baremetal_client.py
@@ -387,6 +387,7 @@
'properties/local_gb',
'properties/memory_mb',
'driver',
+ 'deploy_interface',
'instance_uuid',
'resource_class')
if not patch:
diff --git a/ironic_tempest_plugin/tests/scenario/baremetal_manager.py b/ironic_tempest_plugin/tests/scenario/baremetal_manager.py
index bd6f1bd..b4a8169 100644
--- a/ironic_tempest_plugin/tests/scenario/baremetal_manager.py
+++ b/ironic_tempest_plugin/tests/scenario/baremetal_manager.py
@@ -140,9 +140,9 @@
@classmethod
@retry_on_conflict
- def update_node_driver(cls, node_id, driver):
+ def update_node_driver(cls, node_id, driver, **interfaces):
_, body = cls.baremetal_client.update_node(
- node_id, driver=driver)
+ node_id, driver=driver, **interfaces)
return body
@classmethod
diff --git a/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py b/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py
index 1d19c47..0137db8 100644
--- a/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py
+++ b/ironic_tempest_plugin/tests/scenario/baremetal_standalone_manager.py
@@ -206,7 +206,7 @@
return nodes[0]
@classmethod
- def boot_node(cls, driver, image_ref, image_checksum=None):
+ def boot_node(cls, driver, image_ref, image_checksum=None, **interfaces):
"""Boot ironic node.
The following actions are executed:
@@ -222,10 +222,11 @@
:param image_ref: Reference to user image to boot node with.
:param image_checksum: md5sum of image specified in image_ref.
Needed only when direct HTTP link is provided.
+ :param interfaces: driver interfaces to set on the node
:returns: Ironic node.
"""
node = cls.get_and_reserve_node()
- cls.update_node_driver(node['uuid'], driver)
+ cls.update_node_driver(node['uuid'], driver, **interfaces)
network, subnet, router = cls.create_networks()
n_port = cls.create_neutron_port(network_id=network['id'])
cls.vif_attach(node_id=node['uuid'], vif_id=n_port['id'])
@@ -280,6 +281,9 @@
# The node driver to use in the test
driver = None
+ # The deploy interface to use by the HW type
+ deploy_interface = None
+
# User image ref to boot node with.
image_ref = None
@@ -307,6 +311,13 @@
'driver': cls.driver,
'enabled_drivers': CONF.baremetal.enabled_drivers,
'enabled_hw_types': CONF.baremetal.enabled_hardware_types})
+ if (cls.deploy_interface and cls.deploy_interface not in
+ CONF.baremetal.enabled_deploy_interfaces):
+ raise cls.skipException(
+ "Deploy interface %(iface)s required by test is not "
+ "in the list of enabled deploy interfaces %(enabled)s" % {
+ 'iface': cls.deploy_interface,
+ 'enabled': CONF.baremetal.enabled_deploy_interfaces})
if not cls.wholedisk_image and CONF.baremetal.use_provision_network:
raise cls.skipException(
'Partitioned images are not supported with multitenancy.')
@@ -322,8 +333,10 @@
image_checksum = None
if not uuidutils.is_uuid_like(cls.image_ref):
image_checksum = cls.image_checksum
- cls.node = cls.boot_node(cls.driver, cls.image_ref,
- image_checksum=image_checksum)
+ boot_kwargs = {'image_checksum': image_checksum}
+ if cls.deploy_interface:
+ boot_kwargs['deploy_interface'] = cls.deploy_interface
+ cls.node = cls.boot_node(cls.driver, cls.image_ref, **boot_kwargs)
cls.node_ip = cls.add_floatingip_to_node(cls.node['uuid'])
@classmethod
diff --git a/ironic_tempest_plugin/tests/scenario/ironic_standalone/test_basic_ops.py b/ironic_tempest_plugin/tests/scenario/ironic_standalone/test_basic_ops.py
index f6e02e1..82438fa 100644
--- a/ironic_tempest_plugin/tests/scenario/ironic_standalone/test_basic_ops.py
+++ b/ironic_tempest_plugin/tests/scenario/ironic_standalone/test_basic_ops.py
@@ -121,7 +121,9 @@
class BaremetalIpmiWholedisk(bsm.BaremetalStandaloneScenarioTest):
+ api_microversion = '1.31' # to set the deploy_interface
driver = 'ipmi'
+ deploy_interface = 'direct'
image_ref = CONF.baremetal.whole_disk_image_ref
wholedisk_image = True
@@ -134,7 +136,9 @@
class BaremetalIpmiPartitioned(bsm.BaremetalStandaloneScenarioTest):
+ api_microversion = '1.31' # to set the deploy_interface
driver = 'ipmi'
+ deploy_interface = 'iscsi'
image_ref = CONF.baremetal.partition_image_ref
wholedisk_image = False
diff --git a/setup.cfg b/setup.cfg
index bfcddfc..64770b6 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,11 +1,11 @@
[metadata]
name = ironic-tempest-plugin
-summary = Tempest plugin for ironic
+summary = Tempest plugin for ironic and ironic-inspector
description-file =
README.rst
author = OpenStack
author-email = openstack-dev@lists.openstack.org
-home-page = http://www.openstack.org/
+home-page = https://docs.openstack.org/ironic-tempest-plugin
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
@@ -16,8 +16,7 @@
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
- Programming Language :: Python :: 3.3
- Programming Language :: Python :: 3.4
+ Programming Language :: Python :: 3.5
[files]
packages =