Revert "Save information about the deployment in the database."

This reverts commit 8401359bf3.

Change-Id: Ibcdf138b84710f518665ef86fb0540e6d3b1950b
This commit is contained in:
Andrey Sledzinskiy 2016-04-13 08:39:44 +00:00
parent 8401359bf3
commit 1d8532ef7d
3 changed files with 1 additions and 76 deletions

View File

@ -690,4 +690,4 @@ Test for ssl components
Test for network outage
-----------------------
.. automodule:: fuelweb_test.tests.tests_strength.test_network_outage
:members:
:members:

View File

@ -806,17 +806,11 @@ class FuelWebClient(object):
def deploy_cluster_wait(self, cluster_id, is_feature=False,
timeout=help_data.DEPLOYMENT_TIMEOUT, interval=30,
check_services=True):
cluster_attributes = self.client.get_cluster_attributes(cluster_id)
self.client.generate_ip_address_before_deploy_start(cluster_id)
network_settings = self.client.get_networks(cluster_id)
if not is_feature and help_data.DEPLOYMENT_RETRIES == 1:
logger.info('Deploy cluster %s', cluster_id)
task = self.deploy_cluster(cluster_id)
self.assert_task_success(task, interval=interval, timeout=timeout)
self.check_deploy_state(cluster_id, check_services)
self.check_cluster_settings(cluster_id, cluster_attributes)
self.check_network_settings(cluster_id, network_settings)
self.check_deployment_info_save_in_db(cluster_id)
return
logger.info('Provision nodes of a cluster %s', cluster_id)
@ -829,42 +823,6 @@ class FuelWebClient(object):
task = self.client.deploy_nodes(cluster_id)
self.assert_task_success(task, timeout=timeout, interval=interval)
self.check_deploy_state(cluster_id, check_services)
self.check_cluster_settings(cluster_id, cluster_attributes)
self.check_network_settings(cluster_id, network_settings)
self.check_deployment_info_save_in_db(cluster_id)
@logwrap
def check_cluster_settings(self, cluster_id, cluster_attributes):
task_id = self.client.get_last_task_id(cluster_id, 'deployment')
cluster_settings = self.client.get_cluster_settings(task_id)
logger.debug('Cluster settings before deploy {}'.format(
cluster_attributes))
logger.debug('Cluster settings after deploy {}'.format(
cluster_settings))
assert_equal(cluster_attributes, cluster_settings,
message='Cluser attributes before deploy are not equal'
' with cluster settings after deploy')
@logwrap
def check_network_settings(self, cluster_id, network_settings):
task_id = self.client.get_last_task_id(cluster_id, 'deployment')
network_configuration = self.client.get_network_configuration(task_id)
logger.debug('Network settings before deploy {}'.format(
network_settings))
logger.debug('Network settings after deploy {}'.format(
network_configuration))
assert_equal(network_settings, network_configuration,
message='Network settings from cluster configuration '
'and deployment task are not equal')
@logwrap
def check_deployment_info_save_in_db(self, cluster_id):
try:
task_id = self.client.get_last_task_id(cluster_id, 'deployment')
self.client.get_deployment_info(task_id)
except Exception:
logger.error(
"Cannot get infromation about deployment from database")
def deploy_cluster_wait_progress(self, cluster_id, progress,
return_task=None):

View File

@ -68,12 +68,6 @@ class NailgunClient(object):
)
)
@logwrap
def generate_ip_address_before_deploy_start(self, cluster_id):
self.client.get(
'/api/v1/clusters/{}/orchestrator/deployment/defaults/'.format(
cluster_id))
@logwrap
@json_parse
def verify_networks(self, cluster_id):
@ -173,15 +167,6 @@ class NailgunClient(object):
def get_tasks(self):
return self.client.get("/api/tasks")
@logwrap
def get_last_task_id(self, cluster_id, task_name):
tasks = self.get_tasks()
tasks_ids = []
for task in tasks:
if task['cluster'] == cluster_id and task['name'] == task_name:
tasks_ids.append(task['id'])
return min(tasks_ids)
@logwrap
@json_parse
def get_releases(self):
@ -709,21 +694,3 @@ class NailgunClient(object):
"""
url = '/api/v1/nodes/{}/attributes/'.format(node_id)
return self.client.get(url)
@logwrap
@json_parse
def get_deployment_info(self, task_id):
return self.client.get(
'/api/transactions/{}/deployment_info'.format(task_id))
@logwrap
@json_parse
def get_cluster_settings(self, task_id):
return self.client.get(
'/api/transactions/{}/settings'.format(task_id))
@logwrap
@json_parse
def get_network_configuration(self, task_id):
return self.client.get(
'/api/transactions/{}/network_configuration/'.format(task_id))