Renaming Savanna to Sahara
* File fuel_health/savanna.py was renamed to fuel_health/sahara.py * File fuel_health/tests/platform_tests/test_platform_savanna.py was renamed to fuel_health/tests/platform_tests/test_platform_sahara.py * File fuel_health/tests/sanity/test_sanity_savanna.py was renamed to fuel_health/tests/sanity/test_sanity_sahara.py * Variables, methods, classes, messages were changed too Change-Id: I26b797206e4fa61fb41dfbcf2903c7dc836cfcb8
This commit is contained in:
parent
c1b60d4bce
commit
bedc32733a
|
@ -76,16 +76,16 @@ def cleanup(cluster_deployment_info):
|
|||
|
||||
if 'sahara' in cluster_deployment_info:
|
||||
try:
|
||||
savanna_client = manager._get_savanna_client()
|
||||
if savanna_client is not None:
|
||||
_delete_it(client=savanna_client.clusters,
|
||||
sahara_client = manager._get_sahara_client()
|
||||
if sahara_client is not None:
|
||||
_delete_it(client=sahara_client.clusters,
|
||||
log_message='Start sahara cluster deletion',
|
||||
name='ostf-test-', delete_type='id')
|
||||
_delete_it(client=savanna_client.cluster_templates,
|
||||
_delete_it(client=sahara_client.cluster_templates,
|
||||
log_message='Start sahara cluster'
|
||||
' template deletion',
|
||||
delete_type='id')
|
||||
_delete_it(client=savanna_client.node_group_templates,
|
||||
_delete_it(client=sahara_client.node_group_templates,
|
||||
log_message='Start sahara node'
|
||||
' group template deletion',
|
||||
delete_type='id')
|
||||
|
|
|
@ -296,35 +296,35 @@ def register_object_storage_opts(conf):
|
|||
for opt in ObjectStoreConfig:
|
||||
conf.register_opt(opt, group='object-storage')
|
||||
|
||||
savanna = cfg.OptGroup(name='savanna',
|
||||
title='Savanna Service Options')
|
||||
sahara = cfg.OptGroup(name='sahara',
|
||||
title='Sahara Service Options')
|
||||
|
||||
SavannaConfig = [
|
||||
SaharaConfig = [
|
||||
cfg.StrOpt('api_url',
|
||||
default='10.20.0.131',
|
||||
help="IP of savanna service."),
|
||||
help="IP of sahara service."),
|
||||
cfg.StrOpt('port',
|
||||
default=8386,
|
||||
help="Port of savanna service."),
|
||||
help="Port of sahara service."),
|
||||
cfg.StrOpt('api_version',
|
||||
default='1.1',
|
||||
help="API version of savanna service."),
|
||||
help="API version of sahara service."),
|
||||
cfg.StrOpt('plugin',
|
||||
default='vanilla',
|
||||
help="Plugin name of savanna service."),
|
||||
help="Plugin name of sahara service."),
|
||||
cfg.StrOpt('pligin_version',
|
||||
default='1.1.2',
|
||||
help="Plugin version of savanna service."),
|
||||
help="Plugin version of sahara service."),
|
||||
cfg.StrOpt('tt_config',
|
||||
default={'Task Tracker Heap Size': 515},
|
||||
help="Task Tracker config of savanna service."),
|
||||
help="Task Tracker config of sahara service."),
|
||||
]
|
||||
|
||||
|
||||
def register_savanna_opts(conf):
|
||||
conf.register_group(savanna)
|
||||
for opt in SavannaConfig:
|
||||
conf.register_opt(opt, group='savanna')
|
||||
def register_sahara_opts(conf):
|
||||
conf.register_group(sahara)
|
||||
for opt in SaharaConfig:
|
||||
conf.register_opt(opt, group='sahara')
|
||||
|
||||
|
||||
murano_group = cfg.OptGroup(name='murano',
|
||||
|
@ -433,14 +433,14 @@ class FileConfig(object):
|
|||
register_volume_opts(cfg.CONF)
|
||||
register_murano_opts(cfg.CONF)
|
||||
register_heat_opts(cfg.CONF)
|
||||
register_savanna_opts(cfg.CONF)
|
||||
register_sahara_opts(cfg.CONF)
|
||||
self.compute = cfg.CONF.compute
|
||||
self.identity = cfg.CONF.identity
|
||||
self.network = cfg.CONF.network
|
||||
self.volume = cfg.CONF.volume
|
||||
self.murano = cfg.CONF.murano
|
||||
self.heat = cfg.CONF.heat
|
||||
self.savanna = cfg.CONF.savanna
|
||||
self.sahara = cfg.CONF.sahara
|
||||
|
||||
|
||||
class ConfigGroup(object):
|
||||
|
@ -479,7 +479,7 @@ class NailgunConfig(object):
|
|||
volume = ConfigGroup(VolumeGroup)
|
||||
object_storage = ConfigGroup(ObjectStoreConfig)
|
||||
murano = ConfigGroup(MuranoConfig)
|
||||
savanna = ConfigGroup(SavannaConfig)
|
||||
sahara = ConfigGroup(SaharaConfig)
|
||||
heat = ConfigGroup(HeatConfig)
|
||||
|
||||
def __init__(self, parse=True):
|
||||
|
@ -677,7 +677,7 @@ class NailgunConfig(object):
|
|||
endpoint, 5000, 'v2.0')
|
||||
self.murano.api_url = 'http://{0}:{1}'.format(
|
||||
endpoint_mur_sav, 8082)
|
||||
self.savanna.api_url = 'http://{0}:{1}/{2}'.format(
|
||||
self.sahara.api_url = 'http://{0}:{1}/{2}'.format(
|
||||
endpoint_mur_sav, 8386, 'v1.0')
|
||||
self.heat.endpoint = 'http://{0}:{1}/{2}'.format(
|
||||
endpoint_mur_sav, 8004, 'v1')
|
||||
|
|
|
@ -36,7 +36,7 @@ try:
|
|||
import saharaclient.client
|
||||
except:
|
||||
LOG.debug(traceback.format_exc())
|
||||
LOG.warning('Savanna client could not be imported.')
|
||||
LOG.warning('Sahara client could not be imported.')
|
||||
try:
|
||||
import ceilometerclient.v2.client
|
||||
except:
|
||||
|
@ -90,7 +90,7 @@ class OfficialClientManager(fuel_health.manager.Manager):
|
|||
self.volume_client = self._get_volume_client()
|
||||
self.heat_client = self._get_heat_client()
|
||||
self.murano_client = self._get_murano_client()
|
||||
self.savanna_client = self._get_savanna_client()
|
||||
self.sahara_client = self._get_sahara_client()
|
||||
self.ceilometer_client = self._get_ceilometer_client()
|
||||
self.client_attr_names = [
|
||||
'compute_client',
|
||||
|
@ -98,7 +98,7 @@ class OfficialClientManager(fuel_health.manager.Manager):
|
|||
'volume_client',
|
||||
'heat_client',
|
||||
'murano_client',
|
||||
'savanna_client',
|
||||
'sahara_client',
|
||||
'ceilometer_client'
|
||||
]
|
||||
|
||||
|
@ -211,11 +211,11 @@ class OfficialClientManager(fuel_health.manager.Manager):
|
|||
LOG.debug(traceback.format_exc())
|
||||
LOG.warning('Can not initialize murano client')
|
||||
|
||||
def _get_savanna_client(self, username=None, password=None):
|
||||
def _get_sahara_client(self, username=None, password=None):
|
||||
auth_url = self.config.identity.uri
|
||||
tenant_name = self.config.identity.admin_tenant_name
|
||||
savanna_url = self.config.savanna.api_url
|
||||
LOG.debug('Sahara url is %s' % savanna_url)
|
||||
sahara_url = self.config.sahara.api_url
|
||||
LOG.debug('Sahara url is %s' % sahara_url)
|
||||
if not username:
|
||||
username = self.config.identity.admin_username
|
||||
if not password:
|
||||
|
@ -223,13 +223,13 @@ class OfficialClientManager(fuel_health.manager.Manager):
|
|||
tenant_id = [
|
||||
tenant.id for tenant in self.identity_client.tenants.list()
|
||||
if tenant.name == tenant_name][0]
|
||||
return saharaclient.client.Client(self.config.savanna.api_version,
|
||||
return saharaclient.client.Client(self.config.sahara.api_version,
|
||||
username=username,
|
||||
api_key=password,
|
||||
project_name=tenant_name,
|
||||
auth_url=auth_url,
|
||||
sahara_url="{url}/{id}".format(
|
||||
url=savanna_url, id=tenant_id))
|
||||
url=sahara_url, id=tenant_id))
|
||||
|
||||
def _get_ceilometer_client(self):
|
||||
keystone = self._get_identity_client()
|
||||
|
|
|
@ -26,13 +26,13 @@ import fuel_health.nmanager as nmanager
|
|||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class SavannaTest(nmanager.NovaNetworkScenarioTest):
|
||||
class SaharaTest(nmanager.NovaNetworkScenarioTest):
|
||||
"""
|
||||
Base class for openstack sanity tests for Sahara
|
||||
"""
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(SavannaTest, cls).setUpClass()
|
||||
super(SaharaTest, cls).setUpClass()
|
||||
if cls.manager.clients_initialized:
|
||||
cls.flavors = []
|
||||
cls.node_groups = []
|
||||
|
@ -58,10 +58,10 @@ class SavannaTest(nmanager.NovaNetworkScenarioTest):
|
|||
cls.HDP_HADOOP_USER = 'hdfs'
|
||||
cls.HDP_NODE_USERNAME = 'root'
|
||||
cls.CLUSTER_CREATION_TIMEOUT = '90'
|
||||
cls.USER_KEYPAIR_ID = 'ostf_test-savanna-'
|
||||
cls.USER_KEYPAIR_ID = 'ostf_test-sahara-'
|
||||
cls.PLUGIN_NAME = 'vanilla'
|
||||
cls.CLUSTER_NAME = 'ostf-cluster-'
|
||||
cls.SAVANNA_FLAVOR = 'ostf-test-savanna-flavor-'
|
||||
cls.SAHARA_FLAVOR = 'ostf-test-sahara-flavor-'
|
||||
cls.JT_PORT = 50030
|
||||
cls.NN_PORT = 50070
|
||||
cls.TT_PORT = 50060
|
||||
|
@ -69,7 +69,7 @@ class SavannaTest(nmanager.NovaNetworkScenarioTest):
|
|||
cls.SEC_NN_PORT = 50090
|
||||
|
||||
def setUp(self):
|
||||
super(SavannaTest, self).setUp()
|
||||
super(SaharaTest, self).setUp()
|
||||
self.check_clients_state()
|
||||
self._create_sahara_flavors(self.compute_client)
|
||||
|
||||
|
@ -105,7 +105,7 @@ class SavannaTest(nmanager.NovaNetworkScenarioTest):
|
|||
def _create_sahara_flavors(cls, client):
|
||||
if not cls.flavors:
|
||||
cls.sahara_flavor = client.flavors.create(
|
||||
rand_name(cls.SAVANNA_FLAVOR), 700, 1, 20).id
|
||||
rand_name(cls.SAHARA_FLAVOR), 700, 1, 20).id
|
||||
cls.flavors.append(cls.sahara_flavor)
|
||||
|
||||
@classmethod
|
||||
|
@ -172,7 +172,7 @@ class SavannaTest(nmanager.NovaNetworkScenarioTest):
|
|||
|
||||
def _check_cluster_state(self, cluster_id):
|
||||
|
||||
data = self.savanna_client.clusters.get(cluster_id)
|
||||
data = self.sahara_client.clusters.get(cluster_id)
|
||||
i = 1
|
||||
|
||||
while str(data.status) != 'Active':
|
||||
|
@ -190,7 +190,7 @@ class SavannaTest(nmanager.NovaNetworkScenarioTest):
|
|||
'Cluster state != \'Active\', passed {timeout} '
|
||||
'minutes'.format(timeout=self.CLUSTER_CREATION_TIMEOUT))
|
||||
|
||||
data = self.savanna_client.clusters.get(cluster_id)
|
||||
data = self.sahara_client.clusters.get(cluster_id)
|
||||
time.sleep(10)
|
||||
i += 1
|
||||
|
||||
|
@ -219,7 +219,7 @@ class SavannaTest(nmanager.NovaNetworkScenarioTest):
|
|||
image_id = self.compute_client.images.find(name=image_name).id
|
||||
|
||||
body = self._create_cluster(
|
||||
self.compute_client, self.savanna_client, plugin_name,
|
||||
self.compute_client, self.sahara_client, plugin_name,
|
||||
plugin_version, cluster_template_id, description, image_id,
|
||||
cluster_configs, node_groups, anti_affinity,
|
||||
neutron_management_network)
|
||||
|
@ -228,7 +228,7 @@ class SavannaTest(nmanager.NovaNetworkScenarioTest):
|
|||
|
||||
node_ip_list_with_node_processes = \
|
||||
self._get_cluster_node_ip_list_with_node_processes(
|
||||
self.savanna_client, body.id)
|
||||
self.sahara_client, body.id)
|
||||
|
||||
node_info = self._get_node_info(
|
||||
node_ip_list_with_node_processes, plugin_name)
|
||||
|
@ -360,8 +360,8 @@ class SavannaTest(nmanager.NovaNetworkScenarioTest):
|
|||
LOG.debug('Creating node group template with floating ip')
|
||||
|
||||
return self._create_node_group_template(
|
||||
self.savanna_client,
|
||||
'ostf-test-savanna-tt-dn-',
|
||||
self.sahara_client,
|
||||
'ostf-test-sahara-tt-dn-',
|
||||
self.plugin,
|
||||
self.plugin_version,
|
||||
description='test node group template',
|
||||
|
@ -384,8 +384,8 @@ class SavannaTest(nmanager.NovaNetworkScenarioTest):
|
|||
LOG.debug('Creating node group template with floating ip')
|
||||
|
||||
return self._create_node_group_template(
|
||||
self.savanna_client,
|
||||
'ostf-test-savanna-tt-',
|
||||
self.sahara_client,
|
||||
'ostf-test-sahara-tt-',
|
||||
self.plugin,
|
||||
self.plugin_version,
|
||||
description='test node group template',
|
||||
|
@ -407,8 +407,8 @@ class SavannaTest(nmanager.NovaNetworkScenarioTest):
|
|||
LOG.debug('Creating node group template with floating ip')
|
||||
|
||||
return self._create_node_group_template(
|
||||
self.savanna_client,
|
||||
'ostf-test-savanna-dn-',
|
||||
self.sahara_client,
|
||||
'ostf-test-sahara-dn-',
|
||||
self.plugin,
|
||||
self.plugin_version,
|
||||
description='test node group template',
|
||||
|
@ -422,8 +422,8 @@ class SavannaTest(nmanager.NovaNetworkScenarioTest):
|
|||
|
||||
def create_cluster_template(self):
|
||||
return self._create_cluster_template(
|
||||
self.savanna_client,
|
||||
'ostf-test-savanna-cluster-template-',
|
||||
self.sahara_client,
|
||||
'ostf-test-sahara-cluster-template-',
|
||||
self.plugin,
|
||||
self.plugin_version,
|
||||
description='test cluster template',
|
||||
|
@ -475,8 +475,8 @@ class SavannaTest(nmanager.NovaNetworkScenarioTest):
|
|||
LOG.debug('Creating cluster template with floating ip')
|
||||
|
||||
return self._create_cluster_template(
|
||||
self.savanna_client,
|
||||
'ostf-savanna-cl-tmpl-',
|
||||
self.sahara_client,
|
||||
'ostf-sahara-cl-tmpl-',
|
||||
self.plugin,
|
||||
self.plugin_version,
|
||||
description='test cluster template',
|
||||
|
@ -512,11 +512,11 @@ class SavannaTest(nmanager.NovaNetworkScenarioTest):
|
|||
elif plugin_name == 'hdp':
|
||||
hadoop_user = self.HDP_HADOOP_USER
|
||||
node_username = self.HDP_NODE_USERNAME
|
||||
self._run_ssh_cmd('echo "%s" > /tmp/ostf-savanna.pem' %
|
||||
self._run_ssh_cmd('echo "%s" > /tmp/ostf-sahara.pem' %
|
||||
self.keys[0].private_key)
|
||||
self._run_ssh_cmd('chmod 600 /tmp/ostf-savanna.pem')
|
||||
self._run_ssh_cmd('chmod 600 /tmp/ostf-sahara.pem')
|
||||
while True:
|
||||
cmd = ('ssh -i /tmp/ostf-savanna.pem -l %s '
|
||||
cmd = ('ssh -i /tmp/ostf-sahara.pem -l %s '
|
||||
'-oUserKnownHostsFile=/dev/null '
|
||||
'-oStrictHostKeyChecking=no %s '
|
||||
'sudo -u %s -i "hadoop job '
|
||||
|
@ -528,7 +528,7 @@ class SavannaTest(nmanager.NovaNetworkScenarioTest):
|
|||
LOG.debug('active_tasktracker_count:%s',
|
||||
active_tasktracker_count)
|
||||
print('active_tasktracker_count:%s' % active_tasktracker_count)
|
||||
cmd = ('ssh -i /tmp/ostf-savanna.pem -l %s '
|
||||
cmd = ('ssh -i /tmp/ostf-sahara.pem -l %s '
|
||||
'-oUserKnownHostsFile=/dev/null '
|
||||
'-oStrictHostKeyChecking=no %s '
|
||||
'sudo -u %s -i "hadoop dfsadmin -report" '
|
||||
|
@ -555,11 +555,11 @@ class SavannaTest(nmanager.NovaNetworkScenarioTest):
|
|||
|
||||
@classmethod
|
||||
def _list_node_group_template(cls):
|
||||
return(cls.savanna_client.node_group_templates.list())
|
||||
return(cls.sahara_client.node_group_templates.list())
|
||||
|
||||
@classmethod
|
||||
def _list_cluster_templates(cls):
|
||||
return(cls.savanna_client.cluster_templates.list())
|
||||
return(cls.sahara_client.cluster_templates.list())
|
||||
|
||||
@classmethod
|
||||
def _clean_flavors(cls):
|
||||
|
@ -572,15 +572,15 @@ class SavannaTest(nmanager.NovaNetworkScenarioTest):
|
|||
@classmethod
|
||||
def _clean_cluster_templates(cls):
|
||||
cls._clean(
|
||||
cls.cluster_templates, cls.savanna_client.cluster_templates)
|
||||
cls.cluster_templates, cls.sahara_client.cluster_templates)
|
||||
|
||||
@classmethod
|
||||
def _clean_clusters(cls):
|
||||
cls._clean(cls.clusters, cls.savanna_client.clusters)
|
||||
cls._clean(cls.clusters, cls.sahara_client.clusters)
|
||||
|
||||
@classmethod
|
||||
def _clean_node_groups_templates(cls):
|
||||
cls._clean(cls.node_groups, cls.savanna_client.node_group_templates)
|
||||
cls._clean(cls.node_groups, cls.sahara_client.node_group_templates)
|
||||
|
||||
@classmethod
|
||||
def _clean(cls, items, client):
|
||||
|
@ -601,4 +601,4 @@ class SavannaTest(nmanager.NovaNetworkScenarioTest):
|
|||
cls._clean_node_groups_templates()
|
||||
cls._clean_flavors()
|
||||
cls._clean_keys()
|
||||
super(SavannaTest, cls).tearDownClass()
|
||||
super(SaharaTest, cls).tearDownClass()
|
|
@ -16,17 +16,17 @@
|
|||
|
||||
import logging
|
||||
|
||||
from fuel_health import savanna
|
||||
from fuel_health import sahara
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class PlatformSavannaTests(savanna.SavannaTest):
|
||||
class PlatformSaharaTests(sahara.SaharaTest):
|
||||
"""
|
||||
TestClass contains tests that check basic Savanna functionality.
|
||||
TestClass contains tests that check basic Sahara functionality.
|
||||
"""
|
||||
|
||||
def test_platform_savanna(self):
|
||||
def test_platform_sahara(self):
|
||||
"""Sahara tests to create, list, start, checks and delete cluster
|
||||
Target component: Sahara
|
||||
|
|
@ -16,17 +16,17 @@
|
|||
|
||||
import logging
|
||||
|
||||
from fuel_health import savanna
|
||||
from fuel_health import sahara
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class SanitySavannaTests(savanna.SavannaTest):
|
||||
class SanitySaharaTests(sahara.SaharaTest):
|
||||
"""
|
||||
TestClass contains tests that check basic Savanna functionality.
|
||||
TestClass contains tests that check basic Sahara functionality.
|
||||
"""
|
||||
|
||||
def test_sanity_savanna(self):
|
||||
def test_sanity_sahara(self):
|
||||
"""Sahara tests to create/list/delete node group and cluster templates
|
||||
Target component: Sahara
|
||||
|
|
@ -58,7 +58,7 @@ cluster_fixture = {
|
|||
'murano': {
|
||||
'value': True
|
||||
},
|
||||
'savanna': {
|
||||
'sahara': {
|
||||
'value': False
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue