Skip to content

Conversation

@nmakhotkin
Copy link
Contributor

No description provided.

Nikolay Mahotkin added 2 commits October 7, 2016 11:44
 * Introduced new models for internal service info
   and action info
 * Added the corresponding unit-tests
 * Next step is implementins Actions API
@auhlig
Copy link
Member

auhlig commented Oct 8, 2016

Besides the question above this looks very good. Many thanks for contributing @nmakhotkin

@nmakhotkin
Copy link
Contributor Author

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("?");
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

@auhlig
Copy link
Member

auhlig commented Oct 11, 2016

@nmakhotkin Can you see the comment now?

What do you think on this PR @vinodborole ?

@nmakhotkin
Copy link
Contributor Author

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
@nmakhotkin nmakhotkin changed the title [WIP] Murano API: Implementing actions API Murano API: Implementing actions API Oct 12, 2016
@nmakhotkin
Copy link
Contributor Author

@auhlig, @vinodborole, PR is ready for review now.

@auhlig
Copy link
Member

auhlig commented Oct 12, 2016

Nice work.

@auhlig auhlig added this to the 3.0.3 Release milestone Oct 12, 2016
@auhlig auhlig merged commit e7db81a into ContainX:master Oct 12, 2016
@nmakhotkin
Copy link
Contributor Author

Thanks @auhlig @vinodborole!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants