Removed unused 'alarm' field
The 'alarm' field is currently unused, so it has been removed. Change-Id: I02fa15b06ed49dbc5dd63de54a9cde601413983c Closes-Bug: #1550261
This commit is contained in:
parent
0f14b7635d
commit
408d6d4650
|
@ -130,9 +130,6 @@ class Action(base.APIBase):
|
|||
state = wtypes.text
|
||||
"""This audit state"""
|
||||
|
||||
alarm = types.uuid
|
||||
"""An alarm UUID related to this action"""
|
||||
|
||||
action_type = wtypes.text
|
||||
"""Action type"""
|
||||
|
||||
|
@ -194,7 +191,6 @@ class Action(base.APIBase):
|
|||
sample = cls(uuid='27e3153e-d5bf-4b7e-b517-fb518e17f34c',
|
||||
description='action description',
|
||||
state='PENDING',
|
||||
alarm=None,
|
||||
created_at=datetime.datetime.utcnow(),
|
||||
deleted_at=None,
|
||||
updated_at=datetime.datetime.utcnow())
|
||||
|
|
|
@ -281,8 +281,6 @@ class Connection(api.BaseConnection):
|
|||
|
||||
if 'state' in filters:
|
||||
query = query.filter_by(state=filters['state'])
|
||||
if 'alarm' in filters:
|
||||
query = query.filter_by(alarm=filters['alarm'])
|
||||
|
||||
query = self.__add_soft_delete_mixin_filters(
|
||||
query, filters, models.Action)
|
||||
|
|
|
@ -161,8 +161,6 @@ class Action(Base):
|
|||
action_type = Column(String(255), nullable=False)
|
||||
input_parameters = Column(JSONEncodedDict, nullable=True)
|
||||
state = Column(String(20), nullable=True)
|
||||
# todo(jed) remove parameter alarm
|
||||
alarm = Column(String(36))
|
||||
next = Column(String(36), nullable=True)
|
||||
|
||||
|
||||
|
|
|
@ -53,7 +53,6 @@ class DefaultPlanner(base.BasePlanner):
|
|||
'action_type': action_type,
|
||||
'input_parameters': input_parameters,
|
||||
'state': objects.action.State.PENDING,
|
||||
'alarm': None,
|
||||
'next': None,
|
||||
}
|
||||
return action
|
||||
|
|
|
@ -44,8 +44,6 @@ class Action(base.WatcherObject):
|
|||
'action_type': obj_utils.str_or_none,
|
||||
'input_parameters': obj_utils.dict_or_none,
|
||||
'state': obj_utils.str_or_none,
|
||||
# todo(jed) remove parameter alarm
|
||||
'alarm': obj_utils.str_or_none,
|
||||
'next': obj_utils.int_or_none,
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,6 @@ class TestDefaultWorkFlowEngine(base.DbTestCase):
|
|||
'action_type': action_type,
|
||||
'input_parameters': parameters,
|
||||
'state': objects.action.State.PENDING,
|
||||
'alarm': None,
|
||||
'next': next,
|
||||
}
|
||||
new_action = objects.Action(self.context, **action)
|
||||
|
|
|
@ -266,24 +266,21 @@ class DbActionTestCase(base.DbTestCase):
|
|||
description='description action 1',
|
||||
uuid=w_utils.generate_uuid(),
|
||||
next=None,
|
||||
state='PENDING',
|
||||
alarm=None)
|
||||
state='PENDING')
|
||||
action2 = self._create_test_action(
|
||||
id=2,
|
||||
action_plan_id=2,
|
||||
description='description action 2',
|
||||
uuid=w_utils.generate_uuid(),
|
||||
next=action1['uuid'],
|
||||
state='PENDING',
|
||||
alarm=None)
|
||||
state='PENDING')
|
||||
action3 = self._create_test_action(
|
||||
id=3,
|
||||
action_plan_id=1,
|
||||
description='description action 3',
|
||||
uuid=w_utils.generate_uuid(),
|
||||
next=action2['uuid'],
|
||||
state='ONGOING',
|
||||
alarm=None)
|
||||
state='ONGOING')
|
||||
res = self.dbapi.get_action_list(self.context,
|
||||
filters={'state': 'ONGOING'})
|
||||
self.assertEqual([action3['id']], [r.id for r in res])
|
||||
|
|
|
@ -91,7 +91,6 @@ def get_test_action(**kwargs):
|
|||
'resource_id':
|
||||
'10a47dd1-4874-4298-91cf-eff046dbdb8d'}),
|
||||
'state': kwargs.get('state', 'PENDING'),
|
||||
'alarm': kwargs.get('alarm', None),
|
||||
'next': kwargs.get('next', 2),
|
||||
'created_at': kwargs.get('created_at'),
|
||||
'updated_at': kwargs.get('updated_at'),
|
||||
|
|
Loading…
Reference in New Issue