test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
db_credentials.py
Go to the documentation of this file.
1 import CondCore.Utilities.credentials as credentials
2 import socket
3 
4 authPathEnvVar = 'COND_AUTH_PATH'
5 db_service = 'cms_omds_adg'
6 if socket.getfqdn().strip().endswith('.cms'):
7  db_service = 'cms_omds_lb'
8 db_machine = db_service + '/CMS_ECAL_R'
9 
10 
12  creds = credentials.get_credentials( authPathEnvVar, db_machine )
13  if not creds is None:
14  (username, account, pwd) = creds
15  return db_service, username, pwd
16  else:
17  raise Exception('Entry for service %s not found in .netrc' %db_machine )
def get_credentials
Definition: credentials.py:8
def get_readOnly_db_credentials