Allow a user to run dry-run deployment

Now following handlers:

     /clusters/:cluster_id/changes/
     /clusters/:cluster_id/changes/redeploy/
     /clusters/:cluster_id/deploy/
     /clusters/:cluster_id/deploy_tasks/

?dry_run=1 that is telling Astute not to run cluster executionat all.

Dry run assumes that it does not actually affect
cluster status regardless of their result.

Also, remove redundant update of nodes statuses to 'deploying'
within OpenStackConfigManager and DeploymentTaskManager as it should be
done by receiever.

Do not set cluster status to 'deployment' for these nodes in order to
retain its real status

Modify stop deployment tests to move failing stop deployment for already
deployed clusters to another test class. Since 9.0 we can run stop
deployment for new clusters.

Change-Id: I374fc86b63af64411d4a5ca45ff6c3680cb44897
Partial-bug: #1569839
This commit is contained in:
Vladimir Kuklin
2016-05-05 12:51:46 +03:00
committed by Bulat Gaifullin
parent 58355b34a5
commit e4fbfe80ed
21 changed files with 490 additions and 160 deletions

View File

@@ -102,3 +102,18 @@ class TestTasksSnapshotField(base.BaseAlembicMigrationTest):
])
).first()
self.assertIsNotNone(result['tasks_snapshot'])
class TestTransactionsNames(base.BaseAlembicMigrationTest):
def test_fields_exist(self):
db.execute(
self.meta.tables['tasks'].insert(),
[
{
'uuid': 'fake_task_uuid_0',
'name': 'dry_run_deployment',
'status': 'pending'
}
]
)