110 likes | 223 Views
Proposal for Property/Response Files reference and value substitutions Draft 0.2 Weijia (John) Zhang Dell Inc. Background and Problem Statement
E N D
Proposal for Property/Response Files reference and value substitutions Draft 0.2 Weijia (John) Zhang Dell Inc
Background and Problem Statement Operating Systems and Application installers use various property files and response file for the installation. These files include java property files, unattend files, kickstart files, inf file, ini files, HPQ package.xml file, and response.xml files etc. In order to use these files natively, the SDD will include information regarding these files
Changes from v0.1 to 0.2 per discussion with Randy and Christine • The Response file content will be a separate file. The content of the response file will not be encapsulated in the SDD file through the RawData type. If the value of a parameter is specified in both SDD and the external response file, the one in the SDD will take precedent. • The LanguageEncode parameter is removed as it is already represented in CharEncode. • Add Artifact type to the AdditionalFile • Define types of “ResponseFile”
General comments about property and response files The property files and response files are described through AdditionalFile under the InstallationArtifact tag. The AdditionalFile element is not recommended to be used unless it is actually needed. This is because the Additional File referred by the SDD might be removed by the native application installer and maintaining data outside SDD file increases overhead. A property/response file can be considered as a special AdditionalFile that is modifiable with data from SDD.
Start SDD Handler Parse Package Descriptor Package-Descriptor.xml Parse Deployment Descriptor Deployment-Descriptor.xml Get Paramters/Values Yes Substitute Parameters/Value to the response file Check for response file? No Invoke InstallationUnit Work flow of parameter/value substitution for the response file
<Unit> - <InstallArtifact type="jar" fileRef="files/SimpleApp1.install.jar"> - <Parameters> <Parameter name="InstallLocation" /> </Parameters> <AdditionalFile fileRef="files/SimpleApp1.jar" /> </InstallArtifact> … </Unit> InstallArtifact without a Response File
<Unit> <InstallArtifact type="jar" fileRef="files/SimpleApp1.install.jar"> <Parameters> <Parameter name="InstallLocation" /> </Parameters> <AdditionalFile fileRef="files/SimpleApp1.jar" /> <AdditionalFile type=“ResponseFile” fileRef=“files/response.xml”> <Parameters> <Parameter substitutionType=“ByString” substitutionNumber=“1” name=“UserName” defaultValue=“John_Smith”/> </Parameters> </AdditionalFile> </InstallArtifact> … </Unit> Changes: Add ResponseFile type to the AdditionalFile Add substitutionType and substitutionNumber to the parameter element InstallArtifact with a Response File
ResponseFile type: Potentially three sub-types a) open and structured b) open and unstructured; c) closed format. • substitutionType: • byString: Replace a string in the response file with the value of that parameter as specified in the SDD • byName: Replace the value of the named parameter in the response file with the value as specified in the SDD. • SubstitutionNumber: Specify Number of substitutions. Default to “all” Explanation of Substitute attributes
Linking SDD with the Additional (External) files • The linkage between the SDD and the property/response files can be done via the following • The SDD pointing to the Property/Response file via AdditionalFile tag. The file location should follow the general URL format. • The parameter and value of the response file can be specified in the Parameter tag of SDD. If both the SDD and the response file contain value for the same parameter, the SDD one take precedent. • The AddtionalFile should have a type of ResponseFile type. The response file can be Open-and-Structured (like property file), Open and non-structured, and close format.
Substitution Algorithm additionalFile = Get_AdditionalFile(); If (Get_additionalFile_type() == ResponseFile) { foreach( getParameters() ) { if (get_substitutionType() == byString) { replaceString(additionaFile, get_parameterName, get_parameterValue); } else if (get_substitutitionType() == byName) { setValue(additionalFile, get_parameterName, get_parameterValue); } } }
Other questions and considerations • How to find the replaceable names and values in the template file (AdditionalFiles) and SDD. • Do we need to support Regular expression? • Store of inventory result(?) • AdditionalFile naming conventions (Do we need to support localized filename?) • Do we support remote AdditionalFile location by using an URL? • Mapping the name and value can be done by using URL name and value pair. Some definition can be used. • Is there a need for a Property/Response file type? • Is there a need for Property/Response file version?