.\" $Id: resource.5,v 1.1 2003/07/10 20:13:14 btompkin Exp $ Copyright (c) 2003, Legato Systems Incorporated" .\" Copyright (c) 2003 Legato Systems, Incorporated. .\" All rights reserved. .TH RESOURCE 5 "Aug 23, 06" "StorEdge EBS 7.3.2" .SH NAME resource descriptors \- RAP resource file format .SH SYNOPSIS .I resource ::= .I "attribute list" .I .br .I "attribute list" ::= .I "attribute" [ .BI ; " attribute" ]* .br .I "attribute" ::= .I name [ .BI : " value" [ .BI , " value" ]* ] .br .I "name, value" ::= .I "" .SH DESCRIPTION Files with the .B .res suffix use a common format to describe .IR resources. Generally, a resource represents something that a system administrator might want to manage (for example, devices, backup schedules, file systems), or that a user might want to locate. The encoding of the information describing a resource is called the .IR "resource descriptor" . Resource description files are are accessed by applications and services that use the Resource Administration Platform .SM (RAP), but they can also be viewed with a normal text editor. .LP Each resource descriptor is made up of a list of attributes, and ends in a blank line. Each attribute in the attribute list has a name and an optional list of values. The attribute name is separated from the attribute values by a colon (\fB:\fP), attribute values are separated by commas (\fB,\fP), and attributes are separated by semicolons (\fB;\fP). A comma at the end of a line continues the line, as does a back-slash (\fB\\\fR) character. The back-slash character can also be used to escape the special meaning of a single character (such as comma, semicolon, double quote, and back-slash), or the string can be included in quotes. A line beginning with a pound-sign (\fB#\fR) is a comment and the rest of the line is ignored. The end of a resource attribute list is marked with a blank line. .LP The attribute name and values can contain any printable character. Upper and lower case is ignored on comparisons, and extra white space is ignored on both ends but not in the middle of names and values. For example, .nf .RS \fR\s10Name: testing 1 2;\fP\s0 .RE will match .RS .nf \fR\s10name : Testing 1 2 ;\fP\s0 .RE but is different than .nf .RS \fR\s10Name: testing 1 2;\fP\s0 .RE .fi .LP Below is an example which includes two resources. The first resource has eight attributes: .BR type , .BR name , .BR server , .BR schedule , .BR directive , .BR group , .BR "save set" , and .BR "remote access" . The .B group attribute has two values: .BR marketing " and " sales . The .B remote access attribute has no value. The second example includes an attribute that needs quotes because it contains a colon. .LP .RS .nf \fR\s10 .ta \w'remote access:'u+2nR +1m type: NSR client; name: venus; server: mars; schedule: Default; directive: custom; group: marketing, sales; save set: /, /usr; remote access: ; type: NSR group; name: engineering servers; autostart: Enabled; start time: "3:33";\fP\s0 .ta .RE .fi .LP Each resource includes the special attribute .BR type . The .B type attribute defines which other attributes a resource can contain. For example, a resource with type printer might include an attribute .BR "paper size" , while in a resource of type .BR "NFS filesystem" this attribute makes no sense. The type attribute is case sensitive and must be used exectly as described. For example, a type "NSR group" is different from "nsr group". .LP .LP The .B name attribute is a descriptive name of the object that a resource represents. In the example above, the name of the second resource is \fBengineering servers\fR, which describes a group of machines to be saved together. .LP The .B administrator attribute is the list of users that have permission to modify this resource. This attribute is inherited from the server resource when a new resource is created. The administrator in the server resource also controls who has permission to create new resources and delete old ones. .LP The .B resource identifier is set and used internally by the .SM RAP system. It provides a unique identification of each resource, and although it is sometimes printed like an attribute, it is stored differently. When new resources are created the .B resource identifier attribute should be left off. This signals the system that this is a new resource and a new identifier will be assigned. .SH TYPES There are special resources that define the attributes found in a given type. They are called resource type descriptors. Type descriptors have the same syntax as other resources except that they have a type attribute with the value .B type and a .B type name attribute with the value of the type they describe. For example, the resource type descriptor for type NFS filesystem would have, among its other attributes: .RS \fR\s10type:type; type name:NFS filesystem\fP\s0 .RE .LP Type descriptors are used internally, and should normally never be stored in files or seen by administrators. For each of the other attributes in a type descriptor, there are three or more values. The first value gives the base type, the second value gives a list of flags separated by spaces, the third value is a string for on-line help, and any subsequent strings are default values. This type information is used by system administration tools to improve the user interface. .SH FILES .TP 10 .B *.res Files that contain resource descriptors. .SH SEE ALSO .BR nsradmin (1m).