CMS 3D CMS Logo

Functions | Variables
dqmd_manager Namespace Reference

Functions

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

Variables

 action
 
 actions
 
 COLOR_BLUE
 
 COLOR_DEF
 
 COLOR_GREEN
 
 COLOR_PURPLE
 
 COLOR_RED
 
 COLOR_YELLOW
 
 machines
 
 rpm_path
 
 targets
 

Function Documentation

◆ exec_func()

def dqmd_manager.exec_func (   machine,
  action 
)

Definition at line 66 of file dqmd_manager.py.

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 

References action, beamvalidation.exit(), info(), and usage().

◆ info()

def dqmd_manager.info (   info = None)

Definition at line 59 of file dqmd_manager.py.

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 

References print().

Referenced by exec_func().

◆ rpm_install()

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 

◆ rpm_update()

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 

◆ usage()

def dqmd_manager.usage ( )

Definition at line 47 of file dqmd_manager.py.

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 

References join(), and print().

Referenced by exec_func().

Variable Documentation

◆ action

dqmd_manager.action

Definition at line 93 of file dqmd_manager.py.

Referenced by exec_func().

◆ actions

dqmd_manager.actions

Definition at line 36 of file dqmd_manager.py.

◆ COLOR_BLUE

dqmd_manager.COLOR_BLUE

Definition at line 9 of file dqmd_manager.py.

Referenced by cscdqm::EventProcessor.writeShifterHistograms().

◆ COLOR_DEF

dqmd_manager.COLOR_DEF

Definition at line 13 of file dqmd_manager.py.

◆ COLOR_GREEN

dqmd_manager.COLOR_GREEN

Definition at line 10 of file dqmd_manager.py.

Referenced by cscdqm::EventProcessor.writeShifterHistograms().

◆ COLOR_PURPLE

dqmd_manager.COLOR_PURPLE

Definition at line 8 of file dqmd_manager.py.

◆ COLOR_RED

dqmd_manager.COLOR_RED

Definition at line 12 of file dqmd_manager.py.

Referenced by cscdqm::EventProcessor.writeShifterHistograms().

◆ COLOR_YELLOW

dqmd_manager.COLOR_YELLOW

Definition at line 11 of file dqmd_manager.py.

◆ machines

dqmd_manager.machines

Definition at line 26 of file dqmd_manager.py.

◆ rpm_path

dqmd_manager.rpm_path

Definition at line 17 of file dqmd_manager.py.

◆ targets

dqmd_manager.targets
join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
dqmd_manager.exec_func
def exec_func(machine, action)
Definition: dqmd_manager.py:66
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
dqmd_manager.rpm_update
def rpm_update(machine)
Definition: dqmd_manager.py:22
dqmd_manager.rpm_install
def rpm_install(machine)
Definition: dqmd_manager.py:19
dqmd_manager.action
action
Definition: dqmd_manager.py:93
usage
void usage()
Definition: array2xmlEB.cc:14
format