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

Storage controller #4

Closed
wants to merge 11 commits into from
Closed

Storage controller #4

wants to merge 11 commits into from

Conversation

enolfc
Copy link
Collaborator

@enolfc enolfc commented Mar 17, 2015

No description provided.

alvarolopez and others added 11 commits March 5, 2015 17:54
Our idea is to convert an incoming OCCI request into an OpenStack
request, so that we can pass it downstream so as to be processed by
nova. However, we should call the final application in each of the
controlers instead of just modifying the request, in order to be able to
process the response from nova and "re-occi-fy" it.  In order to do so,
the controllers should receive the application.

 - This change modifies the BaseController so that in receives the app.
   If the controller returns a response (because it calls the
   application, gets the response and process it or by any other
   reason), that response will be used. If it returns None, the
   application will be called.
 - Also modifies the compute controller so that it implements the
   create_resources() function.
 - Rename ooi.api.compute.ComputeController to ooi.api.compute.Controller
 - Move ooi.api.BaseController to ooi.api.base.Controller
OpenStack does some checks searching for a version string in the URL, so
we need to change the script path in the request to match what they're
looking for.

This change modifies the controllers so that they receive the version,
and adds a helpher method that prepares the request for passing it down
to the application.
Depending on what OCCI objects we have and depending on the rendering we
should render one thing or another. This collection should be used to do
so. Currently only supports the rendering of collections of resources,
that are rendered to their locations in both text/occi and text/plain
Build the location, based on its kind location and their uuid
With the new code the controllers should call the application
themselves, get the response, and "re-occi-fy" it. We do this in the
compute controller so we call nova, capture the response, parse it,
build the OCCI objects and return an OCCI collection so that it is
properly rendered.
Still missing the creation of links and mixins of the
compute resource.
Fix tests.

Use a dictionary for the responses of the fake app.

Moved function to openstack.helpers.
Fix tests.

Use a dictionary for the responses of the fake app.

Moved function to openstack.helpers.
Based on the compute one, includes tests.
@coveralls
Copy link

Coverage Status

Coverage increased (+1.41%) to 90.83% when pulling 7286047 on storage_controller into 4d4e7ea on master.

@enolfc
Copy link
Collaborator Author

enolfc commented Mar 17, 2015

This needs rebasing after merging the compute part.

@enolfc enolfc closed this Mar 18, 2015
@enolfc enolfc deleted the storage_controller branch March 18, 2015 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants