Skip to content

Commit 8457e7c

Browse files
committed
Added functionality
Added the ability to run debug mode from the command line with -debug and the ability to gather extra information on each gateway using the -d option
1 parent 8228a83 commit 8457e7c

File tree

6 files changed

+531
-150
lines changed

6 files changed

+531
-150
lines changed

ConfigInventory$1.class

0 Bytes
Binary file not shown.

ConfigInventory.class

2.29 KB
Binary file not shown.

ConfigInventory.java

Lines changed: 141 additions & 56 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ There are lots of comments in the .java file, I believe in heavy commenting, but
1919
## Motivation
2020
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.
2121

22-
I also wanted to get to know how to use GitHub, so this is my first repository. I have a later version of this that I want to add/fork/or whatever ... that adds more capabilities. If you are not seeing this then I guess I managed it ... but you won't know that, will you? :) But that it tomorrow's work.
23-
2422
## Installation
2523
This is a simple command line Java program, it does require Java v1.8+
2624
There are sample csv files from an export of one of my old demo virtual appliances
@@ -32,8 +30,10 @@ There are sample csv files from an export of one of my old demo virtual applianc
3230
zipFile = Absolute path to the DataPower export zip file
3331
tmpDir = Absolute path to temporary directory to extract zip files
3432
csvFile = Absolute path and name of the output csv file
35-
36-
Example > java ConfigInventory /data/IDGv720-A.zip /data/dp-export/ /data/SampleOutput.csv
33+
-d = Optional: When present adds the object details to the output
34+
-debug = Optional: When present generates verbose DEBUG messages in the console
35+
-h = Optional: This message
36+
Example > java ConfigInventory /data/IDGv720-A.zip /data/dp-export/ /data/SampleOutput.csv -d -debug
3737
```
3838
## Contributors
3939
The code may not be the ***slickest*** code ever written (some of it was done in BFH mode) but I think it works well enough to get started and it's not really meant 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.

SampleOutput.csv

Lines changed: 91 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,94 @@
1-
Inventory Date, 2017-07-10 20.36.18
1+
Inventory Date, 2017-07-10 13.35.02
22
Device Name, IDGv7201-A
33
Product ID, 5725
44
Serial Number, 0000000
5-
Firmware Ver, IDG.7.2.0.1
6-
7-
List of Domains
8-
,ABC_Test
9-
, , B2BGateway, test-b2b-gateway
10-
, , MultiProtocolGateway, Test
11-
, , WebAppFW, testWAF
12-
13-
,default
14-
15-
,Demo_AppOpt
16-
17-
,Demo_Base64Converter
18-
, , WSGateway, Base64_Service_WSP
19-
, , XMLFirewallService, Base64_Decode_XMLFW
20-
, , XMLFirewallService, Base64_Encode_XMLFW
21-
22-
,Demo_BasicWPSSecurity
23-
, , XMLFirewallService, SecurityDemoXMLFW
24-
25-
,Demo_Cache
26-
27-
,Demo_ECHO-Service
28-
, , XMLFirewallService, EchoService-3950
29-
, , XMLFirewallService, EchoService-9999
30-
31-
,Demo_FanOut
32-
, , MultiProtocolGateway, FanOut.MPGW
33-
, , XMLFirewallService, XMLFW.Responder.A
34-
, , XMLFirewallService, XMLFW.Responder.B
35-
, , XMLFirewallService, XMLFW.Responder.C
36-
37-
,Demo_JSON
38-
, , MultiProtocolGateway, JSON_to_SOAP_Converter
39-
40-
,Demo_JSONiq
41-
, , MultiProtocolGateway, JSONiq.MPGW
42-
43-
,Demo_Logging-FTP
44-
, , MultiProtocolGateway, EchoServiceTester
45-
, , MultiProtocolGateway, Logger-FTP-Method
46-
, , XMLFirewallService, EchoService
47-
48-
,Demo_MQ_LogTarget
49-
, , MultiProtocolGateway, ConfigLog
50-
, , MultiProtocolGateway, DirectLog
51-
, , MultiProtocolGateway, IndirectLog
52-
, , MultiProtocolGateway, IndirectLogWriter
53-
54-
,Demo_MQReqResp
55-
, , MultiProtocolGateway, MQ_Req_Resp
56-
57-
,Demo_SAMLGeneration
58-
, , MultiProtocolGateway, SAMLGenerator
59-
60-
,Demo_URI-Router
61-
, , MultiProtocolGateway, Demo_URI-Router
62-
, , WSGateway, Level_1_A_WSP
63-
, , WSGateway, Level_1_B_WSP
64-
, , WSGateway, Level_2_A_BackEnd_WSP
65-
, , WSGateway, Level_2_B_BackEnd_WSP
66-
67-
,DynamicRouteSample
68-
, , MultiProtocolGateway, Router.MPGW
69-
, , MultiProtocolGateway, XML-Responder-A
70-
, , MultiProtocolGateway, XML-Responder-B
71-
, , MultiProtocolGateway, XML-Responder-C
72-
73-
,GatewayScriptTest
74-
, , MultiProtocolGateway, GWScriptTest
75-
76-
,SSL-Test-Destination
77-
, , MultiProtocolGateway, APIM-BackSide-SSL-App
78-
79-
,SSL-Test-Source
80-
, , MultiProtocolGateway, APIM-Simulator
81-
, , MultiProtocolGateway, SSL-Proxy_for_APIM
82-
83-
,Test-Polaris
84-
, , MultiProtocolGateway, PUT.MPGW.Passthrough
85-
86-
,Util_Responders
87-
, , MultiProtocolGateway, ECHO-Responder
88-
, , MultiProtocolGateway, JSON-Responder
89-
, , MultiProtocolGateway, SOAP-Responder
90-
, , MultiProtocolGateway, XML-Responder
91-
92-
,XML-Tests
93-
, , MultiProtocolGateway, XML2SOAP.MPGW
5+
Firmware Version, IDG.7.2.0.1
6+
7+
,
8+
Domain, Gateway Type, Gateway Name,
9+
ABC_Test
10+
, B2BGateway, test-b2b-gateway
11+
, MultiProtocolGateway, Test
12+
, WebAppFW, testWAF
13+
,
14+
default
15+
,
16+
Demo_AppOpt
17+
,
18+
Demo_Base64Converter
19+
, WSGateway, Base64_Service_WSP
20+
, XMLFirewallService, Base64_Decode_XMLFW
21+
, XMLFirewallService, Base64_Encode_XMLFW
22+
,
23+
Demo_BasicWPSSecurity
24+
, XMLFirewallService, SecurityDemoXMLFW
25+
,
26+
Demo_Cache
27+
,
28+
Demo_ECHO-Service
29+
, XMLFirewallService, EchoService-3950
30+
, XMLFirewallService, EchoService-9999
31+
,
32+
Demo_FanOut
33+
, MultiProtocolGateway, FanOut.MPGW
34+
, XMLFirewallService, XMLFW.Responder.A
35+
, XMLFirewallService, XMLFW.Responder.B
36+
, XMLFirewallService, XMLFW.Responder.C
37+
,
38+
Demo_JSON
39+
, MultiProtocolGateway, JSON_to_SOAP_Converter
40+
,
41+
Demo_JSONiq
42+
, MultiProtocolGateway, JSONiq.MPGW
43+
,
44+
Demo_Logging-FTP
45+
, MultiProtocolGateway, EchoServiceTester
46+
, MultiProtocolGateway, Logger-FTP-Method
47+
, XMLFirewallService, EchoService
48+
,
49+
Demo_MQ_LogTarget
50+
, MultiProtocolGateway, ConfigLog
51+
, MultiProtocolGateway, DirectLog
52+
, MultiProtocolGateway, IndirectLog
53+
, MultiProtocolGateway, IndirectLogWriter
54+
,
55+
Demo_MQReqResp
56+
, MultiProtocolGateway, MQ_Req_Resp
57+
,
58+
Demo_SAMLGeneration
59+
, MultiProtocolGateway, SAMLGenerator
60+
,
61+
Demo_URI-Router
62+
, MultiProtocolGateway, Demo_URI-Router
63+
, WSGateway, Level_1_A_WSP
64+
, WSGateway, Level_1_B_WSP
65+
, WSGateway, Level_2_A_BackEnd_WSP
66+
, WSGateway, Level_2_B_BackEnd_WSP
67+
,
68+
DynamicRouteSample
69+
, MultiProtocolGateway, Router.MPGW
70+
, MultiProtocolGateway, XML-Responder-A
71+
, MultiProtocolGateway, XML-Responder-B
72+
, MultiProtocolGateway, XML-Responder-C
73+
,
74+
GatewayScriptTest
75+
, MultiProtocolGateway, GWScriptTest
76+
,
77+
SSL-Test-Destination
78+
, MultiProtocolGateway, APIM-BackSide-SSL-App
79+
,
80+
SSL-Test-Source
81+
, MultiProtocolGateway, APIM-Simulator
82+
, MultiProtocolGateway, SSL-Proxy_for_APIM
83+
,
84+
Test-Polaris
85+
, MultiProtocolGateway, PUT.MPGW.Passthrough
86+
,
87+
Util_Responders
88+
, MultiProtocolGateway, ECHO-Responder
89+
, MultiProtocolGateway, JSON-Responder
90+
, MultiProtocolGateway, SOAP-Responder
91+
, MultiProtocolGateway, XML-Responder
92+
,
93+
XML-Tests
94+
, MultiProtocolGateway, XML2SOAP.MPGW

0 commit comments

Comments
 (0)