N1 Grid Service Provisioning System 5.0 XML Schema Reference Guide

Uninstall-Only Steps for Components

This section describes the <uninstall> and <undeployResource> steps, which can only be used within an uninstall block of a component.

<uninstall> Step

This step is used to uninstall a component from a target host, and can be used in an uninstall block of any component. This step causes the steps of the named uninstall block of the targeted component to be executed.

The syntax of this step is as specified for the simple plan <uninstall> step, except that the component targeter can be omitted, in which case <thisComponent> is assumed.

When used within a component, this step is often used to call into another existing uninstall block in the same component. In this case, the component is not uninstalled until the outermost uninstall block has completed its execution. Furthermore, the component is only uninstalled on the host on which the uninstall step was initially targeted, even if calls to other local uninstall blocks were retargeted to other hosts.

This step can also be used within composite components to uninstall referenced components. When a composite component is uninstalled, all of its nested referenced components that were not explicitly uninstalled are implicitly uninstalled by the system without running an uninstall block. However, top-level referenced components that were not explicitly uninstalled remain installed.

<undeployResource> Step

This step is used to remove a resource from the containing component. The step can only be used in an uninstall block of a simple component and has no attributes or child elements.

A directory type resource where deployMode=ADD_TO will have its files removed, but its subdirectories will remain.

A directory type resource where deployMode=REPLACE will have the entire directory and its contents removed.

All other resources are treated as simple files and are removed.

The resource is removed regardless of whether it was originally deployed during the installation of the component. Even if the component was installed using an install block that did not contain a <deployResource> step, the <undeployResource> step removes the resource as if it had been originally installed by the component.