


RAP(8)                                                     RAP(8)


NNAAMMEE
       rap - RAP, character-based resource administration program

SSYYNNOOPPSSIISS
       rraapp [ --cc ] [ --ii _f_i_l_e ] [ --ss _s_e_r_v_e_r ] [ --pp _p_r_o_g_n_u_m ]  [  --vv
       _v_e_r_s_i_o_n ] [ _q_u_e_r_y ] ...

       rraapp [ --cc ] [ --ii _f_i_l_e ] --ff _r_e_s_f_i_l_e ...  [ _q_u_e_r_y ] ...
       rraapp [ --ii _f_i_l_e ] --nn _n_d_b_m_f_i_l_e [ _q_u_e_r_y ] ...

DDEESSCCRRIIPPTTIIOONN
       The  rraapp  command  is  a command-line based administrative
       program for services using the Legato Resource Administra-
       tion  Platform  (RAP).  Normally, a user types commands on
       standard input  and  responses  (such  as  the  result  of
       queries) are produced on standard output.  The rraapp command
       can be used to query and modify resources in  four  forms:
       in files, in an nnddbbmm(3) database, talking to a service, or
       using the RAP Resource Directory, which  is  the  default.
       There  is also a visual mode that uses the ccuurrsseess(3) pack-
       age to do full  screen  interactive  administration  on  a
       character-only terminal.

OOPPTTIIOONNSS
       --cc     Use  the  ccuurrsseess(3)  package  to  implement a full-
              screen display mode, just like the  vviissuuaall  command
              described below.

       --ii _i_n_f_i_l_e
              Take  input  commands  from  _i_n_f_i_l_e instead of from
              standard  input.  In  this  mode,  the  interactive
              prompt  will  not  be  printed.  The file name -- is
              used to indicate reading from standard  input,  but
              without the prompt.

       _q_u_e_r_y  If  a  query  is  specified  (in  the  form  of  an
              attribute list), the edit operation (see below)  is
              performed  on  the  results of the query.  See COM-
              MANDS, below, for more information on how the  edit
              command works.

       --ss _s_e_r_v_e_r --pp _p_r_o_g_r_a_m --vv _v_e_r_s_i_o_n
              Administers  through  a  connection  to the service
              with the given RPC program number and version  num-
              ber running on the given server machine.

       --ff _r_e_s_f_i_l_e
              Administers  the  RAP  resource file _r_e_s_f_i_l_e as its
              database of resources.  If more than one  --ff  argu-
              ment is given all of the listed files will be used.

       --nn _n_d_b_m_f_i_l_e
              Administers the nnddbbmm(3)  resource  database.   Used
              only for debugging.



NetWorker rt_1998_4Q.Build.MMaJrFcehra0l8_,0021000                        1





RAP(8)                                                     RAP(8)


RREESSOOUURRCCEESS
       Each  RAP  resource  is  described  by  a  list  of  named
       attributes. Each attribute can have zero or  more  values.
       The  attribute  names  and  values  are all represented by
       printable strings.  Upper and lower case  is  not  distin-
       guished  for  sake  of  comparison, and spaces are ignored
       except inside the names and values.

       The rules for specifying attributes  and  attribute  lists
       are:

       _a_t_t_r_i_b_u_t_e ::=  _n_a_m_e [ :: _v_a_l_u_e [ ,, _v_a_l_u_e]* ]
              An  attribute  is  a  name optionally followed by a
              colon followed by zero or more values, with  multi-
              ple values separated by commas.  A comma at the end
              of a line continues the line.

       _a_t_t_r_i_b_u_t_e _l_i_s_t ::= _a_t_t_r_i_b_u_t_e [ ;; _a_t_t_r_i_b_u_t_e ]*
              An attribute list is one or more  attributes  sepa-
              rated  by  semicolons.  A semicolon at the end of a
              line continues the line. The list  is  ended  by  a
              newline  that  is  not preceded by a comma or semi-
              colon.  Quotes and  back-slashes  can  be  used  to
              quote special characters.

       Here is an example of an attribute list:


                       name: venus;
                       type: NSR client;
              remote access: venus, mars;

       For  more  information on attributes, attribute lists, the
       RAP  resource  format,  and  type  descriptors,  see   the
       rreessoouurrccee(5) manual page, or the manual page describing the
       appropriate resource type.

