Preview examples

The following simplified examples are intended to illustrate how full and partial import and export operations work. The XML file only contains application definitions. A typical file would also contain information about application groups, releases, lifecycles, environments, components, scripts, tiers, tier groups, and source types.

The preview (-p) operation shows you whether information in an XML file can be successfully imported and whether any conflicts exist.

In this example, the import file contains four applications: MyAppA, MyAppB, MyAppC, and MyAppD. The MyAppA application already exists on this SA core.

Here are the contents of this XML import file (myImportData.xml):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DAData xmlns="http://www.hp.com/DA">
	<ModelVersion>1.3</ModelVersion>
	<ReleaseVersion>09.003.001</ReleaseVersion>
	<SCM_VERSION>0</SCM_VERSION>
	<Applications>
		<Application>
			<Name>MyAppA</Name>
			<Description>This application exists</Description>	
		</Application>
	<Application>
		<Name>MyAppB</Name>
		<Description>This is a new application - no conflict</Description>
	</Application>
	<Application>
		<Name>MyAppC</Name>
		<Description>This is a new application - no conflict</Description>
	</Application>	
	<Application>
		<Name>MyAppD</Name>
		<Description>This is a new application - no conflict</Description>
	</Application>
	</Applications>
</DAData>

Example 1: Preview of full import

The following command previews the import of all Application Deployment information in the myImportData.xml file:

/opt/opsware/da/bin/admtool.sh -p --importFile /tmp/myImportData.xml

The following messages appear on stdout when you perform the preview:

In this case, MyAppA will not be imported because it already exists on this SA core, and the default conflict resolution strategy (skip) applies.

To use the overwrite conflict resolution strategy, specify this command instead:

/opt/opsware/da/bin/admtool.sh -p --importFile /tmp/myImportData.xml --importConflict overwrite

In this case, the following messages appear on stdout:

Example 2: Preview of partial import

The following command previews the import of MyAppA and MyAppB:

/opt/opsware/da/bin/admtool.sh -p --importAppList "MyAppA;MyAppB" --importFile /tmp/myImportData.xml

In this case, MyAppA will not be imported because it already exists on this SA core, and the default (skip) conflict resolution strategy applies. MyAppC and MyAppD will not be imported, because they were not part of the --importAppList argument.

To preview this import using the overwrite conflict resolution strategy, use this command:

/opt/opsware/da/bin/admtool.sh -p --importAppList "MyAppA;MyAppB" --importFile /tmp/myImportData.xml --importConflict overwrite

In this case, the following messages appear on stdout: