Add a WSME model for attachments
Change-Id: I8369f7b9ad6c4f8c7807adcac3a13e88db21f0c9
This commit is contained in:
parent
29428572cc
commit
7662d13857
@ -1,5 +1,6 @@
|
|||||||
# Copyright (c) 2014 Mirantis Inc.
|
# Copyright (c) 2014 Mirantis Inc.
|
||||||
# Copyright (c) 2016 Codethink Ltd
|
# Copyright (c) 2016 Codethink Ltd
|
||||||
|
# Copyright (c) 2019 Adam Coldrick
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with 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])
|
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):
|
class Branch(base.APIBase):
|
||||||
"""Represents a branch."""
|
"""Represents a branch."""
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user