CCOOMMMMAANNDDSS
       In non-visual mode, rraapp expects a command  name  and  some
       optional  arguments  at  each input prompt.  Command names
       can be shortened to the smallest unique string (for  exam-
       ple, pp for pprriinntt).  Command arguments are always specified
       in the form of an attribute list.  Most  commands  operate
       on  a list of resources returned by a _q_u_e_r_y.  The query is
       specified as an attribute list  which  is  used  to  match
       resources with the following rules:

              1)  If  more  than one attribute is specified, then
              the resource must match all attributes.

              2) If more than one value is specified the resource
              can match any one of the values.

              3)  Values  in  a query may be in the form of eedd(1)



NetWorker rt_1998_4Q.Build.MMaJrFcehra0l8_,0021000                        2





RAP(8)                                                     RAP(8)


              style regular  expressions.   A  pattern  match  is
              attempted  against  all  resources that contain the
              specified attribute.

              4) If an attribute is specified with no value, then
              the  resource  must  contain  an  attribute of that
              name.

       Thus, a query:
              type:NSR device;
              name:mars, venus;
              test
       will match all resources that have a ttyyppee  attribute  with
       the  value NNSSRR ddeevviiccee and a nnaammee attribute with a value of
       either mmaarrss or vveennuuss,  and  an  attribute  tteesstt  with  any
       value.

       If the query has only one name and no values (for example,
       if there is no semi-colon or colon in it), then  the  pro-
       gram  tries  to guess a more reasonable query. If the name
       is a host  name,  then  the  query  will  select  all  the
       resources  on the given host.  Otherwise, the name will be
       interpreted as a type name,  and  all  resources  of  that
       given type will be selected.

       bbiinndd [_q_u_e_r_y]
              Bind   to   the  service  that  owns  the  resource
              described by _q_u_e_r_y.   If  no  query  is  specified,
              queries are sent to the RAP Resource Directory, and
              update, create, and delete commands to the  service
              that owns the resource being changed.

       ccrreeaattee _a_t_t_r_i_b_u_t_e _l_i_s_t
              Create a resource with the given attributes. One of
              the attributes must be ttyyppee to specify the resource
              type.   The  ttyyppeess  command can be used to find out
              which types a server supports.   If  no  particular
              server  is bound, then the location attributes must
              also be specified to determine where  the  creation
              takes place.

       ddeelleettee [_q_u_e_r_y]
              Delete  the resources that match the current query.
              If a _q_u_e_r_y is specified,  it  becomes  the  current
              query.

       eeddiitt [_q_u_e_r_y]
              Edit  the  resources  that match the current query.
              If a _q_u_e_r_y is specified,  it  becomes  the  current
              query.   If the environment variable EDITOR is set,
              then that editor will be invoked,  otherwise  vvii(1)
              will be started. When the editor exits, rraapp applies
              update, delete and create operations based  on  the
              changes  to the resource descriptors. Be careful to



NetWorker rt_1998_4Q.Build.MMaJrFcehra0l8_,0021000                        3





