Skip to content

Action Execution#1

Open
rohitkshetty wants to merge 4 commits into
masterfrom
rohitkshetty-action
Open

Action Execution#1
rohitkshetty wants to merge 4 commits into
masterfrom
rohitkshetty-action

Conversation

@rohitkshetty

Copy link
Copy Markdown
Owner

No description provided.

Comment thread spec.md

##### Action <a name="action"></a> #####

| Response field | Type | Description |

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Owner Author

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.

Copy link
Copy Markdown

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?

Copy link
Copy Markdown
Owner Author

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 cloudfoundry#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.

Copy link
Copy Markdown
Owner Author

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.

@vaikas

vaikas commented May 25, 2017 via email

Copy link
Copy Markdown

@duglin

duglin commented Jan 29, 2018

Copy link
Copy Markdown

Please see: cloudfoundry#431

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