CA Visual Infrastructure - Device creation and update via webservices

Document created by NestorFalcon Employee on Jul 3, 2015Last modified by Melissa Potvin on Jul 13, 2016
Version 3Show Document
  • View in full screen mode

Standalone commands created by kopja02 to interact with CA VI webservices.

 

This set of commands enable any user to create and update CAVI devices from command line.

 

1. Get CA VI attributes IDs:
java -Xms54m -Xmx128m -jar getVIAttributes.jar "<VIserver>" "<username>" "<pwd>"
This command produces a CSV file with the list of existing VI attributes (Name,ID,UUID,Data Type ID,Data Type)

2. Create new elements:
createVIdevicesWS.bat
This command logs in using the server, user and password specified in the variables “server”, “user” and “passwd” (Edit the createVIdevicesWS.bat file to change these variables)
It creates all devices listed in the file CREATELISTDEVICES.txt

3. Update an existing element:
updateVIdevicesWS.bat
This commands logs in using the server, user and password specified in the variables “server”, “user” and “passwd” (Edit the updateVIdevicesWS.bat file to change these variables)
It updates all devices listed in the file UPDATELISTDEVICES.txt


NOTE: only 1 attribute can be created/updated at a time
NOTE2: It is mandatory to respect the format and parameter order of the input files (CREATELISTDEVICES.txt and UPDATELISTDEVICES.txt)

 

STANDALONE USAGE OF THE JAR FILES:

updateVIasset.jar
=================
update existing device attribute value in VI
Input parameters: server, sessionID, device name, device UUID, type, model, attUUID, AttName, attValue
Example:
java -jar updateVIAsset.jar "server" "861429519248545" "devicename" "6271bcac-c8f5-42dd-82ed-ec3166d94a6d" "PDU" "PDU1-15-UC343" "5af9373c-f2a7-11dd-907c-00188bfa5707" "IPv4 Address1" "11.22.33.45"

createVIasset.jar
=================
create new devices in VI
Input parameters: server, sessionID, device name, type, model, attValue, AttName, atUUID
java -jar createVIAsset.jar "server" "861429519248545" "devicename" "PDU" "PDU1-15-UC343" "testing" "CI_ID" "f6ae50e0-d479-11e3-91c8-005056000011"

getSessionID.jar
================
get VI SessionID. The session ID is written to a file.
Input parameters: server, user, password
java -jar getSessionID.jar "server" "admin" "123"

getVIAttributes.jar
===================
This command produces a CSV file with the list of existing VI attributes (Name,ID,UUID,Data Type ID,Data Type)
java -Xms54m -Xmx128m -jar getVIAttributes.jar "server" "user" "password"

 

 

 

Your feedback is appreciated so please post any comments in this thread.  As with all free Infrastructure Management Field Developed Utility postings, inquiries should be made through questions or comments in this thread, and the author, NestorFalcon, will provide a response.

 

All information downloaded or accessed (including field packs, customized solutions, patches etc.) are provided AS IS and no warranties are provided or made.  For more information you may click here.

 

Outcomes