Remove references to SERVERS_CONSOLIDATION

Change I6c43eba941022a88851a199b56a6c20f017b9e71 seemed to have remove
most references to the SERVERS_CONSOLIDATION goal.  Since this goal does
not currently exist in the actual code and all usages of it are for
samples or for tests, it is replaced with the DUMMY goal to avoid
confusion.

Change-Id: I4d2240d3b22c42ebf4e6120e2cd7677ec49d8e98
Closes-Bug: #1538388
This commit is contained in:
Taylor Peoples
2016-01-27 04:38:40 +01:00
parent e520f5f452
commit 86c1a9d77f
6 changed files with 12 additions and 12 deletions

View File

@@ -60,7 +60,7 @@ This goal should be declared in the Watcher service configuration file
.. code:: bash
$ watcher audit-template-create my_first_audit SERVERS_CONSOLIDATION
$ watcher audit-template-create my_first_audit DUMMY
If you get "*You must provide a username via either --os-username or via
env[OS_USERNAME]*" you may have to verify your credentials.

View File

@@ -149,7 +149,7 @@ class AuditTemplate(base.APIBase):
name='My Audit Template',
description='Description of my audit template',
host_aggregate=5,
goal='SERVERS_CONSOLIDATION',
goal='DUMMY',
extra={'automatic': True},
created_at=datetime.datetime.utcnow(),
deleted_at=None,

View File

@@ -71,7 +71,7 @@ class BaseConnection(object):
'name': 'example',
'description': 'free text description'
'host_aggregate': 'nova aggregate name or id'
'goal': 'SERVER_CONSOLiDATION'
'goal': 'DUMMY'
'extra': {'automatic': True}
}
:returns: An audit template.

View File

@@ -92,7 +92,7 @@ class DbAuditTestCase(base.DbTestCase):
name='My Audit Template 1',
description='Description of my audit template 1',
host_aggregate=5,
goal='SERVERS_CONSOLIDATION',
goal='DUMMY',
extra={'automatic': True})
)
@@ -118,7 +118,7 @@ class DbAuditTestCase(base.DbTestCase):
name='My Audit Template 1',
description='Description of my audit template 1',
host_aggregate=5,
goal='SERVERS_CONSOLIDATION',
goal='DUMMY',
extra={'automatic': True})
)

View File

@@ -47,7 +47,7 @@ class DbAuditTemplateTestCase(base.DbTestCase):
name='My Audit Template 1',
description='Description of my audit template 1',
host_aggregate=5,
goal='SERVERS_CONSOLIDATION',
goal='DUMMY',
extra={'automatic': True})
audit_template2 = self._create_test_audit_template(
id=2,
@@ -55,7 +55,7 @@ class DbAuditTemplateTestCase(base.DbTestCase):
name='My Audit Template 2',
description='Description of my audit template 2',
host_aggregate=3,
goal='SERVERS_CONSOLIDATION',
goal='DUMMY',
extra={'automatic': True})
res = self.dbapi.get_audit_template_list(self.context,
@@ -68,7 +68,7 @@ class DbAuditTemplateTestCase(base.DbTestCase):
res = self.dbapi.get_audit_template_list(
self.context,
filters={'goal': 'SERVERS_CONSOLIDATION'})
filters={'goal': 'DUMMY'})
self.assertEqual([audit_template1['id'], audit_template2['id']],
[r.id for r in res])

View File

@@ -112,19 +112,19 @@ class TestAuditTemplateObject(base.DbTestCase):
as mock_update_audit_template:
audit_template = objects.AuditTemplate.get_by_uuid(
self.context, uuid)
audit_template.goal = 'SERVERS_CONSOLIDATION'
audit_template.goal = 'DUMMY'
audit_template.save()
mock_get_audit_template.assert_called_once_with(
self.context, uuid)
mock_update_audit_template.assert_called_once_with(
uuid, {'goal': 'SERVERS_CONSOLIDATION'})
uuid, {'goal': 'DUMMY'})
self.assertEqual(self.context, audit_template._context)
def test_refresh(self):
uuid = self.fake_audit_template['uuid']
returns = [dict(self.fake_audit_template,
goal="SERVERS_CONSOLIDATION"),
goal="DUMMY"),
dict(self.fake_audit_template, goal="BALANCE_LOAD")]
expected = [mock.call(self.context, uuid),
mock.call(self.context, uuid)]
@@ -132,7 +132,7 @@ class TestAuditTemplateObject(base.DbTestCase):
side_effect=returns,
autospec=True) as mock_get_audit_template:
audit_template = objects.AuditTemplate.get(self.context, uuid)
self.assertEqual("SERVERS_CONSOLIDATION", audit_template.goal)
self.assertEqual("DUMMY", audit_template.goal)
audit_template.refresh()
self.assertEqual("BALANCE_LOAD", audit_template.goal)
self.assertEqual(expected, mock_get_audit_template.call_args_list)