Changes between Version 5 and Version 6 of NewTestbedAPISpec


Ignore:
Timestamp:
Jun 28, 2013 4:46:53 PM (11 years ago)
Author:
faber
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NewTestbedAPISpec

    v5 v6  
    4242[http://www.isi.edu/~faber/tmp/doc/net/deterlab/testbed/api/ApiInfo.html javadoc for ApiInfo]
    4343
    44 The sole operation in the ApiInfo service is {{{getVersion}}}.  The call is unauthenticated and can be made driectly from a web browser to confirm that the API is functioning and that the user can see DETERlab.
     44The primary operation in the ApiInfo service is {{{getVersion}}}.  The call is unauthenticated and can be made driectly from a web browser to confirm that the API is functioning and that the user can see DETERlab.
    4545
    4646 * '''Service:''' ApiInfo
     
    5252   * PatchLevel - A string containing the patch level
    5353   * KeyID - A string.  If the user presented a valid public key and passed the challenge, this is the sha1 hash of that key.  If no key was presented or an invalid one, this filed is not returned.
     54
     55There is an addtional simpler service, {{{echo}}}, that takes one parameter and returns it:
     56
     57 * '''Service:''' ApiInfo
     58 * '''Operation:''' echo
     59 * '''Input Parameters:'''
     60   * param - a string to echo
     61 * '''Return Values:'''
     62   * the same string
    5463
    5564== Users ==
     
    522531
    523532After {{{releaseExperiment}}} succeeds, experiment state remains in the testbed, but containers are stopped and resources are returned to the testbed.
     533
     534== Resources ==
     535
     536Resources are things that make up experiments.  There are several specialized resources used in experimentation that have their own suite of operations, and there is a general set of operations for future expansion.
     537
     538=== Computers ===
     539
     540Computers are the physical computing resources of the testbed.  A user may be interested in specific instances of a computer - {{{pc23}}} - or in information about types or classes of computers.  Both are possible to view with these calls.
     541
     542A user can view computers or classes by:
     543
     544 * '''Service:''' Resources
     545 * '''Operation:''' viewComputers
     546 * '''Input Parameters:'''
     547   * Userid - the user making the request (the owner on success)
     548   * Owner - an optional string the computer owner
     549   * NameRE - an optional string containing a regular expression matched against the name
     550   * Type - an optional string containing the computer types to look for
     551 * '''Return Values:'''
     552   * Zero or more structures with the following fields:
     553     * Name - a string, the name of this computer, if absent this is a class
     554     * Owner - a string, the owner of the computer or class
     555     * Type - a string containing the type of computer
     556     * Description - a string describing this computer or class
     557     * Allocated - an optional flag indicating whether this computer is allocated.  The field is absent all together if this structure describes a class
     558     * AllocatedExperiment - an optional string containing the experiment name if the computer is allocated and the user has the right to read the experiment
     559     * AllocatedProject - an optional string containing the project name in which the experiment is realized if the computer is allocated and the user has the right to read the project
     560     * ProjectDelete - an optional list of project names that can delete this resource
     561     * ProjectModify - an optional list of project names that can modify this resource
     562     * ProjectUse - an optional list of project names that can use this resource
     563     * ProjectRead - an optional list of projects names that can read this resource
     564
     565If any of the permission fields are not present, the class permissions apply.  If they are present for a specific computer, they specific computer's permissions override the class permissions.
     566
     567Administrators can add new computers or classes using
     568
     569 * '''Service:''' Resources
     570 * '''Operation:''' createComputer
     571 * '''Input Parameters:'''
     572   * Userid - the user making the request (the owner on success)
     573   * Name - an optional string, the name of this computer, if absent this is a class
     574   * Type - a string containing the type of computer
     575   * Description - an optional string describing this computer or class (If omitted for a computer, the type description is used)
     576   * ProjectDelete - an optional list of project names that can delete this resource
     577   * ProjectModify - an optional list of project names that can modify this resource
     578   * ProjectUse - an optional list of project names that can use this resource
     579   * ProjectRead - an optional list of projects names that can read this resource
     580 * '''Return Values:'''
     581   None
     582
     583Note that missing fields in a computer creation are generally filled in from the type.  Creating a computer or class without any projects that can use it is of questionable value.
     584
     585Similarly, they can modify an existing computer using (assuming they are in a project that allows modification of the class or computer):
     586
     587 * '''Service:''' Resources
     588 * '''Operation:''' modifyComputer
     589 * '''Input Parameters:'''
     590   * Userid - the user making the request
     591   * Name - an optional string, the name of this computer, if absent this is a class
     592   * Type - an optional string containing the type of computer
     593   * Description - an optional string describing this computer or class (If omitted for a computer, the type description is used)
     594   * ProjectDelete - an optional list of project names that can delete this resource
     595   * ProjectModify - an optional list of project names that can modify this resource
     596   * ProjectUse - an optional list of project names that can use this resource
     597   * ProjectRead - an optional list of projects names that can read this resource
     598 * '''Return Values:'''
     599   None
     600
     601Values passed in overwrite the current values if the user had modify rights.  One of Name or Type must be present.
     602
     603Finally an administrator can delete a computer:
     604
     605 * '''Service:''' Resources
     606 * '''Operation:''' removeComputer
     607 * '''Input Parameters:'''
     608   * Userid - the user making the request
     609   * Name - an optional string, the name of this computer, if absent this is a class
     610   * Type - an optional string, the type of computer.  May be omitted for specific computers
     611 * '''Return Values:'''
     612   None
     613
     614=== Images ===
     615
     616Images are saved container state - including saved physical container state.  These are selected in the experiment definition, but users may need to manipulate them directly.
     617
     618To read image information:
     619
     620 * '''Service:''' Resources
     621 * '''Operation:''' viewImages
     622 * '''Input Parameters:'''
     623   * Userid - the user making the request (the owner on success)
     624   * Owner - an optional string the computer owner
     625   * NameRE - an optional string containing a regular expression matched against the name
     626 * '''Return Values:'''
     627   * Zero or more structures with the following fields:
     628     * Name - a string, the name of this image
     629     * Owner - a string, the owner of the image
     630     * Description - a string describing this image
     631     * ValidIn - a list of container types that can use this image
     632     * ProjectDelete - a list of project names that can delete this resource
     633     * ProjectModify - a list of project names that can modify this resource
     634     * ProjectUse - a list of project names that can use this resource
     635     * ProjectRead - a list of projects names that can read this resource
     636
     637Images are created by operations on a container, but users can modify or delete their metadata:
     638
     639 * '''Service:''' Resources
     640 * '''Operation:''' modifyImage
     641 * '''Input Parameters:'''
     642   * Userid - the user making the request
     643   * Name - a string, the name of this image
     644   * Description - an optional string describing this computer or class
     645   * ValidIn - an optional list of container types that can use this image
     646   * ProjectDelete - an optional list of project names that can delete this resource
     647   * ProjectModify - an optional list of project names that can modify this resource
     648   * ProjectUse - an optional list of project names that can use this resource
     649   * ProjectRead - an optional list of projects names that can read this resource
     650 * '''Return Values:'''
     651   None
     652
     653
     654As with other resources, these values overwrite the existing parameters (except for name which is a selector).
     655
     656A user can delete an image:
     657
     658 * '''Service:''' Resources
     659 * '''Operation:''' removeImage
     660 * '''Input Parameters:'''
     661   * Userid - the user making the request (the owner on success)
     662   * Name - a string, the image to remove
     663 * '''Return Values:'''
     664   None
     665
     666
     667=== Pubkey ===
     668
     669Public/Private keypairs are used several places in the testbed for authentication and access.  For example, access to containers that present a computer interface is done using the ssh protocol.  These interfaces allow users to manipulate their keys.
     670
     671Viewing keys:
     672
     673* '''Service:''' Resources
     674 * '''Operation:''' viewKeys
     675 * '''Input Parameters:'''
     676   * Userid - the user making the request
     677   * Owner - an optional string the computer owner
     678   * type - an optional string containing the kind of keys to report
     679 * '''Return Values:'''
     680   * Zero or more structures with the following fields:
     681     * Name - a string, the name of this key
     682     * Owner - a string, the owner of the key
     683     * Description - a string describing this key
     684     * KeyData - an opaque data value - the key data
     685     * ProjectDelete - a list of project names that can delete this resource
     686     * ProjectModify - a list of project names that can modify this resource
     687     * ProjectUse - a list of project names that can use this resource
     688     * ProjectRead - a list of projects names that can read this resource
     689
     690
     691Users can add and delete keys:
     692
     693* '''Service:''' Resources
     694 * '''Operation:''' addKey
     695 * '''Input Parameters:'''
     696   * Userid - the user making the request (the owner on success)
     697   * Owner - an optional string the computer owner
     698   * Name - an optional string, the name of this key (system will assign if omitted)
     699   * Description - an optional string describing this key
     700   * KeyData - an opaque data value - the key data
     701   * ProjectDelete - a list of project names that can delete this resource
     702   * ProjectModify - a list of project names that can modify this resource
     703   * ProjectUse - a list of project names that can use this resource
     704   * ProjectRead - a list of projects names that can read this resource
     705 * '''Return Values:'''
     706   * None
     707
     708 * '''Service:''' Resources
     709 * '''Operation:''' removeKey
     710 * '''Input Parameters:'''
     711   * Userid - the user making the request
     712   * Name - a string, the name of this key