Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
CondTools
Ecal
python
db_credentials.py
Go to the documentation of this file.
1
#import FWCore.ParameterSet.Config as cms
2
import
CondCore.Utilities.credentials
as
credentials
3
import
socket
4
5
db_service =
'cms_omds_adg'
6
if
socket.getfqdn().
strip
().endswith(
'.cms'
):
7
db_service =
'cms_omds_lb'
8
9
def
get_db_credentials
( db_account ):
10
machine =
'%s/%s'
%(db_service, db_account)
11
creds =
credentials.get_credentials
( machine )
12
if
not
creds
is
None
:
13
(username, account, pwd) = creds
14
return
db_service, username, pwd
15
else
:
16
raise
Exception
(
'Entry for service %s not found in .netrc'
%machine )
db_credentials.get_db_credentials
def get_db_credentials
Definition:
db_credentials.py:9
credentials.get_credentials
def get_credentials
Definition:
credentials.py:26
digitizers_cfi.strip
strip
Definition:
digitizers_cfi.py:45
Exception
Generated for CMSSW Reference Manual by
1.8.5