Overview

Namespaces

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

Classes

  • Slice_Authority
  • Overview
  • Namespace
  • Class
  • Tree
  1: <?php
  2: 
  3: namespace Slice_Authority;
  4: 
  5: //----------------------------------------------------------------------
  6: // Copyright (c) 2012 Raytheon BBN Technologies
  7: //
  8: // Permission is hereby granted, free of charge, to any person obtaining
  9: // a copy of this software and/or hardware specification (the "Work") to
 10: // deal in the Work without restriction, including without limitation the
 11: // rights to use, copy, modify, merge, publish, distribute, sublicense,
 12: // and/or sell copies of the Work, and to permit persons to whom the Work
 13: // is furnished to do so, subject to the following conditions:
 14: //
 15: // The above copyright notice and this permission notice shall be
 16: // included in all copies or substantial portions of the Work.
 17: //
 18: // THE WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 19: // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 20: // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 21: // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 22: // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 23: // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 24: // OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS
 25: // IN THE WORK.
 26: //----------------------------------------------------------------------
 27: 
 28: /**
 29:  * GENI Clearinghouse Slice Authority (SA) controller interface
 30:  * <br><br>
 31:  * The SA maintains a list of slices, their details and members
 32:  * and provides access to creating, looking up, updating and renewing slices.
 33:  * In addition, provides access to slice and user credentials for interacting
 34:  * with slices within the AM API.
 35:  * <br><br>
 36:  * Supports these methods:
 37: <ul>
 38: <li>   slice_credental <= get_slice_credential(slice_id, experimenter_cert) </li>
 39: <li>   user_credential <= get_user_credential(experimenter_cert) </li>
 40: <li>   slice_id <= create_slice(slice_name, project_id, project_name, owner_id, description) </li>
 41: <li>   [slice_id]* <= lookup_slice_ids(project_id, [owner_id]) </li>
 42: <li>   [id, slice_name, project_id, expiration, creation, owner_id, slice_description, slice_email, slice_urn]* <= lookup_slices(project_id, member_id) </li>
 43: <li>   [id, slice_name, project_id, expiration, creation, owner_id, slice_description, slice_email, slice_urn] <= lookup_slice(slice_id) </li>
 44: <li>   [id, slice_name, project_id, expiration, creation, owner_id, slice_description, slice_email, slice_urn] <= lookup_slice_by_urn(slice_urn) </li>
 45: <li>   success <= renew_slice(slice_id, expiration) </li>
 46: <li>   success <= add_slice_member(slice_id, member_id, role_type) </li>
 47: <li>   success <= remove_slice_member(slice_id, member_id) </li>
 48: <li>   success <= change_slice_member_role(slice_id, member_id, role_type) </li>
 49: <li>   [member_id, role]* <= get_slice_members(slice_id, role_type=null)  </li>
 50: <li>   [slice_id, member_id, role]* <= get_slice_members_for_project(project_id, role_type=null) </li>
 51: <li>   [slice_id]* <= get_slices_for_member(member_id, is_member, role_type=null) </li>
 52: </ul>
 53:  */
 54: class Slice_Authority {
 55: 
 56: /**
 57:  * Create a slice credential and return it 
 58:  *
 59:  * @param dict $args_dict 
 60:  Dictionary containing name/value pairs:
 61: <ul>
 62:     <li>"operation" : name of this method ("get_slice_credential")</li>
 63:     <li>"slice_id" : ID of slice for which to return credential</li>
 64:     <li>"experimenter_cert" : Certificate of experimenter for whom to generate slice credential</li>
 65: </ul>
 66:  * @return slice_credential Slice credential for given experimenter and slice
 67:  */
 68: function get_slice_credential($args_dict)
 69: {
 70: }
 71: 
 72: /**
 73:  * Create a user credential and return it 
 74:  *
 75:  * @param dict $args_dict Dictionary containing name/value pairs:
 76:  <ul>
 77:   <li>"operation" : name of this method ("get_user_credential")</li></li>
 78:     <li>"experimenter_cert" : Certificate of experimenter for whom to generate slice credential</li>
 79:  </ul>
 80:  * @return user_credential User credential for given experimenter 
 81:  */
 82: function get_user_credential($args_dict)
 83: {
 84: }
 85: 
 86: /**
 87:  * Create a slice for given project, name, urn, owner_id 
 88:  *
 89:  * @param dict $args_dict Dictionary containing name/value pairs:
 90: <ul>
 91:    <li>"operation" : name of this method ("create_slice")</li>
 92:    <li>"slice_name" : name of slice to be created</li>
 93:    <li>"project_id" : ID of project to which to associate slice</li>
 94:    <li>"project_name" : name of project to which to associate slice</li>
 95:    <li>"owner_id" : ID of owner of slice</li>
 96:    <li>"description" : Description associated with slice</li>
 97: </ul>
 98:  * @return boolean Success / Failure
 99:  */
100: function create_slice($args_dict)
101: {
102: }
103: 
104: /**
105:  * *** NOT IMPLEMENTED! ***
106:  * Make slice 'disabled' (that is, one can no longer allocate resources to it)
107:  * Whether this actually deletes the slice is implementation and poicy dependent.
108:  * <br><br>
109:  * Will return an error if this call is made when there are active slivers
110:  * on the given slice.
111:  *
112:  * @param dict $args_dict Dictionary containing name/value pairs:
113: <ul>
114:    <li>"operation" : name of this method ("renew_slice")</li>
115:    <li>"slice_id" : ID of slice</li>
116: </ul>
117:  * @return boolean Success/Failure
118:  */
119: function disable_slice($args_dict)
120: {
121: }
122: 
123: /**
124:  * Renew slice of given ID with given new expiration time
125:  *
126:  * @param dict $args_dict Dictionary containing name/value pairs:
127: <ul>
128:    <li>"operation" : name of this method ("renew_slice")</li>
129:    <li>"slice_id" : ID of slice</li>
130:    <li>"expiration : new expiration time of slice</li>
131: </ul>
132:  * @return boolean Success/Failure
133:  */
134: function renew_slice($args_dict)
135: {
136: }
137: 
138: /**
139:  * Add a member of given role to given slice
140:  *
141:  * @param dict $args_dict Dictionary containing name/value pairs:
142: <ul>
143:    <li>"operation" : name of this method ("add_slice_member")</li>
144:    <li>"slice_id" : ID of slice to be modified</li>
145:    <li>"member_id : ID of member to be associated with given slice</li>
146:    <li>"role_type" : role of member within slice</li>
147: </ul>
148:  * @return boolean Success/Failure
149:  */
150: function add_slice_member($args_dict)
151: {
152: }
153: 
154: /**
155:  * Remove a member from given slice
156:  *
157:  * @param dict $args_dict Dictionary containing name/value pairs:
158: <ul>
159:    <li>"operation" : name of this method ("remove_slice_member")</li>
160:    <li>"slice_id" : ID of slice to be modified</li>
161:    <li>"member_id : ID of member to be disassociated with given slice</li>
162: </ul>
163:  * @return boolean Success/Failure
164:  */
165: function remove_slice_member($args_dict)
166: {
167: }
168: 
169: /**
170:  * Change role of given member in given slice
171:  *
172:  * @param dict $args_dict Dictionary containing name/value pairs:
173: <ul>
174:    <li>"operation" : name of this method ("change_member_role")</li>
175:    <li>"slice_id" : ID of slice to be modified</li>
176:    <li>"member_id : ID of member whose role within slice is to be modified</li>
177:    <li>"role_type" : role to be associated with given member</li>
178: </ul>
179:  * @return dict ["code" => error_code, "value" => result, "output" =>error_info]
180:  */
181: function change_slice_member_role($args_dict)
182: {
183: }
184: 
185: /**
186:  * Lookup slice id's by project_id, owner_id and/or slice_name
187:  *
188:  * @param dict $args_dict Dictionary containing name/value pairs:
189: <ul>
190:    <li>"operation" : name of this method ("lookup_slice_ids")</li>
191:    <li>"slice_name" : name of slice to be created [optional]</li>
192:    <li>"project_id" : ID of project to which to associate slice [optional]</li>
193:    <li>"owner_id" : ID of owner of slice [optional]</li>
194: </ul>
195:  * @return array List of slice ID's matching given criteria
196:  */
197: function lookup_slice_ids($args_dict)
198: {
199: }
200: 
201: /**
202:  * Lookup slice id's by project_id, member_id and/or slice_name
203:  *
204:  * @param dict $args_dict Dictionary containing name/value pairs:
205: <ul>
206:    <li>"operation" : name of this method ("lookup_slices")</li>
207:    <li>"project_id" : ID of project to which to associate slice [optional]</li>
208:    <li>"owner_id" : ID of member of slice [optional]</li>
209: </ul>
210:  * @return array List of slice info tuples (id, slice_name, project_id, expiration, creation, owner_id, slice_description, slice_email, slice_urn) matching given criteria
211:  */
212: function lookup_slices($args_dict)
213: {
214: }
215: 
216: /**
217:  * Lookup slice info by slice id
218:  *
219:  * @param dict $args_dict Dictionary containing name/value pairs:
220: <ul>
221:    <li>"operation" : name of this method ("lookup_slice")</li>
222:    <li>"slice_id" : ID of slice</li>
223: </ul>
224:  * @return dict Slice info tuple (id, slice_name, project_id, expiration, creation, owner_id, slice_description, slice_email, slice_urn) for given slice
225:  */
226: function lookup_slice($args_dict)
227: {
228: }
229: 
230: /**
231:  * Lookup slice info by slice URN
232:  *
233:  * @param dict $args_dict Dictionary containing name/value pairs:
234: <ul>
235:    <li>"operation" : name of this method ("lookup_slice_by_urn")</li>
236:    <li>"slice_urn" : URN of slice</li>
237: </ul>
238:  * @return dict Slice info tuple (id, slice_name, project_id, expiration, creation, owner_id, slice_description, slice_email, slice_urn) for given slice
239:  */
240: function lookup_slice_by_urn($args_dict)
241: {
242: }
243: 
244: /**
245:  * Return list of member ID's and roles associated with given slice
246:  * If role is provided, filter to members of given role
247:  *
248:  * @param dict $args_dict Dictionary containing name/value pairs:
249: <ul>
250:    <li>"operation" : name of this method ("get_slice_members")</li>
251:    <li>"slice_id" : ID of slice to be modifiedb</li>
252:    <li>"role_type" : role to be associated with given member [optional]</li>
253: </ul>
254:  * @return array List of (member_id, role) tuples for members of given slice
255:  */
256: function get_slice_members($args)
257: {
258: }
259: 
260: /**
261:  * Return list of member ID's and roles associated with given slice
262:  * If role is provided, filter to members of given role
263:  *
264:  * @param dict $args_dict Dictionary containing name/value pairs:
265: <ul>
266:    <li>"operation" : name of this method ("get_slice_members")</li>
267:    <li>"project_id" : ID of project of slices to be queried</li>
268:    <li>"role_type" : role to be associated with given member [optional]</li>
269: </ul>
270:  * @return array List of (slice_id, member_id, role) tuples for members of given slice
271:  */
272: function get_slice_members_for_project($args_dict)
273: {
274: }
275: 
276: /**
277:  * Return list of slice ID's for given member_id
278:  * 
279:  * Optionally indicate sense of 'is member' or 'is not member'
280:  * If is_member is true, return slices for which member is a member
281:  * If is_member is false, return slices for which member is NOT a member
282:  * 
283:  * Optionally indicate role type of member
284:  * If role is provided, filter on slices 
285:  *    for which member has given role (is_member = true)
286:  *    for which member does NOT have given role (is_member = false)
287:  *
288:  * @param dict $args_dict Dictionary containing name/value pairs:
289: <ul>
290:    <li>"operation" : name of this method ("get_slices_for_member")</li>
291:    <li>"member_id" : ID of member about which slices are being queried </li>
292:    <li>"is_member" : determines sense of 'member_id' query match [optional]</li>
293:    <li>"role_type" : role associated with given member [optional]</li>
294: </ul>
295:  * @return array List of ID's of given slices
296:  */
297: function get_slices_for_member($args_dict)
298: {
299: }
300: 
301: /**
302:  * Get the version of the API of this particular service provider
303:  * @param dict $args_dict Dictionary containing 'operation' argument
304:  * @return number Version of API of this particular service provider
305:  */
306: function get_version($args_dict)
307: {
308: }
309: 
310: }
311: 
312: ?>
API documentation generated by ApiGen 2.8.0