Sun N1 Service Provisioning System 5.1 XML Schema Reference Guide

<addFile> Element

The <addFile> element is a child of the <capture> element and specifies a file that is to be captured as part of the containing snapshot.

ATTRIBUTES FOR THE <addFile> ELEMENT

The <addFile> element includes the following attributes:

  • path – A required attribute that specifies the path name of a file or directory on the file system of the target host. This attribute can reference simple substitution variables.

  • ownership – An optional attribute that specifies the ownership option for the captured file.

    One aspect of the installed state that is captured by the snapshot is file and directory ownership. This ownership is not the same as UNIX permissions. The ownership is more closely tied to the concept of reference counts. Specifically, a file or directory can be captured as being owned by one or more snapshots.

    If the file owner later changes as a result of another component installation, this change can be recognized and reported when the file is compared against its initial state. This feature helps to track down differences that result from one component unintentionally overwriting files associated with another component. Snapshot ownership information is captured in a repository on the target host, which is known as the owners table.

    The values of the ownership attribute have the following semantics:

    • SET_SELF – When the ownership is set in this way, the owners table is updated to contain a single entry for the associated file or directory. That entry lists the executing installed component and snapshot as owners. The entry also lists the capture area ID of the captured contents of the file or directory.

    • ADD_SELF – When the ownership is set in this way, the installed component and snapshot are added as additional owners and share the existing capture area ID as the previous owners.

    • ADD_TEMP – This value is like ADD_SELF except that a new capture is always created and its ID is always used for the new entry rather than sharing the ID of the other owners.

    If this attribute is omitted, the default value is SET_SELF.

  • filter – An optional attribute of type boolean that describes whether to capture files, directories, or both.

    If the value of path is a directory, this attribute is used to indicate whether the directory itself, the files it contains, or both should be captured. If the value of path is not a directory, this attribute is ignored and the file is captured directly. If this attribute is omitted, the default BOTH is used.

    The values for this attribute are as follows:

    • DIRECTORIES

    • FILES

    • BOTH

  • recursive – An optional attribute that indicates whether subdirectories should be recursively captured by using the current filter settings.

    If the value of path is a directory, this attribute indicates whether subdirectories should be recursively captured by using the current filter settings. If the value of path is not a directory, this attribute is ignored and the file is captured directly. The default value is true.

  • displayName – An optional attribute that is a string to be included in the display when this snapshot entry is compared against another.

    This attribute can reference simple substitution variables.