CMS 3D CMS Logo

Functions
dqmd_manager Namespace Reference

Functions

def exec_func (machine, action)
 
def info (info=None)
 
def rpm_install (machine)
 
def rpm_update (machine)
 
def usage ()
 

Function Documentation

def dqmd_manager.exec_func (   machine,
  action 
)

Definition at line 66 of file dqmd_manager.py.

References mps_fire.action, cmsRelvalreport.exit, info(), edm.print(), and usage().

66 def exec_func(machine, action):
67  info('Machine: ' + machine)
68  call_list = []
69  call_list.append('ssh')
70  call_list.append(machine)
71 
72  if hasattr(action, '__call__'):
73  call_list.append(action(machine))
74  else:
75  call_list.append(action)
76 
77  # print(call_list) # DEBUG_CODE
78  subprocess.call(call_list, stderr=subprocess.STDOUT)
79 
80  info()
81 
82 
def info(info=None)
Definition: dqmd_manager.py:59
def exec_func(machine, action)
Definition: dqmd_manager.py:66
def dqmd_manager.info (   info = None)

Definition at line 59 of file dqmd_manager.py.

References edm.print().

Referenced by exec_func().

59 def info(info=None):
60  if None != info:
61  print(COLOR_BLUE + '***************************** ' + info + ' *****************************' + COLOR_DEF)
62  else:
63  print(COLOR_BLUE + '*********************************************************************************' + COLOR_DEF)
64 
65 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:65
def info(info=None)
Definition: dqmd_manager.py:59
def dqmd_manager.rpm_install (   machine)

Definition at line 19 of file dqmd_manager.py.

19 def rpm_install(machine):
20  return 'sudo rpm --install {0}'.format(rpm_path)
21 
def rpm_install(machine)
Definition: dqmd_manager.py:19
def dqmd_manager.rpm_update (   machine)

Definition at line 22 of file dqmd_manager.py.

22 def rpm_update(machine):
23  return 'sudo rpm -Uhv --force {0}'.format(rpm_path)
24 
25 
def rpm_update(machine)
Definition: dqmd_manager.py:22
def dqmd_manager.usage ( )

Definition at line 47 of file dqmd_manager.py.

References join(), and edm.print().

Referenced by exec_func().

47 def usage():
48  print('Usage: ' + sys.argv[0] + ' MACHINES ACTIONS')
49 
50  print('\tMACHINES:')
51  for target in machines.keys():
52  print('\t\t' + target + ': ' + ', '.join(machines[target]))
53 
54  print('\tACTIONS:')
55  for action in actions.keys():
56  print('\t\t' + action)
57 
58 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:65
static std::string join(char **cmd)
Definition: RemoteFile.cc:18