cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2972
Views
5
Helpful
0
Comments
rsantoso
Level 1
Level 1

 

I. Introduction

 

In this article, we're going to discuss how to use Newman to configure ACI. Newman is third party REST API tool. Newman is CLI version of Postman.

 

Basically, it provides the same functionality as Postman, however you run it in CLI. Moreover, you may use Newman as NodeJS module.

 

Instead of setting the variable in the GUI like Postman, you’ll use the .json file to setup the variable and putting all your configuration parameters.

 

II. Running Newman To Configure ACI

 

It’s assume that you’ve install Newman packages.

 

Assuming that you have npm, you can install using the following command:

$npm install newman –global;

 

1. Download the environment from Postman

 

Using the Environment that was configured from the previous article ACI Automation Part 4. you can download this environment.

 

In this example, this will be downloaded to file name “Fabric-3.postman_environment.json”

 

1.png

 

In Managed Environments, click on the icon to Download Environment.

 

2.png

 

2. Export the Postman Collections

 

Using the Environment that was configured from the previous article ACI Automation Part 4. you can export the collections.

 

In this example, this will be downloaded to file name “Set-Multiple-Config.postman_collection.json”

 

3.png

4.png 

 

3. Run the Newman CLI to Configure ACI

 

$ newman run Set-Multiple-Config.postman_collection.json -e Fabric-3.postman_environment.json -d set-multiple-config.csv -k

 

Explanation:

-e is the environment

-d is the data in .csv file

Note: if you have issue with the SSL certificate, you may add the -k at the end of the command to disable SSL. Troubleshooting Newman is beyond the scope of this article.  

 

III. Result

 

1. The Newman CLI output

In the screenshot taken the last iteration 10, there are previous 9 other iteration generates the similar output as iteration 10.

 

Newman_Output.png

 

2. ACI Result

 

2.1. BD

 

BD.png

 

2.2. EPG

 

EPG1.png

 

2.3. Static Binding

 

Static_Binding.png

 

2.4. Domain

 

Domain.png 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: