Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table 2: Output Variables set by Ansible Saltstack DG
 Variable NameDescription
output.status.code

Result of the request : 400 if SUCCESS , 200 if FAILURE.The ansible playbook may have multiple sub-tasks, playbooks etc and may run on multiple VMs of a host. The request is considered to fail if even one of the tasks is incomplete.


output.status.messageIf Salt finished execution, set to corresponding message. If abnormal error, reported in message
output.status.results

A JSON dictionary with results corresponding to Saltstack execution..

2. APP-C Ansible saltstack Adapter : The App-C Ansible saltstack Adapter is an OSGI bundle which essentially makes REST calls to the Ansible saltstack Server. It exposes three methods that can be invoked by the Service Logic Interpreter (SLI) via Directed Graphs

...

  • void reqExecSLSFile(Map<String, String> params, SvcLogicContext ctx) throws SvcLogicException : A method to retreive the logs from a request (not used in the Ansible saltstack DG currently).
    • Method to execute a single sls on SaltState server (Where the SLS file is located in the adaptor). The param entered will only be the SLS file location on the APPC/ODL container and this is automatically uploaded to server and executed, where the output from server will be in JSON format automatically. The response from Saltstack comes in json format and it is automatically put to context for DGs access, with a certain request-ID as prefix. If request Id (Id) is not passed as part of input param, then a random Id will be generated and put to properties in "org.onap.appc.adapter.saltstack.Id" field. All the output message from the execution will be appended with reqId.

        Currently, the "Input Parameters to the Saltstack Directed Graph" defined above is only for reqExecSLS method. DG for using all the methods will be provided in the future when its scope arises, as depicted in the image above.  However, current DG provided for saltstack will only perform reqExecSLS execution.

        In order to communicate with the Ansible saltstack Server, it is currently assumed that :

...