RAP(8)                                                     RAP(8)


              not edit the resource identifier attribute, and  to
              write the file out before exiting the editor.

       hheellpp [_c_o_m_m_a_n_d]
              Print a message describing a command. If no command
              name is given a synopsis of all of the commands  is
              given.

       pprriinntt [_q_u_e_r_y]
              Print  the  resources that match the current query.
              If a _q_u_e_r_y is specified,  it  becomes  the  current
              query.  If  the current show list is not empty only
              the attributes named in the show list will be  dis-
              played.

       sshhooww [_n_a_m_e;; ...]
              If  a  name  list (really an attribute list with no
              values) is specified, add those names to  the  show
              list.  These attributes will be displayed in subse-
              quent pprriinntt commands.  If no name list is given the
              show  list  is  cleared,  resulting  in all visible
              attributes being shown.

       ttyyppeess  Print a list of all known types.

       uuppddaattee _a_t_t_r_i_b_u_t_e_s
              Update the resources given by the current query  to
              match _a_t_t_r_i_b_u_t_e_s.

       qquuiitt   Exit the program.

       vviissuuaall  [_q_u_e_r_y]
              Enter  a full-screen mode using the ccuurrsseess(3) pack-
              age to step through  commands  in  a  perhaps  more
              user-friendly  manner  than the command line inter-
              face.  You can get this mode directly using the  --cc
              command line argument.

       ooppttiioonn [_o_p_t_i_o_n;...]
              This  command  enables  some  options to change the
              display of resources.  With no  arguments  it  dis-
              plays  the  current options; with a list of options
              it turns the specified ones on.  The  options  are:
              DDyynnaammiicc  displays  all dynamic attributes, even the
              normally  hidden   ones.    HHiiddddeenn   displays   all
              attributes,   even   the   normally   hidden  ones.
              RReessoouurrccee IIDD displays  the  resource  identifier  on
              each  resource, a number that is used internally to
              provide sequencing and uniqueness.

       uunnsseett [_o_p_t_i_o_n_;_._._.]
              This command turns off the specified option.





NetWorker rt_1998_4Q.Build.MMaJrFcehra0l8_,0021000                        4





RAP(8)                                                     RAP(8)


       .. [_q_u_e_r_y]
              If a _q_u_e_r_y is specified, this command will set  the
              current  query  without printing the results of the
              query.  Otherwise,  it  will  display  the  current
              query, show list, and server binding.

       ?? [_c_o_m_m_a_n_d]
              Same as the hheellpp command above.

EEXXAAMMPPLLEESS
       print type:NSR device
              Print  all  resources  of  type NNSSRR ddeevviiccee and make
              this the current query.

       show type; name
              Set the show list to only  display  the  attributes
              ttyyppee and nnaammee.

       delete
              Delete  all resources that match the current query.

       delete type:NSR device; hostname: mars
              Delete the resources  with  attributes:  ttyyppee::  NNSSRR
              ddeevviiccee and hhoossttnnaammee:: mmaarrss.

       bind type:NSR
              Limit  administration  to  the  NSR service and the
              resources it manages.

SSEEEE AALLSSOO
       eedd(1), vvii(1), ccuurrsseess(3), nnssrr__rreessoouurrccee(5) rreessoouurrccee(5).

DDIIAAGGNNOOSSTTIICCSS
       The following exit status values are meaningful:

       0      Interactive mode exited normally.

       1      There was a usage or other non-query related error.

       2      When  reading  input  from a file (--ii _f_i_l_e), one or
              more RAP operations failed.  This status  is  never
              returned interactively.

       The  following  standard error messages have the following
       meanings.  Note that individual servers may  return  addi-
       tional  error  messages  besides those listed here, or may
       return more specific forms  of  these  messages  including
       more information.

       Operation not supported
              The  requested  operation  is  not supported by the
              current server.





NetWorker rt_1998_4Q.Build.MMaJrFcehra0l8_,0021000                        5





