8000 Create abstractions for using cloudlaunch-cli as a library · Issue #4 · CloudVE/cloudlaunch-cli · GitHub
[go: up one dir, main page]

Skip to content
Create abstractions for using cloudlaunch-cli as a library #4
@machristie

Description

@machristie

Create some abstractions for easily using cloudlaunch-cli as a python library for calling the CloudLaunch REST API.

TODO

  • .update() and .delete() methods on API response objects
  • proxy attributes to response data dictionary
  • return iterator for paginated results moved to issue Support pagination in APIEndpoint #9
  • Issue: PUT/PATCH doesn't work with openapi, attributes are converted to query parameters (openapi bug?) The issue had to do with the archived form and query parameter of DeploymentsViewSet, see comment below
  • unit tests
  • implement attribute access for responses
  • create wrapper objects for each type of resource
    • Deployment
    • Task
    • Cloud
    • Credential
    • Image
    • Application
    • ...
  • fix how update_endpoint is created for sub resources
  • apply_data_mappings is confusing

DEFERRED

  • configure read only fields and leave them out of update (PUT/PATCH) requests
    • maybe not needed, seems to be related to coreapi PUT/PATCH bug
    • Another approach is to turn off validation in coreapi
  • decided to not switch from coreapi to requests for making REST calls at this time. There is an issue with coreapi when an endpoint has a field and a query parameter with the same name, but that is easily worked around for the time being.
  • accept APIResource instances as argument to APIEndpoint create, update
    • I think it is more useful to document keyword arguments for calling create. APIResource's are designed to wrap API responses, not to be used in making requests.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0