minor tweak in rspec embedded tester - expects an xml filename, not a xml string
[sfa.git] / sfa / rspecs / versions / pgv3.py
1 from sfa.rspecs.versions.pgv2 import PGv2
2
3 class GENIv3(PGv2):
4     type = 'GENI'
5     content_type = 'ad'
6     version = '3'
7     schema = 'http://www.geni.net/resources/rspec/3/ad.xsd'
8     namespace = 'http://www.geni.net/resources/rspec/3'
9     extensions = {
10         'flack': "http://www.protogeni.net/resources/rspec/ext/flack/1",
11         'planetlab': "http://www.planet-lab.org/resources/sfa/ext/planetlab/1",
12         'plos': "http://www.planet-lab.org/resources/sfa/ext/plos/1",
13     }
14     namespaces = dict(extensions.items() + [('default', namespace)])
15     elements = []
16
17
18 class GENIv3Ad(GENIv3):
19     enabled = True
20     content_type = 'ad'
21     schema = 'http://www.geni.net/resources/rspec/3/ad.xsd'
22     template = """<rspec type="advertisement" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.geni.net/resources/rspec/3" xmlns:plos="http://www.planet-lab.org/resources/sfa/ext/plos/1" xmlns:flack="http://www.protogeni.net/resources/rspec/ext/flack/1" xmlns:planetlab="http://www.planet-lab.org/resources/sfa/ext/planetlab/1" xmlns:opstate="http://www.geni.net/resources/rspec/ext/opstate/1" xsi:schemaLocation="http://www.geni.net/resources/rspec/3 http://www.geni.net/resources/rspec/3/ad.xsd http://www.planet-lab.org/resources/sfa/ext/planetlab/1 http://www.planet-lab.org/resources/sfa/ext/planetlab/1/planetlab.xsd http://www.planet-lab.org/resources/sfa/ext/plos/1 http://www.planet-lab.org/resources/sfa/ext/plos/1/plos.xsd http://www.geni.net/resources/rspec/ext/opstate/1 http://www.geni.net/resources/rspec/ext/opstate/1/ad.xsd">
23     <opstate:rspec_opstate aggregate_manager_id="urn:publicid:IDN+plc+authority+cm" start="geni_notready">
24       <opstate:sliver_type name="plab-vserver" />
25       <opstate:sliver_type name="plos-pc" />
26       <opstate:state name="geni_notready">
27         <opstate:action name="geni_start" next="geni_ready">
28           <opstate:description>Boot the node</opstate:description>
29         </opstate:action>
30         <opstate:description>VMs begin powered down or inactive. They
31         must be explicitly booted before use.</opstate:description>
32       </opstate:state>
33       <opstate:state name="geni_ready">
34         <opstate:description>The node is up and ready to use.</opstate:description>
35       </opstate:state>
36       <opstate:state name="geni_failed">
37         <opstate:description>The node has failed and requires administrator
38         intervention before it can be used. Please contact support
39         for assistance.</opstate:description>
40       </opstate:state>
41     </opstate:rspec_opstate>
42 </rspec>"""
43
44 class GENIv3Request(GENIv3):
45     enabled = True
46     content_type = 'request'
47     schema = 'http://www.geni.net/resources/rspec/3/request.xsd'
48     template = '<rspec type="request" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.geni.net/resources/rspec/3" xmlns:plos="http://www.planet-lab.org/resources/sfa/ext/plos/1" xmlns:flack="http://www.protogeni.net/resources/rspec/ext/flack/1" xmlns:planetlab="http://www.planet-lab.org/resources/sfa/ext/planetlab/1" xsi:schemaLocation="http://www.geni.net/resources/rspec/3 http://www.geni.net/resources/rspec/3/request.xsd http://www.planet-lab.org/resources/sfa/ext/planetlab/1 http://www.planet-lab.org/resources/sfa/ext/planetlab/1/planetlab.xsd http://www.planet-lab.org/resources/sfa/ext/plos/1 http://www.planet-lab.org/resources/sfa/ext/plos/1/plos.xsd"/>'
49
50 class GENIv2Manifest(GENIv3):
51     enabled = True
52     content_type = 'manifest'
53     schema = 'http://www.geni.net/resources/rspec/3/manifest.xsd'
54     template = '<rspec type="manifest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.geni.net/resources/rspec/3" xmlns:plos="http://www.planet-lab.org/resources/sfa/ext/plos/1" xmlns:flack="http://www.protogeni.net/resources/rspec/ext/flack/1" xmlns:planetlab="http://www.planet-lab.org/resources/sfa/ext/planetlab/1" xmlns:ssh-user="http://www.geni.net/resources/rspec/ext/user/1" xsi:schemaLocation="http://www.geni.net/resources/rspec/3 http://www.geni.net/resources/rspec/3/manifest.xsd http://www.planet-lab.org/resources/sfa/ext/planetlab/1 http://www.planet-lab.org/resources/sfa/ext/planetlab/1/planetlab.xsd http://www.planet-lab.org/resources/sfa/ext/plos/1 http://www.planet-lab.org/resources/sfa/ext/plos/1/plos.xsd http://www.geni.net/resources/rspec/ext/user/1 http://www.geni.net/resources/rspec/ext/user/1/manifest.xsd"/>'