forked from openservicebrokerapi/servicebroker
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Action Execution #1
Open
rohitkshetty
wants to merge
4
commits into
master
Choose a base branch
from
rohitkshetty-action
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of coming up with our own definition for describing APIs, I'd like to understand why .../actions can't just return a swagger spec. Seems like at the very least we should figure out why it is not sufficient for our needs.
https://github.com/OAI/OpenAPI-Specification
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand the comment. /actions returns the list of actions that can be performed on a service instance and not the list of API's that exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, so the question you're asking from the endpoint is what actions can be performed. I presume each action that you call is an HTTP request and if so, then you're describing an API? Inputs/outputs, etc. and it seems like if you call the /actions, returning a swagger document which is an open spec for describing APIs rather than defining our own format would seem better unless there's a strong reason not to do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each action execution (see line 887 onwards) is a POST /v2/service_instances/:instance_id/actions/:action_id/executions/:execution_id with action id and parameters. So any action is just a call to a single API to execute that action.
What you are referring to is a way to discover the actions that a service brker supports for a service instance. The actions once discovered can be executed using the API mentioned above. I believe what I have here is very similar to the proposals here openservicebrokerapi#114 from gberche-orange . I think the big difference is breaking up the relationship of the actions from plans and allowing a broker to dynamically publish the actions it supports for a service instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vaikas-google The /actions get gives you a lot of information about the tasks that you can use to render to the user.
As I mentioned earlier, these are broker defined actions .i.e. what the task is, what it does is completely controlled by the broker and a broker could introduce any type of action. The platform shouldnt have to care what the action actually does, but just that there are a set of actions available and each action might require user input. The data returned by the /actions allows the platform to present the list of actions available to the end user in the context of a service instance and if the user selects a particular action, present the user with a UI to collect the required parameters and finally submit the action for execution.