-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding deployment ID to db and Tier0Config (#4632)
- Loading branch information
Showing
7 changed files
with
95 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
""" | ||
_GetDeploymentID_ | ||
Oracle implementation of GetDeploymentID | ||
Retrieves T0 deployment ID | ||
""" | ||
from WMCore.Database.DBFormatter import DBFormatter | ||
|
||
class GetDeploymentID(DBFormatter): | ||
|
||
def execute(self, conn = None, transaction = False): | ||
|
||
sql = """SELECT id | ||
from t0_deployment_id""" | ||
|
||
results = self.dbi.processData(sql, {}, conn = conn, | ||
transaction = transaction)[0].fetchall() | ||
id = 0 | ||
if results: | ||
id=results[0][0] | ||
|
||
return id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
""" | ||
_SetDeploymentID_ | ||
Oracle implementation of SetDeploymentID | ||
Sets T0 deployment ID | ||
""" | ||
from WMCore.Database.DBFormatter import DBFormatter | ||
|
||
class SetDeploymentID(DBFormatter): | ||
|
||
def execute(self, id, conn = None, transaction = False): | ||
|
||
sql = """INSERT INTO t0_deployment_id | ||
(name, id) | ||
VALUES ('deployment_id', :ID)""" | ||
|
||
binds = {"ID" : id} | ||
results = self.dbi.processData(sql, binds, conn = conn, | ||
transaction = transaction) | ||
|
||
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters