Ensure compute features enabled in test_images

There are two tests in test_images that should be checking that
the compute features used during the tests are supported.

test_create_image_from_paused_server() needs to ensure that pause is
enabled. test_create_image_from_suspended_server() needs to ensure
that suspend is enabled.

Closes-Bug: #1675158

Change-Id: Ic752ae9849c0585faf95cfa752469f684bb0b35f
diff --git a/tempest/api/compute/images/test_images.py b/tempest/api/compute/images/test_images.py
index ceac56b..29bd6da 100644
--- a/tempest/api/compute/images/test_images.py
+++ b/tempest/api/compute/images/test_images.py
@@ -17,6 +17,7 @@
 from tempest import config
 from tempest.lib.common.utils import data_utils
 from tempest.lib import decorators
+import testtools
 
 CONF = config.CONF
 
@@ -66,6 +67,8 @@
         self.assertEqual(snapshot_name, image['name'])
 
     @decorators.idempotent_id('71bcb732-0261-11e7-9086-fa163e4fa634')
+    @testtools.skipUnless(CONF.compute_feature_enabled.pause,
+                          'Pause is not available.')
     def test_create_image_from_paused_server(self):
         server = self.create_test_server(wait_until='ACTIVE')
         self.servers_client.pause_server(server['id'])
@@ -82,6 +85,8 @@
         self.assertEqual(snapshot_name, image['name'])
 
     @decorators.idempotent_id('8ca07fec-0262-11e7-907e-fa163e4fa634')
+    @testtools.skipUnless(CONF.compute_feature_enabled.suspend,
+                          'Suspend is not available.')
     def test_create_image_from_suspended_server(self):
         server = self.create_test_server(wait_until='ACTIVE')
         self.servers_client.suspend_server(server['id'])