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

Compute controller show #3

Closed
wants to merge 9 commits into from
Closed

Compute controller show #3

wants to merge 9 commits into from

Conversation

enolfc
Copy link
Collaborator

@enolfc enolfc commented Mar 16, 2015

No description provided.

alvarolopez and others added 8 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.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.86%) to 88.57% when pulling c427529 on compute_controller_show into 4d4e7ea on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 89.02% when pulling 6dff1e0 on compute_controller_show into 4d4e7ea on master.

@enolfc enolfc force-pushed the compute_controller_show branch 2 times, most recently from b7a66ad to 5f532a0 Compare March 17, 2015 10:38
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 89.33% when pulling 5f532a0 on compute_controller_show into 4d4e7ea on master.

Fix tests.

Use a dictionary for the responses of the fake app.

Moved function to openstack.helpers.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.66%) to 90.09% when pulling 2f0dd98 on compute_controller_show into 4d4e7ea on master.

@alvarolopez
Copy link
Owner

Can we close this in favour of #5?

@enolfc
Copy link
Collaborator Author

enolfc commented Mar 17, 2015

Dropping this pull request, fixin #5

@enolfc enolfc closed this Mar 17, 2015
@alvarolopez alvarolopez deleted the compute_controller_show branch April 9, 2015 16:53
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.

3 participants