added a cleanProcessesAfter attribute to the linux::Node class, which defaults to...
[nepi.git] / src / nepi / resources / linux / ccn / ccnping.py
index f654a2a..41c0de1 100644 (file)
@@ -3,9 +3,8 @@
 #    Copyright (C) 2013 INRIA
 #
 #    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU General Public License as published by
-#    the Free Software Foundation, either version 3 of the License, or
-#    (at your option) any later version.
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
 #
 #    This program is distributed in the hope that it will be useful,
 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,7 +18,7 @@
 
 from nepi.execution.attribute import Attribute, Flags, Types
 from nepi.execution.resource import ResourceManager, clsinit_copy, \
-        ResourceState, reschedule_delay
+        ResourceState
 from nepi.resources.linux.ccn.ccnpingserver import LinuxCCNPingServer
 from nepi.util.timefuncs import tnow, tdiffsec
 
@@ -27,28 +26,28 @@ import os
 
 @clsinit_copy
 class LinuxCCNPing(LinuxCCNPingServer):
-    _rtype = "LinuxCCNPing"
+    _rtype = "linux::CCNPing"
 
     @classmethod
     def _register_attributes(cls):
         interval = Attribute("i",
             "Set ping interval in seconds (minimum 0.10 second) ",
             type = Types.Integer,
-            flags = Flags.ExecReadOnly)
+            flags = Flags.Design)
 
         count = Attribute("c",
             "Total number of pings",
             type = Types.Double,
-            flags = Flags.ExecReadOnly)
+            flags = Flags.Design)
 
         number = Attribute("n",
             "Set the starting number, the number is incremented by 1 after each Interest ",
             type = Types.Integer,
-            flags = Flags.ExecReadOnly)
+            flags = Flags.Design)
  
         prefix = Attribute("prefix",
             "Prefix to serve content (e.g. ccnx:/name/prefix)",
-            flags = Flags.ExecReadOnly)
+            flags = Flags.Design)
 
         cls._register_attribute(interval)
         cls._register_attribute(count)
@@ -70,7 +69,7 @@ class LinuxCCNPing(LinuxCCNPingServer):
                 self.ccnpingserver.state < ResourceState.STARTED:
             self.debug("---- RESCHEDULING START----  ccnpingserver state %s " % \
                     self.ccnpingserver.state )
-            self.ec.schedule(reschedule_delay, self.start)
+            self.ec.schedule(self.reschedule_delay, self.start)
         else:
             super(LinuxCCNPing, self).do_start()