Changes between Version 8 and Version 9 of AaronHelsinger/GAPI_AM_API_DRAFT


Ignore:
Timestamp:
03/22/12 15:14:46 (7 years ago)
Author:
Aaron Helsinger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AaronHelsinger/GAPI_AM_API_DRAFT

    v8 v9  
    884884             array extensions of string;
    885885        };
    886       }
     886        array geni_credential_types of {
     887             string geni_type <case insensitive>;
     888             string geni_version <containing an integer>;
     889       };
     890    }
    887891}}}
    888892
    889893 == !ListResources ==
    890894{{{
    891 struct ListResources(string credentials[], struct options)
     895struct ListResources(struct credentials[], struct options)
    892896}}}
    893897
     
    907911}}}
    908912
     913Where credentials is:
     914{{{
     915credentials = [
     916   {
     917    geni_type = <string>,
     918    geni_version = <string>,
     919    geni_value = <string>,
     920    <others>
     921   }
     922]
     923}}}
     924
    909925Return struct:
    910926{{{
     
    915931}}}
    916932
    917  == !GetTicket ==
    918 {{{
    919 struct GetTicket (string slice_urn, string credentials[], string requestRSpec,
    920                            struct options)
    921 }}}
    922 
    923 Options include {{{geni_start_time}}} and {{{geni_end_time}}}
    924 
    925 Return: ticket
    926 
    927  == !UpdateTicket ==
    928 {{{
    929 struct UpdateTicket(string slice_urn, string credentials[], string requestRSpec,
    930                                 string ticket, struct options)
    931 }}}
    932 
    933 Options include {{{geni_start_time}}} and {{{geni_end_time}}}
    934 
    935 Return: ticket
    936 
    937  == !RedeemTicket ==
    938 {{{
    939 struct RedeemTicket(string slice_urn, string credentials[], string ticket,
    940                                  struct users[], struct options)
    941 }}}
    942 
    943 Options include {{{geni_auto_start}}}
     933 == !CreateSlivers ==
     934{{{
     935struct CreateSlivers(string slice_urn,
     936                    struct credentials[],
     937                    string rspec,
     938                    struct users[],
     939                    struct options)
     940}}}
     941
     942Where credentials is:
     943{{{
     944credentials = [
     945   {
     946    geni_type = <string>,
     947    geni_version = <string>,
     948    geni_value = <string>,
     949    <others>
     950   }
     951]
     952}}}
     953
     954Options include:
     955{{{
     956{
     957  string geni_start_time <datetime> (optional),
     958  string geni_end_time <datetime> (optional)
     959}
     960}}}
    944961
    945962Return struct:
     
    948965 string rspec=<manifest>,
    949966 geni_start_time=<optional (may be omitted altogether): now if not specified>,
    950  geni_expires=<RFC3339 sliver expiration>,
    951  string geni_status=<sliver state - allocated or changing or ready>,
    952  string geni_state_guarantee=<promise from AM of what experimenter state will be lost on trying to 'start' this allocation>,
     967 geni_expires=<RFC3339 allocation expiration, as in geni_expires from SliversStatus>,
     968 string geni_allocation_status=<sliver state - allocated or ?? >,
    953969 <others that are AM specific>
    954970}
    955971}}}
    956972
     973FIXME: Return list of sliver_urns?
     974
     975 == !RenewAllocations ==
     976{{{
     977struct RenewAllocations(string urn[],
     978                    struct credentials[],
     979                    string expiration_time,
     980                    struct options)
     981}}}
     982
     983Where credentials is:
     984{{{
     985credentials = [
     986   {
     987    geni_type = <string>,
     988    geni_version = <string>,
     989    geni_value = <string>,
     990    <others>
     991   }
     992]
     993}}}
     994
     995Options include {{{geni_atomic = True/False, default True}}}
     996
     997Return list of structs:
     998{{{
     999[
     1000  {
     1001   geni_sliver_urn,
     1002   geni_allocation_status,
     1003   geni_expires <time when the sliver expires from its current state>,
     1004   <others AM or method specific>
     1005  },
     1006  ...
     1007]
     1008}}}
     1009
     1010 == !UpdateAllocations ==
     1011{{{
     1012struct UpdateAllocations(string urn[], struct credentials[], string rspec,
     1013                                struct options)
     1014}}}
     1015
     1016Where credentials is:
     1017{{{
     1018credentials = [
     1019   {
     1020    geni_type = <string>,
     1021    geni_version = <string>,
     1022    geni_value = <string>,
     1023    <others>
     1024   }
     1025]
     1026}}}
     1027
     1028Options include {{{geni_start_time}}} and {{{geni_end_time}}} and {{{geni_atomic = True/False, default True}}}
     1029
     1030Return a list of structs:
     1031{{{
     1032[
     1033  {
     1034   geni_sliver_urn,
     1035   geni_allocation_status,
     1036   geni_expires <time when the sliver expires from its current state>,
     1037   <others AM or method specific>
     1038  },
     1039  ...
     1040]
     1041}}}
     1042
     1043 == !ProvisionSlivers ==
     1044{{{
     1045struct ProvisionSlivers(string urn[], struct credentials[], string ticket,
     1046                                 struct users[], struct options)
     1047}}}
     1048
     1049Where credentials is:
     1050{{{
     1051credentials = [
     1052   {
     1053    geni_type = <string>,
     1054    geni_version = <string>,
     1055    geni_value = <string>,
     1056    <others>
     1057   }
     1058]
     1059}}}
     1060
     1061Options include {{{geni_atomic = True/False, default True}}}
     1062
     1063Return a list of structs:
     1064{{{
     1065[
     1066  {
     1067   geni_sliver_urn,
     1068   geni_allocation_status,
     1069   geni_operational_status,
     1070   geni_expires <time when the sliver expires from its current state>,
     1071   <others AM or method specific>
     1072  },
     1073  ...
     1074]
     1075}}}
     1076
     1077FIXME: Return a manifest RSpec at top level?
     1078FIXME: geni_start_time?
     1079
    9571080 == !UpdateSlivers ==
    9581081{{{
    959 struct UpdateSlivers(string slice_urn, string credentials[], string rspec,
     1082struct UpdateSlivers(string slice_urn, struct credentials[], string rspec,
    9601083                                                 struct options)
    9611084}}}
    9621085
    963 Options include {{{geni_start_time}}} and {{{geni_end_time}}}
     1086Where credentials is:
     1087{{{
     1088credentials = [
     1089   {
     1090    geni_type = <string>,
     1091    geni_version = <string>,
     1092    geni_value = <string>,
     1093    <others>
     1094   }
     1095]
     1096}}}
     1097
     1098Options include {{{geni_start_time}}} and {{{geni_end_time}}} and {{{geni_atomic = True/False, default True}}}
    9641099
    9651100Return struct:
     
    9731108}}}
    9741109
    975  == !ReleaseTicket ==
    976 {{{
    977 struct ReleaseTicket(string slice_urn, string credentials[], string ticket, struct options)
    978 }}}
    979 
    980 Return: boolean
    981 
    982  == !CreateSlivers ==
    983 {{{
    984 struct CreateSlivers(string slice_urn,
    985                     string credentials[],
    986                     string rspec,
    987                     struct users[],
    988                     struct options)
    989 }}}
    990 
    991 Options include:
    992 {{{
    993 {
    994   boolean geni_donotstart (optional),
    995   string geni_start_time <datetime> (optional),
    996   string geni_end_time <datetime> (optional)
    997 }
    998 }}}
    999 
    1000 Return struct:
    1001 {{{
    1002 {
    1003  string rspec=<manifest>,
    1004  geni_start_time=<optional (may be omitted altogether): now if not specified>,
    1005  geni_expires=<RFC3339 sliver expiration, as in geni_expires from SliversStatus>,
    1006  string geni_status=<sliver state - allocated or changing or ready>,
    1007  <others that are AM specific>
    1008 }
    1009 }}}
    10101110
    10111111 == !RenewSlivers ==
    10121112{{{
    1013 struct RenewSlivers(string urn,
    1014                     string credentials[],
     1113struct RenewSlivers(string urn[],
     1114                    struct credentials[],
    10151115                    string expiration_time,
    10161116                    struct options)
    10171117}}}
    1018 Return: boolean
     1118
     1119Where credentials is:
     1120{{{
     1121credentials = [
     1122   {
     1123    geni_type = <string>,
     1124    geni_version = <string>,
     1125    geni_value = <string>,
     1126    <others>
     1127   }
     1128]
     1129}}}
     1130
     1131Options include {{{geni_atomic = True/False, default True}}}
     1132
     1133Return list of structs:
     1134{{{
     1135[
     1136  {
     1137   geni_sliver_urn,
     1138   geni_allocation_status,
     1139   geni_expires <time when the sliver expires from its current state>,
     1140   <others AM or method specific>
     1141  },
     1142  ...
     1143]
     1144}}}
    10191145
    10201146 == !SliversStatus ==
    10211147{{{
    1022 struct SliversStatus(string slice_urn, string credentials[], struct options)
     1148struct SliversStatus(string urn[], struct credentials[], struct options)
     1149}}}
     1150
     1151Where credentials is:
     1152{{{
     1153credentials = [
     1154   {
     1155    geni_type = <string>,
     1156    geni_version = <string>,
     1157    geni_value = <string>,
     1158    <others>
     1159   }
     1160]
    10231161}}}
    10241162
     
    10261164{{{
    10271165{
    1028   string geni_urn: <sliver URN>
    1029   string geni_status: ready
     1166  string geni_urn: <slice URN>
     1167  string geni_allocation_status: provisioned (optional field)
     1168  string geni_operational_status: ready (optional field)
    10301169  geni_expires: <datetime of expiration>
    1031   struct geni_resources: [ { geni_urn: <resource URN>
    1032                       geni_status: ready
     1170  struct geni_resources: [ { geni_urn: <sliver URN>
     1171                      geni_allocation_status: provisioned
     1172                      geni_operational_status: ready
    10331173                      geni_expires: <datetime of individual sliver expiration>
    10341174                      geni_error: ''},
    1035                     { geni_urn: <resource URN>
    1036                       geni_status: ready
     1175                    { geni_urn: <sliver URN>
     1176                      geni_allocation_status: provisioned
     1177                      geni_operational_status: ready
    10371178                      geni_expires: <datetime of individual sliver expiration>
    10381179                      geni_error: ''}
     
    10411182}}}
    10421183
    1043 Where for individual resources this block may be returned:
    1044 {{{
    1045 'users' => [{'urn'   => $user1_urn.
    1046              'login' => $login,
    1047              'protocol' => [ssh, or ?],
    1048              'port' => [22 or ?],
    1049              'keys'  => [...] },
    1050             {'urn'   => $user2_urn.
    1051              'login' => $login,
    1052              'protocol' => [ssh, or ?],
    1053              'port' => [22 or ?],
    1054              'keys'  => [...] }
    1055            ]
    1056 }}}
    1057 
    1058  == !ActOnSlivers ==
    1059 {{{
    1060 struct ActOnSlivers(string command, string credentials[], string urn, string state, struct options)
    1061 }}}
    1062 
    1063 Return struct:
    1064 {{{
    1065 {
    1066  string urn=<urn of sliver or slice>,
    1067  string geni_status=<new state of the slivers>,
    1068  <other entries specific to the AM or resources - specifically am_specific_status>
    1069 }
     1184 == !PerformOperationalAction ==
     1185{{{
     1186struct PerformOperationalAction (string urn[], struct credentials[], string action, struct options={})
     1187}}}
     1188
     1189Where credentials is:
     1190{{{
     1191credentials = [
     1192   {
     1193    geni_type = <string>,
     1194    geni_version = <string>,
     1195    geni_value = <string>,
     1196    <others>
     1197   }
     1198]
     1199}}}
     1200
     1201Options include: {{{geni_atomic = True/False, default True}}}
     1202
     1203Return list of structs:
     1204{{{
     1205[ {
     1206        'sliver_urn' : string,
     1207        'geni_operational_status' : string,
     1208        [optional: 'geni_resource_status' : string]
     1209        },
     1210        ...
     1211]
     1212;
    10701213}}}
    10711214
    10721215 == !DeleteSlivers ==
    10731216{{{
    1074 struct DeleteSlivers(string urn, string credentials[], struct options)
    1075 }}}
    1076 
    1077 Return: boolean
     1217struct DeleteSlivers(string urn[], struct credentials[], struct options)
     1218}}}
     1219
     1220Where credentials is:
     1221{{{
     1222credentials = [
     1223   {
     1224    geni_type = <string>,
     1225    geni_version = <string>,
     1226    geni_value = <string>,
     1227    <others>
     1228   }
     1229]
     1230}}}
     1231
     1232Options include: {{{geni_atomic = True/False, default True}}}
     1233
     1234Return list of structs:
     1235{{{
     1236[
     1237  {
     1238   geni_sliver_urn,
     1239   geni_allocation_status,
     1240   geni_expires <time when the sliver expires from its current state>,
     1241   <others AM or method specific>
     1242  },
     1243  ...
     1244]
     1245}}}
    10781246
    10791247 == Shutdown ==
    10801248{{{
    1081 struct Shutdown(string slice_urn, string credentials[], struct options)
    1082 }}}
    1083 
    1084 Return: boolean
     1249struct Shutdown(string slice_urn, struct credentials[], struct options)
     1250}}}
     1251
     1252Where credentials is:
     1253{{{
     1254credentials = [
     1255   {
     1256    geni_type = <string>,
     1257    geni_version = <string>,
     1258    geni_value = <string>,
     1259    <others>
     1260   }
     1261]
     1262}}}
     1263
     1264Return list of structs:
     1265{{{
     1266[
     1267  {
     1268   geni_sliver_urn,
     1269   geni_allocation_status,
     1270   geni_expires <time when the sliver expires from its current state>,
     1271   <others AM or method specific>
     1272  },
     1273  ...
     1274]
     1275}}}