You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by nd...@apache.org on 2016/02/02 20:03:18 UTC

[4/4] airavata-php-gateway git commit: Adding ability to update a Storage Resource Preference

Adding ability to update a Storage Resource Preference


Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/11f70802
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/11f70802
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/11f70802

Branch: refs/heads/develop
Commit: 11f70802047c13f02654f02dc24f3fb2bab5c7ca
Parents: 810d7dc
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Tue Feb 2 14:02:40 2016 -0500
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Tue Feb 2 14:02:40 2016 -0500

----------------------------------------------------------------------
 app/controllers/GatewayprofileController.php  |  8 ++++----
 app/controllers/StorageResourceController.php |  5 +++--
 app/libraries/CRUtilities.php                 |  3 ---
 app/libraries/SRUtilities.php                 | 12 ++++++------
 app/routes.php                                |  4 ++--
 5 files changed, 15 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/11f70802/app/controllers/GatewayprofileController.php
----------------------------------------------------------------------
diff --git a/app/controllers/GatewayprofileController.php b/app/controllers/GatewayprofileController.php
index 0fcbde4..9930344 100644
--- a/app/controllers/GatewayprofileController.php
+++ b/app/controllers/GatewayprofileController.php
@@ -40,15 +40,15 @@ class GatewayprofileController extends BaseController {
 	{
 		if( CRUtilities::add_or_update_CRP( Input::all()) )
 		{
-			return Redirect::to("admin/dashboard/gateway")->with("message","Compute Resource Preference for the desired Gateway has been set.");
+			return Redirect::to("admin/dashboard/gateway")->with("message","Compute Resource Preference has been set.");
 		}
 	}
 
-	public function modifyDSP()
+	public function modifySRP()
 	{
-		if( SRUtilities::add_or_update_DSP( Input::all()) )
+		if( SRUtilities::add_or_update_SRP( Input::all()) )
 		{
-			return Redirect::to("admin/dashboard/gateway")->with("message","Data Storage Preference for the desired Gateway has been set.");
+			return Redirect::to("admin/dashboard/gateway")->with("message","Storage Preference has been set.");
 		}
 	}
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/11f70802/app/controllers/StorageResourceController.php
----------------------------------------------------------------------
diff --git a/app/controllers/StorageResourceController.php b/app/controllers/StorageResourceController.php
index 02ff74f..5b26a2e 100644
--- a/app/controllers/StorageResourceController.php
+++ b/app/controllers/StorageResourceController.php
@@ -72,10 +72,11 @@ class StorageresourceController extends BaseController
     }
 
     public function editSubmit()
-    {
+    {   
+        var_dump( Input::all() ); exit;
         $this->beforeFilter('verifyeditadmin');
         $tabName = "";
-        if (Input::get("sr-edit") == "resDesc") /* Modify compute Resource description */ {
+        if (Input::get("sr-edit") == "resDesc") /* Modify storage Resource description */ {
             $storageResourceDescription = SRUtilities::get_storage_resource(Input::get("srId"));
             $storageResourceDescription->hostName = trim(Input::get("hostname"));
             $storageResourceDescription->resourceDescription = Input::get("description");

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/11f70802/app/libraries/CRUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/CRUtilities.php b/app/libraries/CRUtilities.php
index e2c8daa..6261acd 100755
--- a/app/libraries/CRUtilities.php
+++ b/app/libraries/CRUtilities.php
@@ -490,10 +490,7 @@ class CRUtilities
                 Cache::forget('CR-' . $inputs["computeResourceId"]);
             }
         }
-
-        //var_dump( $inputs); exit;
         return Airavata::addGatewayComputeResourcePreference(Session::get('authz-token'), $inputs["gatewayId"], $inputs["computeResourceId"], $computeResourcePreferences);
-
     }
 
     public static function deleteGP($gpId)

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/11f70802/app/libraries/SRUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/SRUtilities.php b/app/libraries/SRUtilities.php
index 78669c0..8e22044 100644
--- a/app/libraries/SRUtilities.php
+++ b/app/libraries/SRUtilities.php
@@ -274,7 +274,7 @@ class SRUtilities
         return Airavata::updateGatewayResourceProfile( Session::get('authz-token'), $data["gateway_id"], $gatewayResourceProfile); 
     }
 
-    public static function add_or_update_DSP($inputs)
+    public static function add_or_update_SRP($inputs)
     {
         $storagePreference = new StoragePreference($inputs);
 
@@ -283,11 +283,11 @@ class SRUtilities
                 Cache::forget('SR-' . $inputs["storageResourceId"]);
             }
         }
-
-        //var_dump( $inputs); exit;
-        return Airavata::addGatewayStoragePreference(Session::get('authz-token'), $inputs["gatewayId"], $inputs["storageResourceId"],
-            $storagePreference);
-
+        return Airavata::addGatewayStoragePreference(   Session::get('authz-token'), 
+                                                        $inputs["gatewayId"], 
+                                                        $inputs["storageResourceId"],
+                                                        $storagePreference
+                                                    );
     }
 
     public static function deleteGP($gpId)

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/11f70802/app/routes.php
----------------------------------------------------------------------
diff --git a/app/routes.php b/app/routes.php
index 60c8832..495e439 100755
--- a/app/routes.php
+++ b/app/routes.php
@@ -196,9 +196,9 @@ Route::post("gp/add-crp", "GatewayprofileController@modifyCRP");
 
 Route::post("gp/update-crp", "GatewayprofileController@modifyCRP");
 
-Route::post("gp/add-dsp", "GatewayprofileController@modifyDSP");
+Route::post("gp/add-srp", "GatewayprofileController@modifySRP");
 
-Route::post("gp/update-dsp", "GatewayprofileController@modifyDSP");
+Route::post("gp/update-srp", "GatewayprofileController@modifySRP");
 
 Route::post("gp/remove-sr", "GatewayprofileController@delete");