Overview

Namespaces

  • Authorization_Service
  • Logging_Service
  • Member_Authority
  • Overview
  • Project_Authority
  • Service_Registry
  • Slice_Authority

Classes

  • Service_Registry
  • Overview
  • Namespace
  • Class
  • Tree
  1: <?php
  2: //----------------------------------------------------------------------
  3: // Copyright (c) 2012 Raytheon BBN Technologies
  4: //
  5: // Permission is hereby granted, free of charge, to any person obtaining
  6: // a copy of this software and/or hardware specification (the "Work") to
  7: // deal in the Work without restriction, including without limitation the
  8: // rights to use, copy, modify, merge, publish, distribute, sublicense,
  9: // and/or sell copies of the Work, and to permit persons to whom the Work
 10: // is furnished to do so, subject to the following conditions:
 11: //
 12: // The above copyright notice and this permission notice shall be
 13: // included in all copies or substantial portions of the Work.
 14: //
 15: // THE WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 16: // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 17: // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 18: // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 19: // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 20: // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 21: // OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS
 22: // IN THE WORK.
 23: //----------------------------------------------------------------------
 24: 
 25: namespace Service_Registry;
 26: 
 27: /**
 28:  * GENI Clearinghouse Service Registry (SR) controller interface
 29:  * <br><br>
 30:  * The Service Registry maintains a list of services registered
 31:  * with the clearinghouse, and their type, URL and certificate (signed
 32:  * by the SR itself).
 33:  * <br><br>
 34:  * Supports these modification interfaces:
 35:  <ul>
 36:  <li>success <= register_service(service_type, service_url, attributes)</li>
 37:  <li>success <= remove_service(service_id)
 38:  </ul>
 39:  * <br><br>
 40:  * Supports these query interfaces (where 'service' represents the tuple [id service_type service_url service_cert service_cert_contents service_name service_description]):
 41:  <ul>
 42:  <li>[service]* <= get_services()</li>
 43:  <li>[service]* <= get_services_of_type(service_type)</li>
 44:  <li>[service]* <= get_service_by_id(service_id)</li>
 45:  <li>[service]* <= get_services_by_attributes(attribute_sets)</li>
 46:  <li>[attribute_name attribute_value]* <= get_attributes_for_service(service_id)</li>
 47: </ul>
 48:  **/
 49: class Service_Registry {
 50: 
 51: /**
 52:  * Get all services currently registered with SR 
 53:  *
 54:  * @param dict $args_dict Dictionary containing name/value pairs:
 55: <ul>
 56:    <li>"operation" : name of this method ("get_services")</li>
 57: </ulL
 58:  * @return array  List of service info tuples (id, service_type, service_url, service_cert, service_cert_contents, service_name, service_description)
 59:  *   
 60:  */
 61: function get_services($args_dict)
 62: {
 63: }
 64: 
 65: /**
 66:  * Get all services of given type currently registered with SR 
 67:  *
 68:  * @param dict $args_dict Dictionary containing name/value pairs:
 69: <ul>
 70:    <li>"operation" : name of this method ("get_services_of_type")</li>
 71:    <li>"service_type" : Type of service requested</li>
 72: </ul>
 73:  * @return array List of service info tuples (id, service_type, service_url, service_cert, service_cert_contents, service_name, service_description) of given type
 74:  *   
 75:  */
 76: function get_services_of_type($args_dict)
 77: {
 78: }
 79: 
 80: /**
 81:  * Get the service with the given id.
 82:  *
 83:  * @param dict $args_dict Dictionary containing name/value pairs:
 84: <ul>
 85:    <li>"operation" : name of this method ("get_service_by_id")</li>
 86:    <li>"service_id" : ID of given service</li>
 87: </ul>
 88:  * @return array List of service info tuples (id, service_type, service_url, service_cert, service_cert_contents, service_name, service_description) of given ID
 89:  *   
 90:  */
 91: function get_service_by_id($args_dict)
 92: {
 93: }
 94: 
 95: /**
 96:  * Get the service that match one of a list of name/value attribute sets
 97:  *
 98:  * @param dict $args_dict Dictionary containing name/value pairs:
 99: <ul>
100:    <li>"operation" : name of this method ("get_service_by_id")</li>
101:    <li>"attribute_sets" : List of dictionaries of name/value pairs, the entries of one of which must all match a given service to be returned. ("OR" OF "ANDS")</li>
102: </ul>
103:  * @return array List of service info tuples (id, service_type, service_url, service_cert, service_cert_contents, service_name, service_description) matching all of the requested attributes in one of the given sets of attributes
104:  *   
105:  */
106: function get_service_by_attributes($args_dict)
107: {
108: }
109: 
110: /**
111:  * Register a new service with the Service Registry
112:  * @param dict $args_dict Dictionary containing name/value pairs:
113: <ul>
114:    <li>"operation" : name of this method ("register_service")</li>
115:    <li>"service_type" : type of service (e.g. AM, PA, SA, etc.) </li>
116:    <li>"service_name" : name of service</li>
117:    <li>"service_url" : URL associated with service</li>
118:    <li>"service_cert" : name of file containing service certificate</li>
119:    <li>"service_description" : description of service </li>
120:    <li>"attributes" : Dictionary of name/value pairs associated with service (for querying) </li>
121:  </ul>
122:  * @return int ID of service registered or error code
123:  */
124: function register_service($args_dict)
125: {
126: }
127: 
128: /**
129:  * Remove a given service from the Service Registry
130:  *
131:  * @param dict $args_dict Dictionary containing name/value pairs:
132: <ul>
133:    <li>"operation" : name of this method ("remove_service")</li>
134:    <li>"service_id" : ID of service to be removed</li>
135: </ul>
136: * @return boolean Success/Failure
137:  */
138: function remove_service($args_dict)
139: {
140: }
141: 
142: /**
143:  * Get the version of the API of this particular service provider
144:  * @param dict $args_dict Dictionary containing 'operation' argument
145:  * @return number Version of API of this particular service provider
146:  */
147: function get_version($args_dict)
148: {
149: }
150: 
151: }
152: 
153: ?>
154: 
155: 
API documentation generated by ApiGen 2.8.0