Use ceph instead of cinder in systests

Change-Id: I0200136ba0c4e18fd4ca3819f14942e891678965
This commit is contained in:
Victor Ryzhenkin 2016-12-05 20:37:18 +04:00
parent 619658b002
commit 6992efb05f
2 changed files with 23 additions and 11 deletions

View File

@ -108,6 +108,16 @@ class PluginHelper(object):
self.fuel_web.get_public_vip(self.cluster_id)) self.fuel_web.get_public_vip(self.cluster_id))
return self._os_conn return self._os_conn
@property
def ceph_settings(self):
"""Return a dict with ceph-related settings for the cluster"""
return {
'volumes_lvm': False,
'volumes_ceph': True,
'images_ceph': True,
'objects_ceph': True
}
def prepare_plugin(self, plugin_path): def prepare_plugin(self, plugin_path):
"""Upload and install plugin by path.""" """Upload and install plugin by path."""
self.env.admin_actions.upload_plugin(plugin=plugin_path) self.env.admin_actions.upload_plugin(plugin=plugin_path)
@ -177,13 +187,13 @@ class PluginHelper(object):
self.nailgun_client.list_cluster_nodes(self.cluster_id) self.nailgun_client.list_cluster_nodes(self.cluster_id)
if node["status"] == "ready"] if node["status"] == "ready"]
def create_cluster(self, name=None, settings=None, ssl=False): def create_cluster(self, name=None, opts=None, ssl=False):
"""Create a cluster. """Create a cluster.
:param name: name of the cluster. :param name: name of the cluster.
:type name: str :type name: str
:param settings: optional dict containing the cluster's configuration. :param opts: optional dict containing the cluster's configuration.
:type settings: dict :type opts: dict
:param ssl: parameter, that shows, use SSL or not. :param ssl: parameter, that shows, use SSL or not.
:type ssl: bool :type ssl: bool
:returns: the cluster's id :returns: the cluster's id
@ -191,9 +201,11 @@ class PluginHelper(object):
""" """
if not name: if not name:
name = self.__class__.__name__ name = self.__class__.__name__
if not opts:
opts = self.ceph_settings
self._cluster_id = self.env.fuel_web.create_cluster( self._cluster_id = self.env.fuel_web.create_cluster(
name=name, name=name,
settings=settings, settings=opts,
mode='ha_compact', mode='ha_compact',
configure_ssl=ssl) configure_ssl=ssl)
return self._cluster_id return self._cluster_id

View File

@ -46,7 +46,7 @@ class MuranoPluginApi(object):
'slave-01': ['controller'], 'slave-01': ['controller'],
'slave-02': ['controller'], 'slave-02': ['controller'],
'slave-03': ['controller'], 'slave-03': ['controller'],
'slave-04': ['compute', 'cinder'] 'slave-04': ['compute', 'ceph-osd']
} }
@property @property
@ -54,7 +54,7 @@ class MuranoPluginApi(object):
"""Return a dict mapping nodes to Fuel roles non-HA.""" """Return a dict mapping nodes to Fuel roles non-HA."""
return { return {
'slave-01': ['controller'], 'slave-01': ['controller'],
'slave-02': ['compute', 'cinder'] 'slave-02': ['compute', 'ceph-osd']
} }
@property @property
@ -62,7 +62,7 @@ class MuranoPluginApi(object):
"""Return a dict mapping nodes to Fuel roles without HA.""" """Return a dict mapping nodes to Fuel roles without HA."""
return { return {
'slave-01': ['controller'], 'slave-01': ['controller'],
'slave-02': ['compute', 'cinder'], 'slave-02': ['compute', 'ceph-osd'],
'slave-03': self.settings.role_name, 'slave-03': self.settings.role_name,
} }
@ -73,7 +73,7 @@ class MuranoPluginApi(object):
'slave-01': ['controller'], 'slave-01': ['controller'],
'slave-02': ['controller'], 'slave-02': ['controller'],
'slave-03': ['controller'], 'slave-03': ['controller'],
'slave-04': ['compute', 'cinder'], 'slave-04': ['compute', 'ceph-osd'],
'slave-05': ['compute'] + self.settings.role_name, 'slave-05': ['compute'] + self.settings.role_name,
} }
@ -84,9 +84,9 @@ class MuranoPluginApi(object):
'slave-01': ['controller'], 'slave-01': ['controller'],
'slave-02': ['controller'], 'slave-02': ['controller'],
'slave-03': ['controller'], 'slave-03': ['controller'],
'slave-04': ['compute', 'cinder'], 'slave-04': ['compute', 'ceph-osd'],
'slave-05': ['compute', 'cinder'], 'slave-05': ['compute', 'ceph-osd'],
'slave-06': ['compute', 'cinder'], 'slave-06': ['compute', 'ceph-osd'],
'slave-07': self.settings.role_name, 'slave-07': self.settings.role_name,
'slave-08': self.settings.role_name, 'slave-08': self.settings.role_name,
'slave-09': self.settings.role_name, 'slave-09': self.settings.role_name,