Features:
* class AtrealOpenads now extends HTTPResource for HTTP Basic credentials
* check_status is now also an endpoint (endpoint 'test_openads_connexion' deleted)
* added JSON schema to validate POST request input (ouput schemas are defined too but unused for now)
* added class 'LogJsonPayloadWithFileContent' to lazy log a json payload with content file filtered
* added 'attempt' field to class 'ForwardFile' that count the attempt of uploading to openADS.API
* added more controls over response data received
Refactoring:
* removed the file content in function 'get_fwd_files_status()' and added content size instead
* splitted the function 'get_fwd_files_status()' in two: one that retrieve detailed files, one only the summary
* added function 'log_json_payload()' to help to log json payloads
* added 2 functions to factorize the process of getting files from json payload
* added function 'check_file_dict()' to factorize the process of checking a file dictionary
Fixes:
* Default filename are now under 50 chars
* Make the function 'get_fwd_files_status()' consistent in its return
Tests:
* updated the test to reflect the use of HTTPResource and the split of 'get_fwd_files_status()'
More:
* Added a lot of comments
* Added endpoint anotation to validate response body, but its commented as the 'get' helper is not defined (not like the 'post' one)
Packaging:
* added author, description, classifiers, scripts and requirements in 'setup.py'
Tests:
* added support for 'tox.ini'
* moved 'tests' directory outside main python module
Fixes:
* namespace is 'atreal_openads' instead of 'passerelle.apps.atreal_openads'
* increased timeout removed from 'get' requests
* fixed timeout typo on 'self.openADS_API_timeout'
Tests:
* moved 'tests' folder inside 'atreal_openads' module
* removed useless settings.py file
* removed useless imports
* added test file 'resources'
* fixed file path (no more vagrant)
* updated the test case of 'upload2ForwardFile' to test for 'plan' type_fichier
* added HTTP Basic credentials to 'atreal_openads' fixture (removed 'token')
Fixes:
* stop guessing ForwardFile.type_fichier based on file path
Feature:
* added two new connector fields to store HTTP Basic credentials
* removed one connector field that stored the HTTP auth token
Logging:
* added debuging and warning messages
* replaced the python interpolation '%' by function args ','
Cleaning:
* removed functions 'ajob', 'afile'
* removed unused imports
Fixes:
* added missing imports
* using string in dictionary keys
Features:
* added support for a payload build from the request instead of hardcoded in
function 'create_dossier()'
* added a warning message when an APIError is raised all functions
* added the name/key of the error in the error message build from a response
* added a function 'normalize()' to normalize user's input in the payload
* changed endpoint arguments coming from request parameters instead of URI path
in functions 'create_dossier()', 'get_dossier()', 'get_courrier()' and
'get_fwd_files_status()'
* changed JSON response to use an explicit key to hold file data in function
'create_dossier()':'recepisse' and 'get_courrier()':'courrier'
* removed the useless key 'data' in all the JSON response
* removed useless case 'jsondata' in function 'afile()'
Cleaning:
* Removed useless variable 'dossier_payload'
Tests:
* added request containing the payload in the test case for 'create_dossier()'
* added the name/key of the error in the error message build from a response
* used the explicit keys 'recepisse' and 'courrier' in JSON responses
* removed the 'data' key from JSON responses
* function 'echofile()' support for posted file content, not just url
Bug fix
* corrected file content in function 'afile()'
* corrected payload assignment in function 'get_fwd_files_status()'
* added 'type_dossier' to job creation in function 'create_dossier()'
Coding style: better indentation
Logging : 'debug' instead of 'info'
Locale : identifier in english instead of french