sriram83.life has asked for the wisdom of the Perl Monks concerning the following question:
I need to develop an xml generating framework at my work which has to do following things.
Objective: With out installing a product manually (currently, we have to install 7000 ibm applications), we need to find an evidence that uniquely identifies a product that is otherwise installed.This unique identification comes from an xml file with in the installer file that gives the following information i.e productname, publisher and version.
For example, "ibm websphere application server 8.0". We may get multiple evidences like this from the installer file. So, we need to crack the installer file and extract the installer evidence.IBM has multiple installer technologies like Installation Manager, Install Anywhere etc.... Installer evidence will be something like this:
Like these, many packages should be created in the resultant xml file.<package Name="IBM Websphere Application Server" Evidence="IA" Version="8.0"> <property Name="Publisher" Value="IBM"/> </package>
Framework should be generic and should open an interactive menu asking user to input following:
a.Type of Installer technology ( if we select this option,it should ask for installer file location.Then Framework will process installer file and produce the resultant xml file)
b.Get File Evidence ( if we select this option, it should ask for file location.Framework should scan zip files to look for a specific file that ibm writes on the file system and write that into the resultant xml file).
File evidence should be something like this:
<Content MD5="NO-MD5" Size=50> <InstancePath="/opt/tivoli/ibm/WASND0800.SYS2"/> </Content>
Framework should take care of logging also. For each Installer technology,there will be a separate script like a plugin that processes the data and returns the installer package information to the framework (main script),main script should collect that data into a datastructure and dump that into the resultant xml file.
The resultant xml file will be consumed by our application.
Dear Monks,
Now i need approach to this kind of framework. My plan is to go for an object oriented approach.Please find my steps:
1.Create a class that collects installer information and stores into productName variable,Publisher Variable and Version Variable and returns an object that holds these three values.
2.Create XML writer class which accepts the object values created in step 1 and write them to the resultant xml file.
3.Create a logger class that collects print information from the plugin script and write to the log file about the ongoing process
Is this right approach? Please guide me.Thanks in Advance and Your help is much appreciated.
Sriram
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Need to develop a generic framework which generates an XML output (application)
by Anonymous Monk on Mar 07, 2014 at 08:23 UTC | |
by sriram83.life (Acolyte) on Mar 08, 2014 at 06:31 UTC |