-
Notifications
You must be signed in to change notification settings - Fork 1
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
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
enolfc
force-pushed
the
compute_controller_show
branch
from
March 17, 2015 09:32
c427529
to
6dff1e0
Compare
enolfc
force-pushed
the
compute_controller_show
branch
2 times, most recently
from
March 17, 2015 10:38
b7a66ad
to
5f532a0
Compare
enolfc
force-pushed
the
compute_controller_show
branch
from
March 17, 2015 11:39
5f532a0
to
2f0dd98
Compare
Fix tests. Use a dictionary for the responses of the fake app. Moved function to openstack.helpers.
Can we close this in favour of #5? |
Dropping this pull request, fixin #5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.