diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d16fd4f4..0cf79a2b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,7 @@ Brewtils Changelog TBD - Fixed self reference bug that was returning back output instead of Request object. +- Added Source/Target Garden labels on Request model 3.23.0 ------ diff --git a/brewtils/models.py b/brewtils/models.py index 95b5c241..afe6722e 100644 --- a/brewtils/models.py +++ b/brewtils/models.py @@ -655,6 +655,8 @@ def __init__( status_updated_at=None, has_parent=None, requester=None, + source_garden=None, + target_garden=None, ): super(Request, self).__init__( system=system, @@ -681,6 +683,8 @@ def __init__( self.error_class = error_class self.has_parent = has_parent self.requester = requester + self.source_garden = source_garden + self.target_garden = target_garden @classmethod def from_template(cls, template, **kwargs): diff --git a/brewtils/schemas.py b/brewtils/schemas.py index e3c9c94d..7a02a7f1 100644 --- a/brewtils/schemas.py +++ b/brewtils/schemas.py @@ -348,6 +348,8 @@ class RequestSchema(RequestTemplateSchema): ) has_parent = fields.Bool(allow_none=True) requester = fields.String(allow_none=True) + source_garden = fields.String(allow_none=True) + target_garden = fields.String(allow_none=True) class StatusInfoSchema(BaseSchema): diff --git a/brewtils/test/fixtures.py b/brewtils/test/fixtures.py index 81f1fd91..45c86b50 100644 --- a/brewtils/test/fixtures.py +++ b/brewtils/test/fixtures.py @@ -306,6 +306,8 @@ def child_request_dict(ts_epoch): "metadata": {"child": "stuff"}, "has_parent": True, "requester": "user", + "source_garden": "parent", + "target_garden": "child", } @@ -345,6 +347,8 @@ def parent_request_dict(ts_epoch): "metadata": {"parent": "stuff"}, "has_parent": False, "requester": "user", + "source_garden": "parent", + "target_garden": "child", } @@ -408,6 +412,8 @@ def request_dict(parent_request_dict, child_request_dict, ts_epoch): "metadata": {"request": "stuff"}, "has_parent": True, "requester": "user", + "source_garden": "parent", + "target_garden": "child", }