RAP(8)                                                     RAP(8)


       Bad getids arguments
              A lookup-by-ID was attempted, and the requested IDs
              are not in the correct format.

       Bad create arguments
              One  or  more of the attributes or values specified
              in the requested  resource  create  operation  were
              invalid.   After  correcting  the  mistake(s),  the
              operation may be re-attempted.

       Bad delete arguments
              One or more of the attributes or  values  specified
              in  the  requested  resource  delete operation were
              invalid.  One possibility is that the resource  may
              not be deleted.

       Bad update arguments
              One  or  more of the attributes or values specified
              in the requested  resource  update  operation  were
              invalid.   After  correcting  the  mistake(s),  the
              operation may be re-attempted.

       Bad retrieve arguments
              One or more of the attributes or  values  specified
              in  the  requested  resource  update operation were
              invalid.   After  correcting  the  mistake(s),  the
              operation may be re-attempted.

       Bad or missing hostname
              The  server specified was not valid, or no hostname
              was given.  Correct the  name  of  the  server  and
              retry the operation.

       Bad or missing version number
              An  internal  error  occured.   A RAP operation was
              attempted to a server supporting a  different  ver-
              sion  of the protocol.  Obtain a new version of the
              client program and try again.

       Bad or missing program number
              An internal error occured.   A  RAP  operation  was
              attempted  to  a server supporting a different ver-
              sion of the protocol.  Obtain a new version of  the
              client program and try again.

       Bad or missing attribute name
              An  attribute required when creating a new resource
              was missing.  Add the attribute and any needed val-
              ues to the request, and try again.

       No such type
              The  server  does  not  support  resources  of  the
              requested type.  Double-check  the  type  requested
              for typographical errors.



NetWorker rt_1998_4Q.Build.MMaJrFcehra0l8_,0021000                        6





RAP(8)                                                     RAP(8)


       Resource does not exist
              The  requested  resource does not exist; the opera-
              tion cannot be completed.

       Permission denied
              The user does not have permission  to  perform  the
              desired operation.

       Create permission denied
              The  user  does  not  have permission to create the
              desired resource.

       system error
              Some unspecified internal  system  error  occurred.
              The  operation  may be retried at a later time, and
              may succeed.  Additional errors  may  be  found  in
              server-specific log files.

       sequence number mismatch
              An update operation was attempted, but the sequence
              numbers had changed.  Re-retrieve the  resource(s),
              apply the desired change, and re-attempt the update
              operation.

       Resource already exists
              A create operation was attempted, but the  resource
              with the given key (usually name) already exists.

       Resource database failure
              Some internal error occured, such as running out of
              disk space.

       Resource parse error
              The syntax of the query was  incorrect,  and  could
              not  be  parsed.  Double-check the requested opera-
              tion for typographical errors and try again.

       Illegal values selection
              The value for a choice  attribute  was  not  valid.
              Check  the  valid  values  (from  the resource type
              descriptor), pick one  of  those  values,  and  re-
              attempt the operation.

       Illegal numeric value
              The  value  for  a numeric attribute was not valid.
              Check the ranges of valid values (from the resource
              type  descriptor),  pick a value on that range, and
              re-attempt the operation.

       Too many values
              Too many values many values were specified  for  an
              attribute  in  the  query.  This usually means that
              multiple values were  specified  for  an  attribute
              that only allows single values.



NetWorker rt_1998_4Q.Build.MMaJrFcehra0l8_,0021000                        7





RAP(8)                                                     RAP(8)


       Read-only attribute
              An  attempt  was  made to specify a new value for a
              read-only attribute.  Check the type descriptor for
              the resource for read-only attributes.

       Not such attribute in this type
              An  attribute name specified does not exist for the
              given resource type.  Check the type descriptor for
              the resource for valid attribute names.

       No type attribute specified
              A  query  did  not  specify  a  type attribute, and
              querying for all types was  not  valid.   Choose  a
              type,  add  that  to  the query, and re-attempt the
              query.

       No such host
              The specified server name does not exist.

       No such netgroup
              The specified NIS netgroup name does not exist.

       No such attribute
              An attribute name specified does not exist for  any
              resource  type.   Check  the  type  descriptors for
              valid attribute names.

       Resource database busy
              An operation was attempted that would have modified
              the  resource  database,  but the resource database
              was locked.  Wait a while and re-attempt the opera-
              tion.

























NetWorker rt_1998_4Q.Build.MMaJrFcehra0l8_,0021000                        8


