Changes between Initial Version and Version 1 of PGConfCall_20120111


Ignore:
Timestamp:
01/11/12 12:09:24 (12 years ago)
Author:
sedwards@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PGConfCall_20120111

    v1 v1  
     1
     2[[PageOutline]]
     3
     4= Omni 1.5.1/1.5.2 =
     5
     6== Support for AM API v2 and GENI v3 RSpecs ==
     7
     8The following should work with either gcf-1.5.1 or gcf-1.5.2 (to be released inside the next week).
     9
     10=== `getversion` at ProtoGENI ===
     11Run `getversion` against the default ProtoGENI Aggregate Manager (AM):
     12
     13{{{
     14$ ~/gcf/src/omni.py -a https://www.emulab.net:12369/protogeni/xmlrpc/am getversion
     15INFO:omni:Loading config file omni_config
     16INFO:omni:Using control framework pg-gpo
     17INFO:omni:AM URN: unspecified_AM_URN (url: https://www.emulab.net:12369/protogeni/xmlrpc/am) has version:                                                                       
     18INFO:omni:{   'ad_rspec_versions': [   {   'extensions': [],                           
     19                                 'namespace': 'http://www.protogeni.net/resources/rspec/0.1',                                                                                   
     20                                 'schema': 'http://www.protogeni.net/resources/rspec/0.1/ad.xsd',                                                                               
     21                                 'type': 'ProtoGENI',                                   
     22                                 'version': '0.1'},                                     
     23                             {   'extensions': [],                                     
     24                                 'namespace': 'http://www.protogeni.net/resources/rspec/0.2',                                                                                   
     25                                 'schema': 'http://www.protogeni.net/resources/rspec/0.2/ad.xsd',                                                                               
     26                                 'type': 'ProtoGENI',                                   
     27                                 'version': '0.2'},                                     
     28                             {   'extensions': [   'http://www.protogeni.net/resources/rspec/ext/emulab/1'],                                                                   
     29                                 'namespace': 'http://www.protogeni.net/resources/rspec/2',                                                                                     
     30                                 'schema': 'http://www.protogeni.net/resources/rspec/2/ad.xsd',                                                                                 
     31                                 'type': 'ProtoGENI',                                   
     32                                 'version': '2'},                                       
     33                             {   'extensions': [   'http://www.protogeni.net/resources/rspec/ext/emulab/1'],                                                                   
     34                                 'namespace': 'http://www.geni.net/resources/rspec/3', 
     35                                 'schema': 'http://www.geni.net/resources/rspec/3/ad.xsd',                                                                                     
     36                                 'type': 'GENI',                                       
     37                                 'version': '3'}],                                     
     38    'code_tag': '2adb42b80c36b375042ec7cb2453016b195e9596',                             
     39    'default_ad_rspec': {   'type': 'ProtoGENI', 'version': '2'},                       
     40    'geni_api': 1,                                                                     
     41    'geni_api_versions': {   '1': 'https://www.emulab.net:12369/protogeni/xmlrpc/am/1.0',                                                                                       
     42                             '2': 'https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0'},                                                                                     
     43    'hostname': 'boss.emulab.net',                                                     
     44    'hrn': 'utahemulab.cm',                                                             
     45    'interface': 'aggregate',                                                           
     46    'peers': {   'urn:publicid:IDN+ansp.br+authority+cm': 'https://pg-boss.ansp.br/protogeni/xmlrpc/am',                                                                       
     47                 'urn:publicid:IDN+attcm.net+authority+cm': 'https://localhost.localdomain/protogeni/xmlrpc/am',                                                               
     48                 'urn:publicid:IDN+chi.itesm.mx+authority+cm': 'https://boss.chi.itesm.mx/protogeni/xmlrpc/am',                                                                 
     49                 'urn:publicid:IDN+cis.fiu.edu+authority+cm': 'https://pg-boss.cis.fiu.edu:12369/protogeni/xmlrpc/am',                                                         
     50                 'urn:publicid:IDN+cmcl.cs.cmu.edu+authority+cm': 'https://boss.cmcl.cs.cmu.edu/protogeni/xmlrpc/am',                                                           
     51                 'urn:publicid:IDN+cron.loni.org+authority+cm': 'https://www.cron.loni.org/protogeni/xmlrpc/am',                                                               
     52                 'urn:publicid:IDN+elabinelab.geni.emulab.net+authority+cm': 'https://myboss.elabinelab.geni.emulab.net/protogeni/xmlrpc/am',                                   
     53                 'urn:publicid:IDN+emulab.net+authority+cm': 'https://www.emulab.net:12369/protogeni/xmlrpc/am',                                                               
     54                 'urn:publicid:IDN+etri-cm1.kreonet.net+authority+cm': 'https://etri-cm1.kreonet.net/protogeni/xmlrpc/am',                                                     
     55                 'urn:publicid:IDN+etri-cm2.kreonet.net+authority+cm': 'https://etri-cm2.kreonet.net/protogeni/xmlrpc/am',                                                     
     56                 'urn:publicid:IDN+example.org+authority+cm': 'https://host.linux.geni.emulab.net/protogeni/xmlrpc/am',                                                         
     57                 'urn:publicid:IDN+geelab.geni.emulab.net+authority+cm': 'https://myboss.geelab.geni.emulab.net:12369/protogeni/xmlrpc/am',                                     
     58                 'urn:publicid:IDN+gims.wail.wisc.edu+authority+cm': 'https://gims.wail.wisc.edu/protogeni/xmlrpc/am',                                                         
     59                 'urn:publicid:IDN+host.protogeni-abac.geni.emulab.net+authority+cm': 'https://host.protogeni-abac.geni.emulab.net/protogeni/xmlrpc/am',                       
     60                 'urn:publicid:IDN+ionpl+authority+sa': 'http://alpha.east.isi.edu:12346',                                                                                     
     61                 'urn:publicid:IDN+jonlab.tbres.emulab.net+authority+cm': 'https://myboss.jonlab.tbres.emulab.net:12369/protogeni/xmlrpc/am',                                   
     62                 'urn:publicid:IDN+maxpl+authority+sa': 'http://max-myplc.dragon.maxgigapop.net:12346',                                                                         
     63                 'urn:publicid:IDN+myelab.testbed.emulab.net+authority+cm': 'https://www.myelab.testbed.emulab.net:12369/protogeni/xmlrpc/am',                                 
     64                 'urn:publicid:IDN+pgeni.gpolab.bbn.com+authority+cm': 'https://www.pgeni.gpolab.bbn.com/protogeni/xmlrpc/am',                                                 
     65                 'urn:publicid:IDN+pgeni1.gpolab.bbn.com+authority+cm': 'https://www.pgeni1.gpolab.bbn.com/protogeni/xmlrpc/am',                                               
     66                 'urn:publicid:IDN+pgeni3.gpolab.bbn.com+authority+cm': 'https://www.pgeni3.gpolab.bbn.com/protogeni/xmlrpc/am',                                               
     67                 'urn:publicid:IDN+plc+authority+sa': 'https://planet-lab.org:12346',   
     68                 'urn:publicid:IDN+ple+authority+sa': 'https://www.planet-lab.eu:12346/',                                                                                       
     69                 'urn:publicid:IDN+pni.uml.edu+authority+cm': 'https://pni.uml.edu/protogeni/xmlrpc/am',                                                                       
     70                 'urn:publicid:IDN+schooner.wail.wisc.edu+authority+cm': 'https://www.schooner.wail.wisc.edu/protogeni/xmlrpc/am',                                             
     71                 'urn:publicid:IDN+shadownet.uky.emulab.net+authority+cm': 'https://shadownet.uky.emulab.net/protogeni/xmlrpc/am',                                             
     72                 'urn:publicid:IDN+sparta.com+authority+cm': 'https://host.referencecm.amp.emulab.net/protogeni/xmlrpc/am',                                                     
     73                 'urn:publicid:IDN+uky.emulab.net+authority+cm': 'https://www.uky.emulab.net:12369/protogeni/xmlrpc/am',                                                       
     74                 'urn:publicid:IDN+uml.emulab.net+authority+cm': 'https://boss.uml.emulab.net/protogeni/xmlrpc/am'},                                                           
     75    'request_rspec_versions': [   {   'extensions': [],                                 
     76                                      'namespace': 'http://www.protogeni.net/resources/rspec/0.1',                                                                             
     77                                      'schema': 'http://www.protogeni.net/resources/rspec/0.1/request.xsd',
     78                                      'type': 'ProtoGENI',
     79                                      'version': '0.1'},
     80                                  {   'extensions': [],
     81                                      'namespace': 'http://www.protogeni.net/resources/rspec/0.2',
     82                                      'schema': 'http://www.protogeni.net/resources/rspec/0.2/request.xsd',
     83                                      'type': 'ProtoGENI',
     84                                      'version': '0.2'},
     85                                  {   'extensions': [   'http://www.protogeni.net/resources/rspec/ext/emulab/1'],
     86                                      'namespace': 'http://www.protogeni.net/resources/rspec/2',
     87                                      'schema': 'http://www.protogeni.net/resources/rspec/2/request.xsd',
     88                                      'type': 'ProtoGENI',
     89                                      'version': '2'},
     90                                  {   'extensions': [   'http://www.protogeni.net/resources/rspec/ext/emulab/1'],
     91                                      'namespace': 'http://www.geni.net/resources/rspec/3',
     92                                      'schema': 'http://www.geni.net/resources/rspec/3/request.xsd',
     93                                      'type': 'GENI',
     94                                      'version': '3'}],
     95    'url': 'https://www.emulab.net:12369/protogeni/xmlrpc/am',
     96    'urn': 'urn:publicid:IDN+emulab.net+authority+cm'}
     97INFO:omni: ------------------------------------------------------------
     98INFO:omni: Completed getversion:
     99
     100  Options as run:
     101                aggregate: https://www.emulab.net:12369/protogeni/xmlrpc/am
     102                framework: pg-gpo
     103                native: True
     104
     105  Args: getversion
     106
     107  Result Summary:
     108Got version for 1 out of 1 aggregates
     109
     110INFO:omni: ============================================================
     111}}}
     112
     113
     114Notice:
     115{{{
     116    'geni_api': 1,                                                                     
     117    'geni_api_versions': {   '1': 'https://www.emulab.net:12369/protogeni/xmlrpc/am/1.0',                                                                                       
     118                             '2': 'https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0'},                     
     119}}}
     120
     121This says this aggregate runs AM API v1 (`'geni_api': 1`) and indicates that the AM supports both AM API v1 or v2 accessible via different urls.
     122
     123=== `getversion` with AM API v2 URL ===
     124
     125So let's try the same things using the v2 url (`https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0`)
     126
     127{{{
     128$ ~/gcf/src/omni.py -a https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0 getversion
     129INFO:omni:Loading config file omni_config
     130INFO:omni:Using control framework pg-gpo
     131INFO:omni:AM URN: unspecified_AM_URN (url: https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0) has version:                                                                   
     132INFO:omni:{   'code': {   'am_code': 0, 'am_type': 'protogeni', 'geni_code': 0},       
     133    'geni_api': 2,                                                                     
     134    'output': '',                                                                       
     135    'value': {   'code_tag': '2adb42b80c36b375042ec7cb2453016b195e9596',               
     136                 'geni_ad_rspec_versions': [   {   'extensions': [],                   
     137                                                   'namespace': 'http://www.protogeni.net/resources/rspec/0.1',                                                                 
     138                                                   'schema': 'http://www.protogeni.net/resources/rspec/0.1/ad.xsd',                                                             
     139                                                   'type': 'ProtoGENI',                 
     140                                                   'version': '0.1'},                   
     141                                               {   'extensions': [],                   
     142                                                   'namespace': 'http://www.protogeni.net/resources/rspec/0.2',                                                                 
     143                                                   'schema': 'http://www.protogeni.net/resources/rspec/0.2/ad.xsd',                                                             
     144                                                   'type': 'ProtoGENI',                 
     145                                                   'version': '0.2'},                   
     146                                               {   'extensions': [   'http://www.protogeni.net/resources/rspec/ext/emulab/1'],                                                 
     147                                                   'namespace': 'http://www.protogeni.net/resources/rspec/2',                                                                   
     148                                                   'schema': 'http://www.protogeni.net/resources/rspec/2/ad.xsd',                                                               
     149                                                   'type': 'ProtoGENI',                 
     150                                                   'version': '2'},                     
     151                                               {   'extensions': [   'http://www.protogeni.net/resources/rspec/ext/emulab/1'],                                                 
     152                                                   'namespace': 'http://www.geni.net/resources/rspec/3',                                                                       
     153                                                   'schema': 'http://www.geni.net/resources/rspec/3/ad.xsd',                                                                   
     154                                                   'type': 'GENI',                     
     155                                                   'version': '3'}],                   
     156                 'geni_api': 2,                                                         
     157                 'geni_api_versions': {   '1': 'https://www.emulab.net:12369/protogeni/xmlrpc/am/1.0',                                                                         
     158                                          '2': 'https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0'},                                                                         
     159                 'geni_request_rspec_versions': [   {   'extensions': [],               
     160                                                        'namespace': 'http://www.protogeni.net/resources/rspec/0.1',                                                           
     161                                                        'schema': 'http://www.protogeni.net/resources/rspec/0.1/request.xsd',                                                   
     162                                                        'type': 'ProtoGENI',           
     163                                                        'version': '0.1'},             
     164                                                    {   'extensions': [],               
     165                                                        'namespace': 'http://www.protogeni.net/resources/rspec/0.2',                                                           
     166                                                        'schema': 'http://www.protogeni.net/resources/rspec/0.2/request.xsd',                                                   
     167                                                        'type': 'ProtoGENI',           
     168                                                        'version': '0.2'},             
     169                                                    {   'extensions': [   'http://www.protogeni.net/resources/rspec/ext/emulab/1'],                                             
     170                                                        'namespace': 'http://www.protogeni.net/resources/rspec/2',                                                             
     171                                                        'schema': 'http://www.protogeni.net/resources/rspec/2/request.xsd',                                                     
     172                                                        'type': 'ProtoGENI',           
     173                                                        'version': '2'},               
     174                                                    {   'extensions': [   'http://www.protogeni.net/resources/rspec/ext/emulab/1'],                                             
     175                                                        'namespace': 'http://www.geni.net/resources/rspec/3',                                                                   
     176                                                        'schema': 'http://www.geni.net/resources/rspec/3/request.xsd',                                                         
     177                                                        'type': 'GENI',                 
     178                                                        'version': '3'}],               
     179                 'hostname': 'boss.emulab.net',                                         
     180                 'hrn': 'utahemulab.cm',                                               
     181                 'interface': 'aggregate',                                             
     182                 'peers': {   'urn:publicid:IDN+ansp.br+authority+cm': 'https://pg-boss.ansp.br/protogeni/xmlrpc/am',                                                           
     183                              'urn:publicid:IDN+attcm.net+authority+cm': 'https://localhost.localdomain/protogeni/xmlrpc/am',                                                   
     184                              'urn:publicid:IDN+chi.itesm.mx+authority+cm': 'https://boss.chi.itesm.mx/protogeni/xmlrpc/am',                                                   
     185                              'urn:publicid:IDN+cis.fiu.edu+authority+cm': 'https://pg-boss.cis.fiu.edu:12369/protogeni/xmlrpc/am',                                             
     186                              'urn:publicid:IDN+cmcl.cs.cmu.edu+authority+cm': 'https://boss.cmcl.cs.cmu.edu/protogeni/xmlrpc/am',                                             
     187                              'urn:publicid:IDN+cron.loni.org+authority+cm': 'https://www.cron.loni.org/protogeni/xmlrpc/am',                                                   
     188                              'urn:publicid:IDN+elabinelab.geni.emulab.net+authority+cm': 'https://myboss.elabinelab.geni.emulab.net/protogeni/xmlrpc/am',                     
     189                              'urn:publicid:IDN+emulab.net+authority+cm': 'https://www.emulab.net:12369/protogeni/xmlrpc/am',                                                   
     190                              'urn:publicid:IDN+etri-cm1.kreonet.net+authority+cm': 'https://etri-cm1.kreonet.net/protogeni/xmlrpc/am',                                         
     191                              'urn:publicid:IDN+etri-cm2.kreonet.net+authority+cm': 'https://etri-cm2.kreonet.net/protogeni/xmlrpc/am',                                         
     192                              'urn:publicid:IDN+example.org+authority+cm': 'https://host.linux.geni.emulab.net/protogeni/xmlrpc/am',                                           
     193                              'urn:publicid:IDN+geelab.geni.emulab.net+authority+cm': 'https://myboss.geelab.geni.emulab.net:12369/protogeni/xmlrpc/am',                       
     194                              'urn:publicid:IDN+gims.wail.wisc.edu+authority+cm': 'https://gims.wail.wisc.edu/protogeni/xmlrpc/am',                                             
     195                              'urn:publicid:IDN+host.protogeni-abac.geni.emulab.net+authority+cm': 'https://host.protogeni-abac.geni.emulab.net/protogeni/xmlrpc/am',           
     196                              'urn:publicid:IDN+ionpl+authority+sa': 'http://alpha.east.isi.edu:12346',                                                                         
     197                              'urn:publicid:IDN+jonlab.tbres.emulab.net+authority+cm': 'https://myboss.jonlab.tbres.emulab.net:12369/protogeni/xmlrpc/am',                     
     198                              'urn:publicid:IDN+maxpl+authority+sa': 'http://max-myplc.dragon.maxgigapop.net:12346',
     199                              'urn:publicid:IDN+myelab.testbed.emulab.net+authority+cm': 'https://www.myelab.testbed.emulab.net:12369/protogeni/xmlrpc/am',
     200                              'urn:publicid:IDN+pgeni.gpolab.bbn.com+authority+cm': 'https://www.pgeni.gpolab.bbn.com/protogeni/xmlrpc/am',
     201                              'urn:publicid:IDN+pgeni1.gpolab.bbn.com+authority+cm': 'https://www.pgeni1.gpolab.bbn.com/protogeni/xmlrpc/am',
     202                              'urn:publicid:IDN+pgeni3.gpolab.bbn.com+authority+cm': 'https://www.pgeni3.gpolab.bbn.com/protogeni/xmlrpc/am',
     203                              'urn:publicid:IDN+plc+authority+sa': 'https://planet-lab.org:12346',
     204                              'urn:publicid:IDN+ple+authority+sa': 'https://www.planet-lab.eu:12346/',
     205                              'urn:publicid:IDN+pni.uml.edu+authority+cm': 'https://pni.uml.edu/protogeni/xmlrpc/am',
     206                              'urn:publicid:IDN+schooner.wail.wisc.edu+authority+cm': 'https://www.schooner.wail.wisc.edu/protogeni/xmlrpc/am',
     207                              'urn:publicid:IDN+shadownet.uky.emulab.net+authority+cm': 'https://shadownet.uky.emulab.net/protogeni/xmlrpc/am',
     208                              'urn:publicid:IDN+sparta.com+authority+cm': 'https://host.referencecm.amp.emulab.net/protogeni/xmlrpc/am',
     209                              'urn:publicid:IDN+uky.emulab.net+authority+cm': 'https://www.uky.emulab.net:12369/protogeni/xmlrpc/am',
     210                              'urn:publicid:IDN+uml.emulab.net+authority+cm': 'https://boss.uml.emulab.net/protogeni/xmlrpc/am'},
     211                 'url': 'https://www.emulab.net:12369/protogeni/xmlrpc/am',
     212                 'urn': 'urn:publicid:IDN+emulab.net+authority+cm'}}
     213INFO:omni: ------------------------------------------------------------
     214INFO:omni: Completed getversion:
     215
     216  Options as run:
     217                aggregate: https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0
     218                framework: pg-gpo
     219                native: True
     220
     221  Args: getversion
     222
     223  Result Summary:
     224Got version for 1 out of 1 aggregates
     225
     226INFO:omni: ============================================================
     227
     228
     229}}}
     230
     231It now says `'geni_api': 2`.  Great!
     232
     233=== `listresources` with AM API v2 URL ===
     234
     235Now let's try `listresources`.
     236
     237
     238{{{
     239
     240$ ~/gcf/src/omni.py -a https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0 listresources
     241INFO:omni:Loading config file omni_config
     242INFO:omni:Using control framework pg-gpo
     243INFO:omni:Listed resources on 0 out of 1 possible aggregates.
     244INFO:omni:Got no resources. No resources from AM https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0: Malformed arguments: Missing arguments
     245INFO:omni: ------------------------------------------------------------
     246INFO:omni: Completed listresources:
     247
     248  Options as run:
     249                aggregate: https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0
     250                framework: pg-gpo
     251                native: True
     252
     253  Args: listresources
     254
     255  Result Summary: Got no resources. No resources from AM https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0: Malformed arguments: Missing arguments
     256INFO:omni: ============================================================
     257
     258
     259}}}
     260
     261Why didn't this work?
     262
     263Because you haven't told omni to use AM API v2 yet. 
     264
     265Why does a similar things work with `getversion`?  Because `getversion` is special and is backwards compatible to allow clients that support AM API v1 to tell that the AM they are talking to doesn't support them.
     266
     267
     268=== `listresources --api-version 2` ===
     269
     270To get AM API v2 support in `listresources` let's add `--api-version 2` and do it again.
     271
     272
     273{{{
     274$ ~/gcf/src/omni.py -a https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0 listresources --api-version 2
     275INFO:omni:Loading config file omni_config
     276INFO:omni:Using control framework pg-gpo
     277WARNING:omni:Please use the -t option to specify the desired RSpec type for AM https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0 as one of [('ProtoGENI', '0.1'), ('ProtoGENI', '0.2'), ('ProtoGENI', '2'), ('GENI', '3')]
     278INFO:omni:Listed resources on 0 out of 1 possible aggregates.
     279INFO:omni:Got no resources. AM https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0 supports multiple RSpec versions: [('ProtoGENI', '0.1'), ('ProtoGENI', '0.2'), ('ProtoGENI', '2'), ('GENI', '3')]
     280INFO:omni: ------------------------------------------------------------
     281INFO:omni: Completed listresources:
     282
     283  Options as run:
     284                aggregate: https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0
     285                api_version: 2
     286                framework: pg-gpo
     287                native: True
     288
     289  Args: listresources
     290
     291  Result Summary: Got no resources. AM https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0 supports multiple RSpec versions: [('ProtoGENI', '0.1'), ('ProtoGENI', '0.2'), ('ProtoGENI', '2'), ('GENI', '3')]
     292INFO:omni: ============================================================
     293
     294}}}
     295
     296So why doesn't it work yet?
     297
     298We need to specify the RSpec version we want using `-t`.  For example, `-t GENI 3` requests GENI v3 RSpecs.
     299
     300
     301=== `listresources --api-version 2 -t GENI 3` ===
     302
     303Let's try that:
     304
     305{{{
     306
     307$ ~/gcf/src/omni.py -a https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0 listresources --api-version 2 -t GENI 3 -o
     308INFO:omni:Loading config file omni_config
     309INFO:omni:Using control framework pg-gpo
     310INFO:omni:Saving output to a file.
     311INFO:omni:Listed resources on 1 out of 1 possible aggregates.
     312INFO:omni:Writing to 'rspec-www-emulab-net-12369-protogeni-xmlrpc-am-2-0.xml'
     313INFO:omni: ------------------------------------------------------------
     314INFO:omni: Completed listresources:
     315
     316  Options as run:
     317                aggregate: https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0
     318                api_version: 2
     319                framework: pg-gpo
     320                native: True
     321                output: True
     322                rspectype: ('GENI', '3')
     323
     324  Args: listresources
     325
     326  Result Summary: Retrieved resources from 1 aggregates.
     327Wrote rspecs from 1 aggregates to 1 files
     328Saved listResources RSpec at unspecified_AM_URN to file rspec-www-emulab-net-12369-protogeni-xmlrpc-am-2-0.xml.
     329INFO:omni: ============================================================
     330}}}
     331
     332It works!
     333
     334And the contents of the file are correct:
     335{{{
     336<?xml version="1.0" ?>
     337<!-- Resources at AM:
     338        URN: unspecified_AM_URN
     339        URL: https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0
     340 -->
     341
     342<rspec expires="2012-01-11T15:39:04Z" generated="2012-01-11T15:39:04Z" type="advertisement" xmlns="http://www.geni.net/resources/rspec/3" xmlns:emulab="http://www.protogeni.net/resources/rspec/ext/emulab/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.geni.net/resources/rspec/3 http://www.geni.net/resources/rspec/3/ad.xsd http://www.protogeni.net/resources/rspec/ext/emulab/1 http://www.protogeni.net/resources/rspec/ext/emulab/1/ptop_extension.xsd http://company.com/rspec/ext/stitch/1 http://company.com/rspec/ext/stitch/1/ad.xsd ">
     343  <node component_id="urn:publicid:IDN+emulab.net+node+cisco3" component_manager_id="urn:publicid:IDN+emulab.net+authority+cm" component_name="cisco3" exclusive="true">
     344      <hardware_type name="switch">
     345          <emulab:node_type type_slots="1"/>
     346      </hardware_type>
     347      <hardware_type name="lan">
     348          <emulab:node_type static="true" type_slots="unlimited"/>
     349      </hardware_type>
     350      <available now="true"/>
     351      <location country="US" latitude="40.768652" longitude="-111.84581"/>
     352      <interface component_id="urn:publicid:IDN+emulab.net+interface+cisco3:(null)">   
     353          <emulab:interface name="(null)"/>
     354      </interface>
     355      <emulab:fd name="real-switch" weight="0"/>
     356  </node>
     357
     358<snip>
     359}}}
     360
     361
     362=== Conclusions ===
     363
     364Always use:
     365 * `--api-version 2` on all calls to an AM API v2 aggregate (eventually v2 will become the default, but we aren't there yet)
     366 *  `-t GENI 3` (or `-t ProtGENI 2`) to specify the RSpec version on listresources and createsliver calls
     367
     368
     369== AM API v1 Acceptance Tests ==
     370
     371The following should work with either gcf-1.5.1 or gcf-1.5.2 (to be released inside the next week).
     372
     373The examples are from gcf-1.5.2.  gcf-1.5.1 output is similar but there are fewer tests and they are less picky about the content of RSpecs.
     374
     375=== What are the AM API v1 Acceptance Tests? ===
     376
     377Acceptance tests to verify the implementation of AM API v1 on the forthcoming GENI racks, but they are open to anyone.
     378
     379They cover all of AM API v1 + Change Set A from AM API v2.
     380
     381
     382
     383=== Where are the AM API v1 Acceptance Tests? ===
     384
     385 1. Download gcf: http://www.gpolab.bbn.com/local-sw/
     386 2. Unpackage and install.
     387 3. Files are in gcf-1.52/acceptance_tests/AM_API_v1
     388 4. README-accept-AMAPIv1.txt has detailed instructions on what is needed and how to run the tests.
     389
     390=== What is tested? ===
     391
     392From the README for gcf-1.5.2:
     393{{{
     394Test verifies:
     395     - Sliver creation workflow
     396        * CreateSliver : checks that request and manifest match
     397        * SliverStatus
     398        * ListResources <slice name> : checks that request and manifest match
     399        * DeleteSliver
     400     - Sliver creation workflow works with multiple simultaneous slices
     401        * checks that you can't use a slice credential from one slice to do
     402          ListResources <slicename> on another slice
     403     - Sliver creation workflow fails when:
     404        * request RSpec is really a manifest RSpec
     405        * request RSpec is malformed (ie a tag is not closed)
     406        * request RSpec is an empty file
     407     - SliverStatus, ListResources <slice name>, and DeleteSliver fail when:
     408        * slice has been deleted
     409        * slice never existed
     410     - GetVersion return contains:
     411        * GENI AM API version 1
     412        * 'geni_ad_rspec_versions' (or 'ad_rspec_versions') which in turn
     413          contains a 'type' and 'version'
     414        * 'geni_request_rspec_versions' (or 'request_rspec_versions')
     415          which in turn contains a 'type' and 'version'
     416     - ListResources returns an advertisement RSpec (that is
     417       optionally validated with rspeclint)
     418     - ListResources FAILS when using a bad user credential
     419     - ListResources FAILS when using a valid but untrusted user
     420       credential
     421     - ListResources supports 'geni_compressed' and 'geni_available' options
     422     - SliverRenewal for 2 days and 5 days succeeds
     423     - Shutdown : WARNING, running this test (which is in a separate
     424       file) likely requires administrator assistance to recover from)
     425}}}
     426
     427=== What do I need to run them? ===
     428
     429From the README for gcf-1.5.2:
     430
     431{{{
     432==============================
     433Software Dependencies
     434=====================
     435Requires:
     436 * Omni 1.5.2 and the acceptance tests [3] which are distributed as part
     437   of the gcf1.5.2 package
     438 * (optional) rspeclint (Code [4] and documentation [5] is available from ProtoGENI.)
     439   (1) Install LibXML (which rspeclint relies on) from CPAN.
     440     -- On Ubuntu Linux this is the libxml-libxml-perl package
     441        $ sudo apt-get install libxml-libxml-perl
     442     -- On Fedora Linux this is the perl-XML-LibXML package
     443        $ sudo yum install perl-XML-LibXML
     444   (2) Download rspeclint from ProtoGENI and save the file as "rspeclint".
     445       'rspeclint' perl file is found here:
     446                 http://www.protogeni.net/trac/protogeni/wiki/RSpecDebugging
     447   (3) Add rspeclint to your path.
     448
     449Credentials
     450===========
     451By policy, requires:
     452 * GENI credentials from the GPO ProtoGENI Slice Authority (SA) which
     453   is located at:
     454   https://boss.pgeni.gpolab.bbn.com:443/protogeni/xmlrpc/sa
     455
     456}}}
     457
     458=== What does the output of a run at ProtoGENI look like? ===
     459
     460{{{
     461$ date;am_api_v1_accept.py -a am-undertest --vv; date                                                                           
     462Wed Jan 11 09:51:12 EST 2012                                                           
     463test_CreateSliver: Passes if the sliver creation workflow succeeds.  Use --rspec-file to replace the default request RSpec. ... FAIL                                           
     464test_CreateSliverWorkflow_fail_notexist:  Passes if the sliver creation workflow fails when the slice has never existed. ... ok                                                 
     465test_CreateSliverWorkflow_multiSlice: Do CreateSliver workflow with multiple slices and ensure can not do ListResources on slices with the wrong credential. ... FAIL           
     466test_CreateSliver_badrspec_emptyfile: Passes if the sliver creation workflow fails when the request RSpec is an empty file. ... ok                                             
     467test_CreateSliver_badrspec_malformed: Passes if the sliver creation workflow fails when the request RSpec is not well-formed XML. ... ok                                       
     468test_CreateSliver_badrspec_manifest: Passes if the sliver creation workflow fails when the request RSpec is a manifest RSpec.  --bad-rspec-file allows you to replace the RSpec with an alternative. ... FAIL                                                           
     469test_GetVersion: Passes if a 'GetVersion' returns an XMLRPC struct containing 'geni_api = 1' and other parameters defined in Change Set A. ... ok                               
     470test_ListResources: Passes if 'ListResources' returns an advertisement RSpec. ... ok   
     471test_ListResources_badCredential_alteredObject: Run ListResources with a User Credential that has been altered (so the signature doesn't match). ... ok                         
     472test_ListResources_badCredential_malformedXML: Run ListResources with a User Credential that is missing it's first character (so that it is invalid XML). ... ok               
     473test_ListResources_geni_available: Passes if 'ListResources' returns an advertisement RSpec. ... ok                                                                             
     474test_ListResources_geni_compressed: Passes if 'ListResources' returns an advertisement RSpec. ... ok                                                                           
     475test_ListResources_untrustedCredential: Passes if 'ListResources' FAILS to return an advertisement RSpec when using a credential from an untrusted Clearinghouse. ... ok
     476
     477======================================================================
     478FAIL: test_CreateSliver: Passes if the sliver creation workflow succeeds.  Use --rspec-file to replace the default request RSpec.
     479----------------------------------------------------------------------
     480Traceback (most recent call last):
     481  File "./am_api_v1_accept.py", line 481, in test_CreateSliver
     482    self.subtest_CreateSliverWorkflow()
     483  File "./am_api_v1_accept.py", line 500, in subtest_CreateSliverWorkflow
     484    self.assertRspecType( manifest, 'manifest')
     485  File "/home/sedwards/gcf/src/omni_unittest.py", line 163, in assertRspecType
     486    raise WrongRspecType, msg
     487WrongRspecType: RSpec expected to have type 'manifest' but did not.
     488
     489======================================================================
     490FAIL: test_CreateSliverWorkflow_multiSlice: Do CreateSliver workflow with multiple slices and ensure can not do ListResources on slices with the wrong credential.
     491----------------------------------------------------------------------
     492Traceback (most recent call last):
     493  File "./am_api_v1_accept.py", line 669, in test_CreateSliverWorkflow_multiSlice
     494    self.assertRspecType( "".join(manifest[i]), 'manifest')
     495  File "/home/sedwards/gcf/src/omni_unittest.py", line 163, in assertRspecType
     496    raise WrongRspecType, msg
     497WrongRspecType: RSpec expected to have type 'manifest' but did not.
     498
     499======================================================================
     500FAIL: test_CreateSliver_badrspec_manifest: Passes if the sliver creation workflow fails when the request RSpec is a manifest RSpec.  --bad-rspec-file allows you to replace the RSpec with an alternative.
     501----------------------------------------------------------------------
     502Traceback (most recent call last):
     503  File "./am_api_v1_accept.py", line 945, in test_CreateSliver_badrspec_manifest
     504    self.subtest_MinCreateSliverWorkflow, slice_name)
     505AssertionError: NotNoneAssertionError not raised
     506
     507----------------------------------------------------------------------
     508Ran 13 tests in 444.584s
     509
     510FAILED (failures=3)
     511Wed Jan 11 09:58:37 EST 2012
     512}}}
     513
     514=== Why all of these errors? ===
     515
     516There are three issues that the acceptance test is catching:
     517 1. (Deurig is working on this) manifest RSpecs returned by calls to !ListResources and !CreateSliver contain the request schema not the manifest schema
     518 2. (Deurig is working on this) Stitching extension includes company.com
     519 3. Passing in a ProtoGENIv2 manifest RSpec to !CreateSliver works at ProtoGENI.  Should it?
     520
     521When items 1 and 2 are fixed, the output will look more like this:
     522{{{
     523$ am_api_v1_accept.py -a am-undertest --vv
     524test_CreateSliver: Passes if the sliver creation workflow succeeds.  Use --rspec-file to replace the default request RSpec. ... ok
     525test_CreateSliverWorkflow_fail_notexist:  Passes if the sliver creation workflow fails when the slice has never existed. ... ok
     526test_CreateSliverWorkflow_multiSlice (__main__.Test) ... ok
     527test_CreateSliver_badrspec_emptyfile: Passes if the sliver creation workflow fails when the request RSpec is an empty file. ... ok
     528test_CreateSliver_badrspec_malformed: Passes if the sliver creation workflow fails when the request RSpec is not well-formed XML. ... ok
     529test_CreateSliver_badrspec_manifest: Passes if the sliver creation workflow fails when the request RSpec is a manifest RSpec.  --bad-rspec-file allows you to replace the RSpec with an alternative. ... FAIL
     530test_GetVersion: Passes if a 'GetVersion' returns an XMLRPC struct containing 'geni_api = 1' and other parameters defined in Change Set A. ... ok
     531test_ListResources: Passes if 'ListResources' returns an advertisement RSpec. ... ok
     532Run ListResources with a User Credential that has been altered (so the signature doesn't match). ... ok
     533Run ListResources with a User Credential that is missing it's first character (so that it is invalid XML). ... ok
     534test_ListResources_geni_available: Passes if 'ListResources' returns an advertisement RSpec. ... ok
     535test_ListResources_geni_compressed: Passes if 'ListResources' returns an advertisement RSpec. ... ok
     536test_ListResources_untrustedCredential: Passes if 'ListResources' FAILS to return an advertisement RSpec when using a credential from an untrusted Clearinghouse. ... ok
     537
     538======================================================================
     539FAIL: test_CreateSliver_badrspec_manifest: Passes if the sliver creation workflow fails when the request RSpec is a manifest RSpec.  --bad-rspec-file allows you to replace the RSpec with an alternative.
     540----------------------------------------------------------------------
     541Traceback (most recent call last):
     542  File "./am_api_v1_accept.py", line 939, in test_CreateSliver_badrspec_manifest
     543    self.assertRaises(NotNoneAssertionError,
     544AssertionError: NotNoneAssertionError not raised
     545
     546----------------------------------------------------------------------
     547Ran 13 tests in 672.873s
     548
     549FAILED (failures=1)
     550}}}
     551
     552=== Shutdown test ===
     553
     554There is also a Shutdown test which requires adminstrator help to clean up.
     555
     556So don't run it unless you are ready.  To facilitate this, the test is in a separate file.
     557
     558{{{
     559$ am_api_v1_accept.py -a am-undertest Test.test_CreateSliverWorkflow_with_Shutdown
     560}}}
     561
     562
     563=== How do I comment on this? ===
     564
     565Send email to gcf-dev@geni.net