You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2019/06/25 14:56:54 UTC
[airavata-php-gateway] branch develop updated: AIRAVATA-3085
Specify group-resource-profile-id in pga_config.php
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-php-gateway.git
The following commit(s) were added to refs/heads/develop by this push:
new 6a26f91 AIRAVATA-3085 Specify group-resource-profile-id in pga_config.php
6a26f91 is described below
commit 6a26f91f6087dc59cab5dd10632bc83bf10be256
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Tue Jun 25 10:56:43 2019 -0400
AIRAVATA-3085 Specify group-resource-profile-id in pga_config.php
---
app/config/pga_config.php.template | 9 +++++++--
app/libraries/ExperimentUtilities.php | 9 +++++++++
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/app/config/pga_config.php.template b/app/config/pga_config.php.template
index 920d938..5a85cc8 100644
--- a/app/config/pga_config.php.template
+++ b/app/config/pga_config.php.template
@@ -212,7 +212,12 @@ return array(
/**
* Data Sharing enabled
*/
- 'data-sharing-enabled' => false
+ 'data-sharing-enabled' => false,
+
+ /**
+ * Group Resource Profile ID to use when submitting experiments
+ */
+ 'group-resource-profile-id' => '',
],
/**
@@ -306,4 +311,4 @@ return array(
*/
'google-analytics-id' => ''
]
-);
\ No newline at end of file
+);
diff --git a/app/libraries/ExperimentUtilities.php b/app/libraries/ExperimentUtilities.php
index a6b40ac..17738f1 100755
--- a/app/libraries/ExperimentUtilities.php
+++ b/app/libraries/ExperimentUtilities.php
@@ -335,6 +335,9 @@ class ExperimentUtilities
$userConfigData->userDN = $_POST["userDN"];
}
$userConfigData->useUserCRPref = isset($_POST['use-user-cr-pref']) ? true : false;
+ if (isset(Config::get('pga_config.airavata')['group-resource-profile-id'])) {
+ $userConfigData->groupResourceProfileId = Config::get('pga_config.airavata')['group-resource-profile-id'];
+ }
ExperimentUtilities::create_experiment_folder_path($_POST['project'], $_POST['experiment-name']);
$userConfigData->experimentDataDir = ExperimentUtilities::$experimentPath;
$applicationInputs = AppUtilities::get_application_inputs($_POST['application']);
@@ -721,6 +724,9 @@ class ExperimentUtilities
// In case the gateway-data-store-resource-id has changed since the
// original experiment was created, update in this experiment
$experiment->userConfigurationData->storageId = Config::get('pga_config.airavata')['gateway-data-store-resource-id'];
+ if (isset(Config::get('pga_config.airavata')['group-resource-profile-id'])) {
+ $userConfigData->groupResourceProfileId = Config::get('pga_config.airavata')['group-resource-profile-id'];
+ }
Airavata::updateExperiment(Session::get('authz-token'), $cloneId, $experiment);
$share = SharingUtilities::getAllUserPermissions($expId, ResourceType::EXPERIMENT);
@@ -1396,6 +1402,9 @@ class ExperimentUtilities
$userConfigDataUpdated->userDN = $input["userDN"];
}
$userConfigDataUpdated->useUserCRPref = isset($_POST['use-user-cr-pref']) ? true : false;
+ if (isset(Config::get('pga_config.airavata')['group-resource-profile-id'])) {
+ $userConfigData->groupResourceProfileId = Config::get('pga_config.airavata')['group-resource-profile-id'];
+ }
$experiment->userConfigurationData = $userConfigDataUpdated;