From fd7428ffd231cdc811536b434caabf291d165984 Mon Sep 17 00:00:00 2001 From: Alexander Chadin Date: Wed, 27 Apr 2016 17:15:39 +0300 Subject: [PATCH] Add fix for ONESHOT type ONE_SHOT type has been renamed to ONESHOT across the watcher-dashboard project. Change-Id: I0f128dabaa4b4d266ef67c91a23ff905d3100794 Closes-Bug: #1573686 --- watcher_dashboard/content/audit_templates/tables.py | 2 +- watcher_dashboard/content/audits/forms.py | 2 +- watcher_dashboard/test/test_data/watcher_data.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/watcher_dashboard/content/audit_templates/tables.py b/watcher_dashboard/content/audit_templates/tables.py index 070b1c5..8abf02f 100644 --- a/watcher_dashboard/content/audit_templates/tables.py +++ b/watcher_dashboard/content/audit_templates/tables.py @@ -86,7 +86,7 @@ class LaunchAudit(horizon.tables.BatchAction): def action(self, request, obj_id): params = {'audit_template_uuid': obj_id} - params['type'] = 'ONE_SHOT' + params['type'] = 'ONESHOT' params['deadline'] = None watcher.Audit.create(request, **params) diff --git a/watcher_dashboard/content/audits/forms.py b/watcher_dashboard/content/audits/forms.py index ffbec91..be73552 100644 --- a/watcher_dashboard/content/audits/forms.py +++ b/watcher_dashboard/content/audits/forms.py @@ -64,7 +64,7 @@ class CreateForm(forms.SelfHandlingForm): def handle(self, request, data): try: params = {'audit_template_uuid': data['audit_template']} - params['type'] = 'ONE_SHOT' + params['type'] = 'ONESHOT' params['deadline'] = None audit = watcher.Audit.create(request, **params) message = _('Audit was successfully created.') diff --git a/watcher_dashboard/test/test_data/watcher_data.py b/watcher_dashboard/test/test_data/watcher_data.py index 023b4d5..4c9e818 100644 --- a/watcher_dashboard/test/test_data/watcher_data.py +++ b/watcher_dashboard/test/test_data/watcher_data.py @@ -75,7 +75,7 @@ def data(TEST): audit_dict = { 'id': '22222222-2222-2222-2222-222222222222', 'deadline': None, - 'type': 'ONE_SHOT', + 'type': 'ONESHOT', 'audit_template_uuid': '11111111-1111-1111-1111-111111111111' } TEST.api_audits.add(audit_dict)