Cloudify Utilities Refactoring

Description

Current list of ideas:

  1. Done rest plugin: export ctx to template (instead current merge runtime properties with parameters). https://github.com/cloudify-incubator/cloudify-utilities-plugin/pull/163

  2. Done rest plugin: save response headers to runtime property https://github.com/cloudify-incubator/cloudify-utilities-plugin/pull/166

  3. Done rest plugin: save part of response to runtime property, User can select name of filed plus "path" to part.

  4. Done rest plugin: bunch calls - in action user provide several templates for run. https://github.com/cloudify-incubator/cloudify-utilities-plugin/pull/163

  5. Done rest plugin: user can use in parameters - static fields and results of get_attributes

  6. Done rest plugin: user can use in parameters field that will be calculated before run template, user provide path to runtime property in separate parameter (like 'params_attributes': {'a': ["a", "b", "c"]) for same "a->b->c" to a. (Partially covered by export ctx to template) https://github.com/cloudify-incubator/cloudify-utilities-plugin/pull/163

  7. Done rest plugin: support url-encoded post - user provide dictionary with key->value - we pack and encode all parts. https://github.com/cloudify-incubator/cloudify-utilities-plugin/pull/166

  8. Done rest plugin: move rest class to separate python package (same as previous) https://github.com/cloudify-incubator/cloudify-utilities-plugin/pull/163

  9. Done terminal plugin: move ssh connect and output filtering to separate python package (same as previous) https://github.com/cloudify-incubator/cloudify-utilities-plugin/pull/163

  10. Done netconf plugin: move connection code/class to separate python package (same as previous) https://github.com/cloudify-cosmo/cloudify-netconf-plugin/pull/13

  11. Done all: Unified exceptions for all parts: https://github.com/cloudify-cosmo/cloudify-netconf-plugin/pull/15

  12. Done Rest plugin: auto detect response type by content type https://github.com/cloudify-incubator/cloudify-utilities-plugin/pull/166

  13. Done rest plugin: write documentation about all parameters in RestTemplate. https://github.com/cloudify-incubator/cloudify-utilities-plugins-sdk/pull/4

  14. Done rest plugin: ability force response filtering to set version https://github.com/cloudify-incubator/cloudify-utilities-plugin/pull/167

  15. Done rest: support use payload from external file by provide callback function to process call(as optional additional parameter to yaml template) https://github.com/cloudify-incubator/cloudify-utilities-plugin/pull/167

  16. Done all make debug log message not more than 1024 bytes. https://github.com/cloudify-incubator/cloudify-utilities-plugin/pull/168 https://github.com/cloudify-incubator/cloudify-utilities-plugins-sdk/pull/6

  17. Done Rest plugin: remove call list from results, dump only to debug(hide credentials from runtime properties). https://github.com/cloudify-incubator/cloudify-utilities-plugin/pull/169

  18. Done Rest plugin: correctly work with empty call list. https://github.com/cloudify-incubator/cloudify-utilities-plugins-sdk/pull/7

  19. all plugins: move result filtering and templating to separate python package

  20. ssh tunneling support.

  21. terminal plugin: create "smart" connection for ssh where host support shell extension/layer

  22. netconf plugin: remove dependencies to lxml and use xmltodict for xml->dict conversion.

All connection interfaces should support such:

  1. user can provide credentials for connection in node property and/or action inputs,

  • for rest: it will be port/ssl/verify ssl.

  • terminal plugin: port/login/password/key

  • netconf: port/login/key

  1. user can provide list of hosts for connect, plugin will try to connect to first alive

  2. if host is not provided use instance.host_ip

  3. each plugin provide ability to use bunch calls in same action

  4. each call can be defined as jinja2 template file or directly in blueprint (like command to run by plugin)

  5. each template can contain several command to run (like list of shell command, list of http calls, list of netconf commands)

  6. for each template file - user can provide static parameters calculated before run action (get_attibutes and so on) and current ctx

  7. for each template file - user can provide dynamic parameters that will be calculated before run call

  8. for each call user provide filter for warings - if plugin found such in output - call will be rerun without close connection

  9. for each call user provide filter for errors - if plugin found such in output - full action will rerun (RecoverableError error)

  10. for each call user provide filter for critical errors - if plugin found such in output - execution will fail (NonRecoverableError error)

  11. all connection/call implementation should be in separate python package uploaded to PyPi (all connections classes in same package, not separate packages for each class)

  12. user can provide several filters for results and names for save (like translation table output -> runtime property in case structured outputs)

Done

Assignee

Trammell -

Reporter

Denis Pauk

Target Version

4.5.5

Premium Only

no

Documentation Required

Yes

Why Blocked?

None

Release Notes

yes

Priority

Medium

Priority

Medium

Epic Name

Utilities Plugin Reorganization
Configure