diff --git a/tempest/api/data_processing/test_plugins.py b/tempest/api/data_processing/test_plugins.py
new file mode 100644
index 0000000..3b941d8
--- /dev/null
+++ b/tempest/api/data_processing/test_plugins.py
@@ -0,0 +1,58 @@
+# Copyright (c) 2013 Mirantis Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from tempest.api.data_processing import base as dp_base
+from tempest.test import attr
+
+
+class PluginsTest(dp_base.BaseDataProcessingTest):
+    def _list_all_plugin_names(self):
+        """Returns all enabled plugin names.
+
+        It ensures response status and main plugins availability.
+        """
+        resp, plugins = self.client.list_plugins()
+
+        self.assertEqual(200, resp.status)
+
+        plugins_names = list([plugin['name'] for plugin in plugins])
+        self.assertIn('vanilla', plugins_names)
+        self.assertIn('hdp', plugins_names)
+
+        return plugins_names
+
+    @attr(type='smoke')
+    def test_plugin_list(self):
+        self._list_all_plugin_names()
+
+    @attr(type='smoke')
+    def test_plugin_get(self):
+        for plugin_name in self._list_all_plugin_names():
+            resp, plugin = self.client.get_plugin(plugin_name)
+
+            self.assertEqual(200, resp.status)
+            self.assertEqual(plugin_name, plugin['name'])
+
+            for plugin_version in plugin['versions']:
+                resp, detailed_plugin = self.client.get_plugin(plugin_name,
+                                                               plugin_version)
+
+                self.assertEqual(200, resp.status)
+                self.assertEqual(plugin_name, detailed_plugin['name'])
+
+                # check that required image tags contains name and version
+                image_tags = detailed_plugin['required_image_tags']
+                self.assertIn(plugin_name, image_tags)
+                self.assertIn(plugin_version, image_tags)
diff --git a/tempest/services/data_processing/v1_1/client.py b/tempest/services/data_processing/v1_1/client.py
index db21201..e96b44b 100644
--- a/tempest/services/data_processing/v1_1/client.py
+++ b/tempest/services/data_processing/v1_1/client.py
@@ -77,3 +77,17 @@
 
         uri = "node-group-templates/%s" % tmpl_id
         return self.delete(uri)
+
+    def list_plugins(self):
+        """List all enabled plugins."""
+
+        uri = 'plugins'
+        return self._request_and_parse(self.get, uri, 'plugins')
+
+    def get_plugin(self, plugin_name, plugin_version=None):
+        """Returns the details of a single plugin."""
+
+        uri = "plugins/%s" % plugin_name
+        if plugin_version:
+            uri += '/%s' % plugin_version
+        return self._request_and_parse(self.get, uri, 'plugin')
