Merge "Add support for Node tainted field"

This commit is contained in:
Zuul 2019-10-29 16:41:45 +00:00 committed by Gerrit Code Review
commit 93d0a7166a
2 changed files with 4 additions and 0 deletions

View File

@ -80,6 +80,8 @@ class Node(_async_resource.AsyncResource):
details = resource.Body('details', type=dict)
#: A map containing the dependency of nodes
dependents = resource.Body('dependents', type=dict)
#: Whether the node is tainted. *Type: bool*
tainted = resource.Body('tainted', type=bool)
def _action(self, session, body):
"""Procedure the invoke an action API.

View File

@ -34,6 +34,7 @@ FAKE = {
'created_at': '2015-10-10T12:46:36.000000',
'updated_at': '2016-10-10T12:46:36.000000',
'init_at': '2015-10-10T12:46:36.000000',
'tainted': True
}
@ -66,6 +67,7 @@ class TestNode(base.TestCase):
self.assertEqual(FAKE['created_at'], sot.created_at)
self.assertEqual(FAKE['updated_at'], sot.updated_at)
self.assertEqual(FAKE['dependents'], sot.dependents)
self.assertEqual(FAKE['tainted'], sot.tainted)
def test_check(self):
sot = node.Node(**FAKE)