npm package: @itentialopensource/iag-itenital-get-info-extract-common-fields
Description: Maps the output from Automation Gateway's itential_get_info role task to expose results to the workflow.
Author: Itential Artifacts
Latest version: 0.4.4-2023.1.0

<!-- This is a comment in md (Markdown) format, it will not be visible to the end user -->

<!-- Update the below line with your artifact name -->
# IAG itential_get_info Extract Common Fields

<!-- Leave TOC intact unless you've added or removed headers -->
## Table of Contents

* [Overview](#overview)
* [Installation Prerequisites](#installation-prerequisites)
* [Requirements](#requirements)
* [Features](#features)
* [Future Enhancements](#future-enhancements)
* [How to Install](#how-to-install)
* [How to Run](#how-to-run)

## Overview

<!-- Write a few sentences about the artifact and explain the use case(s) -->
<!-- Ex.: The Migration Wizard enables IAP users to conveniently move their automation use cases between different IAP environments -->
<!-- (e.g. from Dev to Pre-Production or from Lab to Production). -->
This Pre-Built Transfromation maps the output from Automation Gateway's itential_get_info role task to expose the fields below to workflow tasks:

```
{
  "ansible_net_model": "",
  "ansible_net_system": "",
  "ansible_net_version": "",
  "ansible_net_image": "",
  "ansible_net_memfree_mb": 0,
  "deviceName": ""
}
```

<!-- Workflow(s) Image Placeholder - TO BE ADDED DIRECTLY TO GitLab -->
<!-- REPLACE COMMENT BELOW WITH IMAGE OF YOUR MAIN WORKFLOW -->
<!--
<table><tr><td>
  <img src="./images/workflow.png" alt="workflow" width="800px">
</td></tr></table>
-->
<!-- REPLACE COMMENT ABOVE WITH IMAGE OF YOUR MAIN WORKFLOW -->

<!-- ADD ESTIMATED RUN TIME HERE -->


## Installation Prerequisites

Users must satisfy the following pre-requisites:

<!-- Include any other required apps or adapters in this list -->
<!-- Ex.: EC2 Adapter -->
* Itential Automation Platform
  * `^2020.1.2`
* Adapter Automation Gateway
  * `^2020.1.2`
* App-Artifacts
  * `^5.x.x`



## How to Install

To install the artifact:

* Verify you are running a supported version of the Itential Automation Platform (IAP) as listed above in the [Requirements](#requirements) section in order to install the artifact. 
* The artifact can be installed from within App-Admin_Essential. Simply search for the name of your desired artifact and click the install button (as shown below).

<!-- REPLACE BELOW WITH IMAGE OF YOUR PUBLISHED ARTIFACT -->
<table><tr><td>
  <img src="./images/install.png" alt="install" width="600px">
</td></tr></table>
<!-- REPLACE ABOVE WITH IMAGE OF YOUR PUBLISHED ARTIFACT -->

<!-- OPTIONAL - Explain if external components are required outside of IAP -->
<!-- Ex.: The Ansible roles required for this artifact can be found in the repository located at https://gitlab.com/itentialopensource/pre-built-automations/hello-world -->

## How to Run

Use this JST in combination with the [`itential_get_info`](https://docs.itential.io/2020.1/user/Itential%20Automation%20Gateway/Roles%20and%20Sample%20Objects/#itential_get_info) task in Workflow Builder.

Example input to the JST (Response from itential_get_info):
```
{
    "role": "itential_get_info",
    "task": "itential_get_info response",
    "host": "ios_aws",
    "status": "SUCCESS",
    "argument_warnings": null,
    "results": {
      "serial_number": "9IKZMWL4K0X",
      "raw_ansible_facts": {
        "ansible_net_serialnum": "9IKZMWL4K0X",
        "ansible_net_all_ipv4_addresses": [
          "10.11.0.72"
        ],
        "ansible_net_model": "CSR1000V",
        "ansible_net_system": "ios",
        "ansible_net_hostname": "ph10894c",
        "ansible_net_gather_subset": [
          "hardware"
        ],
        "ansible_net_interfaces": {},
        "ansible_net_version": "03.16.02.S",
        "ansible_net_all_ipv6_addresses": [],
        "ansible_net_memtotal_mb": 1672835,
        "ansible_net_filesystems": [
          "bootflash:"
        ],
        "ansible_net_image": "bootflash:packages.conf",
        "ansible_net_memfree_mb": 1442035
      },
      "interfaces": {},
      "os_version": "03.16.02.S",
      "changed": true
    }
}
```

Example Output:
```
{
  "ansible_net_model": "CSR1000V",
  "ansible_net_system": "ios",
  "ansible_net_version": "03.16.02.S",
  "ansible_net_image": "bootflash:packages.conf",
  "ansible_net_memfree_mb": 1442035,
  "deviceName": "ios_aws"
}
```

<!-- Explain the main entrypoint(s) for this artifact: Automation Catalog item, Workflow, Postman, etc. -->