diff --git a/storyboard/api/v1/wmodels.py b/storyboard/api/v1/wmodels.py index eb623fb4..cacff53e 100644 --- a/storyboard/api/v1/wmodels.py +++ b/storyboard/api/v1/wmodels.py @@ -1,5 +1,6 @@ # Copyright (c) 2014 Mirantis Inc. # Copyright (c) 2016 Codethink Ltd +# Copyright (c) 2019 Adam Coldrick # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -366,6 +367,31 @@ class Task(base.APIBase): due_dates=[1, 2, 3]) +class Attachment(base.APIBase): + """Represents metadata about a file attachment.""" + + name = wtypes.text + """The name of this attachment.""" + + link = wtypes.text + """The link to the actual attachment for download.""" + + creator_id = int + """The ID of the user who created this attachment.""" + + story_id = int + """The story that this attachment is related to.""" + + @classmethod + def sample(cls): + return cls( + name="logs.tar", + link="https://example.org/v1/AUTH_test/storyboard/logs.tar", + creator_id=1, + story_id=1 + ) + + class Branch(base.APIBase): """Represents a branch."""