Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PLUGINS-2854] - RFE 142314 - Need ability to export more than a single class or object. #108

Merged
merged 5 commits into from
Aug 24, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Complete list of current DCM target commands. (* = matching plug-in step)
- __download-files__* - Download target files or all files from a filestore

- __export-object__* - export an object i.e. service
- __export-objects__ - export objects based on a dcm:definition file
- __export-objects__* - export objects based on a dcm:definition file

- __firmware-rollback__ - Rollback to the previous firmware (and filesystem contents!)
- __firmware-update__ - Update to a new level of firmware
Expand Down
2 changes: 1 addition & 1 deletion deploy.ant.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
download-files* - Download target files or all files from a filestore

export-object* - export an object i.e. service
export-objects - export objects based on a dcm:definition file
export-objects* - export objects based on a dcm:definition file

firmware-rollback - Rollback to the previous firmware (and filesystem contents!)
firmware-update - Update to a new level of firmware
Expand Down
3 changes: 3 additions & 0 deletions src/main/zip/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -184,5 +184,8 @@
<release-note plugin-version="22">
RFE 142129 - Added Deployment-Policy-variables field to the Import (Deployment Policy Object) step.
</release-note>
<release-note plugin-version="23">
RFE 142314 - Need ability to export more than a single class or object.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going forward, I would suggest a release note that better aligns to the plugin change, rather than the RFE request.

Something like ... RFE 142314 - Added new Export Objects steps that enables the export of one or more objects.

</release-note>
</release-notes>
</pluginInfo>
76 changes: 75 additions & 1 deletion src/main/zip/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<plugin xmlns="http://www.urbancode.com/PluginXMLSchema_v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<header>
<identifier version="22" id="com.ibm.datapower" name="DataPower"/>
<identifier version="23" id="com.ibm.datapower" name="DataPower"/>
<description>The IBM WebSphere DataPower plugin deploys DataPower services.</description>
<tag>Infrastructure/WebSphere DataPower</tag>
</header>
Expand Down Expand Up @@ -717,6 +717,80 @@
<arg value="export-object"/>
</command>
</step-type>



<step-type name="Export Objects">
<description>Export objects from a domain on a device</description>
<properties>
<property name="domainName" required="true">
<property-ui type="textBox" default-value="${p:dpDomainName}" label="Domain name" description="Name of the first domain to backup"/>
</property>
<property name="definitionFile" required="true">
<property-ui type="textBox" default-value="" label="Definition file" description="Definition file for class objects to export"/>
</property>
<property name="refObjects">
<property-ui type="checkBox" default-value="true" label="Include reference objects?" description="Include referenced objects when exporting?"/>
</property>
<property name="refFiles">
<property-ui type="checkBox" default-value="true" label="Include reference files?" description="Include referenced files when exporting?"/>
</property>
<property name="allFiles">
<property-ui type="checkBox" default-value="false" label="Include all files?" description="Include other files when exporting?"/>
</property>
<property name="exportFile" required="true">
<property-ui type="textBox" default-value="" label="Export file" description="DataPower export zip file to create/overwrite"/>
</property>
<property name="hostname">
<property-ui type="textBox" default-value="${p:dpHostname}" label="DataPower hostname/IP" description="Hostname or IP address of DataPower appliance" hidden="true"/>
</property>
<property name="uid">
<property-ui type="textBox" default-value="${p:dpUserid}" label="DataPower userid" description="Userid on DataPower appliance" hidden="true"/>
</property>
<property name="pwd">
<property-ui type="secureBox" default-value="${p:dpPassword}" label="DataPower password" description="Password for userid on DataPower appliance" hidden="true"/>
</property>
<property name="portXMI">
<property-ui type="textBox" default-value="${p:dpXMIPort}" label="DataPower XMI port" description="XML Management Interface port on DataPower appliance (usually 5550)" hidden="true"/>
</property>
<property name="addlProperties">
<property-ui type="textBox" default-value="" label="Additional Properties" description="Additional property mappings - antpropname=...[ '~' more definitions ]" hidden="true"/>
</property>
<property name="memorySize">
<property-ui type="selectBox" default-value="default" label="Java Max Memory Size" description="Set the max Java Heap Memory size for the DCM's Ant call. " hidden="true"/>
<value label="Default">default</value>
<value label="-Xmx256m">-Xmx256m</value>
<value label="-Xmx512m">-Xmx512m</value>
<value label="-Xmx1024m">-Xmx1024m</value>
<value label="-Xmx2048m">-Xmx2048m</value>
<value label="-Xmx4096m">-Xmx4096m</value>
<value label="${p?:environment/memorySize}">${p?:environment/memorySize}</value>
<value label="${p?:resource/memorySize}">${p?:resource/memorySize}</value>
</property>
</properties>
<post-processing><![CDATA[
if (properties.get("exitCode") != 0) {
properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
}
else {
properties.put("Status", "Success");
}
]]></post-processing>
<command program="${GROOVY_HOME}/bin/groovy">
<arg value="-cp"/>
<arg file="classes"/>
<arg file="RunDeployDotAnt.groovy"/>
<arg file="${PLUGIN_INPUT_PROPS}"/>
<arg file="${PLUGIN_OUTPUT_PROPS}"/>
<arg value="-Ddomain=@domainName@"/>
<arg value="-Dexport-manifest.file=@definitionFile@"/>
<arg value="-Dref.objects=@refObjects@"/>
<arg value="-Dref.files=@refFiles@"/>
<arg value="-Dall.files=@allFiles@"/>
<arg value="-Dexport.file=@exportFile@"/>
<arg value="export-objects"/>
</command>
</step-type>



Expand Down
7 changes: 6 additions & 1 deletion src/main/zip/upgrade.xml
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,11 @@
<migrate-property name="deploymentPolicyObjectVariables" />
</migrate-properties>
</migrate-command>
</migrate>
</migrate>

<migrate to-version="23">
<migrate-command name="Export Objects"/>
</migrate>


</plugin-upgrade>