Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Firmware bundle #392

Open
wants to merge 3 commits into
base: enhancement/resource_base_class
Choose a base branch
from

Conversation

madhav-bharadwaj
Copy link
Member

Description

Adds additional custom headers' support for firmware bundles introduced in api600.

Check List

  • New functionality includes testing.
    • All tests pass for Python 2.7+ & 3.4+($ tox).
  • New functionality has been documented in the README if applicable.
    • New functionality has been thoroughly documented in the examples (please include helpful comments).
    • New endpoints supported are updated in the endpoints-support.md file.
  • Changes are documented in the CHANGELOG.

CHANGELOG.md Outdated
@@ -1,4 +1,10 @@
# 4.7.1
# 4.7.1 (Unreleased)
Copy link
Member

Choose a reason for hiding this comment

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

Lets mark this release as 5.0 as it will be a major change because of design changes

@@ -1209,7 +1209,7 @@ def create(self, resource, uri=None, timeout=-1, custom_headers=None, default_va

return self.__do_post(uri, resource, timeout, custom_headers)

def upload(self, file_path, uri=None, timeout=-1):
def upload(self, file_path, uri=None, timeout=-1, custom_headers=None):
Copy link
Member

Choose a reason for hiding this comment

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

Add documentation for the new arg in the comments section

@@ -45,7 +45,7 @@ def __init__(self, con):
self._connection = con
self._client = ResourceClient(con, self.URI)

def upload(self, file_path, timeout=-1):
def upload(self, file_path, timeout=-1, custom_headers=None,):
Copy link
Member

@soodpr soodpr Aug 24, 2018

Choose a reason for hiding this comment

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

remove comma in the end of args list and add documentation

@@ -283,7 +283,7 @@ def post_multipart_with_response_handling(self, uri, file_path, baseName):

return None, body

def post_multipart(self, uri, fields, files, baseName, verbose=False):
def post_multipart(self, uri, fields, files, baseName, custom_headers, verbose=False):
Copy link
Member

Choose a reason for hiding this comment

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

again custom_headers should be added in the end of args list as we discussed and is custom_headers a mandatory param. If not, then better to give default value

@JohnAZoidberg
Copy link

What's the progress of this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants