Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Attachments #91

Merged
merged 111 commits into from
Sep 6, 2021

Conversation

MysteriousWolf
Copy link
Contributor

@MysteriousWolf MysteriousWolf commented Jul 29, 2021

SUMMARY

Adds an option to add/change attachments to existing modules. Modules that support this feature:

  • change_request
  • change_request_info
  • configuration_item
  • configuration_item_info
  • incident
  • incident_info
  • problem
  • problem_info
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

Attachments

ADDITIONAL INFORMATION

Supports adding attachments, changing them (when updating a table record that already has a file with the same name attached) and deleting them (when deleting the records they are attached to).

Fixes: #89

@MysteriousWolf MysteriousWolf changed the title Feat/attachments Attachments Jul 29, 2021
@MysteriousWolf MysteriousWolf changed the title Attachments Add Attachments Jul 29, 2021
@tadeboro tadeboro self-assigned this Jul 29, 2021
@tadeboro tadeboro added this to the 2.0.0 milestone Aug 3, 2021
Copy link
Contributor

@tadeboro tadeboro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are almost there yet. I commented on most of the things in the code, but there is still one thing that is missing: one attachment sample call in the EXAMPLES section of each regular module. You can just add that parameter to the existing sample tasks that are already present in the modules.

plugins/modules/change_request_info.py Outdated Show resolved Hide resolved
plugins/modules/configuration_item_info.py Outdated Show resolved Hide resolved
plugins/modules/incident_info.py Outdated Show resolved Hide resolved
plugins/modules/problem_info.py Outdated Show resolved Hide resolved
tests/integration/targets/attachment/tasks/main.yml Outdated Show resolved Hide resolved
tests/unit/plugins/module_utils/test_attachment.py Outdated Show resolved Hide resolved
tests/unit/plugins/modules/test_change_request_info.py Outdated Show resolved Hide resolved
tests/unit/plugins/modules/test_configuration_item_info.py Outdated Show resolved Hide resolved
tests/unit/plugins/modules/test_incident_info.py Outdated Show resolved Hide resolved
tests/unit/plugins/modules/test_problem_info.py Outdated Show resolved Hide resolved
plugins/module_utils/attachment.py Outdated Show resolved Hide resolved
tests/unit/plugins/module_utils/test_attachment.py Outdated Show resolved Hide resolved
tests/unit/plugins/module_utils/test_attachment.py Outdated Show resolved Hide resolved
tests/unit/plugins/module_utils/test_attachment.py Outdated Show resolved Hide resolved
tests/unit/plugins/module_utils/test_attachment.py Outdated Show resolved Hide resolved
tests/unit/plugins/module_utils/test_attachment.py Outdated Show resolved Hide resolved
tests/unit/plugins/module_utils/test_attachment.py Outdated Show resolved Hide resolved
tests/unit/plugins/module_utils/test_attachment.py Outdated Show resolved Hide resolved
tests/unit/plugins/module_utils/test_attachment.py Outdated Show resolved Hide resolved
tests/unit/plugins/module_utils/test_attachment.py Outdated Show resolved Hide resolved
Copy link
Contributor

@tadeboro tadeboro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @MysteriousWolf, for your contribution!

@Akasurde
Copy link
Member

Akasurde commented Sep 6, 2021

@tadeboro Are we waiting on something here? If not, I can gate this.

@tadeboro
Copy link
Contributor

tadeboro commented Sep 6, 2021

@tadeboro Are we waiting on something here? If not, I can gate this.

Just your LGTM ;) I did not want to gate this PR since you asked me to wait with the merges until you had a chance to review the PRs.

Copy link
Member

@Akasurde Akasurde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Akasurde
Copy link
Member

Akasurde commented Sep 6, 2021

I will gate this once the #99 is merged.

@Akasurde Akasurde added the gate label Sep 6, 2021
Copy link

@ansible-zuul ansible-zuul bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ansible-zuul ansible-zuul bot merged commit 988f664 into ansible-collections:main Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow attaching files to ServiceNow records
3 participants