Sun N1 Service Provisioning System 5.1 Plan and Component Developer's Guide

Resource Descriptor File Concepts

A resource descriptor file specifies the owner, group, and permission settings to use for the files and directories that comprise the resource of a simple component. This resource descriptor is an XML file. For information about the XML schema for this file, see Chapter 5, Resource Descriptor Schema, in Sun N1 Service Provisioning System 5.1 XML Schema Reference Guide. By using a resource descriptor file, you can override the permissions that are determined at component check-in time.

When a resource descriptor file is not used, a resource uses the owner, group, and permission settings it has at check-in time. This situation is the default case when you perform the check-in on a UNIX system. When you check in a component on a Windows system, the default settings are as if you used the :NONE: value for each of the settings in a resource descriptor file.

When you use a resource descriptor file, a resource uses the owner, group, and permission settings specified by the resource descriptor. If an <entry> element is specified for a resource, the settings are taken from that entry. If the entry does not specify all of the settings, the missing setting values are taken from the <defaultEntry>, if present. If those setting values are not specified in a <defaultEntry>, the resource uses the setting values it had at check-in time.

If no <entry> element is specified for a resource, the resource uses the settings specified in <defaultEntry>, if present. If no <defaultEntry> is present, the resource uses the settings it had at check-in time.

Use the :NONE: value to tell the provisioning system to use the default settings from the file system on which the component will be deployed. You can specify the :NONE: value for any setting specified in a <defaultEntry> block or in an <entry> for a resource.

A resource descriptor file is only used when deploying a component to a UNIX system. If a component is deployed to a Windows system, the resource descriptor file is ignored. So, if your component only applies to Windows systems, do not create a resource descriptor file.

A resource descriptor file can be used by simple components that extend the system#file and system#directory component types. A resource descriptor file can also be used by a component that extends the com.sun.linux#rpm component type, which is part of the Linux plug-in.

You check in the resource descriptor file at the same time that you check in your component. When you attempt a checkin-current for a component that used a resource descriptor file for its last checkin, the provisioning system expects to find the resource descriptor in the original check-in location. Thus, if you move the file to a different location and attempt a checkin-current for the component, the check-in operation fails.

You can download the resource descriptor for a simple component that has been checked in to see the settings for every file that is part of the component's resource.

You might use this download feature to update the file and check in an updated version of the component. First, you download the resource descriptor file and then check out the associated component's resource. Then, you modify the resource descriptor file and use it to check in a new version of the component.

The resource descriptor you download might differ from the resource descriptor you used to check in the component. Differences might appear because the descriptor you use to check in a component is not required to have information about every file in the resource, or to have full information for every entry. Notice that no <defaultEntry> block appears in the downloaded resource descriptor file. Instead, every file is described in its own <entry>.