Merge branch 'geni-v3' of ssh://git.onelab.eu/git/sfa into geni-v3
Loic Baron [Wed, 23 Jul 2014 13:01:29 +0000 (15:01 +0200)]
Conflicts:
sfa/rspecs/rspec.py

1  2 
sfa/rspecs/rspec.py
testbeds/iotlab/tests/tests_rspecs/iotlab_avakian_slice_iotlab.rspec

@@@ -9,7 -10,8 +10,8 @@@ from sfa.rspecs.version_manager import 
  
  class RSpec:
   
-     def __init__(self, rspec="", version=None, user_options={}, ttl=60):
 -    def __init__(self, rspec="", version=None, user_options=None):
++    def __init__(self, rspec="", version=None, user_options=None, ttl=60):
+         if user_options is None: user_options={}
          self.header = '<?xml version="1.0"?>\n'
          self.template = """<RSpec></RSpec>"""
          self.version = None
          self.version = self.version_manager.get_version(version)
          self.namespaces = self.version.namespaces
          self.parse_xml(self.version.template, self.version) 
-         # eg. 2011-03-23T19:53:28Z 
-         date_format = '%Y-%m-%dT%H:%M:%SZ'
          now = datetime.utcnow()
-         generated_ts = now.strftime(date_format)
-         expires_ts = (now + timedelta(minutes=self.ttl)).strftime(date_format) 
+         generated_ts = now.strftime(SFATIME_FORMAT)
 -        expires_ts = (now + timedelta(hours=1)).strftime(SFATIME_FORMAT) 
++        expires_ts = (now + timedelta(minutes=self.ttl)).strftime(SFATIME_FORMAT) 
          self.xml.set('expires', expires_ts)
          self.xml.set('generated', generated_ts)
  
@@@ -1,5 -1,5 +1,5 @@@
  <?xml version="1.0"?>
--<RSpec type="SFA" expires="2013-02-27T15:14:10Z" generated="2013-02-27T14:14:10Z">
++<RSpec type="SFA" expires="2014-52-27T15:14:10Z" generated="2013-05-19T14:14:10Z">
    <network name="iotlab">
      <node component_manager_id="urn:publicid:IDN+iotlab+authority+sa" component_id="urn:publicid:IDN+iotlab+node+wsn430-12.devlille.iot-lab.info" boot_state="Alive" component_name="wsn430-12.devlille.iot-lab.info" site_id="urn:publicid:IDN+senslab+authority+sa">
        <hostname>wsn430-12.devlille.iot-lab.info</hostname>
@@@ -16,7 -16,7 +16,7 @@@
        <sliver/>
      </node>
    </network>
-- <lease slice_id="urn:publicid:IDN+iotlab+slice+sandrine_slice" start_time="1405078836" duration="20">
++ <lease slice_id="urn:publicid:IDN+ple:upmc+slice+myslicedemo" start_time="1400604923" duration="20">
        <node component_id="urn:publicid:IDN+iotlab+node+a8-11.devgrenoble.iot-lab.info"/>
        <node component_id="urn:publicid:IDN+iotlab+node+wsn430-12.devlille.iot-lab.info"/>
   </lease>