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

Fixed mulitpart sig file upload #171

Merged
merged 20 commits into from
Mar 22, 2022
Merged

Fixed mulitpart sig file upload #171

merged 20 commits into from
Mar 22, 2022

Conversation

nabhajit-ray
Copy link
Contributor

Description

[Fixed mulitpart sig file upload]

Issues Resolved

[#168 ]

Check List

  • New functionality includes sanity testing.
    • All sanity tests pass. ($ ansible-test sanity).
    • All unit tests pass.
  • New functionality has been documented in the README if applicable.
    • New functionality has been thoroughly documented in the examples (please include helpful comments).

Copy link
Collaborator

@AvijitOS AvijitOS left a comment

Choose a reason for hiding this comment

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

if not self.current_resource:
"No HotFix file"
elif self.current_resource and file_name in self.current_resource.data.get('signatureFileName'):
"file already present so no point checking other status"
return dict(changed=False, msg=self.MSG_SIG_ALREADY_PRESENT)

elif self.current_resource and self.current_resource.data.get('resourceState') != 'Created' and
file_name not in self.current_resource.data.get('signatureFileName'):
"resourceState not Created and file also not exist in signatureFileName"
self.current_resource = self.resource_client.upload_compsig(
file_path)
return dict(changed=True, msg=self.MSG_ADD_SIG, ansible_facts=dict(compsig=self.current_resource))
else
"Corner case"
return "No upload required"

return dict(changed=True, msg=self.MSG_ADD_SIG, ansible_facts=dict(compsig=self.current_resource))
elif self.current_resource and self.current_resource.data.get('signatureFileRequired') is True:

elif self.current_resource and self.current_resource.data.get('resourceState') == 'AddFailed' and\
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we need to different checks to see if file is already present. I mean
if self.current_resource and file_name in self.current_resource.data.get('signatureFileName'):
will not do?

Copy link
Collaborator

@AvijitOS AvijitOS left a comment

Choose a reason for hiding this comment

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

Ok with the change but build is failing

@nabhajit-ray nabhajit-ray merged commit b03a735 into master Mar 22, 2022
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.

2 participants