Make validation_resources a stable interface

Move the module to tempest.lib, add unit tests, release notes and
update imports.

Change-Id: I76b3b8e9a83bd83a6b5742b6d2ceb84642f653ad
diff --git a/doc/source/library.rst b/doc/source/library.rst
index a461a0f..074d642 100644
--- a/doc/source/library.rst
+++ b/doc/source/library.rst
@@ -69,3 +69,4 @@
    library/auth
    library/clients
    library/credential_providers
+   library/validation_resources
diff --git a/doc/source/library/validation_resources.rst b/doc/source/library/validation_resources.rst
new file mode 100644
index 0000000..9b36476
--- /dev/null
+++ b/doc/source/library/validation_resources.rst
@@ -0,0 +1,11 @@
+.. _validation_resources:
+
+Validation Resources
+====================
+
+-------------------------------
+The validation_resources module
+-------------------------------
+
+.. automodule:: tempest.lib.common.validation_resources
+   :members:
diff --git a/releasenotes/notes/add-validation-resources-to-lib-dc2600c4324ca4d7.yaml b/releasenotes/notes/add-validation-resources-to-lib-dc2600c4324ca4d7.yaml
new file mode 100644
index 0000000..7814f4e
--- /dev/null
+++ b/releasenotes/notes/add-validation-resources-to-lib-dc2600c4324ca4d7.yaml
@@ -0,0 +1,7 @@
+---
+features:
+  - |
+    Add the `validation_resources` module to tempest.lib. The module provides
+    a set of helpers that can be used to provision and cleanup all the
+    resources required to perform ping / ssh tests against a virtual machine:
+    a keypair, a security group with targeted rules and a floating IP.
diff --git a/tempest/common/validation_resources.py b/tempest/lib/common/validation_resources.py
similarity index 100%
rename from tempest/common/validation_resources.py
rename to tempest/lib/common/validation_resources.py
diff --git a/tempest/test.py b/tempest/test.py
index cfa01e6..3967515 100644
--- a/tempest/test.py
+++ b/tempest/test.py
@@ -26,10 +26,10 @@
 from tempest import clients
 from tempest.common import credentials_factory as credentials
 from tempest.common import utils
-import tempest.common.validation_resources as vr
 from tempest import config
 from tempest.lib.common import cred_client
 from tempest.lib.common import fixed_network
+from tempest.lib.common import validation_resources as vr
 from tempest.lib import decorators
 from tempest.lib import exceptions as lib_exc
 
diff --git a/tempest/tests/common/test_validation_resources.py b/tempest/tests/lib/common/test_validation_resources.py
similarity index 99%
rename from tempest/tests/common/test_validation_resources.py
rename to tempest/tests/lib/common/test_validation_resources.py
index f7edfc0..d5139f4 100644
--- a/tempest/tests/common/test_validation_resources.py
+++ b/tempest/tests/lib/common/test_validation_resources.py
@@ -15,7 +15,7 @@
 import mock
 import testtools
 
-from tempest.common import validation_resources as vr
+from tempest.lib.common import validation_resources as vr
 from tempest.lib import exceptions as lib_exc
 from tempest.lib.services import clients
 from tempest.tests import base
diff --git a/tempest/tests/test_test.py b/tempest/tests/test_test.py
index de3dc06..72e3ac7 100644
--- a/tempest/tests/test_test.py
+++ b/tempest/tests/test_test.py
@@ -20,8 +20,8 @@
 import testtools
 
 from tempest import clients
-from tempest.common import validation_resources as vr
 from tempest import config
+from tempest.lib.common import validation_resources as vr
 from tempest.lib import exceptions as lib_exc
 from tempest import test
 from tempest.tests import base
@@ -48,7 +48,7 @@
 
 class TestValidationResources(base.TestCase):
 
-    validation_resources_module = 'tempest.common.validation_resources'
+    validation_resources_module = 'tempest.lib.common.validation_resources'
 
     def setUp(self):
         super(TestValidationResources, self).setUp()