Skip to content
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.

Commit

Permalink
minor bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Claudio Cacciari committed Dec 16, 2017
1 parent 3e5a6a5 commit 09e3ce5
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 38 deletions.
14 changes: 8 additions & 6 deletions rulebase/catchError.re
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ EUDATCatchErrorChecksum(*source, *source_res, *destination, *dest_res, *response
}

EUDATCatchErrorChecksum(*source, *destination, *response) {
*source_res = "";
*dest_res = "";
EUDATCatchErrorChecksum(*source, *source_res, *destination, *dest_res, *response);
*source_res = "null";
*dest_res = "null";
*b = EUDATCatchErrorChecksum(*source, *source_res, *destination, *dest_res, *response);
*b;
}

# Check if 2 replicas have the same size.
Expand Down Expand Up @@ -111,9 +112,10 @@ EUDATCatchErrorSize(*source, *source_res, *destination, *dest_res, *response) {
}

EUDATCatchErrorSize(*source, *destination, *response) {
*source_res = "";
*dest_res = "";
EUDATCatchErrorSize(*source, *source_res, *destination, *dest_res, *response);
*source_res = "null";
*dest_res = "null";
*b = EUDATCatchErrorSize(*source, *source_res, *destination, *dest_res, *response);
*b;
}

# Check if a user is or is not owner of the data object/collection
Expand Down
4 changes: 2 additions & 2 deletions rulebase/eudat.re
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ EUDATPushObjMetadata(*path, *queue) {
EUDATMessage(*queue, *message) {

*res = 'None';
getMessageParameters(*msgConfPath, *ctrlQName, *messageQueueEnabled);
if (*messageQueueEnabled) {
getMessageParameters(*msgConfPath, *ctrlQName, *enabled);
if (*enabled) {
logInfo("[EUDATMessage] sending message to the topic '*queue'");
logVerbose("[EUDATMessage] message '*message'");
if (*queue == 'None') {
Expand Down
12 changes: 6 additions & 6 deletions rulebase/local.re
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ getEpicApiParameters(*credStoreType, *credStorePath, *epicApi, *serverID, *epicD
*serverID="irods://<hostnameWithFullDomain>:1247";
*epicDebug=2;

getConfParameters(*msiFreeEnabled, *msiCurlEnabled, *authzEnabled);
getConfParameters(*authzEnabled);
if (*authzEnabled) {
EUDATAuthZ("$userNameClient#$rodsZoneClient", "read", *credStorePath, *response);
}
Expand All @@ -57,7 +57,7 @@ parseCredentials (*baseuri, *username, *prefix, *password) {
*password = "<password>"
*prefix = "<prefix>"

getConfParameters(*msiFreeEnabled, *msiCurlEnabled, *authzEnabled);
getConfParameters(*authzEnabled);
if (*authzEnabled) {
EUDATAuthZ("$userNameClient#$rodsZoneClient", "read", "EPIC credentials", *response);
}
Expand Down Expand Up @@ -97,10 +97,10 @@ getLogParameters(*logConfPath) {
#
# Author: Claudio Cacciari (Cineca)
#-------------------------------------------------------------------------------
getMessageParameters(*msgConfPath, *controlQueueName, *messageQueueEnabled) {
getMessageParameters(*msgConfPath, *controlQueueName, *enabled) {
*msgConfPath="/opt/eudat/b2safe/conf/msgManager.conf";
*controlQueueName="B2SAFE";
*messageQueueEnabled=bool("false");
*enabled=bool("false");
}

# Provides parameters for some B2SAFE configurations.
Expand All @@ -124,8 +124,8 @@ getConfParameters(*authzEnabled) {
#-------------------------------------------------------------------------------
getB2SAFEVersion(*version) {
*major_version = "4";
*minor_version = "0";
*sub_version = "1";
*minor_version = "1";
*sub_version = "0";
*version = *major_version ++ "." ++ *minor_version ++ "-" ++ *sub_version;
}

Expand Down
49 changes: 25 additions & 24 deletions rulebase/replication.re
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# EUDATPIDRegistration(*source, *destination, *notification, *registration_response)
# EUDATSearchAndCreatePID(*path, *pid)
# EUDATSearchAndDefineField(*path, *pid, *key)
# EUDATCheckIntegrityColl(*sCollPath, *source_res, *dCollPath, *dest_res, *logEnabled, *response)
# EUDATCheckIntegrityColl(*sCollPesult*source_res, *dCollPath, *dest_res, *logEnabled, *response)
# EUDATCheckIntegrityDO(*source, *source_res, *destination, *dest_res, *logEnabled, *response)


Expand Down Expand Up @@ -94,10 +94,11 @@ EUDATCheckIntegrity(*source, *source_res, *destination, *dest_res,
}

EUDATCheckIntegrity(*source, *destination, *logEnabled, *notification, *response) {
*source_res = "";
*dest_res = "";
EUDATCheckIntegrity(*source, *source_res, *destination, *dest_res,
*logEnabled, *notification, *response);
*source_res = "null";
*dest_res = "null";
*status_transfer_success = EUDATCheckIntegrity(*source, *source_res, *destination, *dest_res,
*logEnabled, *notification, *response);
*status_transfer_success;
}

# Data set replication
Expand Down Expand Up @@ -150,7 +151,7 @@ EUDATReplication(*source, *destination, *dest_res, *registered, *recursive, *res
logDebug("[EUDATReplication] perform a further verification about checksum and size");
*logEnabled = bool("true");
*notification = 0;
*source_res = "";
*source_res = "null";
*status = EUDATCheckIntegrity(*source, *source_res, *destination, *dest_res,
*logEnabled, *notification, *response);
}
Expand All @@ -162,17 +163,14 @@ EUDATReplication(*source, *destination, *dest_res, *registered, *recursive, *res
++ "::registered=*registered::recursive=*recursive";
}
logDebug("[EUDATReplication] response = *response");
# EUDATGetZoneNameFromPath(*source, *zone);
# *queue = *zone ++ "_" ++ $userNameClient;
# *message = "status:*status;response:*response"
# EUDATMessage(*queue, *message);

*status;
}

EUDATReplication(*source, *destination, *registered, *recursive, *response) {
*dest_res = "";
EUDATReplication(*source, *destination, *dest_res, *registered, *recursive, *response);
*dest_res = "null";
*status = EUDATReplication(*source, *destination, *dest_res, *registered, *recursive, *response);
*status;
}

# Transfer all data object saved in the logging system,
Expand Down Expand Up @@ -279,7 +277,7 @@ EUDATRegDataRepl(*source, *destination, *dest_res, *recursive, *response) {
logDebug("[EUDATRegDataRepl] perform a further verification about checksum and size");
*logEnabled = bool("true");
*notification = 0;
*source_res = "";
*source_res = "null";
*status = EUDATCheckIntegrity(*source, *source_res, *destination, *dest_res,
*logEnabled, *notification, *response);
}
Expand Down Expand Up @@ -330,7 +328,7 @@ EUDATRegDataRepl(*source, *destination, *dest_res, *recursive, *response) {
logDebug("[EUDATRegDataRepl] perform a further verification about checksum and size");
*logEnabled = bool("true");
*notification = 0;
*source_res = "";
*source_res = "null";
*status = EUDATCheckIntegrity(*source, *source_res, *destination, *dest_res,
*logEnabled, *notification, *response);
}
Expand All @@ -348,8 +346,9 @@ EUDATRegDataRepl(*source, *destination, *dest_res, *recursive, *response) {
}

EUDATRegDataRepl(*source, *destination, *recursive, *response) {
*dest_res = "";
EUDATRegDataRepl(*source, *destination, *dest_res, *recursive, *response);
*dest_res = "null";
*status = EUDATRegDataRepl(*source, *destination, *dest_res, *recursive, *response);
*status;
}

# Verify that a PID exist for a given path and optionally create it
Expand Down Expand Up @@ -547,10 +546,11 @@ EUDATCheckIntegrityColl(*sCollPath, *source_res, *dCollPath, *dest_res, *logEnab
}

EUDATCheckIntegrityColl(*sCollPath, *dCollPath, *logEnabled, *check_response) {
*source_res = "";
*dest_res = "";
EUDATCheckIntegrityColl(*sCollPath, *source_res, *dCollPath, *dest_res,
*logEnabled, *check_response);
*source_res = "null";
*dest_res = "null";
*totalResult = EUDATCheckIntegrityColl(*sCollPath, *source_res, *dCollPath, *dest_res,
*logEnabled, *check_response);
*totalResult;
}

# Checks differences about checksum and size between two Data Objects
Expand Down Expand Up @@ -589,8 +589,9 @@ EUDATCheckIntegrityDO(*source, *source_res, *destination, *dest_res, *logEnabled
}

EUDATCheckIntegrityDO(*source, *destination, *logEnabled, *response) {
*source_res = "";
*dest_res = "";
EUDATCheckIntegrityDO(*source, *source_res, *destination, *dest_res,
*logEnabled, *response);
*source_res = "null";
*dest_res = "null";
*status = EUDATCheckIntegrityDO(*source, *source_res, *destination, *dest_res,
*logEnabled, *response);
*status;
}

0 comments on commit 09e3ce5

Please sign in to comment.