Changeset 842 for trunk/Monitoring


Ignore:
Timestamp:
03/29/13 14:27:09 (11 years ago)
Author:
jripsl
Message:
  • add sample.
Location:
trunk/Monitoring
Files:
4 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Monitoring/Failover/failover

    r841 r842  
    1515from smon import dao 
    1616 
     17CSTE_SIMULATION_STATUS_OK="2.2" 
     18 
    1719class Failover(): 
     20        running=true 
    1821 
    1922        @classmethod 
    2023        def controlLoop(cls): 
    21                 simulation=dao.get_simulation() 
    2224 
    23                 pass 
    24   
     25                while cls.running is True: 
     26 
     27                        simulation=dao.get_simulation() 
     28 
     29                        if simulation.status 
     30                                 
     31                        sleep 20 
     32 
    2533def main(): 
    2634 
  • trunk/Monitoring/smon/types.py

    r840 r842  
    1111#  @license        CeCILL (http://dods.ipsl.jussieu.fr/jripsl/smon/LICENSE) 
    1212################################## 
     13 
     14import networkx as nx 
     15import pickle 
    1316 
    1417CSTE_SAMPLE="2.2" 
     
    3639 
    3740    def __init__(self,**kw): 
    38                 pass 
     41                dg = nx.DiGraph() 
     42 
     43        def update(cls): 
     44                dg.add_edge('a','b') 
     45 
     46        def print(cls): 
     47                print dg.edges() 
     48 
     49        def write(cls): 
     50                pickle.dump(dg, open('/tmp/graph.txt', 'w')) 
     51 
     52        def read(cls): 
     53                dg = pickle.load(open('/tmp/graph.txt')) 
    3954 
    4055    def __str__(self): 
Note: See TracChangeset for help on using the changeset viewer.