Browse Source

Use ceph instead of cinder in systests

Change-Id: I0200136ba0c4e18fd4ca3819f14942e891678965
Victor Ryzhenkin 2 years ago
parent
commit
6992efb05f
2 changed files with 23 additions and 11 deletions
  1. 16
    4
      murano_plugin_tests/helpers/helpers.py
  2. 7
    7
      murano_plugin_tests/murano_plugin/api.py

+ 16
- 4
murano_plugin_tests/helpers/helpers.py View File

@@ -108,6 +108,16 @@ class PluginHelper(object):
108 108
                 self.fuel_web.get_public_vip(self.cluster_id))
109 109
         return self._os_conn
110 110
 
111
+    @property
112
+    def ceph_settings(self):
113
+        """Return a dict with ceph-related settings for the cluster"""
114
+        return {
115
+                'volumes_lvm': False,
116
+                'volumes_ceph': True,
117
+                'images_ceph': True,
118
+                'objects_ceph': True
119
+        }
120
+
111 121
     def prepare_plugin(self, plugin_path):
112 122
         """Upload and install plugin by path."""
113 123
         self.env.admin_actions.upload_plugin(plugin=plugin_path)
@@ -177,13 +187,13 @@ class PluginHelper(object):
177 187
                 self.nailgun_client.list_cluster_nodes(self.cluster_id)
178 188
                 if node["status"] == "ready"]
179 189
 
180
-    def create_cluster(self, name=None, settings=None, ssl=False):
190
+    def create_cluster(self, name=None, opts=None, ssl=False):
181 191
         """Create a cluster.
182 192
 
183 193
         :param name: name of the cluster.
184 194
         :type name: str
185
-        :param settings: optional dict containing the cluster's configuration.
186
-        :type settings: dict
195
+        :param opts: optional dict containing the cluster's configuration.
196
+        :type opts: dict
187 197
         :param ssl: parameter, that shows, use SSL or not.
188 198
         :type ssl: bool
189 199
         :returns: the cluster's id
@@ -191,9 +201,11 @@ class PluginHelper(object):
191 201
         """
192 202
         if not name:
193 203
             name = self.__class__.__name__
204
+        if not opts:
205
+            opts = self.ceph_settings
194 206
         self._cluster_id = self.env.fuel_web.create_cluster(
195 207
             name=name,
196
-            settings=settings,
208
+            settings=opts,
197 209
             mode='ha_compact',
198 210
             configure_ssl=ssl)
199 211
         return self._cluster_id

+ 7
- 7
murano_plugin_tests/murano_plugin/api.py View File

@@ -46,7 +46,7 @@ class MuranoPluginApi(object):
46 46
             'slave-01': ['controller'],
47 47
             'slave-02': ['controller'],
48 48
             'slave-03': ['controller'],
49
-            'slave-04': ['compute', 'cinder']
49
+            'slave-04': ['compute', 'ceph-osd']
50 50
         }
51 51
 
52 52
     @property
@@ -54,7 +54,7 @@ class MuranoPluginApi(object):
54 54
         """Return a dict mapping nodes to Fuel roles non-HA."""
55 55
         return {
56 56
             'slave-01': ['controller'],
57
-            'slave-02': ['compute', 'cinder']
57
+            'slave-02': ['compute', 'ceph-osd']
58 58
         }
59 59
 
60 60
     @property
@@ -62,7 +62,7 @@ class MuranoPluginApi(object):
62 62
         """Return a dict mapping nodes to Fuel roles without HA."""
63 63
         return {
64 64
             'slave-01': ['controller'],
65
-            'slave-02': ['compute', 'cinder'],
65
+            'slave-02': ['compute', 'ceph-osd'],
66 66
             'slave-03': self.settings.role_name,
67 67
         }
68 68
 
@@ -73,7 +73,7 @@ class MuranoPluginApi(object):
73 73
             'slave-01': ['controller'],
74 74
             'slave-02': ['controller'],
75 75
             'slave-03': ['controller'],
76
-            'slave-04': ['compute', 'cinder'],
76
+            'slave-04': ['compute', 'ceph-osd'],
77 77
             'slave-05': ['compute'] + self.settings.role_name,
78 78
         }
79 79
 
@@ -84,9 +84,9 @@ class MuranoPluginApi(object):
84 84
             'slave-01': ['controller'],
85 85
             'slave-02': ['controller'],
86 86
             'slave-03': ['controller'],
87
-            'slave-04': ['compute', 'cinder'],
88
-            'slave-05': ['compute', 'cinder'],
89
-            'slave-06': ['compute', 'cinder'],
87
+            'slave-04': ['compute', 'ceph-osd'],
88
+            'slave-05': ['compute', 'ceph-osd'],
89
+            'slave-06': ['compute', 'ceph-osd'],
90 90
             'slave-07': self.settings.role_name,
91 91
             'slave-08': self.settings.role_name,
92 92
             'slave-09': self.settings.role_name,

Loading…
Cancel
Save