Skip to content

Java based tool for getting a list of configured items from a DataPower whole appliance export.

License

Notifications You must be signed in to change notification settings

RayMN/DataPower-Configuration-Inventory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DataPower-Gateway-Inventory

Java based tool for getting a list of configured items from a DataPower whole appliance export.

Synopsis

This is a tool that extracts a list of all of gateways and "important" objects with optional details OR a list of all named objects (everything you have created) on a DataPower appliance from an export of the entire appliance.

Code Example

There are lots of comments in the .java files, I believe in heavy commenting, but the basic steps paraphrased are:

1) Open the parent zip file
2) Gathers some basic appliance information including a list of all domains from the export.xml file
3) From that list of domains:
   a) Extract the zip file for each domain
   b) Get a the data for the list type selected for that domain
4) Create a csv file with the above information. (actually happens throughout)
5) Clean up all the extracted files

Motivation

A friend (and soon to be co-worker) asked me if there was a way to get a listing of all the gateways on a DataPower appliance. The short answer from IBM when I posted the question to Developer Works was "No, we recomment you open an RFE." Having been down that path and understanding the speed with which these things happen (that's not a dig, just a statement ... I realize there is a lot to do and it gets complicated when you are dealing with that amount of code) I decided that it would probably be best to do this outside of DataPower. I thought about using CLI or SSH and decided to keep it entirely off of DataPower and use the information found in the export.xml files in an export of the entire appliance.

Installation

This is a simple command line Java program, it does require Java v1.8+

Usage

Usage: java -jar ConfigInventory.jar zipFile tmpDir csvFile [-h (-details | -all) -debug]
    Where:
          zipFile  = Absolute path to the DataPower complete appliance export zip file
          tmpDir   = Absolute path to temporary directory to extract zip files including a tailing /
          csvFile  = Absolute path and name of the output csv file");
          -h       = Optional: This message
          -details = Optional: When present adds the object details to the output - ! used with -all
          -all     = Optional: When present generates a list of all named objects - ! used with -details
          -debug   = Optional: When present generates VERY verbose DEBUG messages in the console

Example > java -jar /Classes/ConfigInventory.jar /dir/IDG-20-A.zip /dir/dp-export/ /dir/IDG-20-report.csv

Contributors

The code may not be the slickest code ever written but I think it works well enough to get started and it's not really meant to be a high performance application. It's a tool. Like a hammer (mentioned above). I am more than open to constructive criticizm, suggestions for improvement, and/or help in improving the tool.

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

About

Java based tool for getting a list of configured items from a DataPower whole appliance export.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages