-
Notifications
You must be signed in to change notification settings - Fork 364
Murano API: Implementing actions API #843
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
Conversation
Sync with master
* Introduced new models for internal service info and action info * Added the corresponding unit-tests * Next step is implementins Actions API
|
Besides the question above this looks very good. Many thanks for contributing @nmakhotkin |
|
Hi @auhlig! Sorry but I don't see any question from you. |
| Map<String, Object> serviceMap = mapper.readValue(json, Map.class); | ||
|
|
||
| // Need to remove internal service info from test json string. | ||
| serviceMap.remove("?"); |
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 wondering why that is necessary.
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.
Yes. Let me explain. The whole murano service structure json looks as the following:
{
"key1": "val1",
"key2": "val2",
...
"keyN": "valN",
"?": {
..<service internal data like id, type, name etc.>..
}
}
So I divide the application class model onto 2 parts: service internal info (which is all in "?" key) and all other app-related info (arbitrary data). Obviously, serviceMap here contains both data and service info but there is assertion only for data part. Without deletion value in "?" key this assertion won't work.
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.
Makes sense. Thanks for explaining.
|
@nmakhotkin Can you see the comment now? What do you think on this PR @vinodborole ? |
|
Thanks, now I see. Btw, this PR is WIP for now till I submit action API implementation itself. |
* Implemented API methods for:
- list available actions
- get specific action
- find action by name
- call action
- get result of an action
- call & wait for the result
* Tested on real environment
|
@auhlig, @vinodborole, PR is ready for review now. |
|
Nice work. |
|
Thanks @auhlig @vinodborole! |
No description provided.