You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2016/10/28 16:45:50 UTC

[01/20] airavata-php-gateway git commit: Add dashboard link for non-admin users

Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop 31a70432b -> e47baa67a


Add dashboard link for non-admin users


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/06ede1d2
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/06ede1d2
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/06ede1d2

Branch: refs/heads/develop
Commit: 06ede1d24c9e3ef4c8cb154de7841912d8d2a46a
Parents: 26ed2cf
Author: Marcus Christie <ma...@gmail.com>
Authored: Fri Oct 7 16:47:18 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Thu Oct 20 10:21:41 2016 -0400

----------------------------------------------------------------------
 app/controllers/AccountController.php | 5 +++++
 app/libraries/CommonUtilities.php     | 6 ++++--
 2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/06ede1d2/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index d167148..ddcecef 100644
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -3,6 +3,11 @@
 class AccountController extends BaseController
 {
 
+    public function __construct()
+    {
+        Session::put("nav-active", "user-dashboard");
+    }
+
     public function createAccountView()
     {
         return View::make('account/create');

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/06ede1d2/app/libraries/CommonUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/CommonUtilities.php b/app/libraries/CommonUtilities.php
index 962bbcd..9ec209b 100644
--- a/app/libraries/CommonUtilities.php
+++ b/app/libraries/CommonUtilities.php
@@ -203,7 +203,7 @@ class CommonUtilities
         if (Session::has('loggedin')) {
             $active = "";
             if (Session::has("nav-active")) {
-                if ("user-console" == Session::get("nav-active"))
+                if ("user-console" == Session::get("nav-active") || "user-dashboard" == Session::get("nav-active"))
                     $active = " active ";
             }
 
@@ -216,7 +216,9 @@ class CommonUtilities
 
 
             if (Session::has("admin") || Session::has("admin-read-only"))
-                echo '<li class="' . $active . '"><a href="' . URL::to("/") . '/admin/dashboard"><span class="glyphicon glyphicon-user"></span>Admin Dashboard</a></li>';
+                echo '<li class="' . $active . '"><a href="' . URL::to("/") . '/admin/dashboard"><span class="glyphicon glyphicon-user"></span> Admin Dashboard</a></li>';
+            else
+                echo '<li class="' . $active . '"><a href="' . URL::to("/") . '/account/dashboard"><span class="glyphicon glyphicon-user"></span> Dashboard</a></li>';
 //            else
 //                echo '<li><a href="' . URL::to("/") . '/user/profile"><span class="glyphicon glyphicon-user"></span> Profile</a></li>';
 


[16/20] airavata-php-gateway git commit: AIRAVATA-2156 Moved utility method to URPUtilities

Posted by sm...@apache.org.
AIRAVATA-2156 Moved utility method to URPUtilities


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/b6eab429
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/b6eab429
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/b6eab429

Branch: refs/heads/develop
Commit: b6eab429899ba38e587a65f70cf9b6b7d187b29d
Parents: a90dfed
Author: Marcus Christie <ma...@iu.edu>
Authored: Thu Oct 27 11:02:07 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Thu Oct 27 11:02:07 2016 -0400

----------------------------------------------------------------------
 app/controllers/AccountController.php | 21 +++++----------------
 app/libraries/URPUtilities.php        | 14 +++++++++++++-
 2 files changed, 18 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b6eab429/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index b5361b5..74e3690 100644
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -471,8 +471,7 @@ class AccountController extends BaseController
 
         $userResourceProfile = URPUtilities::get_or_create_user_resource_profile();
         $userCredentialSummaries = URPUtilities::get_all_ssh_pub_keys_summary_for_user();
-        $credentialSummaryMap = $this->create_credential_summary_map(URPUtilities::get_all_ssh_pub_keys_summary_for_user());
-        $defaultCredentialSummary = $credentialSummaryMap[$userResourceProfile->credentialStoreToken];
+        $defaultCredentialSummary = $userCredentialSummaries[$userResourceProfile->credentialStoreToken];
         foreach ($userCredentialSummaries as $credentialSummary) {
             $credentialSummary->canDelete = ($credentialSummary->token != $defaultCredentialSummary->token);
         }
@@ -491,8 +490,8 @@ class AccountController extends BaseController
         $userResourceProfile->credentialStoreToken = $defaultToken;
         URPUtilities::update_user_resource_profile($userResourceProfile);
 
-        $credentialSummaryMap = $this->create_credential_summary_map(URPUtilities::get_all_ssh_pub_keys_summary_for_user());
-        $description = $credentialSummaryMap[$defaultToken]->description;
+        $credentialSummaries = URPUtilities::get_all_ssh_pub_keys_summary_for_user();
+        $description = $credentialSummaries[$defaultToken]->description;
 
         return Redirect::to("account/credential-store")->with("message", "SSH Key '$description' is now the default");
     }
@@ -528,24 +527,14 @@ class AccountController extends BaseController
             return Redirect::to("account/credential-store")->with("error-message", "You are not allowed to delete the default SSH key.");
         }
 
-        $credentialSummaryMap = $this->create_credential_summary_map(URPUtilities::get_all_ssh_pub_keys_summary_for_user());
-        $description = $credentialSummaryMap[$credentialStoreToken]->description;
+        $credentialSummaries = URPUtilities::get_all_ssh_pub_keys_summary_for_user();
+        $description = $credentialSummaries[$credentialStoreToken]->description;
 
         if (AdminUtilities::remove_ssh_token($credentialStoreToken)) {
             return Redirect::to("account/credential-store")->with("message", "SSH Key '$description' was deleted");
         }
     }
 
-    // TODO: move to URPUtilities?
-    private function create_credential_summary_map($credentialSummaries) {
-
-        $credentialSummaryMap = array();
-        foreach ($credentialSummaries as $csIndex => $credentialSummary) {
-            $credentialSummaryMap[$credentialSummary->token] = $credentialSummary;
-        }
-        return $credentialSummaryMap;
-    }
-
     public function getComputeResources(){
         $userResourceProfile = URPUtilities::get_or_create_user_resource_profile();
         return View::make("account/compute-resources", array(

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/b6eab429/app/libraries/URPUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/URPUtilities.php b/app/libraries/URPUtilities.php
index f0a6094..68aef94 100644
--- a/app/libraries/URPUtilities.php
+++ b/app/libraries/URPUtilities.php
@@ -55,9 +55,21 @@ class URPUtilities
         $userId = Session::get('username');
         $gatewayId = Session::get('gateway_id');
 
-        return Airavata::getAllSSHPubKeysSummaryForUserInGateway(Session::get('authz-token'), $gatewayId, $userId);
+        return URPUtilities::create_credential_summary_map(
+            Airavata::getAllSSHPubKeysSummaryForUserInGateway(Session::get('authz-token'), $gatewayId, $userId));
     }
 
+    // Create array of CredentialSummary objects where the token is the key
+    private static function create_credential_summary_map($credentialSummaries) {
+
+        $credentialSummaryMap = array();
+        foreach ($credentialSummaries as $csIndex => $credentialSummary) {
+            $credentialSummaryMap[$credentialSummary->token] = $credentialSummary;
+        }
+        return $credentialSummaryMap;
+    }
+
+
     // Only used for testing
     public static function delete_user_resource_profile()
     {


[04/20] airavata-php-gateway git commit: AIRAVATA-2156 Calling correct API method

Posted by sm...@apache.org.
AIRAVATA-2156 Calling correct API method

In the backend, the credential store ends up doing the same thing, which
is why even though the wrong method is called, this didn't show up as a
bug.


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/2685fa8f
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/2685fa8f
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/2685fa8f

Branch: refs/heads/develop
Commit: 2685fa8f8a3690d7febd5ff645da477248021600
Parents: d75f93d
Author: Marcus Christie <ma...@iu.edu>
Authored: Wed Oct 26 09:19:55 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Wed Oct 26 11:22:27 2016 -0400

----------------------------------------------------------------------
 app/libraries/AdminUtilities.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2685fa8f/app/libraries/AdminUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/AdminUtilities.php b/app/libraries/AdminUtilities.php
index c930425..bf7116a 100644
--- a/app/libraries/AdminUtilities.php
+++ b/app/libraries/AdminUtilities.php
@@ -191,11 +191,11 @@ class AdminUtilities
     }
 
     public static function remove_ssh_token( $token){
-        return Airavata::deletePWDCredential( Session::get('authz-token'), $token, Session::get("gateway_id"));
+        return Airavata::deleteSSHPubKey( Session::get('authz-token'), $token, Session::get("gateway_id"));
     }
 
     public static function remove_pwd_token( $token){
-        return Airavata::deleteSSHPubKey( Session::get('authz-token'), $token, Session::get("gateway_id"));
+        return Airavata::deletePWDCredential( Session::get('authz-token'), $token, Session::get("gateway_id"));
     }
 
     public static function add_or_update_notice( $notifData, $update = false){


[05/20] airavata-php-gateway git commit: AIRAVATA-2156 Using isNull to check if UserResourceProfile exists

Posted by sm...@apache.org.
AIRAVATA-2156 Using isNull to check if UserResourceProfile exists


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/127653fe
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/127653fe
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/127653fe

Branch: refs/heads/develop
Commit: 127653fe1eaf4efcff06b0f65d41f7b90513d499
Parents: cd045ec
Author: Marcus Christie <ma...@iu.edu>
Authored: Wed Oct 26 11:19:12 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Wed Oct 26 11:22:27 2016 -0400

----------------------------------------------------------------------
 app/libraries/URPUtilities.php | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/127653fe/app/libraries/URPUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/URPUtilities.php b/app/libraries/URPUtilities.php
index 395d88f..62c2318 100644
--- a/app/libraries/URPUtilities.php
+++ b/app/libraries/URPUtilities.php
@@ -8,14 +8,13 @@ class URPUtilities
 
     public static function get_or_create_user_resource_profile()
     {
-        try {
-            return URPUtilities::get_user_resource_profile();
-        } catch (AiravataSystemException $ase) {
-            // TODO: replace try/catch with null check once backend is updated, see AIRAVATA-2117
-            // Assume that exception was thrown because there is no UserResourceProfile
-
-            return URPUtilities::create_user_resource_profile();
+        $userResourceProfile = URPUtilities::get_user_resource_profile();
+        // Check if user has UserResourceProfile by checking isNull flag
+        if ($userResourceProfile->isNull)
+        {
+            $userResourceProfile = URPUtilities::create_user_resource_profile();
         }
+        return $userResourceProfile;
     }
 
     public static function get_user_resource_profile()


[07/20] airavata-php-gateway git commit: AIRAVATA-2156 Using CredentialSummary with token, description

Posted by sm...@apache.org.
AIRAVATA-2156 Using CredentialSummary with token, description


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/6496e54b
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/6496e54b
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/6496e54b

Branch: refs/heads/develop
Commit: 6496e54b45aacf82129add534e5bfb085a9b6884
Parents: 127653f
Author: Marcus Christie <ma...@iu.edu>
Authored: Wed Oct 26 11:43:35 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Wed Oct 26 16:45:13 2016 -0400

----------------------------------------------------------------------
 app/controllers/AccountController.php        |  7 ++++---
 app/libraries/URPUtilities.php               | 24 +----------------------
 app/views/account/credential-store.blade.php | 12 ++++++------
 3 files changed, 11 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/6496e54b/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index 6ac13f3..ccd3305 100644
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -489,7 +489,7 @@ class AccountController extends BaseController
         URPUtilities::update_user_resource_profile($userResourceProfile);
 
         $credentialSummaryMap = $this->create_credential_summary_map(URPUtilities::get_all_ssh_pub_keys_summary_for_user());
-        $description = $credentialSummaryMap[$defaultToken]["description"];
+        $description = $credentialSummaryMap[$defaultToken]->description;
 
         return Redirect::to("account/credential-store")->with("message", "SSH Key '$description' is now the default");
     }
@@ -498,18 +498,19 @@ class AccountController extends BaseController
 
         $credentialStoreToken = Input::get("credentialStoreToken");
         $credentialSummaryMap = $this->create_credential_summary_map(URPUtilities::get_all_ssh_pub_keys_summary_for_user());
-        $description = $credentialSummaryMap[$credentialStoreToken]["description"];
+        $description = $credentialSummaryMap[$credentialStoreToken]->description;
 
         if (AdminUtilities::remove_ssh_token($credentialStoreToken)) {
             return Redirect::to("account/credential-store")->with("message", "SSH Key '$description' is was deleted");
         }
     }
 
+    // TODO: move to URPUtilities?
     private function create_credential_summary_map($credentialSummaries) {
 
         $credentialSummaryMap = array();
         foreach ($credentialSummaries as $csIndex => $credentialSummary) {
-            $credentialSummaryMap[$credentialSummary["credentialStoreToken"]] = $credentialSummary;
+            $credentialSummaryMap[$credentialSummary->token] = $credentialSummary;
         }
         return $credentialSummaryMap;
     }

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/6496e54b/app/libraries/URPUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/URPUtilities.php b/app/libraries/URPUtilities.php
index 62c2318..fccf63e 100644
--- a/app/libraries/URPUtilities.php
+++ b/app/libraries/URPUtilities.php
@@ -56,29 +56,7 @@ class URPUtilities
         $userId = Session::get('username');
         $gatewayId = Session::get('gateway_id');
 
-        // TODO use the real method once it has the credentialStoreToken in it
-        // $credSummaries = Airavata::getAllSSHPubKeysSummaryForUserInGateway(Session::get('authz-token'), $gatewayId, $userId);
-        $userResourceProfile = URPUtilities::get_or_create_user_resource_profile();
-        $publicKey = AdminUtilities::get_pubkey_from_token($userResourceProfile->credentialStoreToken);
-        $credSummaries = array(
-            array(
-                "publicKey" => $publicKey,
-                "description" => "Default SSH Public Key",
-                "credentialStoreToken" => $userResourceProfile->credentialStoreToken
-            ),
-            array(
-                "publicKey" => "dummy public key",
-                "description" => "Public Key #2",
-                "credentialStoreToken" => "abc123"
-            ),
-            array(
-                "publicKey" => "dummy public key",
-                "description" => "Public Key #3",
-                "credentialStoreToken" => "def456"
-            )
-        );
-
-        return $credSummaries;
+        return Airavata::getAllSSHPubKeysSummaryForUserInGateway(Session::get('authz-token'), $gatewayId, $userId);
     }
 
     // Only used for testing

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/6496e54b/app/views/account/credential-store.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/credential-store.blade.php b/app/views/account/credential-store.blade.php
index 20eadcd..a29d7f7 100644
--- a/app/views/account/credential-store.blade.php
+++ b/app/views/account/credential-store.blade.php
@@ -22,10 +22,10 @@
             <select class="form-control" id="defaultToken" name="defaultToken">
                 @foreach ($credentialSummaries as $credentialSummary)
                 <option
-                @if ($credentialSummary["credentialStoreToken"] == $defaultCredentialSummary["credentialStoreToken"])
+                @if ($credentialSummary->token == $defaultCredentialSummary->token)
                 selected
                 @endif
-                value="{{ $credentialSummary["credentialStoreToken"] }}">{{ $credentialSummary["description"] }}</option>
+                value="{{ $credentialSummary->token }}">{{ $credentialSummary->description }}</option>
                 @endforeach
             </select>
         </div>
@@ -45,14 +45,14 @@
             @foreach ($credentialSummaries as $credentialSummary)
             <tr>
                 <td>
-                    {{ $credentialSummary["description"] }}
+                    {{ $credentialSummary->description }}
                 </td>
                 <td>
-                    {{ $credentialSummary["publicKey"] }}
+                    {{ $credentialSummary->publicKey }}
                 </td>
                 <td>
-                    <span data-token="{{$credentialSummary["credentialStoreToken"]}}"
-                        data-description="{{$credentialSummary["description"]}}"
+                    <span data-token="{{$credentialSummary->token}}"
+                        data-description="{{$credentialSummary->description}}"
                         class="glyphicon glyphicon-trash delete-credential"></span>
                 </td>
             </tr>


[15/20] airavata-php-gateway git commit: AIRAVATA-2156 Prevent deleting default SSH key

Posted by sm...@apache.org.
AIRAVATA-2156 Prevent deleting default SSH key

Also fixes for the client-side description field validation


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/a90dfedb
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/a90dfedb
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/a90dfedb

Branch: refs/heads/develop
Commit: a90dfedb1b51ce8de956ccc2b450a6269dc30b99
Parents: 9bc02d0
Author: Marcus Christie <ma...@iu.edu>
Authored: Thu Oct 27 10:37:56 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Thu Oct 27 10:37:56 2016 -0400

----------------------------------------------------------------------
 app/controllers/AccountController.php        |  8 ++++++++
 app/views/account/credential-store.blade.php | 18 +++++++++++++++++-
 2 files changed, 25 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a90dfedb/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index bd8091d..b5361b5 100644
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -473,6 +473,9 @@ class AccountController extends BaseController
         $userCredentialSummaries = URPUtilities::get_all_ssh_pub_keys_summary_for_user();
         $credentialSummaryMap = $this->create_credential_summary_map(URPUtilities::get_all_ssh_pub_keys_summary_for_user());
         $defaultCredentialSummary = $credentialSummaryMap[$userResourceProfile->credentialStoreToken];
+        foreach ($userCredentialSummaries as $credentialSummary) {
+            $credentialSummary->canDelete = ($credentialSummary->token != $defaultCredentialSummary->token);
+        }
 
         return View::make("account/credential-store", array(
             "userResourceProfile" => $userResourceProfile,
@@ -519,7 +522,12 @@ class AccountController extends BaseController
 
     public function deleteCredential() {
 
+        $userResourceProfile = URPUtilities::get_user_resource_profile();
         $credentialStoreToken = Input::get("credentialStoreToken");
+        if ($credentialStoreToken == $userResourceProfile->credentialStoreToken) {
+            return Redirect::to("account/credential-store")->with("error-message", "You are not allowed to delete the default SSH key.");
+        }
+
         $credentialSummaryMap = $this->create_credential_summary_map(URPUtilities::get_all_ssh_pub_keys_summary_for_user());
         $description = $credentialSummaryMap[$credentialStoreToken]->description;
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a90dfedb/app/views/account/credential-store.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/credential-store.blade.php b/app/views/account/credential-store.blade.php
index 6908844..3f4fee6 100644
--- a/app/views/account/credential-store.blade.php
+++ b/app/views/account/credential-store.blade.php
@@ -14,6 +14,16 @@
     </div>
     {{ Session::forget("message") }}
     @endif
+
+    @if( Session::has("error-message"))
+    <div class="alert alert-danger alert-dismissible" role="alert">
+        <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span
+                class="sr-only">Close</span></button>
+        {{{ Session::get("error-message") }}}
+    </div>
+    {{ Session::forget("error-message") }}
+    @endif
+
     <h1>SSH Keys</h1>
     <h3>Default SSH Key</h3>
     <form class="form-inline" action="{{ URL::to('/') }}/account/set-default-credential" method="post">
@@ -66,9 +76,11 @@
                     {{ $credentialSummary->publicKey }}
                 </td>
                 <td>
+                    @if ($credentialSummary->canDelete)
                     <span data-token="{{$credentialSummary->token}}"
                         data-description="{{$credentialSummary->description}}"
                         class="glyphicon glyphicon-trash delete-credential"></span>
+                    @endif
                 </td>
             </tr>
             @endforeach
@@ -117,12 +129,16 @@ $('.delete-credential').on('click', function(){
 });
 
 $('#credential-description').on('invalid', function(event){
+    this.setCustomValidity("Please provide a description");
     $('#credential-description-form-group').addClass('has-error');
 });
 $('#credential-description').on('keyup input change', function(event){
     if (this.checkValidity) {
+        // Reset custom error message. If it isn't empty string it is considered invalid.
+        this.setCustomValidity("");
+        // checkValidity will cause invalid event to be dispatched. See invalid
+        // event handler above which will set the custom error message.
         var valid = this.checkValidity();
-        this.setCustomValidity("Please provide a description");
         $('#credential-description-form-group').toggleClass('has-error', !valid);
     }
 });


[08/20] airavata-php-gateway git commit: AIRAVATA-2156 Updating thrift stubs

Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/4ffaa68a/app/libraries/Airavata/Model/AppCatalog/ComputeResource/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Model/AppCatalog/ComputeResource/Types.php b/app/libraries/Airavata/Model/AppCatalog/ComputeResource/Types.php
index 49fdf5a..c96c05f 100644
--- a/app/libraries/Airavata/Model/AppCatalog/ComputeResource/Types.php
+++ b/app/libraries/Airavata/Model/AppCatalog/ComputeResource/Types.php
@@ -174,11 +174,13 @@ final class MonitorMode {
   const JOB_EMAIL_NOTIFICATION_MONITOR = 1;
   const XSEDE_AMQP_SUBSCRIBE = 2;
   const FORK = 3;
+  const LOCAL = 4;
   static public $__names = array(
     0 => 'POLL_JOB_MANAGER',
     1 => 'JOB_EMAIL_NOTIFICATION_MONITOR',
     2 => 'XSEDE_AMQP_SUBSCRIBE',
     3 => 'FORK',
+    4 => 'LOCAL',
   );
 }
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/4ffaa68a/app/libraries/Airavata/Model/AppCatalog/CredetialSummary/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Model/AppCatalog/CredetialSummary/Types.php b/app/libraries/Airavata/Model/AppCatalog/CredetialSummary/Types.php
new file mode 100644
index 0000000..2dd144c
--- /dev/null
+++ b/app/libraries/Airavata/Model/AppCatalog/CredetialSummary/Types.php
@@ -0,0 +1,210 @@
+<?php
+namespace Airavata\Model\AppCatalog\CredetialSummary;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Protocol\TBinaryProtocolAccelerated;
+use Thrift\Exception\TApplicationException;
+
+
+class CredentialSummary {
+  static $_TSPEC;
+
+  /**
+   * @var string
+   */
+  public $gatewayId = null;
+  /**
+   * @var string
+   */
+  public $username = null;
+  /**
+   * @var string
+   */
+  public $token = null;
+  /**
+   * @var string
+   */
+  public $publicKey = null;
+  /**
+   * @var int
+   */
+  public $persistedTime = null;
+  /**
+   * @var string
+   */
+  public $description = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'gatewayId',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'username',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'token',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'publicKey',
+          'type' => TType::STRING,
+          ),
+        5 => array(
+          'var' => 'persistedTime',
+          'type' => TType::I64,
+          ),
+        6 => array(
+          'var' => 'description',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['gatewayId'])) {
+        $this->gatewayId = $vals['gatewayId'];
+      }
+      if (isset($vals['username'])) {
+        $this->username = $vals['username'];
+      }
+      if (isset($vals['token'])) {
+        $this->token = $vals['token'];
+      }
+      if (isset($vals['publicKey'])) {
+        $this->publicKey = $vals['publicKey'];
+      }
+      if (isset($vals['persistedTime'])) {
+        $this->persistedTime = $vals['persistedTime'];
+      }
+      if (isset($vals['description'])) {
+        $this->description = $vals['description'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'CredentialSummary';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->gatewayId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->username);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->token);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->publicKey);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->persistedTime);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->description);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('CredentialSummary');
+    if ($this->gatewayId !== null) {
+      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 1);
+      $xfer += $output->writeString($this->gatewayId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->username !== null) {
+      $xfer += $output->writeFieldBegin('username', TType::STRING, 2);
+      $xfer += $output->writeString($this->username);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->token !== null) {
+      $xfer += $output->writeFieldBegin('token', TType::STRING, 3);
+      $xfer += $output->writeString($this->token);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->publicKey !== null) {
+      $xfer += $output->writeFieldBegin('publicKey', TType::STRING, 4);
+      $xfer += $output->writeString($this->publicKey);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->persistedTime !== null) {
+      $xfer += $output->writeFieldBegin('persistedTime', TType::I64, 5);
+      $xfer += $output->writeI64($this->persistedTime);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->description !== null) {
+      $xfer += $output->writeFieldBegin('description', TType::STRING, 6);
+      $xfer += $output->writeString($this->description);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/4ffaa68a/app/libraries/Airavata/Model/AppCatalog/UserResourceProfile/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Model/AppCatalog/UserResourceProfile/Types.php b/app/libraries/Airavata/Model/AppCatalog/UserResourceProfile/Types.php
new file mode 100644
index 0000000..8ab78a0
--- /dev/null
+++ b/app/libraries/Airavata/Model/AppCatalog/UserResourceProfile/Types.php
@@ -0,0 +1,788 @@
+<?php
+namespace Airavata\Model\AppCatalog\UserResourceProfile;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Protocol\TBinaryProtocolAccelerated;
+use Thrift\Exception\TApplicationException;
+
+
+/**
+ * User specific preferences for a Computer Resource
+ * 
+ * computeResourceId:
+ *   Corelate the preference to a compute resource.
+ * 
+ * 
+ * loginUserName:
+ *   If turned true, Airavata will override the preferences of better alternatives exist.
+ * 
+ * 
+ * preferredBatchQueue:
+ *  Gateways can choose a defualt batch queue based on average job dimention, reservations or other metrics.
+ * 
+ * scratchLocation:
+ *  Path to the local scratch space on a HPC cluster. Typically used to create working directory for job execution.
+ * 
+ * allocationProjectNumber:
+ *  Typically used on HPC machines to charge computing usage to a account number. For instance, on XSEDE once an
+ *    allocation is approved, an allocation number is assigned. Before passing this number with job submittions, the
+ *    account to be used has to be added to the allocation.
+ * 
+ * resourceSpecificCredentialStoreToken:
+ *  Resource specific credential store token. If this token is specified, then it is superceeded by the gateway's
+ *   default credential store.
+ * 
+ */
+class UserComputeResourcePreference {
+  static $_TSPEC;
+
+  /**
+   * @var string
+   */
+  public $computeResourceId = null;
+  /**
+   * @var string
+   */
+  public $loginUserName = null;
+  /**
+   * @var string
+   */
+  public $preferredBatchQueue = null;
+  /**
+   * @var string
+   */
+  public $scratchLocation = null;
+  /**
+   * @var string
+   */
+  public $allocationProjectNumber = null;
+  /**
+   * @var string
+   */
+  public $resourceSpecificCredentialStoreToken = null;
+  /**
+   * @var string
+   */
+  public $qualityOfService = null;
+  /**
+   * @var string
+   */
+  public $reservation = null;
+  /**
+   * @var int
+   */
+  public $reservationStartTime = null;
+  /**
+   * @var int
+   */
+  public $reservationEndTime = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'computeResourceId',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'loginUserName',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'preferredBatchQueue',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'scratchLocation',
+          'type' => TType::STRING,
+          ),
+        5 => array(
+          'var' => 'allocationProjectNumber',
+          'type' => TType::STRING,
+          ),
+        6 => array(
+          'var' => 'resourceSpecificCredentialStoreToken',
+          'type' => TType::STRING,
+          ),
+        7 => array(
+          'var' => 'qualityOfService',
+          'type' => TType::STRING,
+          ),
+        8 => array(
+          'var' => 'reservation',
+          'type' => TType::STRING,
+          ),
+        9 => array(
+          'var' => 'reservationStartTime',
+          'type' => TType::I64,
+          ),
+        10 => array(
+          'var' => 'reservationEndTime',
+          'type' => TType::I64,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['computeResourceId'])) {
+        $this->computeResourceId = $vals['computeResourceId'];
+      }
+      if (isset($vals['loginUserName'])) {
+        $this->loginUserName = $vals['loginUserName'];
+      }
+      if (isset($vals['preferredBatchQueue'])) {
+        $this->preferredBatchQueue = $vals['preferredBatchQueue'];
+      }
+      if (isset($vals['scratchLocation'])) {
+        $this->scratchLocation = $vals['scratchLocation'];
+      }
+      if (isset($vals['allocationProjectNumber'])) {
+        $this->allocationProjectNumber = $vals['allocationProjectNumber'];
+      }
+      if (isset($vals['resourceSpecificCredentialStoreToken'])) {
+        $this->resourceSpecificCredentialStoreToken = $vals['resourceSpecificCredentialStoreToken'];
+      }
+      if (isset($vals['qualityOfService'])) {
+        $this->qualityOfService = $vals['qualityOfService'];
+      }
+      if (isset($vals['reservation'])) {
+        $this->reservation = $vals['reservation'];
+      }
+      if (isset($vals['reservationStartTime'])) {
+        $this->reservationStartTime = $vals['reservationStartTime'];
+      }
+      if (isset($vals['reservationEndTime'])) {
+        $this->reservationEndTime = $vals['reservationEndTime'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'UserComputeResourcePreference';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->computeResourceId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->loginUserName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->preferredBatchQueue);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->scratchLocation);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->allocationProjectNumber);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->resourceSpecificCredentialStoreToken);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 7:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->qualityOfService);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 8:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->reservation);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 9:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->reservationStartTime);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 10:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->reservationEndTime);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('UserComputeResourcePreference');
+    if ($this->computeResourceId !== null) {
+      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 1);
+      $xfer += $output->writeString($this->computeResourceId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->loginUserName !== null) {
+      $xfer += $output->writeFieldBegin('loginUserName', TType::STRING, 2);
+      $xfer += $output->writeString($this->loginUserName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->preferredBatchQueue !== null) {
+      $xfer += $output->writeFieldBegin('preferredBatchQueue', TType::STRING, 3);
+      $xfer += $output->writeString($this->preferredBatchQueue);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->scratchLocation !== null) {
+      $xfer += $output->writeFieldBegin('scratchLocation', TType::STRING, 4);
+      $xfer += $output->writeString($this->scratchLocation);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->allocationProjectNumber !== null) {
+      $xfer += $output->writeFieldBegin('allocationProjectNumber', TType::STRING, 5);
+      $xfer += $output->writeString($this->allocationProjectNumber);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->resourceSpecificCredentialStoreToken !== null) {
+      $xfer += $output->writeFieldBegin('resourceSpecificCredentialStoreToken', TType::STRING, 6);
+      $xfer += $output->writeString($this->resourceSpecificCredentialStoreToken);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->qualityOfService !== null) {
+      $xfer += $output->writeFieldBegin('qualityOfService', TType::STRING, 7);
+      $xfer += $output->writeString($this->qualityOfService);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->reservation !== null) {
+      $xfer += $output->writeFieldBegin('reservation', TType::STRING, 8);
+      $xfer += $output->writeString($this->reservation);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->reservationStartTime !== null) {
+      $xfer += $output->writeFieldBegin('reservationStartTime', TType::I64, 9);
+      $xfer += $output->writeI64($this->reservationStartTime);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->reservationEndTime !== null) {
+      $xfer += $output->writeFieldBegin('reservationEndTime', TType::I64, 10);
+      $xfer += $output->writeI64($this->reservationEndTime);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class UserStoragePreference {
+  static $_TSPEC;
+
+  /**
+   * @var string
+   */
+  public $storageResourceId = null;
+  /**
+   * @var string
+   */
+  public $loginUserName = null;
+  /**
+   * @var string
+   */
+  public $fileSystemRootLocation = null;
+  /**
+   * @var string
+   */
+  public $resourceSpecificCredentialStoreToken = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'storageResourceId',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'loginUserName',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'fileSystemRootLocation',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'resourceSpecificCredentialStoreToken',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['storageResourceId'])) {
+        $this->storageResourceId = $vals['storageResourceId'];
+      }
+      if (isset($vals['loginUserName'])) {
+        $this->loginUserName = $vals['loginUserName'];
+      }
+      if (isset($vals['fileSystemRootLocation'])) {
+        $this->fileSystemRootLocation = $vals['fileSystemRootLocation'];
+      }
+      if (isset($vals['resourceSpecificCredentialStoreToken'])) {
+        $this->resourceSpecificCredentialStoreToken = $vals['resourceSpecificCredentialStoreToken'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'UserStoragePreference';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->storageResourceId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->loginUserName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->fileSystemRootLocation);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->resourceSpecificCredentialStoreToken);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('UserStoragePreference');
+    if ($this->storageResourceId !== null) {
+      $xfer += $output->writeFieldBegin('storageResourceId', TType::STRING, 1);
+      $xfer += $output->writeString($this->storageResourceId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->loginUserName !== null) {
+      $xfer += $output->writeFieldBegin('loginUserName', TType::STRING, 2);
+      $xfer += $output->writeString($this->loginUserName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->fileSystemRootLocation !== null) {
+      $xfer += $output->writeFieldBegin('fileSystemRootLocation', TType::STRING, 3);
+      $xfer += $output->writeString($this->fileSystemRootLocation);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->resourceSpecificCredentialStoreToken !== null) {
+      $xfer += $output->writeFieldBegin('resourceSpecificCredentialStoreToken', TType::STRING, 4);
+      $xfer += $output->writeString($this->resourceSpecificCredentialStoreToken);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+/**
+ * User Resource Profile
+ * 
+ * userId:
+ * Unique identifier used to link user to corresponding user data model
+ * 
+ * gatewayID:
+ *  Unique identifier for the gateway assigned by Airavata. Corelate this to Airavata Admin API Gateway Registration.
+ * 
+ * credentialStoreToken:
+ *  Gateway's defualt credential store token.
+ * 
+ * computeResourcePreferences:
+ *  List of resource preferences for each of the registered compute resources.
+ * 
+ *  identityServerTenant:
+ * 
+ *  identityServerPwdCredToken:
+ * 
+ * isNull:
+ *  Indicates that this instance is just a container for a null value.
+ * 
+ */
+class UserResourceProfile {
+  static $_TSPEC;
+
+  /**
+   * @var string
+   */
+  public $userId = null;
+  /**
+   * @var string
+   */
+  public $gatewayID = null;
+  /**
+   * @var string
+   */
+  public $credentialStoreToken = null;
+  /**
+   * @var \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference[]
+   */
+  public $userComputeResourcePreferences = null;
+  /**
+   * @var \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference[]
+   */
+  public $userStoragePreferences = null;
+  /**
+   * @var string
+   */
+  public $identityServerTenant = null;
+  /**
+   * @var string
+   */
+  public $identityServerPwdCredToken = null;
+  /**
+   * @var bool
+   */
+  public $isNull = false;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'userId',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'gatewayID',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'credentialStoreToken',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'userComputeResourcePreferences',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference',
+            ),
+          ),
+        5 => array(
+          'var' => 'userStoragePreferences',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference',
+            ),
+          ),
+        6 => array(
+          'var' => 'identityServerTenant',
+          'type' => TType::STRING,
+          ),
+        7 => array(
+          'var' => 'identityServerPwdCredToken',
+          'type' => TType::STRING,
+          ),
+        8 => array(
+          'var' => 'isNull',
+          'type' => TType::BOOL,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['userId'])) {
+        $this->userId = $vals['userId'];
+      }
+      if (isset($vals['gatewayID'])) {
+        $this->gatewayID = $vals['gatewayID'];
+      }
+      if (isset($vals['credentialStoreToken'])) {
+        $this->credentialStoreToken = $vals['credentialStoreToken'];
+      }
+      if (isset($vals['userComputeResourcePreferences'])) {
+        $this->userComputeResourcePreferences = $vals['userComputeResourcePreferences'];
+      }
+      if (isset($vals['userStoragePreferences'])) {
+        $this->userStoragePreferences = $vals['userStoragePreferences'];
+      }
+      if (isset($vals['identityServerTenant'])) {
+        $this->identityServerTenant = $vals['identityServerTenant'];
+      }
+      if (isset($vals['identityServerPwdCredToken'])) {
+        $this->identityServerPwdCredToken = $vals['identityServerPwdCredToken'];
+      }
+      if (isset($vals['isNull'])) {
+        $this->isNull = $vals['isNull'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'UserResourceProfile';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->userId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->gatewayID);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->credentialStoreToken);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::LST) {
+            $this->userComputeResourcePreferences = array();
+            $_size0 = 0;
+            $_etype3 = 0;
+            $xfer += $input->readListBegin($_etype3, $_size0);
+            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+            {
+              $elem5 = null;
+              $elem5 = new \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference();
+              $xfer += $elem5->read($input);
+              $this->userComputeResourcePreferences []= $elem5;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::LST) {
+            $this->userStoragePreferences = array();
+            $_size6 = 0;
+            $_etype9 = 0;
+            $xfer += $input->readListBegin($_etype9, $_size6);
+            for ($_i10 = 0; $_i10 < $_size6; ++$_i10)
+            {
+              $elem11 = null;
+              $elem11 = new \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference();
+              $xfer += $elem11->read($input);
+              $this->userStoragePreferences []= $elem11;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->identityServerTenant);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 7:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->identityServerPwdCredToken);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 8:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->isNull);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('UserResourceProfile');
+    if ($this->userId !== null) {
+      $xfer += $output->writeFieldBegin('userId', TType::STRING, 1);
+      $xfer += $output->writeString($this->userId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->gatewayID !== null) {
+      $xfer += $output->writeFieldBegin('gatewayID', TType::STRING, 2);
+      $xfer += $output->writeString($this->gatewayID);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->credentialStoreToken !== null) {
+      $xfer += $output->writeFieldBegin('credentialStoreToken', TType::STRING, 3);
+      $xfer += $output->writeString($this->credentialStoreToken);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->userComputeResourcePreferences !== null) {
+      if (!is_array($this->userComputeResourcePreferences)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('userComputeResourcePreferences', TType::LST, 4);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->userComputeResourcePreferences));
+        {
+          foreach ($this->userComputeResourcePreferences as $iter12)
+          {
+            $xfer += $iter12->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->userStoragePreferences !== null) {
+      if (!is_array($this->userStoragePreferences)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('userStoragePreferences', TType::LST, 5);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->userStoragePreferences));
+        {
+          foreach ($this->userStoragePreferences as $iter13)
+          {
+            $xfer += $iter13->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->identityServerTenant !== null) {
+      $xfer += $output->writeFieldBegin('identityServerTenant', TType::STRING, 6);
+      $xfer += $output->writeString($this->identityServerTenant);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->identityServerPwdCredToken !== null) {
+      $xfer += $output->writeFieldBegin('identityServerPwdCredToken', TType::STRING, 7);
+      $xfer += $output->writeString($this->identityServerPwdCredToken);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->isNull !== null) {
+      $xfer += $output->writeFieldBegin('isNull', TType::BOOL, 8);
+      $xfer += $output->writeBool($this->isNull);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/4ffaa68a/app/libraries/Airavata/Model/Credential/Store/Types.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/Model/Credential/Store/Types.php b/app/libraries/Airavata/Model/Credential/Store/Types.php
new file mode 100644
index 0000000..82139a3
--- /dev/null
+++ b/app/libraries/Airavata/Model/Credential/Store/Types.php
@@ -0,0 +1,1029 @@
+<?php
+namespace Airavata\Model\Credential\Store;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Protocol\TBinaryProtocolAccelerated;
+use Thrift\Exception\TApplicationException;
+
+
+class SSHCredential {
+  static $_TSPEC;
+
+  /**
+   * @var string
+   */
+  public $gatewayId = null;
+  /**
+   * @var string
+   */
+  public $username = null;
+  /**
+   * @var string
+   */
+  public $passphrase = null;
+  /**
+   * @var string
+   */
+  public $publicKey = null;
+  /**
+   * @var string
+   */
+  public $privateKey = null;
+  /**
+   * @var int
+   */
+  public $persistedTime = null;
+  /**
+   * @var string
+   */
+  public $token = null;
+  /**
+   * @var string
+   */
+  public $description = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'gatewayId',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'username',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'passphrase',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'publicKey',
+          'type' => TType::STRING,
+          ),
+        5 => array(
+          'var' => 'privateKey',
+          'type' => TType::STRING,
+          ),
+        6 => array(
+          'var' => 'persistedTime',
+          'type' => TType::I64,
+          ),
+        7 => array(
+          'var' => 'token',
+          'type' => TType::STRING,
+          ),
+        8 => array(
+          'var' => 'description',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['gatewayId'])) {
+        $this->gatewayId = $vals['gatewayId'];
+      }
+      if (isset($vals['username'])) {
+        $this->username = $vals['username'];
+      }
+      if (isset($vals['passphrase'])) {
+        $this->passphrase = $vals['passphrase'];
+      }
+      if (isset($vals['publicKey'])) {
+        $this->publicKey = $vals['publicKey'];
+      }
+      if (isset($vals['privateKey'])) {
+        $this->privateKey = $vals['privateKey'];
+      }
+      if (isset($vals['persistedTime'])) {
+        $this->persistedTime = $vals['persistedTime'];
+      }
+      if (isset($vals['token'])) {
+        $this->token = $vals['token'];
+      }
+      if (isset($vals['description'])) {
+        $this->description = $vals['description'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'SSHCredential';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->gatewayId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->username);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->passphrase);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->publicKey);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->privateKey);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->persistedTime);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 7:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->token);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 8:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->description);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('SSHCredential');
+    if ($this->gatewayId !== null) {
+      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 1);
+      $xfer += $output->writeString($this->gatewayId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->username !== null) {
+      $xfer += $output->writeFieldBegin('username', TType::STRING, 2);
+      $xfer += $output->writeString($this->username);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->passphrase !== null) {
+      $xfer += $output->writeFieldBegin('passphrase', TType::STRING, 3);
+      $xfer += $output->writeString($this->passphrase);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->publicKey !== null) {
+      $xfer += $output->writeFieldBegin('publicKey', TType::STRING, 4);
+      $xfer += $output->writeString($this->publicKey);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->privateKey !== null) {
+      $xfer += $output->writeFieldBegin('privateKey', TType::STRING, 5);
+      $xfer += $output->writeString($this->privateKey);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->persistedTime !== null) {
+      $xfer += $output->writeFieldBegin('persistedTime', TType::I64, 6);
+      $xfer += $output->writeI64($this->persistedTime);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->token !== null) {
+      $xfer += $output->writeFieldBegin('token', TType::STRING, 7);
+      $xfer += $output->writeString($this->token);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->description !== null) {
+      $xfer += $output->writeFieldBegin('description', TType::STRING, 8);
+      $xfer += $output->writeString($this->description);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class SSHCredentialSummary {
+  static $_TSPEC;
+
+  /**
+   * @var string
+   */
+  public $gatewayId = null;
+  /**
+   * @var string
+   */
+  public $username = null;
+  /**
+   * @var string
+   */
+  public $publicKey = null;
+  /**
+   * @var int
+   */
+  public $persistedTime = null;
+  /**
+   * @var string
+   */
+  public $token = null;
+  /**
+   * @var string
+   */
+  public $description = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'gatewayId',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'username',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'publicKey',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'persistedTime',
+          'type' => TType::I64,
+          ),
+        5 => array(
+          'var' => 'token',
+          'type' => TType::STRING,
+          ),
+        6 => array(
+          'var' => 'description',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['gatewayId'])) {
+        $this->gatewayId = $vals['gatewayId'];
+      }
+      if (isset($vals['username'])) {
+        $this->username = $vals['username'];
+      }
+      if (isset($vals['publicKey'])) {
+        $this->publicKey = $vals['publicKey'];
+      }
+      if (isset($vals['persistedTime'])) {
+        $this->persistedTime = $vals['persistedTime'];
+      }
+      if (isset($vals['token'])) {
+        $this->token = $vals['token'];
+      }
+      if (isset($vals['description'])) {
+        $this->description = $vals['description'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'SSHCredentialSummary';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->gatewayId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->username);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->publicKey);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->persistedTime);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->token);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->description);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('SSHCredentialSummary');
+    if ($this->gatewayId !== null) {
+      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 1);
+      $xfer += $output->writeString($this->gatewayId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->username !== null) {
+      $xfer += $output->writeFieldBegin('username', TType::STRING, 2);
+      $xfer += $output->writeString($this->username);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->publicKey !== null) {
+      $xfer += $output->writeFieldBegin('publicKey', TType::STRING, 3);
+      $xfer += $output->writeString($this->publicKey);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->persistedTime !== null) {
+      $xfer += $output->writeFieldBegin('persistedTime', TType::I64, 4);
+      $xfer += $output->writeI64($this->persistedTime);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->token !== null) {
+      $xfer += $output->writeFieldBegin('token', TType::STRING, 5);
+      $xfer += $output->writeString($this->token);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->description !== null) {
+      $xfer += $output->writeFieldBegin('description', TType::STRING, 6);
+      $xfer += $output->writeString($this->description);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class CommunityUser {
+  static $_TSPEC;
+
+  /**
+   * @var string
+   */
+  public $gatewayName = null;
+  /**
+   * @var string
+   */
+  public $username = null;
+  /**
+   * @var string
+   */
+  public $userEmail = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'gatewayName',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'username',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'userEmail',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['gatewayName'])) {
+        $this->gatewayName = $vals['gatewayName'];
+      }
+      if (isset($vals['username'])) {
+        $this->username = $vals['username'];
+      }
+      if (isset($vals['userEmail'])) {
+        $this->userEmail = $vals['userEmail'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'CommunityUser';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->gatewayName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->username);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->userEmail);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('CommunityUser');
+    if ($this->gatewayName !== null) {
+      $xfer += $output->writeFieldBegin('gatewayName', TType::STRING, 1);
+      $xfer += $output->writeString($this->gatewayName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->username !== null) {
+      $xfer += $output->writeFieldBegin('username', TType::STRING, 2);
+      $xfer += $output->writeString($this->username);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->userEmail !== null) {
+      $xfer += $output->writeFieldBegin('userEmail', TType::STRING, 3);
+      $xfer += $output->writeString($this->userEmail);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class CertificateCredential {
+  static $_TSPEC;
+
+  /**
+   * @var \Airavata\Model\Credential\Store\CommunityUser
+   */
+  public $communityUser = null;
+  /**
+   * @var string
+   */
+  public $x509Cert = null;
+  /**
+   * @var string
+   */
+  public $notAfter = null;
+  /**
+   * @var string
+   */
+  public $privateKey = null;
+  /**
+   * @var int
+   */
+  public $lifeTime = null;
+  /**
+   * @var string
+   */
+  public $notBefore = null;
+  /**
+   * @var int
+   */
+  public $persistedTime = null;
+  /**
+   * @var string
+   */
+  public $token = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'communityUser',
+          'type' => TType::STRUCT,
+          'class' => '\Airavata\Model\Credential\Store\CommunityUser',
+          ),
+        2 => array(
+          'var' => 'x509Cert',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'notAfter',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'privateKey',
+          'type' => TType::STRING,
+          ),
+        5 => array(
+          'var' => 'lifeTime',
+          'type' => TType::I64,
+          ),
+        6 => array(
+          'var' => 'notBefore',
+          'type' => TType::STRING,
+          ),
+        7 => array(
+          'var' => 'persistedTime',
+          'type' => TType::I64,
+          ),
+        8 => array(
+          'var' => 'token',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['communityUser'])) {
+        $this->communityUser = $vals['communityUser'];
+      }
+      if (isset($vals['x509Cert'])) {
+        $this->x509Cert = $vals['x509Cert'];
+      }
+      if (isset($vals['notAfter'])) {
+        $this->notAfter = $vals['notAfter'];
+      }
+      if (isset($vals['privateKey'])) {
+        $this->privateKey = $vals['privateKey'];
+      }
+      if (isset($vals['lifeTime'])) {
+        $this->lifeTime = $vals['lifeTime'];
+      }
+      if (isset($vals['notBefore'])) {
+        $this->notBefore = $vals['notBefore'];
+      }
+      if (isset($vals['persistedTime'])) {
+        $this->persistedTime = $vals['persistedTime'];
+      }
+      if (isset($vals['token'])) {
+        $this->token = $vals['token'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'CertificateCredential';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRUCT) {
+            $this->communityUser = new \Airavata\Model\Credential\Store\CommunityUser();
+            $xfer += $this->communityUser->read($input);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->x509Cert);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->notAfter);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->privateKey);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->lifeTime);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->notBefore);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 7:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->persistedTime);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 8:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->token);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('CertificateCredential');
+    if ($this->communityUser !== null) {
+      if (!is_object($this->communityUser)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('communityUser', TType::STRUCT, 1);
+      $xfer += $this->communityUser->write($output);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->x509Cert !== null) {
+      $xfer += $output->writeFieldBegin('x509Cert', TType::STRING, 2);
+      $xfer += $output->writeString($this->x509Cert);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->notAfter !== null) {
+      $xfer += $output->writeFieldBegin('notAfter', TType::STRING, 3);
+      $xfer += $output->writeString($this->notAfter);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->privateKey !== null) {
+      $xfer += $output->writeFieldBegin('privateKey', TType::STRING, 4);
+      $xfer += $output->writeString($this->privateKey);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->lifeTime !== null) {
+      $xfer += $output->writeFieldBegin('lifeTime', TType::I64, 5);
+      $xfer += $output->writeI64($this->lifeTime);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->notBefore !== null) {
+      $xfer += $output->writeFieldBegin('notBefore', TType::STRING, 6);
+      $xfer += $output->writeString($this->notBefore);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->persistedTime !== null) {
+      $xfer += $output->writeFieldBegin('persistedTime', TType::I64, 7);
+      $xfer += $output->writeI64($this->persistedTime);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->token !== null) {
+      $xfer += $output->writeFieldBegin('token', TType::STRING, 8);
+      $xfer += $output->writeString($this->token);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class PasswordCredential {
+  static $_TSPEC;
+
+  /**
+   * @var string
+   */
+  public $gatewayId = null;
+  /**
+   * @var string
+   */
+  public $portalUserName = null;
+  /**
+   * @var string
+   */
+  public $loginUserName = null;
+  /**
+   * @var string
+   */
+  public $password = null;
+  /**
+   * @var string
+   */
+  public $description = null;
+  /**
+   * @var int
+   */
+  public $persistedTime = null;
+  /**
+   * @var string
+   */
+  public $token = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'gatewayId',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'portalUserName',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'loginUserName',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'password',
+          'type' => TType::STRING,
+          ),
+        5 => array(
+          'var' => 'description',
+          'type' => TType::STRING,
+          ),
+        6 => array(
+          'var' => 'persistedTime',
+          'type' => TType::I64,
+          ),
+        7 => array(
+          'var' => 'token',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['gatewayId'])) {
+        $this->gatewayId = $vals['gatewayId'];
+      }
+      if (isset($vals['portalUserName'])) {
+        $this->portalUserName = $vals['portalUserName'];
+      }
+      if (isset($vals['loginUserName'])) {
+        $this->loginUserName = $vals['loginUserName'];
+      }
+      if (isset($vals['password'])) {
+        $this->password = $vals['password'];
+      }
+      if (isset($vals['description'])) {
+        $this->description = $vals['description'];
+      }
+      if (isset($vals['persistedTime'])) {
+        $this->persistedTime = $vals['persistedTime'];
+      }
+      if (isset($vals['token'])) {
+        $this->token = $vals['token'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'PasswordCredential';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->gatewayId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->portalUserName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->loginUserName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->password);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->description);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::I64) {
+            $xfer += $input->readI64($this->persistedTime);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 7:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->token);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('PasswordCredential');
+    if ($this->gatewayId !== null) {
+      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 1);
+      $xfer += $output->writeString($this->gatewayId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->portalUserName !== null) {
+      $xfer += $output->writeFieldBegin('portalUserName', TType::STRING, 2);
+      $xfer += $output->writeString($this->portalUserName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->loginUserName !== null) {
+      $xfer += $output->writeFieldBegin('loginUserName', TType::STRING, 3);
+      $xfer += $output->writeString($this->loginUserName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->password !== null) {
+      $xfer += $output->writeFieldBegin('password', TType::STRING, 4);
+      $xfer += $output->writeString($this->password);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->description !== null) {
+      $xfer += $output->writeFieldBegin('description', TType::STRING, 5);
+      $xfer += $output->writeString($this->description);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->persistedTime !== null) {
+      $xfer += $output->writeFieldBegin('persistedTime', TType::I64, 6);
+      $xfer += $output->writeI64($this->persistedTime);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->token !== null) {
+      $xfer += $output->writeFieldBegin('token', TType::STRING, 7);
+      $xfer += $output->writeString($this->token);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+final class Constant extends \Thrift\Type\TConstant {
+  static protected $DEFAULT_ID;
+
+  static protected function init_DEFAULT_ID() {
+    return "DO_NOT_SET_AT_CLIENTS";
+  }
+}
+
+


[06/20] airavata-php-gateway git commit: AIRAVATA-2156 Allow user to set default SSH key

Posted by sm...@apache.org.
AIRAVATA-2156 Allow user to set default SSH key


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/d75f93da
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/d75f93da
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/d75f93da

Branch: refs/heads/develop
Commit: d75f93da5967386992f3221df314ca8a059d48c9
Parents: 0b8d5f2
Author: Marcus Christie <ma...@iu.edu>
Authored: Mon Oct 24 15:20:00 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Wed Oct 26 11:22:27 2016 -0400

----------------------------------------------------------------------
 app/controllers/AccountController.php        | 31 ++++++++-
 app/libraries/URPUtilities.php               | 80 +++++++++++++++++++----
 app/routes.php                               |  2 +
 app/views/account/credential-store.blade.php | 34 ++++++++--
 4 files changed, 126 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d75f93da/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index 9295f66..e93318e 100644
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -470,14 +470,39 @@ class AccountController extends BaseController
     public function getCredentialStore() {
 
         $userResourceProfile = URPUtilities::get_or_create_user_resource_profile();
-        $publicKey = AdminUtilities::get_pubkey_from_token($userResourceProfile->credentialStoreToken);
+        $userCredentialSummaries = URPUtilities::get_all_ssh_pub_keys_summary_for_user();
+        $credentialSummaryMap = $this->create_credential_summary_map(URPUtilities::get_all_ssh_pub_keys_summary_for_user());
+        $defaultCredentialSummary = $credentialSummaryMap[$userResourceProfile->credentialStoreToken];
 
         return View::make("account/credential-store", array(
-            "token" => $userResourceProfile->credentialStoreToken,
-            "publicKey" => $publicKey
+            "userResourceProfile" => $userResourceProfile,
+            "credentialSummaries" => $userCredentialSummaries,
+            "defaultCredentialSummary" => $defaultCredentialSummary
         ));
     }
 
+    public function setDefaultCredential() {
+
+        $defaultToken = Input::get("defaultToken");
+        $userResourceProfile = URPUtilities::get_user_resource_profile();
+        $userResourceProfile->credentialStoreToken = $defaultToken;
+        URPUtilities::update_user_resource_profile($userResourceProfile);
+
+        $credentialSummaryMap = $this->create_credential_summary_map(URPUtilities::get_all_ssh_pub_keys_summary_for_user());
+        $description = $credentialSummaryMap["$defaultToken"]["description"];
+
+        return Redirect::to("account/credential-store")->with("message", "SSH Key '$description' is now the default");
+    }
+
+    private function create_credential_summary_map($credentialSummaries) {
+
+        $credentialSummaryMap = array();
+        foreach ($credentialSummaries as $csIndex => $credentialSummary) {
+            $credentialSummaryMap[$credentialSummary["credentialStoreToken"]] = $credentialSummary;
+        }
+        return $credentialSummaryMap;
+    }
+
     public function getComputeResources(){
         $userResourceProfile = URPUtilities::get_or_create_user_resource_profile();
         return View::make("account/compute-resources", array(

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d75f93da/app/libraries/URPUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/URPUtilities.php b/app/libraries/URPUtilities.php
index 435c643..395d88f 100644
--- a/app/libraries/URPUtilities.php
+++ b/app/libraries/URPUtilities.php
@@ -8,28 +8,80 @@ class URPUtilities
 
     public static function get_or_create_user_resource_profile()
     {
-        $userId = Session::get('username');
-        $gatewayId = Session::get('gateway_id');
         try {
-            return Airavata::getUserResourceProfile(Session::get('authz-token'), $userId, $gatewayId);
+            return URPUtilities::get_user_resource_profile();
         } catch (AiravataSystemException $ase) {
             // TODO: replace try/catch with null check once backend is updated, see AIRAVATA-2117
             // Assume that exception was thrown because there is no UserResourceProfile
 
-            // Create a minimal UserResourceProfile with an SSH credential store token
-            $credentialStoreToken = AdminUtilities::create_ssh_token();
-            $userResourceProfileData = new UserResourceProfile(array(
-                    "userId" => $userId,
-                    "gatewayID" => $gatewayId,
-                    "" => $credentialStoreToken
-                )
-            );
-            Airavata::registerUserResourceProfile(Session::get('authz-token'), $userResourceProfileData);
-
-            return Airavata::getUserResourceProfile(Session::get('authz-token'), $userId, $gatewayId);
+            return URPUtilities::create_user_resource_profile();
         }
     }
 
+    public static function get_user_resource_profile()
+    {
+        $userId = Session::get('username');
+        $gatewayId = Session::get('gateway_id');
+        return Airavata::getUserResourceProfile(Session::get('authz-token'), $userId, $gatewayId);
+    }
+
+    public static function create_user_resource_profile()
+    {
+
+        $userId = Session::get('username');
+        $gatewayId = Session::get('gateway_id');
+        // TODO add a description to the SSH token
+        $credentialStoreToken = AdminUtilities::create_ssh_token();
+        $userResourceProfileData = new UserResourceProfile(array(
+                "userId" => $userId,
+                "gatewayID" => $gatewayId,
+                "credentialStoreToken" => $credentialStoreToken
+            )
+        );
+        Airavata::registerUserResourceProfile(Session::get('authz-token'), $userResourceProfileData);
+
+        return Airavata::getUserResourceProfile(Session::get('authz-token'), $userId, $gatewayId);
+    }
+
+    public static function update_user_resource_profile($userResourceProfile)
+    {
+
+        $userId = Session::get('username');
+        $gatewayId = Session::get('gateway_id');
+        Airavata::updateUserResourceProfile(Session::get('authz-token'), $userId, $gatewayId, $userResourceProfile);
+    }
+
+    public static function get_all_ssh_pub_keys_summary_for_user()
+    {
+
+        $userId = Session::get('username');
+        $gatewayId = Session::get('gateway_id');
+
+        // TODO use the real method once it has the credentialStoreToken in it
+        // $credSummaries = Airavata::getAllSSHPubKeysSummaryForUserInGateway(Session::get('authz-token'), $gatewayId, $userId);
+        $userResourceProfile = URPUtilities::get_or_create_user_resource_profile();
+        $publicKey = AdminUtilities::get_pubkey_from_token($userResourceProfile->credentialStoreToken);
+        $credSummaries = array(
+            array(
+                "publicKey" => $publicKey,
+                "description" => "Default SSH Public Key",
+                "credentialStoreToken" => $userResourceProfile->credentialStoreToken
+            ),
+            array(
+                "publicKey" => "dummy public key",
+                "description" => "Public Key #2",
+                "credentialStoreToken" => "abc123"
+            ),
+            array(
+                "publicKey" => "dummy public key",
+                "description" => "Public Key #3",
+                "credentialStoreToken" => "def456"
+            )
+        );
+
+        return $credSummaries;
+    }
+
     // Only used for testing
     public static function delete_user_resource_profile()
     {

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d75f93da/app/routes.php
----------------------------------------------------------------------
diff --git a/app/routes.php b/app/routes.php
index bb3025e..3fd11e6 100755
--- a/app/routes.php
+++ b/app/routes.php
@@ -49,6 +49,8 @@ Route::get("allocation-request", "AccountController@allocationRequestView");
 Route::post("allocation-request", "AccountController@allocationRequestSubmit");
 
 Route::get("account/credential-store", "AccountController@getCredentialStore");
+Route::post("account/set-default-credential", "AccountController@setDefaultCredential");
+
 Route::get("account/computeResources", "AccountController@getComputeResources");
 // TODO: just for testing
 Route::get("account/deleteURP", "AccountController@deleteUserResourceProfile");

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/d75f93da/app/views/account/credential-store.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/credential-store.blade.php b/app/views/account/credential-store.blade.php
index 71f76fa..58666b0 100644
--- a/app/views/account/credential-store.blade.php
+++ b/app/views/account/credential-store.blade.php
@@ -6,25 +6,51 @@
 
 @section('content')
 <div class="container">
+    @if( Session::has("message"))
+    <div class="alert alert-success alert-dismissible" role="alert">
+        <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span
+                class="sr-only">Close</span></button>
+        {{{ Session::get("message") }}}
+    </div>
+    {{ Session::forget("message") }}
+    @endif
     <h1>SSH Keys</h1>
-    <h2>Default SSH Key</h2>
+    <h3>Default SSH Key</h3>
+    <form class="form-inline" action="{{ URL::to('/') }}/account/set-default-credential" method="post">
+        <div class="form-group">
+            <label for="defaultToken" class="sr-only">Select default SSH key</label>
+            <select class="form-control" id="defaultToken" name="defaultToken">
+                @foreach ($credentialSummaries as $credentialSummary)
+                <option
+                @if ($credentialSummary["credentialStoreToken"] == $defaultCredentialSummary["credentialStoreToken"])
+                selected
+                @endif
+                value="{{ $credentialSummary["credentialStoreToken"] }}">{{ $credentialSummary["description"] }}</option>
+                @endforeach
+            </select>
+        </div>
+        <button type="submit" class="btn btn-default">Update default</button>
+    </form>
 
+    <h3>SSH Key Info</h3>
     <table class="table table-bordered table-condensed" style="word-wrap: break-word; table-layout: fixed; width: 100%;">
         <thead>
             <tr>
-                <th>Token</th>
+                <th>Description</th>
                 <th>Public Key</th>
             </tr>
         </thead>
         <tbody>
+            @foreach ($credentialSummaries as $credentialSummary)
             <tr>
                 <td>
-                    {{ $token }}
+                    {{ $credentialSummary["description"] }}
                 </td>
                 <td>
-                    {{ $publicKey }}
+                    {{ $credentialSummary["publicKey"] }}
                 </td>
             </tr>
+            @endforeach
         </tbody>
     </table>
 </div>


[17/20] airavata-php-gateway git commit: AIRAVATA-2156 UI refinements; copy-to-clipboard button

Posted by sm...@apache.org.
AIRAVATA-2156 UI refinements; copy-to-clipboard button


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/a6665570
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/a6665570
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/a6665570

Branch: refs/heads/develop
Commit: a6665570907be2f1902ac0e0ccc747ef615d5e4b
Parents: b6eab42
Author: Marcus Christie <ma...@iu.edu>
Authored: Thu Oct 27 17:26:43 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Thu Oct 27 17:26:43 2016 -0400

----------------------------------------------------------------------
 app/views/account/credential-store.blade.php | 144 +++++++++++++---------
 public/js/clipboard.min.js                   |   7 ++
 2 files changed, 93 insertions(+), 58 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a6665570/app/views/account/credential-store.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/credential-store.blade.php b/app/views/account/credential-store.blade.php
index 3f4fee6..a1c382e 100644
--- a/app/views/account/credential-store.blade.php
+++ b/app/views/account/credential-store.blade.php
@@ -2,6 +2,20 @@
 
 @section('page-header')
 @parent
+<style>
+.credential-item {
+    padding-right: 220px;
+    position: relative;
+}
+.credential-item .credential-buttons {
+    height: 34px;
+    width: 220px;
+    position: absolute;
+    top: 50%;
+    margin-top: -17px;
+    right: 0px;
+}
+</style>
 @stop
 
 @section('content')
@@ -25,67 +39,71 @@
     @endif
 
     <h1>SSH Keys</h1>
-    <h3>Default SSH Key</h3>
-    <form class="form-inline" action="{{ URL::to('/') }}/account/set-default-credential" method="post">
-        <div class="form-group">
-            <label for="defaultToken" class="sr-only">Select default SSH key</label>
-            <select class="form-control" id="defaultToken" name="defaultToken">
-                @foreach ($credentialSummaries as $credentialSummary)
-                <option
-                @if ($credentialSummary->token == $defaultCredentialSummary->token)
-                selected
-                @endif
-                value="{{ $credentialSummary->token }}">{{ $credentialSummary->description }}</option>
-                @endforeach
-            </select>
+
+    <div class="panel panel-default">
+        <div class="panel-heading">
+            <h3 class="panel-title">Default SSH Key</h3>
         </div>
-        <button type="submit" class="btn btn-default">Update default</button>
-    </form>
-
-    <h3>Add SSH Key</h3>
-    @if ($errors->has())
-    @foreach ($errors->all() as $error)
-    {{ CommonUtilities::print_error_message($error) }}
-    @endforeach
-    @endif
-    <form id="add-credential" class="form-inline" action="{{ URL::to('/') }}/account/add-credential" method="post">
-        <div id="credential-description-form-group" class="form-group">
-            <label for="credential-description" class="sr-only">Description for new SSH key</label>
-            <input type="text" id="credential-description" name="credential-description"
-                class="form-control" placeholder="Description" required/>
+        <div class="panel-body">
+            <form class="form-inline" action="{{ URL::to('/') }}/account/set-default-credential" method="post">
+                <div class="form-group">
+                    <label for="defaultToken" class="sr-only">Select default SSH key</label>
+                    <select class="form-control" id="defaultToken" name="defaultToken">
+                        @foreach ($credentialSummaries as $credentialSummary)
+                        <option
+                        @if ($credentialSummary->token == $defaultCredentialSummary->token)
+                        selected
+                        @endif
+                        value="{{ $credentialSummary->token }}">{{ $credentialSummary->description }}</option>
+                        @endforeach
+                    </select>
+                </div>
+                <button type="submit" class="btn btn-default">Update default</button>
+            </form>
         </div>
-        <button type="submit" class="btn btn-default">Add</button>
-    </form>
-
-    <h3>SSH Key Info</h3>
-    <table class="table table-bordered table-condensed" style="word-wrap: break-word; table-layout: fixed; width: 100%;">
-        <thead>
-            <tr>
-                <th>Description</th>
-                <th>Public Key</th>
-                <th>Delete</th>
-            </tr>
-        </thead>
-        <tbody>
-            @foreach ($credentialSummaries as $credentialSummary)
-            <tr>
-                <td>
-                    {{ $credentialSummary->description }}
-                </td>
-                <td>
-                    {{ $credentialSummary->publicKey }}
-                </td>
-                <td>
-                    @if ($credentialSummary->canDelete)
-                    <span data-token="{{$credentialSummary->token}}"
-                        data-description="{{$credentialSummary->description}}"
-                        class="glyphicon glyphicon-trash delete-credential"></span>
-                    @endif
-                </td>
-            </tr>
+    </div>
+
+    <div class="panel panel-default">
+        <div class="panel-heading">
+            <h3 class="panel-title">Add SSH Key</h3>
+        </div>
+        <div class="panel-body">
+            @if ($errors->has())
+            @foreach ($errors->all() as $error)
+            {{ CommonUtilities::print_error_message($error) }}
             @endforeach
-        </tbody>
-    </table>
+            @endif
+            <form id="add-credential" class="form-inline" action="{{ URL::to('/') }}/account/add-credential" method="post">
+                <div id="credential-description-form-group" class="form-group">
+                    <label for="credential-description" class="sr-only">Description for new SSH key</label>
+                    <input type="text" id="credential-description" name="credential-description"
+                    class="form-control" placeholder="Description" required/>
+                </div>
+                <button type="submit" class="btn btn-default">Add</button>
+            </form>
+        </div>
+    </div>
+
+    <div class="panel panel-default">
+      <div class="panel-heading">SSH Keys</div>
+      <ul class="list-group">
+        @foreach ($credentialSummaries as $credentialSummary)
+        <li class="list-group-item credential-item">
+            {{ $credentialSummary->description }}
+            <div class="credential-buttons">
+                <button type="button" class="btn btn-default copy-credential"
+                    data-clipboard-text="{{$credentialSummary->publicKey}}"
+                    data-toggle="tooltip" data-placement="bottom" data-title="Copied!" data-trigger="manual">Copy to clipboard</button>
+                @if ($credentialSummary->canDelete)
+                <button data-token="{{$credentialSummary->token}}"
+                    data-description="{{$credentialSummary->description}}"
+                    class="btn btn-default delete-credential">Delete</button>
+                @endif
+            </div>
+        </li>
+        @endforeach
+      </ul>
+    </div>
 </div>
 
 <div class="modal fade" id="delete-credential-modal" tabindex="-1" role="dialog" aria-labelledby="delete-credential-modal-title"
@@ -117,6 +135,7 @@
 
 @section('scripts')
 @parent
+{{ HTML::script('js/clipboard.min.js') }}
 <script>
 $('.delete-credential').on('click', function(){
 
@@ -142,5 +161,14 @@ $('#credential-description').on('keyup input change', function(event){
         $('#credential-description-form-group').toggleClass('has-error', !valid);
     }
 });
+
+var clipboard = new Clipboard('.copy-credential');
+clipboard.on('success', function(e){
+    // Show 'Copied!' tooltip for 2 seconds on successful copy
+    $(e.trigger).tooltip('show');
+    setTimeout(function(){
+        $(e.trigger).tooltip('hide');
+    }, 2000);
+});
 </script>
 @stop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a6665570/public/js/clipboard.min.js
----------------------------------------------------------------------
diff --git a/public/js/clipboard.min.js b/public/js/clipboard.min.js
new file mode 100755
index 0000000..607a71d
--- /dev/null
+++ b/public/js/clipboard.min.js
@@ -0,0 +1,7 @@
+/*!
+ * clipboard.js v1.5.15
+ * https://zenorocha.github.io/clipboard.js
+ *
+ * Licensed MIT � Zeno Rocha
+ */
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Clipboard=e()}}(function(){var e,t,n;return function e(t,n,i){function o(a,c){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!c&&l)return l(a,!0);if(r)return r(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var u=n[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return o(n?n:e)},u,u.exports,e,t,n,i)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(e,t,n){function i(e,t){for(;e&&e!==document;){if(e.matches(t))return e;e=e.parentNode}}if(Element&&!Element.prototype.matches){var o=Element.prototype;o.matches=o.matchesSelector||o.mozMatchesSelector||o.msMatchesSelector||o.oMatchesSelec
 tor||o.webkitMatchesSelector}t.exports=i},{}],2:[function(e,t,n){function i(e,t,n,i,r){var a=o.apply(this,arguments);return e.addEventListener(n,a,r),{destroy:function(){e.removeEventListener(n,a,r)}}}function o(e,t,n,i){return function(n){n.delegateTarget=r(n.target,t),n.delegateTarget&&i.call(e,n)}}var r=e("./closest");t.exports=i},{"./closest":1}],3:[function(e,t,n){n.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},n.nodeList=function(e){var t=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===t||"[object HTMLCollection]"===t)&&"length"in e&&(0===e.length||n.node(e[0]))},n.string=function(e){return"string"==typeof e||e instanceof String},n.fn=function(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t}},{}],4:[function(e,t,n){function i(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!c.string(t))throw new TypeError("Second argument must be a String");if(!c.fn(n))throw new TypeError
 ("Third argument must be a Function");if(c.node(e))return o(e,t,n);if(c.nodeList(e))return r(e,t,n);if(c.string(e))return a(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function o(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}function r(e,t,n){return Array.prototype.forEach.call(e,function(e){e.addEventListener(t,n)}),{destroy:function(){Array.prototype.forEach.call(e,function(e){e.removeEventListener(t,n)})}}}function a(e,t,n){return l(document.body,e,t,n)}var c=e("./is"),l=e("delegate");t.exports=i},{"./is":3,delegate:2}],5:[function(e,t,n){function i(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName)e.focus(),e.setSelectionRange(0,e.value.length),t=e.value;else{e.hasAttribute("contenteditable")&&e.focus();var n=window.getSelection(),i=document.createRange();i.selectNodeContents(e),n.removeAllRanges(),n.addRange(i),t=n.toStri
 ng()}return t}t.exports=i},{}],6:[function(e,t,n){function i(){}i.prototype={on:function(e,t,n){var i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){function i(){o.off(e,i),t.apply(n,arguments)}var o=this;return i._=t,this.on(e,i,n)},emit:function(e){var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),i=0,o=n.length;for(i;i<o;i++)n[i].fn.apply(n[i].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),i=n[e],o=[];if(i&&t)for(var r=0,a=i.length;r<a;r++)i[r].fn!==t&&i[r].fn._!==t&&o.push(i[r]);return o.length?n[e]=o:delete n[e],this}},t.exports=i},{}],7:[function(t,n,i){!function(o,r){if("function"==typeof e&&e.amd)e(["module","select"],r);else if("undefined"!=typeof i)r(n,t("select"));else{var a={exports:{}};r(a,o.select),o.clipboardAction=a.exports}}(this,function(e,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class 
 as a function")}var o=n(t),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),c=function(){function e(t){i(this,e),this.resolveOptions(t),this.initSelection()}return a(e,[{key:"resolveOptions",value:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function e(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function e(){var t=this,n="rtl"==document.documentElement.getAttribu
 te("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=document.body.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[n?"right":"left"]="-9999px";var i=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.addEventListener("focus",window.scrollTo(0,i)),this.fakeElem.style.top=i+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,o.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function e(){this.fakeHandler&&(document.body.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(document.body.removeChild(this.fa
 keElem),this.fakeElem=null)}},{key:"selectTarget",value:function e(){this.selectedText=(0,o.default)(this.target),this.copyText()}},{key:"copyText",value:function e(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function e(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function e(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function e(){this.removeFake()}},{key:"action",set:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function e(){return this._action}},{key:"target",set:function e(t){if(void 0!==t){if(!t||"object"!==("undefined"==typeof t?"undefined":r(t))||1
 !==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function e(){return this._target}}]),e}();e.exports=c})},{select:5}],8:[function(t,n,i){!function(o,r){if("function"==typeof e&&e.amd)e(["module","./clipboard-action","tiny-emitter","good-listener"],r);else if("undefined"!=typeof i)r(n,t("./clipboard-action"),t("tiny-emitter"),t("good-listener"));else{var a={exports:{}};r(a,o.clipboardAction,o.tinyEmitter,o.goodListener),o.clipboard=a.exports}}(this,function(e,t,n,i){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("
 Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}var s=o(t),u=o(n),f=o(i),d=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),h=function(e){function t(e,n){r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.resolveOpti
 ons(n),i.listenClick(e),i}return c(t,e),d(t,[{key:"resolveOptions",value:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText}},{key:"listenClick",value:function e(t){var n=this;this.listener=(0,f.default)(t,"click",function(e){return n.onClick(e)})}},{key:"onClick",value:function e(t){var n=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new s.default({action:this.action(n),target:this.target(n),text:this.text(n),trigger:n,emitter:this})}},{key:"defaultAction",value:function e(t){return l("action",t)}},{key:"defaultTarget",value:function e(t){var n=l("target",t);if(n)return document.querySelector(n)}},{key:"defaultText",value:function e(t){return l("text",t)}},{key:"destroy",value:function e(){this.listener.de
 stroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}]),t}(u.default);e.exports=h})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)});
\ No newline at end of file


[19/20] airavata-php-gateway git commit: AIRAVATA-2156 Removing test code

Posted by sm...@apache.org.
AIRAVATA-2156 Removing test code


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/188d6ff9
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/188d6ff9
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/188d6ff9

Branch: refs/heads/develop
Commit: 188d6ff9d78fabbe6fcbb86a501ee2743bd2ef4d
Parents: 8a22f77
Author: Marcus Christie <ma...@iu.edu>
Authored: Fri Oct 28 11:50:24 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Fri Oct 28 11:50:24 2016 -0400

----------------------------------------------------------------------
 app/controllers/AccountController.php | 6 ------
 app/routes.php                        | 2 --
 2 files changed, 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/188d6ff9/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index 74e3690..2b3eced 100644
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -541,10 +541,4 @@ class AccountController extends BaseController
             "userResourceProfile" => $userResourceProfile
         ));
     }
-
-    // TODO: Only used for testing, remove
-    public function deleteUserResourceProfile(){
-        URPUtilities::delete_user_resource_profile();
-        return Redirect::to("account/dashboard");
-    }
 }

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/188d6ff9/app/routes.php
----------------------------------------------------------------------
diff --git a/app/routes.php b/app/routes.php
index bfe5ee9..e0bc801 100755
--- a/app/routes.php
+++ b/app/routes.php
@@ -54,8 +54,6 @@ Route::post("account/add-credential", "AccountController@addCredential");
 Route::post("account/delete-credential", "AccountController@deleteCredential");
 
 Route::get("account/computeResources", "AccountController@getComputeResources");
-// TODO: just for testing
-Route::get("account/deleteURP", "AccountController@deleteUserResourceProfile");
 
 /*
  * The following routes will not work without logging in.


[14/20] airavata-php-gateway git commit: AIRAVATA-2156 Give description for default SSH key

Posted by sm...@apache.org.
AIRAVATA-2156 Give description for default SSH key


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/9bc02d0f
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/9bc02d0f
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/9bc02d0f

Branch: refs/heads/develop
Commit: 9bc02d0fcd305a782ab8fc4255a09f0146e49dca
Parents: 83a8373
Author: Marcus Christie <ma...@iu.edu>
Authored: Thu Oct 27 10:09:41 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Thu Oct 27 10:09:41 2016 -0400

----------------------------------------------------------------------
 app/libraries/URPUtilities.php | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/9bc02d0f/app/libraries/URPUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/URPUtilities.php b/app/libraries/URPUtilities.php
index fccf63e..f0a6094 100644
--- a/app/libraries/URPUtilities.php
+++ b/app/libraries/URPUtilities.php
@@ -29,8 +29,7 @@ class URPUtilities
 
         $userId = Session::get('username');
         $gatewayId = Session::get('gateway_id');
-        // TODO add a description to the SSH token
-        $credentialStoreToken = AdminUtilities::create_ssh_token();
+        $credentialStoreToken = AdminUtilities::create_ssh_token_with_description("Default SSH Key");
         $userResourceProfileData = new UserResourceProfile(array(
                 "userId" => $userId,
                 "gatewayID" => $gatewayId,


[02/20] airavata-php-gateway git commit: AIRAVATA-2156 Basic first credential store UI

Posted by sm...@apache.org.
AIRAVATA-2156 Basic first credential store UI

For now just displaying the default credential store SSH public key to
the user.

Also added management of user resources to the user dashboard and the
beginnings of a compute resources view.


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/0b8d5f22
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/0b8d5f22
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/0b8d5f22

Branch: refs/heads/develop
Commit: 0b8d5f22f000f1820e7b68464ec3e065ccd647cc
Parents: 06ede1d
Author: Marcus Christie <ma...@gmail.com>
Authored: Wed Oct 12 09:50:21 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Thu Oct 20 10:21:42 2016 -0400

----------------------------------------------------------------------
 app/controllers/AccountController.php         | 23 ++++++++++++
 app/libraries/URPUtilities.php                | 42 ++++++++++++++++++++++
 app/routes.php                                |  5 +++
 app/views/account/compute-resources.blade.php | 17 +++++++++
 app/views/account/credential-store.blade.php  | 37 +++++++++++++++++++
 app/views/account/dashboard.blade.php         | 39 ++++++++++++++++++++
 6 files changed, 163 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/0b8d5f22/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index ddcecef..9295f66 100644
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -467,4 +467,27 @@ class AccountController extends BaseController
         Session::put("notice-seen", true);
     }
 
+    public function getCredentialStore() {
+
+        $userResourceProfile = URPUtilities::get_or_create_user_resource_profile();
+        $publicKey = AdminUtilities::get_pubkey_from_token($userResourceProfile->credentialStoreToken);
+
+        return View::make("account/credential-store", array(
+            "token" => $userResourceProfile->credentialStoreToken,
+            "publicKey" => $publicKey
+        ));
+    }
+
+    public function getComputeResources(){
+        $userResourceProfile = URPUtilities::get_or_create_user_resource_profile();
+        return View::make("account/compute-resources", array(
+            "userResourceProfile" => $userResourceProfile
+        ));
+    }
+
+    // TODO: Only used for testing, remove
+    public function deleteUserResourceProfile(){
+        URPUtilities::delete_user_resource_profile();
+        return Redirect::to("account/dashboard");
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/0b8d5f22/app/libraries/URPUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/URPUtilities.php b/app/libraries/URPUtilities.php
new file mode 100644
index 0000000..435c643
--- /dev/null
+++ b/app/libraries/URPUtilities.php
@@ -0,0 +1,42 @@
+<?php
+
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile;
+
+class URPUtilities
+{
+
+    public static function get_or_create_user_resource_profile()
+    {
+        $userId = Session::get('username');
+        $gatewayId = Session::get('gateway_id');
+        try {
+            return Airavata::getUserResourceProfile(Session::get('authz-token'), $userId, $gatewayId);
+        } catch (AiravataSystemException $ase) {
+            // TODO: replace try/catch with null check once backend is updated, see AIRAVATA-2117
+            // Assume that exception was thrown because there is no UserResourceProfile
+
+            // Create a minimal UserResourceProfile with an SSH credential store token
+            $credentialStoreToken = AdminUtilities::create_ssh_token();
+            $userResourceProfileData = new UserResourceProfile(array(
+                    "userId" => $userId,
+                    "gatewayID" => $gatewayId,
+                    "" => $credentialStoreToken
+                )
+            );
+            Airavata::registerUserResourceProfile(Session::get('authz-token'), $userResourceProfileData);
+
+            return Airavata::getUserResourceProfile(Session::get('authz-token'), $userId, $gatewayId);
+        }
+    }
+
+    // Only used for testing
+    public static function delete_user_resource_profile()
+    {
+        $userId = Session::get('username');
+        $gatewayId = Session::get('gateway_id');
+        Airavata::deleteUserResourceProfile(Session::get('authz-token'), $userId, $gatewayId);
+    }
+}
+
+?>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/0b8d5f22/app/routes.php
----------------------------------------------------------------------
diff --git a/app/routes.php b/app/routes.php
index b1ad089..bb3025e 100755
--- a/app/routes.php
+++ b/app/routes.php
@@ -48,6 +48,11 @@ Route::get("allocation-request", "AccountController@allocationRequestView");
 
 Route::post("allocation-request", "AccountController@allocationRequestSubmit");
 
+Route::get("account/credential-store", "AccountController@getCredentialStore");
+Route::get("account/computeResources", "AccountController@getComputeResources");
+// TODO: just for testing
+Route::get("account/deleteURP", "AccountController@deleteUserResourceProfile");
+
 /*
  * The following routes will not work without logging in.
  *

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/0b8d5f22/app/views/account/compute-resources.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/compute-resources.blade.php b/app/views/account/compute-resources.blade.php
new file mode 100644
index 0000000..89d64a8
--- /dev/null
+++ b/app/views/account/compute-resources.blade.php
@@ -0,0 +1,17 @@
+@extends('layout.basic')
+
+@section('page-header')
+@parent
+@stop
+
+@section('content')
+<div class="container">
+{{var_dump($userResourceProfile)}}
+</div>
+
+@stop
+
+@section('scripts')
+@parent
+<script></script>
+@stop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/0b8d5f22/app/views/account/credential-store.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/credential-store.blade.php b/app/views/account/credential-store.blade.php
new file mode 100644
index 0000000..71f76fa
--- /dev/null
+++ b/app/views/account/credential-store.blade.php
@@ -0,0 +1,37 @@
+@extends('layout.basic')
+
+@section('page-header')
+@parent
+@stop
+
+@section('content')
+<div class="container">
+    <h1>SSH Keys</h1>
+    <h2>Default SSH Key</h2>
+
+    <table class="table table-bordered table-condensed" style="word-wrap: break-word; table-layout: fixed; width: 100%;">
+        <thead>
+            <tr>
+                <th>Token</th>
+                <th>Public Key</th>
+            </tr>
+        </thead>
+        <tbody>
+            <tr>
+                <td>
+                    {{ $token }}
+                </td>
+                <td>
+                    {{ $publicKey }}
+                </td>
+            </tr>
+        </tbody>
+    </table>
+</div>
+
+@stop
+
+@section('scripts')
+@parent
+<script></script>
+@stop
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/0b8d5f22/app/views/account/dashboard.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/dashboard.blade.php b/app/views/account/dashboard.blade.php
index b701ca3..c7d0e93 100644
--- a/app/views/account/dashboard.blade.php
+++ b/app/views/account/dashboard.blade.php
@@ -383,6 +383,45 @@
                         </div>
                     </div>
                 </a>
+                @else
+
+            <div class="row well">
+
+                <h3>Manage Personal Computing and Storage Resources</h3>
+
+                <a href="{{URL::to('/')}}/account/computeResources">
+                    <div class=" col-md-4 well">
+                        <div class="col-md-12">
+                            <span class="glyphicon glyphicon-briefcase  console-icon"></span>
+                        </div>
+                        <div class="col-md-12">
+                            <h4>Compute Resources</h4>
+                        </div>
+                    </div>
+                </a>
+
+                <a href="{{URL::to('/')}}/account/storageResources">
+                    <div class=" col-md-4 well">
+                        <div class="col-md-12">
+                            <span class="glyphicon glyphicon-folder-open console-icon"></span>
+                        </div>
+                        <div class="col-md-12">
+                            <h4>Storage Resources</h4>
+                        </div>
+                    </div>
+                </a>
+
+                <a href="{{URL::to('/')}}/account/credential-store">
+                    <div class=" col-md-4 well">
+                        <div class="col-md-12">
+                            <span class="glyphicon glyphicon-lock console-icon"></span>
+                        </div>
+                        <div class="col-md-12">
+                            <h4>Credential Store</h4>
+                        </div>
+                    </div>
+                </a>
+
                 @endif
 
                 


[09/20] airavata-php-gateway git commit: AIRAVATA-2156 Updating thrift stubs

Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/4ffaa68a/app/libraries/Airavata/API/Airavata.php
----------------------------------------------------------------------
diff --git a/app/libraries/Airavata/API/Airavata.php b/app/libraries/Airavata/API/Airavata.php
index 0c6e126..7d5325a 100644
--- a/app/libraries/Airavata/API/Airavata.php
+++ b/app/libraries/Airavata/API/Airavata.php
@@ -269,6 +269,35 @@ interface AiravataIf {
    */
   public function generateAndRegisterSSHKeys(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userName);
   /**
+   * Generate and Register SSH Key Pair with Airavata Credential Store.
+   * 
+   * @param gatewayId
+   *    The identifier for the requested Gateway.
+   * 
+   * @param userName
+   *    The User for which the credential should be registered. For community accounts, this user is the name of the
+   *    community user name. For computational resources, this user name need not be the same user name on resoruces.
+   * 
+   * @param description
+   *    The description field for a credential type, all type of credential can have a description.
+   * 
+   * @return airavataCredStoreToken
+   *   An SSH Key pair is generated and stored in the credential store and associated with users or community account
+   *   belonging to a Gateway.
+   * 
+   * 
+   * 
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param string $gatewayId
+   * @param string $userName
+   * @param string $description
+   * @return string
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   */
+  public function generateAndRegisterSSHKeysWithDescription(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userName, $description);
+  /**
    * Generate and Register Username PWD Pair with Airavata Credential Store.
    * 
    * @param gatewayId
@@ -345,6 +374,54 @@ interface AiravataIf {
    */
   public function getAllGatewaySSHPubKeys(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId);
   /**
+   * 
+   * Get all Public Keys of the Gateway
+   * 
+   * @param CredStoreToken
+   *    Credential Store Token which you want to find the Public Key for.
+   * 
+   * @param gatewayId
+   *    This is the unique identifier of your gateway where the token and public key was generated from.
+   * 
+   * @return publicKey
+   * 
+   * 
+   * 
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param string $gatewayId
+   * @return \Airavata\Model\AppCatalog\CredetialSummary\CredentialSummary[]
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   */
+  public function getAllGatewaySSHPubKeysSummary(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId);
+  /**
+   * 
+   * Get all Public Key summaries for user in a Gateway
+   * 
+   * @param CredStoreToken
+   *    Credential Store Token which you want to find the Public Key for.
+   * 
+   * @param gatewayId
+   *    This is the unique identifier of your gateway where the token and public key was generated from.
+   * 
+   * @param userId
+   *    This is the unique identifier of user whose public keys are to be fetched.
+   * 
+   * @return CredentialSummary
+   * 
+   * 
+   * 
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param string $gatewayId
+   * @param string $userId
+   * @return \Airavata\Model\AppCatalog\CredetialSummary\CredentialSummary[]
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   */
+  public function getAllSSHPubKeysSummaryForUserInGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userId);
+  /**
    * @param \Airavata\Model\Security\AuthzToken $authzToken
    * @param string $gatewayId
    * @return array
@@ -3229,12 +3306,428 @@ interface AiravataIf {
    */
   public function deleteGatewayStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayID, $storageId);
   /**
-   * Delete the Storage Resource Preference of a registered gateway profile.
+   * Register User Resource Profile.
+   * 
+   * @param UserResourceProfile
+   *    User Resource Profile Object.
+   *    The userId should be obtained from Airavata user profile data model and passed to register a corresponding
+   *      resource profile.
+   * 
+   * @return status
+   *   Returns a success/failure of the update.
+   * 
+   * 
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile $userResourceProfile
+   * @return string
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function registerUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile $userResourceProfile);
+  /**
+   * Fetch the given User Resource Profile.
+   * 
+   * @param userId
+   *   The identifier for the requested user resource profile.
    * 
    * @param gatewayID
-   *   The identifier of the gateway profile to be deleted.
+   *   The identifier to link a gateway for the requested user resource profile.
    * 
-   * @param storageId
+   * @return UserResourceProfile
+   *    User Resource Profile Object.
+   * 
+   * 
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param string $userId
+   * @param string $gatewayID
+   * @return \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile User Resource Profile
+   * 
+   * userId:
+   * Unique identifier used to link user to corresponding user data model
+   * 
+   * gatewayID:
+   *  Unique identifier for the gateway assigned by Airavata. Corelate this to Airavata Admin API Gateway Registration.
+   * 
+   * credentialStoreToken:
+   *  Gateway's defualt credential store token.
+   * 
+   * computeResourcePreferences:
+   *  List of resource preferences for each of the registered compute resources.
+   * 
+   *  identityServerTenant:
+   * 
+   *  identityServerPwdCredToken:
+   * 
+   * isNull:
+   *  Indicates that this instance is just a container for a null value.
+   * 
+   * 
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function getUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID);
+  /**
+   * Update a User Resource Profile.
+   * 
+   * @param userId
+   *   The identifier for the requested user resource to be updated.
+   * 
+   * @param gatewayID
+   *   The identifier to link a gateway for the requested user resource profile.
+   * 
+   * @param UserResourceProfile
+   *    User Resource Profile Object.
+   * 
+   * @return status
+   *   Returns a success/failure of the update.
+   * 
+   * 
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param string $userId
+   * @param string $gatewayID
+   * @param \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile $userResourceProfile
+   * @return bool
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function updateUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile $userResourceProfile);
+  /**
+   * Delete the given User Resource Profile.
+   * 
+   * @param userId
+   *   The identifier for the requested user resource to be deleted.
+   * 
+   * @param gatewayID
+   *   The identifier to link a gateway for the requested user resource profile.
+   * 
+   * @return status
+   *   Returns a success/failure of the deletion.
+   * 
+   * 
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param string $userId
+   * @param string $gatewayID
+   * @return bool
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function deleteUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID);
+  /**
+   * Add a Compute Resource Preference to a registered User profile.
+   * 
+   * @param userId
+   *   The identifier for the User resource profile to be added.
+   * 
+   * @param gatewayID
+   *   The identifier to link a gateway for the requested user resource profile.
+   * 
+   * @param computeResourceId
+   *   Preferences related to a particular compute resource
+   * 
+   * @param computeResourcePreference
+   *   The ComputeResourcePreference object to be added to the resource profile.
+   * 
+   * @return status
+   *   Returns a success/failure of the addition. If a profile already exists, this operation will fail.
+   *    Instead an update should be used.
+   * 
+   * 
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param string $userId
+   * @param string $gatewayID
+   * @param string $userComputeResourceId
+   * @param \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference $userComputeResourcePreference
+   * @return bool
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function addUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId, \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference $userComputeResourcePreference);
+  /**
+   * Add a Storage Resource Preference to a registered user resource profile.
+   * 
+   * @param userId
+   *   The identifier of the user resource profile to be added.
+   * 
+   * @param gatewayID
+   *   The identifier to link a gateway for the requested user resource profile.
+   * 
+   * @param storageResourceId
+   *   Preferences related to a particular compute resource
+   * 
+   * @param computeResourcePreference
+   *   The ComputeResourcePreference object to be added to the resource profile.
+   * 
+   * @return status
+   *   Returns a success/failure of the addition. If a profile already exists, this operation will fail.
+   *    Instead an update should be used.
+   * 
+   * 
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param string $userId
+   * @param string $gatewayID
+   * @param string $userStorageResourceId
+   * @param \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference $userStoragePreference
+   * @return bool
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function addUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageResourceId, \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference $userStoragePreference);
+  /**
+   * 
+   * Fetch a Compute Resource Preference of a registered user resource profile.
+   * 
+   * @param userId
+   *   The identifier for the user profile to be requested
+   * 
+   * @param gatewayID
+   *   The identifier to link a gateway for the requested user resource profile.
+   * 
+   * @param userComputeResourceId
+   *   Preferences related to a particular compute resource
+   * 
+   * @return computeResourcePreference
+   *   Returns the ComputeResourcePreference object.
+   * 
+   * 
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param string $userId
+   * @param string $gatewayID
+   * @param string $userComputeResourceId
+   * @return \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference User specific preferences for a Computer Resource
+   * 
+   * computeResourceId:
+   *   Corelate the preference to a compute resource.
+   * 
+   * 
+   * loginUserName:
+   *   If turned true, Airavata will override the preferences of better alternatives exist.
+   * 
+   * 
+   * preferredBatchQueue:
+   *  Gateways can choose a defualt batch queue based on average job dimention, reservations or other metrics.
+   * 
+   * scratchLocation:
+   *  Path to the local scratch space on a HPC cluster. Typically used to create working directory for job execution.
+   * 
+   * allocationProjectNumber:
+   *  Typically used on HPC machines to charge computing usage to a account number. For instance, on XSEDE once an
+   *    allocation is approved, an allocation number is assigned. Before passing this number with job submittions, the
+   *    account to be used has to be added to the allocation.
+   * 
+   * resourceSpecificCredentialStoreToken:
+   *  Resource specific credential store token. If this token is specified, then it is superceeded by the gateway's
+   *   default credential store.
+   * 
+   * 
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function getUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId);
+  /**
+   * 
+   * Fetch a Storage Resource Preference of a registered user resource profile.
+   * 
+   * @param userId
+   *   The identifier of the user resource profile to request to fetch the particular storage resource preference.
+   * 
+   * @param gatewayID
+   *   The identifier to link a gateway for the requested user resource profile.
+   * 
+   * @param userStorageResourceId
+   *   Identifier of the Stprage Preference required to be fetched.
+   * 
+   * @return UserStoragePreference
+   *   Returns the StoragePreference object.
+   * 
+   * 
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param string $userId
+   * @param string $gatewayID
+   * @param string $userStorageResourceId
+   * @return \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function getUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageResourceId);
+  /**
+   * 
+   * Fetch all Compute Resource Preferences of a registered gateway profile.
+   * 
+   * @param userId
+   *   The identifier of the user resource profile to request to fetch the particular storage resource preference.
+   * 
+   * @param gatewayID
+   *   The identifier for the gateway profile to be requested
+   * 
+   * @return computeResourcePreference
+   *   Returns the ComputeResourcePreference object.
+   * 
+   * 
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param string $userId
+   * @param string $gatewayID
+   * @return \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference[]
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function getAllUserComputeResourcePreferences(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID);
+  /**
+   * Fetch all User Storage Resource Preferences of a registered user profile.
+   * 
+   * @param userId
+   *   The identifier of the user resource profile to request to fetch the particular storage resource preference.
+   * 
+   * @param gatewayID
+   *   The identifier for the gateway profile to be requested
+   * 
+   * @return StoragePreference
+   *   Returns the StoragePreference object.
+   * 
+   * 
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param string $userId
+   * @param string $gatewayID
+   * @return \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference[]
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function getAllUserStoragePreferences(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID);
+  /**
+   * 
+   * Fetch all user resources Profiles registered
+   * 
+   * @return UserResourceProfile
+   *   Returns all the UserResourcePrifle list object.
+   * 
+   * 
+   * 
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @return \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile[]
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function getAllUserResourceProfiles(\Airavata\Model\Security\AuthzToken $authzToken);
+  /**
+   * Update a Compute Resource Preference to a registered user resource profile.
+   * 
+   * @param userId
+   *   The identifier for the user profile to be updated.
+   * 
+   * @param gatewayID
+   *   The identifier to link a gateway for the requested user resource profile.
+   * 
+   * @param userComputeResourceId
+   *   Preferences related to a particular compute resource
+   * 
+   * @param userComputeResourcePreference
+   *   The ComputeResourcePreference object to be updated to the resource profile.
+   * 
+   * @return status
+   *   Returns a success/failure of the updation.
+   * 
+   * 
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param string $userId
+   * @param string $gatewayID
+   * @param string $userComputeResourceId
+   * @param \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference $userComputeResourcePreference
+   * @return bool
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function updateUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId, \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference $userComputeResourcePreference);
+  /**
+   * Update a Storage Resource Preference of a registered user resource profile.
+   * 
+   * @param userId
+   *   The identifier of the user resource profile to be updated.
+   * 
+   * @param gatewayID
+   *   The identifier to link a gateway for the requested user resource profile.
+   * 
+   * @param userStorageId
+   *   The Storage resource identifier of the one that you want to update
+   * 
+   * @param userStoragePreference
+   *   The storagePreference object to be updated to the resource profile.
+   * 
+   * @return status
+   *   Returns a success/failure of the updation.
+   * 
+   * 
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param string $userId
+   * @param string $gatewayID
+   * @param string $userStorageId
+   * @param \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference $userStoragePreference
+   * @return bool
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function updateUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageId, \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference $userStoragePreference);
+  /**
+   * Delete the Compute Resource Preference of a registered user resource profile.
+   * 
+   * @param userId
+   *   The identifier for the user resource profile to be deleted.
+   * 
+   * @param gatewayID
+   *   The identifier to link a gateway for the requested user resource profile.
+   * 
+   * @param userComputeResourceId
+   *   Preferences related to a particular compute resource
+   * 
+   * @return status
+   *   Returns a success/failure of the deletion.
+   * 
+   * 
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param string $userId
+   * @param string $gatewayID
+   * @param string $userComputeResourceId
+   * @return bool
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function deleteUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId);
+  /**
+   * Delete the Storage Resource Preference of a registered user resource profile.
+   * 
+   * @param userId
+   *   The identifier of the user profile to be deleted.
+   * 
+   * @param gatewayID
+   *   The identifier to link a gateway for the requested user resource profile.
+   * 
+   * @param userStorageId
    *   ID of the storage preference you want to delete.
    * 
    * @return status
@@ -3242,6 +3735,18 @@ interface AiravataIf {
    * 
    * 
    * @param \Airavata\Model\Security\AuthzToken $authzToken
+   * @param string $userId
+   * @param string $gatewayID
+   * @param string $userStorageId
+   * @return bool
+   * @throws \Airavata\API\Error\InvalidRequestException
+   * @throws \Airavata\API\Error\AiravataClientException
+   * @throws \Airavata\API\Error\AiravataSystemException
+   * @throws \Airavata\API\Error\AuthorizationException
+   */
+  public function deleteUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageId);
+  /**
+   * @param \Airavata\Model\Security\AuthzToken $authzToken
    * @param string $gatewayId
    * @return string[]
    * @throws \Airavata\API\Error\InvalidRequestException
@@ -4432,6 +4937,69 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     throw new \Exception("generateAndRegisterSSHKeys failed: unknown result");
   }
 
+  public function generateAndRegisterSSHKeysWithDescription(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userName, $description)
+  {
+    $this->send_generateAndRegisterSSHKeysWithDescription($authzToken, $gatewayId, $userName, $description);
+    return $this->recv_generateAndRegisterSSHKeysWithDescription();
+  }
+
+  public function send_generateAndRegisterSSHKeysWithDescription(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userName, $description)
+  {
+    $args = new \Airavata\API\Airavata_generateAndRegisterSSHKeysWithDescription_args();
+    $args->authzToken = $authzToken;
+    $args->gatewayId = $gatewayId;
+    $args->userName = $userName;
+    $args->description = $description;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'generateAndRegisterSSHKeysWithDescription', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('generateAndRegisterSSHKeysWithDescription', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_generateAndRegisterSSHKeysWithDescription()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_generateAndRegisterSSHKeysWithDescription_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Airavata_generateAndRegisterSSHKeysWithDescription_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    throw new \Exception("generateAndRegisterSSHKeysWithDescription failed: unknown result");
+  }
+
   public function registerPwdCredential(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $portalUserName, $loginUserName, $password, $description)
   {
     $this->send_registerPwdCredential($authzToken, $gatewayId, $portalUserName, $loginUserName, $password, $description);
@@ -4620,6 +5188,129 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     throw new \Exception("getAllGatewaySSHPubKeys failed: unknown result");
   }
 
+  public function getAllGatewaySSHPubKeysSummary(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
+  {
+    $this->send_getAllGatewaySSHPubKeysSummary($authzToken, $gatewayId);
+    return $this->recv_getAllGatewaySSHPubKeysSummary();
+  }
+
+  public function send_getAllGatewaySSHPubKeysSummary(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
+  {
+    $args = new \Airavata\API\Airavata_getAllGatewaySSHPubKeysSummary_args();
+    $args->authzToken = $authzToken;
+    $args->gatewayId = $gatewayId;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'getAllGatewaySSHPubKeysSummary', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('getAllGatewaySSHPubKeysSummary', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_getAllGatewaySSHPubKeysSummary()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getAllGatewaySSHPubKeysSummary_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Airavata_getAllGatewaySSHPubKeysSummary_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    throw new \Exception("getAllGatewaySSHPubKeysSummary failed: unknown result");
+  }
+
+  public function getAllSSHPubKeysSummaryForUserInGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userId)
+  {
+    $this->send_getAllSSHPubKeysSummaryForUserInGateway($authzToken, $gatewayId, $userId);
+    return $this->recv_getAllSSHPubKeysSummaryForUserInGateway();
+  }
+
+  public function send_getAllSSHPubKeysSummaryForUserInGateway(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, $userId)
+  {
+    $args = new \Airavata\API\Airavata_getAllSSHPubKeysSummaryForUserInGateway_args();
+    $args->authzToken = $authzToken;
+    $args->gatewayId = $gatewayId;
+    $args->userId = $userId;
+    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
+    if ($bin_accel)
+    {
+      thrift_protocol_write_binary($this->output_, 'getAllSSHPubKeysSummaryForUserInGateway', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+    }
+    else
+    {
+      $this->output_->writeMessageBegin('getAllSSHPubKeysSummaryForUserInGateway', TMessageType::CALL, $this->seqid_);
+      $args->write($this->output_);
+      $this->output_->writeMessageEnd();
+      $this->output_->getTransport()->flush();
+    }
+  }
+
+  public function recv_getAllSSHPubKeysSummaryForUserInGateway()
+  {
+    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getAllSSHPubKeysSummaryForUserInGateway_result', $this->input_->isStrictRead());
+    else
+    {
+      $rseqid = 0;
+      $fname = null;
+      $mtype = 0;
+
+      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
+      if ($mtype == TMessageType::EXCEPTION) {
+        $x = new TApplicationException();
+        $x->read($this->input_);
+        $this->input_->readMessageEnd();
+        throw $x;
+      }
+      $result = new \Airavata\API\Airavata_getAllSSHPubKeysSummaryForUserInGateway_result();
+      $result->read($this->input_);
+      $this->input_->readMessageEnd();
+    }
+    if ($result->success !== null) {
+      return $result->success;
+    }
+    if ($result->ire !== null) {
+      throw $result->ire;
+    }
+    if ($result->ace !== null) {
+      throw $result->ace;
+    }
+    if ($result->ase !== null) {
+      throw $result->ase;
+    }
+    throw new \Exception("getAllSSHPubKeysSummaryForUserInGateway failed: unknown result");
+  }
+
   public function getAllGatewayPWDCredentials(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
   {
     $this->send_getAllGatewayPWDCredentials($authzToken, $gatewayId);
@@ -11813,35 +12504,35 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     throw new \Exception("deleteGatewayStoragePreference failed: unknown result");
   }
 
-  public function getAllWorkflows(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
+  public function registerUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile $userResourceProfile)
   {
-    $this->send_getAllWorkflows($authzToken, $gatewayId);
-    return $this->recv_getAllWorkflows();
+    $this->send_registerUserResourceProfile($authzToken, $userResourceProfile);
+    return $this->recv_registerUserResourceProfile();
   }
 
-  public function send_getAllWorkflows(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
+  public function send_registerUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile $userResourceProfile)
   {
-    $args = new \Airavata\API\Airavata_getAllWorkflows_args();
+    $args = new \Airavata\API\Airavata_registerUserResourceProfile_args();
     $args->authzToken = $authzToken;
-    $args->gatewayId = $gatewayId;
+    $args->userResourceProfile = $userResourceProfile;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'getAllWorkflows', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'registerUserResourceProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('getAllWorkflows', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('registerUserResourceProfile', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_getAllWorkflows()
+  public function recv_registerUserResourceProfile()
   {
     $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getAllWorkflows_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_registerUserResourceProfile_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -11855,7 +12546,7 @@ class AiravataClient implements \Airavata\API\AiravataIf {
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new \Airavata\API\Airavata_getAllWorkflows_result();
+      $result = new \Airavata\API\Airavata_registerUserResourceProfile_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -11874,38 +12565,39 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     if ($result->ae !== null) {
       throw $result->ae;
     }
-    throw new \Exception("getAllWorkflows failed: unknown result");
+    throw new \Exception("registerUserResourceProfile failed: unknown result");
   }
 
-  public function getWorkflow(\Airavata\Model\Security\AuthzToken $authzToken, $workflowTemplateId)
+  public function getUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID)
   {
-    $this->send_getWorkflow($authzToken, $workflowTemplateId);
-    return $this->recv_getWorkflow();
+    $this->send_getUserResourceProfile($authzToken, $userId, $gatewayID);
+    return $this->recv_getUserResourceProfile();
   }
 
-  public function send_getWorkflow(\Airavata\Model\Security\AuthzToken $authzToken, $workflowTemplateId)
+  public function send_getUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID)
   {
-    $args = new \Airavata\API\Airavata_getWorkflow_args();
+    $args = new \Airavata\API\Airavata_getUserResourceProfile_args();
     $args->authzToken = $authzToken;
-    $args->workflowTemplateId = $workflowTemplateId;
+    $args->userId = $userId;
+    $args->gatewayID = $gatewayID;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'getWorkflow', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'getUserResourceProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('getWorkflow', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('getUserResourceProfile', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_getWorkflow()
+  public function recv_getUserResourceProfile()
   {
     $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getWorkflow_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getUserResourceProfile_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -11919,7 +12611,7 @@ class AiravataClient implements \Airavata\API\AiravataIf {
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new \Airavata\API\Airavata_getWorkflow_result();
+      $result = new \Airavata\API\Airavata_getUserResourceProfile_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -11938,38 +12630,40 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     if ($result->ae !== null) {
       throw $result->ae;
     }
-    throw new \Exception("getWorkflow failed: unknown result");
+    throw new \Exception("getUserResourceProfile failed: unknown result");
   }
 
-  public function deleteWorkflow(\Airavata\Model\Security\AuthzToken $authzToken, $workflowTemplateId)
+  public function updateUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile $userResourceProfile)
   {
-    $this->send_deleteWorkflow($authzToken, $workflowTemplateId);
-    $this->recv_deleteWorkflow();
+    $this->send_updateUserResourceProfile($authzToken, $userId, $gatewayID, $userResourceProfile);
+    return $this->recv_updateUserResourceProfile();
   }
 
-  public function send_deleteWorkflow(\Airavata\Model\Security\AuthzToken $authzToken, $workflowTemplateId)
+  public function send_updateUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, \Airavata\Model\AppCatalog\UserResourceProfile\UserResourceProfile $userResourceProfile)
   {
-    $args = new \Airavata\API\Airavata_deleteWorkflow_args();
+    $args = new \Airavata\API\Airavata_updateUserResourceProfile_args();
     $args->authzToken = $authzToken;
-    $args->workflowTemplateId = $workflowTemplateId;
+    $args->userId = $userId;
+    $args->gatewayID = $gatewayID;
+    $args->userResourceProfile = $userResourceProfile;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'deleteWorkflow', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'updateUserResourceProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('deleteWorkflow', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('updateUserResourceProfile', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_deleteWorkflow()
+  public function recv_updateUserResourceProfile()
   {
     $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_deleteWorkflow_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_updateUserResourceProfile_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -11983,10 +12677,13 @@ class AiravataClient implements \Airavata\API\AiravataIf {
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new \Airavata\API\Airavata_deleteWorkflow_result();
+      $result = new \Airavata\API\Airavata_updateUserResourceProfile_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
+    if ($result->success !== null) {
+      return $result->success;
+    }
     if ($result->ire !== null) {
       throw $result->ire;
     }
@@ -11999,39 +12696,39 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     if ($result->ae !== null) {
       throw $result->ae;
     }
-    return;
+    throw new \Exception("updateUserResourceProfile failed: unknown result");
   }
 
-  public function registerWorkflow(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, \Airavata\Model\WorkflowModel $workflow)
+  public function deleteUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID)
   {
-    $this->send_registerWorkflow($authzToken, $gatewayId, $workflow);
-    return $this->recv_registerWorkflow();
+    $this->send_deleteUserResourceProfile($authzToken, $userId, $gatewayID);
+    return $this->recv_deleteUserResourceProfile();
   }
 
-  public function send_registerWorkflow(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId, \Airavata\Model\WorkflowModel $workflow)
+  public function send_deleteUserResourceProfile(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID)
   {
-    $args = new \Airavata\API\Airavata_registerWorkflow_args();
+    $args = new \Airavata\API\Airavata_deleteUserResourceProfile_args();
     $args->authzToken = $authzToken;
-    $args->gatewayId = $gatewayId;
-    $args->workflow = $workflow;
+    $args->userId = $userId;
+    $args->gatewayID = $gatewayID;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'registerWorkflow', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'deleteUserResourceProfile', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('registerWorkflow', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('deleteUserResourceProfile', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_registerWorkflow()
+  public function recv_deleteUserResourceProfile()
   {
     $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_registerWorkflow_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_deleteUserResourceProfile_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -12045,7 +12742,7 @@ class AiravataClient implements \Airavata\API\AiravataIf {
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new \Airavata\API\Airavata_registerWorkflow_result();
+      $result = new \Airavata\API\Airavata_deleteUserResourceProfile_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -12064,39 +12761,41 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     if ($result->ae !== null) {
       throw $result->ae;
     }
-    throw new \Exception("registerWorkflow failed: unknown result");
+    throw new \Exception("deleteUserResourceProfile failed: unknown result");
   }
 
-  public function updateWorkflow(\Airavata\Model\Security\AuthzToken $authzToken, $workflowTemplateId, \Airavata\Model\WorkflowModel $workflow)
+  public function addUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId, \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference $userComputeResourcePreference)
   {
-    $this->send_updateWorkflow($authzToken, $workflowTemplateId, $workflow);
-    $this->recv_updateWorkflow();
+    $this->send_addUserComputeResourcePreference($authzToken, $userId, $gatewayID, $userComputeResourceId, $userComputeResourcePreference);
+    return $this->recv_addUserComputeResourcePreference();
   }
 
-  public function send_updateWorkflow(\Airavata\Model\Security\AuthzToken $authzToken, $workflowTemplateId, \Airavata\Model\WorkflowModel $workflow)
+  public function send_addUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId, \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference $userComputeResourcePreference)
   {
-    $args = new \Airavata\API\Airavata_updateWorkflow_args();
+    $args = new \Airavata\API\Airavata_addUserComputeResourcePreference_args();
     $args->authzToken = $authzToken;
-    $args->workflowTemplateId = $workflowTemplateId;
-    $args->workflow = $workflow;
+    $args->userId = $userId;
+    $args->gatewayID = $gatewayID;
+    $args->userComputeResourceId = $userComputeResourceId;
+    $args->userComputeResourcePreference = $userComputeResourcePreference;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'updateWorkflow', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'addUserComputeResourcePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('updateWorkflow', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('addUserComputeResourcePreference', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_updateWorkflow()
+  public function recv_addUserComputeResourcePreference()
   {
     $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_updateWorkflow_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_addUserComputeResourcePreference_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -12110,10 +12809,13 @@ class AiravataClient implements \Airavata\API\AiravataIf {
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new \Airavata\API\Airavata_updateWorkflow_result();
+      $result = new \Airavata\API\Airavata_addUserComputeResourcePreference_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
+    if ($result->success !== null) {
+      return $result->success;
+    }
     if ($result->ire !== null) {
       throw $result->ire;
     }
@@ -12126,38 +12828,41 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     if ($result->ae !== null) {
       throw $result->ae;
     }
-    return;
+    throw new \Exception("addUserComputeResourcePreference failed: unknown result");
   }
 
-  public function getWorkflowTemplateId(\Airavata\Model\Security\AuthzToken $authzToken, $workflowName)
+  public function addUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageResourceId, \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference $userStoragePreference)
   {
-    $this->send_getWorkflowTemplateId($authzToken, $workflowName);
-    return $this->recv_getWorkflowTemplateId();
+    $this->send_addUserStoragePreference($authzToken, $userId, $gatewayID, $userStorageResourceId, $userStoragePreference);
+    return $this->recv_addUserStoragePreference();
   }
 
-  public function send_getWorkflowTemplateId(\Airavata\Model\Security\AuthzToken $authzToken, $workflowName)
+  public function send_addUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageResourceId, \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference $userStoragePreference)
   {
-    $args = new \Airavata\API\Airavata_getWorkflowTemplateId_args();
+    $args = new \Airavata\API\Airavata_addUserStoragePreference_args();
     $args->authzToken = $authzToken;
-    $args->workflowName = $workflowName;
+    $args->userId = $userId;
+    $args->gatewayID = $gatewayID;
+    $args->userStorageResourceId = $userStorageResourceId;
+    $args->userStoragePreference = $userStoragePreference;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'getWorkflowTemplateId', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'addUserStoragePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('getWorkflowTemplateId', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('addUserStoragePreference', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_getWorkflowTemplateId()
+  public function recv_addUserStoragePreference()
   {
     $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getWorkflowTemplateId_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_addUserStoragePreference_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -12171,7 +12876,7 @@ class AiravataClient implements \Airavata\API\AiravataIf {
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new \Airavata\API\Airavata_getWorkflowTemplateId_result();
+      $result = new \Airavata\API\Airavata_addUserStoragePreference_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -12190,38 +12895,40 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     if ($result->ae !== null) {
       throw $result->ae;
     }
-    throw new \Exception("getWorkflowTemplateId failed: unknown result");
+    throw new \Exception("addUserStoragePreference failed: unknown result");
   }
 
-  public function isWorkflowExistWithName(\Airavata\Model\Security\AuthzToken $authzToken, $workflowName)
+  public function getUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId)
   {
-    $this->send_isWorkflowExistWithName($authzToken, $workflowName);
-    return $this->recv_isWorkflowExistWithName();
+    $this->send_getUserComputeResourcePreference($authzToken, $userId, $gatewayID, $userComputeResourceId);
+    return $this->recv_getUserComputeResourcePreference();
   }
 
-  public function send_isWorkflowExistWithName(\Airavata\Model\Security\AuthzToken $authzToken, $workflowName)
+  public function send_getUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId)
   {
-    $args = new \Airavata\API\Airavata_isWorkflowExistWithName_args();
+    $args = new \Airavata\API\Airavata_getUserComputeResourcePreference_args();
     $args->authzToken = $authzToken;
-    $args->workflowName = $workflowName;
+    $args->userId = $userId;
+    $args->gatewayID = $gatewayID;
+    $args->userComputeResourceId = $userComputeResourceId;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'isWorkflowExistWithName', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'getUserComputeResourcePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('isWorkflowExistWithName', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('getUserComputeResourcePreference', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_isWorkflowExistWithName()
+  public function recv_getUserComputeResourcePreference()
   {
     $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_isWorkflowExistWithName_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getUserComputeResourcePreference_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -12235,7 +12942,7 @@ class AiravataClient implements \Airavata\API\AiravataIf {
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new \Airavata\API\Airavata_isWorkflowExistWithName_result();
+      $result = new \Airavata\API\Airavata_getUserComputeResourcePreference_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -12254,38 +12961,40 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     if ($result->ae !== null) {
       throw $result->ae;
     }
-    throw new \Exception("isWorkflowExistWithName failed: unknown result");
+    throw new \Exception("getUserComputeResourcePreference failed: unknown result");
   }
 
-  public function registerDataProduct(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Data\Replica\DataProductModel $dataProductModel)
+  public function getUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageResourceId)
   {
-    $this->send_registerDataProduct($authzToken, $dataProductModel);
-    return $this->recv_registerDataProduct();
+    $this->send_getUserStoragePreference($authzToken, $userId, $gatewayID, $userStorageResourceId);
+    return $this->recv_getUserStoragePreference();
   }
 
-  public function send_registerDataProduct(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Data\Replica\DataProductModel $dataProductModel)
+  public function send_getUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageResourceId)
   {
-    $args = new \Airavata\API\Airavata_registerDataProduct_args();
+    $args = new \Airavata\API\Airavata_getUserStoragePreference_args();
     $args->authzToken = $authzToken;
-    $args->dataProductModel = $dataProductModel;
+    $args->userId = $userId;
+    $args->gatewayID = $gatewayID;
+    $args->userStorageResourceId = $userStorageResourceId;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'registerDataProduct', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'getUserStoragePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('registerDataProduct', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('getUserStoragePreference', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_registerDataProduct()
+  public function recv_getUserStoragePreference()
   {
     $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_registerDataProduct_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getUserStoragePreference_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -12299,7 +13008,7 @@ class AiravataClient implements \Airavata\API\AiravataIf {
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new \Airavata\API\Airavata_registerDataProduct_result();
+      $result = new \Airavata\API\Airavata_getUserStoragePreference_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -12318,38 +13027,39 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     if ($result->ae !== null) {
       throw $result->ae;
     }
-    throw new \Exception("registerDataProduct failed: unknown result");
+    throw new \Exception("getUserStoragePreference failed: unknown result");
   }
 
-  public function getDataProduct(\Airavata\Model\Security\AuthzToken $authzToken, $dataProductUri)
+  public function getAllUserComputeResourcePreferences(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID)
   {
-    $this->send_getDataProduct($authzToken, $dataProductUri);
-    return $this->recv_getDataProduct();
+    $this->send_getAllUserComputeResourcePreferences($authzToken, $userId, $gatewayID);
+    return $this->recv_getAllUserComputeResourcePreferences();
   }
 
-  public function send_getDataProduct(\Airavata\Model\Security\AuthzToken $authzToken, $dataProductUri)
+  public function send_getAllUserComputeResourcePreferences(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID)
   {
-    $args = new \Airavata\API\Airavata_getDataProduct_args();
+    $args = new \Airavata\API\Airavata_getAllUserComputeResourcePreferences_args();
     $args->authzToken = $authzToken;
-    $args->dataProductUri = $dataProductUri;
+    $args->userId = $userId;
+    $args->gatewayID = $gatewayID;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'getDataProduct', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'getAllUserComputeResourcePreferences', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('getDataProduct', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('getAllUserComputeResourcePreferences', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_getDataProduct()
+  public function recv_getAllUserComputeResourcePreferences()
   {
     $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getDataProduct_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getAllUserComputeResourcePreferences_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -12363,7 +13073,7 @@ class AiravataClient implements \Airavata\API\AiravataIf {
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new \Airavata\API\Airavata_getDataProduct_result();
+      $result = new \Airavata\API\Airavata_getAllUserComputeResourcePreferences_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -12382,38 +13092,39 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     if ($result->ae !== null) {
       throw $result->ae;
     }
-    throw new \Exception("getDataProduct failed: unknown result");
+    throw new \Exception("getAllUserComputeResourcePreferences failed: unknown result");
   }
 
-  public function registerReplicaLocation(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Data\Replica\DataReplicaLocationModel $replicaLocationModel)
+  public function getAllUserStoragePreferences(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID)
   {
-    $this->send_registerReplicaLocation($authzToken, $replicaLocationModel);
-    return $this->recv_registerReplicaLocation();
+    $this->send_getAllUserStoragePreferences($authzToken, $userId, $gatewayID);
+    return $this->recv_getAllUserStoragePreferences();
   }
 
-  public function send_registerReplicaLocation(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Data\Replica\DataReplicaLocationModel $replicaLocationModel)
+  public function send_getAllUserStoragePreferences(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID)
   {
-    $args = new \Airavata\API\Airavata_registerReplicaLocation_args();
+    $args = new \Airavata\API\Airavata_getAllUserStoragePreferences_args();
     $args->authzToken = $authzToken;
-    $args->replicaLocationModel = $replicaLocationModel;
+    $args->userId = $userId;
+    $args->gatewayID = $gatewayID;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'registerReplicaLocation', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'getAllUserStoragePreferences', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('registerReplicaLocation', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('getAllUserStoragePreferences', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_registerReplicaLocation()
+  public function recv_getAllUserStoragePreferences()
   {
     $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_registerReplicaLocation_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getAllUserStoragePreferences_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -12427,7 +13138,7 @@ class AiravataClient implements \Airavata\API\AiravataIf {
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new \Airavata\API\Airavata_registerReplicaLocation_result();
+      $result = new \Airavata\API\Airavata_getAllUserStoragePreferences_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -12446,38 +13157,37 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     if ($result->ae !== null) {
       throw $result->ae;
     }
-    throw new \Exception("registerReplicaLocation failed: unknown result");
+    throw new \Exception("getAllUserStoragePreferences failed: unknown result");
   }
 
-  public function getParentDataProduct(\Airavata\Model\Security\AuthzToken $authzToken, $productUri)
+  public function getAllUserResourceProfiles(\Airavata\Model\Security\AuthzToken $authzToken)
   {
-    $this->send_getParentDataProduct($authzToken, $productUri);
-    return $this->recv_getParentDataProduct();
+    $this->send_getAllUserResourceProfiles($authzToken);
+    return $this->recv_getAllUserResourceProfiles();
   }
 
-  public function send_getParentDataProduct(\Airavata\Model\Security\AuthzToken $authzToken, $productUri)
+  public function send_getAllUserResourceProfiles(\Airavata\Model\Security\AuthzToken $authzToken)
   {
-    $args = new \Airavata\API\Airavata_getParentDataProduct_args();
+    $args = new \Airavata\API\Airavata_getAllUserResourceProfiles_args();
     $args->authzToken = $authzToken;
-    $args->productUri = $productUri;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'getParentDataProduct', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'getAllUserResourceProfiles', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('getParentDataProduct', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('getAllUserResourceProfiles', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_getParentDataProduct()
+  public function recv_getAllUserResourceProfiles()
   {
     $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getParentDataProduct_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getAllUserResourceProfiles_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -12491,7 +13201,7 @@ class AiravataClient implements \Airavata\API\AiravataIf {
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new \Airavata\API\Airavata_getParentDataProduct_result();
+      $result = new \Airavata\API\Airavata_getAllUserResourceProfiles_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -12510,38 +13220,41 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     if ($result->ae !== null) {
       throw $result->ae;
     }
-    throw new \Exception("getParentDataProduct failed: unknown result");
+    throw new \Exception("getAllUserResourceProfiles failed: unknown result");
   }
 
-  public function getChildDataProducts(\Airavata\Model\Security\AuthzToken $authzToken, $productUri)
+  public function updateUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId, \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference $userComputeResourcePreference)
   {
-    $this->send_getChildDataProducts($authzToken, $productUri);
-    return $this->recv_getChildDataProducts();
+    $this->send_updateUserComputeResourcePreference($authzToken, $userId, $gatewayID, $userComputeResourceId, $userComputeResourcePreference);
+    return $this->recv_updateUserComputeResourcePreference();
   }
 
-  public function send_getChildDataProducts(\Airavata\Model\Security\AuthzToken $authzToken, $productUri)
+  public function send_updateUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId, \Airavata\Model\AppCatalog\UserResourceProfile\UserComputeResourcePreference $userComputeResourcePreference)
   {
-    $args = new \Airavata\API\Airavata_getChildDataProducts_args();
+    $args = new \Airavata\API\Airavata_updateUserComputeResourcePreference_args();
     $args->authzToken = $authzToken;
-    $args->productUri = $productUri;
+    $args->userId = $userId;
+    $args->gatewayID = $gatewayID;
+    $args->userComputeResourceId = $userComputeResourceId;
+    $args->userComputeResourcePreference = $userComputeResourcePreference;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'getChildDataProducts', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'updateUserComputeResourcePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('getChildDataProducts', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('updateUserComputeResourcePreference', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_getChildDataProducts()
+  public function recv_updateUserComputeResourcePreference()
   {
     $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getChildDataProducts_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_updateUserComputeResourcePreference_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -12555,7 +13268,7 @@ class AiravataClient implements \Airavata\API\AiravataIf {
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new \Airavata\API\Airavata_getChildDataProducts_result();
+      $result = new \Airavata\API\Airavata_updateUserComputeResourcePreference_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -12574,40 +13287,41 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     if ($result->ae !== null) {
       throw $result->ae;
     }
-    throw new \Exception("getChildDataProducts failed: unknown result");
+    throw new \Exception("updateUserComputeResourcePreference failed: unknown result");
   }
 
-  public function shareResourceWithUsers(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, $resourceType, array $userPermissionList)
+  public function updateUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageId, \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference $userStoragePreference)
   {
-    $this->send_shareResourceWithUsers($authzToken, $resourceId, $resourceType, $userPermissionList);
-    return $this->recv_shareResourceWithUsers();
+    $this->send_updateUserStoragePreference($authzToken, $userId, $gatewayID, $userStorageId, $userStoragePreference);
+    return $this->recv_updateUserStoragePreference();
   }
 
-  public function send_shareResourceWithUsers(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, $resourceType, array $userPermissionList)
+  public function send_updateUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageId, \Airavata\Model\AppCatalog\UserResourceProfile\UserStoragePreference $userStoragePreference)
   {
-    $args = new \Airavata\API\Airavata_shareResourceWithUsers_args();
+    $args = new \Airavata\API\Airavata_updateUserStoragePreference_args();
     $args->authzToken = $authzToken;
-    $args->resourceId = $resourceId;
-    $args->resourceType = $resourceType;
-    $args->userPermissionList = $userPermissionList;
+    $args->userId = $userId;
+    $args->gatewayID = $gatewayID;
+    $args->userStorageId = $userStorageId;
+    $args->userStoragePreference = $userStoragePreference;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'shareResourceWithUsers', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'updateUserStoragePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('shareResourceWithUsers', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('updateUserStoragePreference', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_shareResourceWithUsers()
+  public function recv_updateUserStoragePreference()
   {
     $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_shareResourceWithUsers_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_updateUserStoragePreference_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -12621,7 +13335,7 @@ class AiravataClient implements \Airavata\API\AiravataIf {
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new \Airavata\API\Airavata_shareResourceWithUsers_result();
+      $result = new \Airavata\API\Airavata_updateUserStoragePreference_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -12640,40 +13354,40 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     if ($result->ae !== null) {
       throw $result->ae;
     }
-    throw new \Exception("shareResourceWithUsers failed: unknown result");
+    throw new \Exception("updateUserStoragePreference failed: unknown result");
   }
 
-  public function revokeSharingOfResourceFromUsers(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, $resourceType, array $userPermissionList)
+  public function deleteUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId)
   {
-    $this->send_revokeSharingOfResourceFromUsers($authzToken, $resourceId, $resourceType, $userPermissionList);
-    return $this->recv_revokeSharingOfResourceFromUsers();
+    $this->send_deleteUserComputeResourcePreference($authzToken, $userId, $gatewayID, $userComputeResourceId);
+    return $this->recv_deleteUserComputeResourcePreference();
   }
 
-  public function send_revokeSharingOfResourceFromUsers(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, $resourceType, array $userPermissionList)
+  public function send_deleteUserComputeResourcePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userComputeResourceId)
   {
-    $args = new \Airavata\API\Airavata_revokeSharingOfResourceFromUsers_args();
+    $args = new \Airavata\API\Airavata_deleteUserComputeResourcePreference_args();
     $args->authzToken = $authzToken;
-    $args->resourceId = $resourceId;
-    $args->resourceType = $resourceType;
-    $args->userPermissionList = $userPermissionList;
+    $args->userId = $userId;
+    $args->gatewayID = $gatewayID;
+    $args->userComputeResourceId = $userComputeResourceId;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'revokeSharingOfResourceFromUsers', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'deleteUserComputeResourcePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('revokeSharingOfResourceFromUsers', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('deleteUserComputeResourcePreference', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_revokeSharingOfResourceFromUsers()
+  public function recv_deleteUserComputeResourcePreference()
   {
     $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_revokeSharingOfResourceFromUsers_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_deleteUserComputeResourcePreference_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -12687,7 +13401,7 @@ class AiravataClient implements \Airavata\API\AiravataIf {
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new \Airavata\API\Airavata_revokeSharingOfResourceFromUsers_result();
+      $result = new \Airavata\API\Airavata_deleteUserComputeResourcePreference_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -12706,40 +13420,40 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     if ($result->ae !== null) {
       throw $result->ae;
     }
-    throw new \Exception("revokeSharingOfResourceFromUsers failed: unknown result");
+    throw new \Exception("deleteUserComputeResourcePreference failed: unknown result");
   }
 
-  public function getAllAccessibleUsers(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, $resourceType, $permissionType)
+  public function deleteUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageId)
   {
-    $this->send_getAllAccessibleUsers($authzToken, $resourceId, $resourceType, $permissionType);
-    return $this->recv_getAllAccessibleUsers();
+    $this->send_deleteUserStoragePreference($authzToken, $userId, $gatewayID, $userStorageId);
+    return $this->recv_deleteUserStoragePreference();
   }
 
-  public function send_getAllAccessibleUsers(\Airavata\Model\Security\AuthzToken $authzToken, $resourceId, $resourceType, $permissionType)
+  public function send_deleteUserStoragePreference(\Airavata\Model\Security\AuthzToken $authzToken, $userId, $gatewayID, $userStorageId)
   {
-    $args = new \Airavata\API\Airavata_getAllAccessibleUsers_args();
+    $args = new \Airavata\API\Airavata_deleteUserStoragePreference_args();
     $args->authzToken = $authzToken;
-    $args->resourceId = $resourceId;
-    $args->resourceType = $resourceType;
-    $args->permissionType = $permissionType;
+    $args->userId = $userId;
+    $args->gatewayID = $gatewayID;
+    $args->userStorageId = $userStorageId;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'getAllAccessibleUsers', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'deleteUserStoragePreference', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('getAllAccessibleUsers', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('deleteUserStoragePreference', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_getAllAccessibleUsers()
+  public function recv_deleteUserStoragePreference()
   {
     $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getAllAccessibleUsers_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_deleteUserStoragePreference_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -12753,7 +13467,7 @@ class AiravataClient implements \Airavata\API\AiravataIf {
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new \Airavata\API\Airavata_getAllAccessibleUsers_result();
+      $result = new \Airavata\API\Airavata_deleteUserStoragePreference_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -12772,38 +13486,38 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     if ($result->ae !== null) {
       throw $result->ae;
     }
-    throw new \Exception("getAllAccessibleUsers failed: unknown result");
+    throw new \Exception("deleteUserStoragePreference failed: unknown result");
   }
 
-  public function createGroup(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Group\GroupModel $groupModel)
+  public function getAllWorkflows(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
   {
-    $this->send_createGroup($authzToken, $groupModel);
-    return $this->recv_createGroup();
+    $this->send_getAllWorkflows($authzToken, $gatewayId);
+    return $this->recv_getAllWorkflows();
   }
 
-  public function send_createGroup(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Group\GroupModel $groupModel)
+  public function send_getAllWorkflows(\Airavata\Model\Security\AuthzToken $authzToken, $gatewayId)
   {
-    $args = new \Airavata\API\Airavata_createGroup_args();
+    $args = new \Airavata\API\Airavata_getAllWorkflows_args();
     $args->authzToken = $authzToken;
-    $args->groupModel = $groupModel;
+    $args->gatewayId = $gatewayId;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'createGroup', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'getAllWorkflows', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('createGroup', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('getAllWorkflows', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_createGroup()
+  public function recv_getAllWorkflows()
   {
     $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_createGroup_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getAllWorkflows_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -12817,7 +13531,7 @@ class AiravataClient implements \Airavata\API\AiravataIf {
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new \Airavata\API\Airavata_createGroup_result();
+      $result = new \Airavata\API\Airavata_getAllWorkflows_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -12836,38 +13550,38 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     if ($result->ae !== null) {
       throw $result->ae;
     }
-    throw new \Exception("createGroup failed: unknown result");
+    throw new \Exception("getAllWorkflows failed: unknown result");
   }
 
-  public function updateGroup(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Group\GroupModel $groupModel)
+  public function getWorkflow(\Airavata\Model\Security\AuthzToken $authzToken, $workflowTemplateId)
   {
-    $this->send_updateGroup($authzToken, $groupModel);
-    return $this->recv_updateGroup();
+    $this->send_getWorkflow($authzToken, $workflowTemplateId);
+    return $this->recv_getWorkflow();
   }
 
-  public function send_updateGroup(\Airavata\Model\Security\AuthzToken $authzToken, \Airavata\Model\Group\GroupModel $groupModel)
+  public function send_getWorkflow(\Airavata\Model\Security\AuthzToken $authzToken, $workflowTemplateId)
   {
-    $args = new \Airavata\API\Airavata_updateGroup_args();
+    $args = new \Airavata\API\Airavata_getWorkflow_args();
     $args->authzToken = $authzToken;
-    $args->groupModel = $groupModel;
+    $args->workflowTemplateId = $workflowTemplateId;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protocol_write_binary($this->output_, 'updateGroup', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
+      thrift_protocol_write_binary($this->output_, 'getWorkflow', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     }
     else
     {
-      $this->output_->writeMessageBegin('updateGroup', TMessageType::CALL, $this->seqid_);
+      $this->output_->writeMessageBegin('getWorkflow', TMessageType::CALL, $this->seqid_);
       $args->write($this->output_);
       $this->output_->writeMessageEnd();
       $this->output_->getTransport()->flush();
     }
   }
 
-  public function recv_updateGroup()
+  public function recv_getWorkflow()
   {
     $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_updateGroup_result', $this->input_->isStrictRead());
+    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getWorkflow_result', $this->input_->isStrictRead());
     else
     {
       $rseqid = 0;
@@ -12881,7 +13595,7 @@ class AiravataClient implements \Airavata\API\AiravataIf {
         $this->input_->readMessageEnd();
         throw $x;
       }
-      $result = new \Airavata\API\Airavata_updateGroup_result();
+      $result = new \Airavata\API\Airavata_getWorkflow_result();
       $result->read($this->input_);
       $this->input_->readMessageEnd();
     }
@@ -12900,40 +13614,38 @@ class AiravataClient implements \Airavata\API\AiravataIf {
     if ($result->ae !== null) {
       throw $result->ae;
     }
-    throw new \Exception("updateGroup failed: unknown result");
+    throw new \Exception("getWorkflow failed: unknown result");
   }
 
-  public function deleteGroup(\Airavata\Model\Security\AuthzToken $authzToken, $groupId, $ownerId, $gatewayId)
+  public function deleteWorkflow(\Airavata\Model\Security\AuthzToken $authzToken, $workflowTemplateId)
   {
-    $this->send_deleteGroup($authzToken, $groupId, $ownerId, $gatewayId);
-    return $this->recv_deleteGroup();
+    $this->send_deleteWorkflow($authzToken, $workflowTemplateId);
+    $this->recv_deleteWorkflow();
   }
 
-  public function send_deleteGroup(\Airavata\Model\Security\AuthzToken $authzToken, $groupId, $ownerId, $gatewayId)
+  public function send_deleteWorkflow(\Airavata\Model\Security\AuthzToken $authzToken, $workflowTemplateId)
   {
-    $args = new \Airavata\API\Airavata_deleteGroup_args();
+    $args = new \Airavata\API\Airavata_deleteWorkflow_args();
     $args->authzToken = $authzToken;
-    $args->groupId = $groupId;
-    $args->ownerId = $ownerId;
-    $args->gatewayId = $gatewayId;
+    $args->workflowTemplateId = $workflowTemplateId;
     $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
     if ($bin_accel)
     {
-      thrift_protoco

<TRUNCATED>

[12/20] airavata-php-gateway git commit: AIRAVATA-2156 New SSH key description is required server-side

Posted by sm...@apache.org.
AIRAVATA-2156 New SSH key description is required server-side


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/7c14035f
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/7c14035f
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/7c14035f

Branch: refs/heads/develop
Commit: 7c14035fed5879d86e87afbaea51e36a619602c0
Parents: 11dcac8
Author: Marcus Christie <ma...@iu.edu>
Authored: Thu Oct 27 09:17:14 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Thu Oct 27 09:17:14 2016 -0400

----------------------------------------------------------------------
 app/controllers/AccountController.php        | 14 ++++++++++++++
 app/views/account/credential-store.blade.php |  5 +++++
 2 files changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/7c14035f/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index 615fe73..bd8091d 100644
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -496,6 +496,20 @@ class AccountController extends BaseController
 
     public function addCredential() {
 
+        $rules = array(
+            "credential-description" => "required",
+        );
+
+        $messages = array(
+            "credential-description.required" => "A description is required for a new SSH key",
+        );
+
+        $validator = Validator::make(Input::all(), $rules, $messages);
+        if ($validator->fails()) {
+            return Redirect::to("account/credential-store")
+                ->withErrors($validator);
+        }
+
         $description = Input::get("credential-description");
 
         if (AdminUtilities::create_ssh_token_with_description($description)) {

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/7c14035f/app/views/account/credential-store.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/credential-store.blade.php b/app/views/account/credential-store.blade.php
index 690e47a..9c9bca3 100644
--- a/app/views/account/credential-store.blade.php
+++ b/app/views/account/credential-store.blade.php
@@ -33,6 +33,11 @@
     </form>
 
     <h3>Add SSH Key</h3>
+    @if ($errors->has())
+    @foreach ($errors->all() as $error)
+    {{ CommonUtilities::print_error_message($error) }}
+    @endforeach
+    @endif
     <form class="form-inline" action="{{ URL::to('/') }}/account/add-credential" method="post">
         <div class="form-group">
             <label for="defaultToken" class="sr-only">Description for new SSH key</label>


[20/20] airavata-php-gateway git commit: Merge branch 'develop' into pr28

Posted by sm...@apache.org.
Merge branch 'develop' into pr28


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/e47baa67
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/e47baa67
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/e47baa67

Branch: refs/heads/develop
Commit: e47baa67ab386441402799675d6f9aa525d99978
Parents: 188d6ff 31a7043
Author: Suresh Marru <sm...@apache.org>
Authored: Fri Oct 28 12:45:34 2016 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Fri Oct 28 12:45:34 2016 -0400

----------------------------------------------------------------------
 app/libraries/AppUtilities.php               | 17 +++++++++++++
 app/libraries/ExperimentUtilities.php        | 30 +++++++++++------------
 app/libraries/ProjectUtilities.php           |  1 +
 app/views/partials/experiment-info.blade.php |  4 +--
 4 files changed, 35 insertions(+), 17 deletions(-)
----------------------------------------------------------------------



[10/20] airavata-php-gateway git commit: AIRAVATA-2156 Updating thrift stubs

Posted by sm...@apache.org.
AIRAVATA-2156 Updating thrift stubs


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/4ffaa68a
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/4ffaa68a
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/4ffaa68a

Branch: refs/heads/develop
Commit: 4ffaa68a5138e7c037b59338093a01d4c7395132
Parents: 6496e54
Author: Marcus Christie <ma...@iu.edu>
Authored: Wed Oct 26 16:45:43 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Wed Oct 26 16:45:43 2016 -0400

----------------------------------------------------------------------
 app/libraries/Airavata/API/Airavata.php         | 19805 +++++++++++------
 .../Model/AppCatalog/ComputeResource/Types.php  |     2 +
 .../Model/AppCatalog/CredetialSummary/Types.php |   210 +
 .../AppCatalog/UserResourceProfile/Types.php    |   788 +
 .../Airavata/Model/Credential/Store/Types.php   |  1029 +
 5 files changed, 15505 insertions(+), 6329 deletions(-)
----------------------------------------------------------------------



[11/20] airavata-php-gateway git commit: AIRAVATA-2156 User can add credential with description

Posted by sm...@apache.org.
AIRAVATA-2156 User can add credential with description


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/11dcac8b
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/11dcac8b
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/11dcac8b

Branch: refs/heads/develop
Commit: 11dcac8b776426640f8fe0f8f9a314edbb9e1cd0
Parents: 4ffaa68
Author: Marcus Christie <ma...@iu.edu>
Authored: Thu Oct 27 08:55:37 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Thu Oct 27 08:55:37 2016 -0400

----------------------------------------------------------------------
 app/controllers/AccountController.php        | 11 ++++++++++-
 app/libraries/AdminUtilities.php             | 19 ++++++++++++-------
 app/routes.php                               |  1 +
 app/views/account/credential-store.blade.php | 10 ++++++++++
 4 files changed, 33 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/11dcac8b/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index ccd3305..615fe73 100644
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -494,6 +494,15 @@ class AccountController extends BaseController
         return Redirect::to("account/credential-store")->with("message", "SSH Key '$description' is now the default");
     }
 
+    public function addCredential() {
+
+        $description = Input::get("credential-description");
+
+        if (AdminUtilities::create_ssh_token_with_description($description)) {
+            return Redirect::to("account/credential-store")->with("message", "SSH Key '$description' was added");
+        }
+    }
+
     public function deleteCredential() {
 
         $credentialStoreToken = Input::get("credentialStoreToken");
@@ -501,7 +510,7 @@ class AccountController extends BaseController
         $description = $credentialSummaryMap[$credentialStoreToken]->description;
 
         if (AdminUtilities::remove_ssh_token($credentialStoreToken)) {
-            return Redirect::to("account/credential-store")->with("message", "SSH Key '$description' is was deleted");
+            return Redirect::to("account/credential-store")->with("message", "SSH Key '$description' was deleted");
         }
     }
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/11dcac8b/app/libraries/AdminUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/AdminUtilities.php b/app/libraries/AdminUtilities.php
index bf7116a..d514cce 100644
--- a/app/libraries/AdminUtilities.php
+++ b/app/libraries/AdminUtilities.php
@@ -40,7 +40,7 @@ class AdminUtilities
         $gateway->identityServerPasswordToken  = $inputs["admin-password"];
         $gateway->reviewProposalDescription = $inputs["project-details"];
         $gateway->gatewayPublicAbstract = $inputs["public-project-description"];
-        
+
         $userProfile = Session::get("user-profile");
         $gateway->requesterUsername = $userProfile["username"];
 
@@ -66,7 +66,7 @@ class AdminUtilities
             $gateway->gatewayName = $gatewayData["gatewayName"];
             $gateway->declinedReason = $gatewayData["declinedReason"];
         }
-        
+
         if( isset($gatewayData["createTenant"])){
             if( AdminUtilities::add_tenant( $gateway) )
                 $gateway->gatewayApprovalStatus = GatewayApprovalStatus::APPROVED;
@@ -169,6 +169,11 @@ class AdminUtilities
         return $newToken = Airavata::generateAndRegisterSSHKeys( Session::get('authz-token'), Session::get("gateway_id"), Session::get("username"));
     }
 
+    public static function create_ssh_token_with_description($description){
+        return Airavata::generateAndRegisterSSHKeysWithDescription(
+            Session::get('authz-token'), Session::get("gateway_id"), Session::get("username"), $description);
+    }
+
     public static function create_pwd_token($inputs){
         $username = $inputs['username'];
         $password = $inputs['password'];
@@ -211,17 +216,17 @@ class AdminUtilities
             $notification->notificationId =  $notifData["notificationId"];
             if( Airavata::updateNotification( Session::get("authz-token"), $notification) )
             {
-                return json_encode( Airavata::getNotification(  Session::get('authz-token'), 
-                                                                Session::get("gateway_id"), 
+                return json_encode( Airavata::getNotification(  Session::get('authz-token'),
+                                                                Session::get("gateway_id"),
                                                                 $notifData["notificationId"] ));
             }
             else
                 0;
         }
         else
-            return Airavata::getNotification( 
-                    Session::get('authz-token'), 
-                    Session::get("gateway_id"), 
+            return Airavata::getNotification(
+                    Session::get('authz-token'),
+                    Session::get("gateway_id"),
                     Airavata::createNotification( Session::get("authz-token"), $notification) );
     }
 

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/11dcac8b/app/routes.php
----------------------------------------------------------------------
diff --git a/app/routes.php b/app/routes.php
index a81816f..bfe5ee9 100755
--- a/app/routes.php
+++ b/app/routes.php
@@ -50,6 +50,7 @@ Route::post("allocation-request", "AccountController@allocationRequestSubmit");
 
 Route::get("account/credential-store", "AccountController@getCredentialStore");
 Route::post("account/set-default-credential", "AccountController@setDefaultCredential");
+Route::post("account/add-credential", "AccountController@addCredential");
 Route::post("account/delete-credential", "AccountController@deleteCredential");
 
 Route::get("account/computeResources", "AccountController@getComputeResources");

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/11dcac8b/app/views/account/credential-store.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/credential-store.blade.php b/app/views/account/credential-store.blade.php
index a29d7f7..690e47a 100644
--- a/app/views/account/credential-store.blade.php
+++ b/app/views/account/credential-store.blade.php
@@ -32,6 +32,16 @@
         <button type="submit" class="btn btn-default">Update default</button>
     </form>
 
+    <h3>Add SSH Key</h3>
+    <form class="form-inline" action="{{ URL::to('/') }}/account/add-credential" method="post">
+        <div class="form-group">
+            <label for="defaultToken" class="sr-only">Description for new SSH key</label>
+            <input type="text" id="credential-description" name="credential-description"
+                class="form-control" placeholder="Description" />
+        </div>
+        <button type="submit" class="btn btn-default">Add</button>
+    </form>
+
     <h3>SSH Key Info</h3>
     <table class="table table-bordered table-condensed" style="word-wrap: break-word; table-layout: fixed; width: 100%;">
         <thead>


[03/20] airavata-php-gateway git commit: AIRAVATA-2156 Delete credential option added to UI

Posted by sm...@apache.org.
AIRAVATA-2156 Delete credential option added to UI


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/cd045ecf
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/cd045ecf
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/cd045ecf

Branch: refs/heads/develop
Commit: cd045ecf8f13526e19e7914df808587262d08747
Parents: 2685fa8
Author: Marcus Christie <ma...@iu.edu>
Authored: Wed Oct 26 10:06:21 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Wed Oct 26 11:22:27 2016 -0400

----------------------------------------------------------------------
 app/controllers/AccountController.php        | 15 ++++++--
 app/routes.php                               |  1 +
 app/views/account/credential-store.blade.php | 43 ++++++++++++++++++++++-
 3 files changed, 56 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/cd045ecf/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index e93318e..6ac13f3 100644
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -148,7 +148,7 @@ class AccountController extends BaseController
             CommonUtilities::store_id_in_session($username);
             Session::put("gateway_id", Config::get('pga_config.airavata')['gateway-id']);
 
-            if(Session::has("admin") || Session::has("admin-read-only") || Session::has("authorized-user")){            
+            if(Session::has("admin") || Session::has("admin-read-only") || Session::has("authorized-user")){
                 return $this->initializeWithAiravata($username);
             }
 
@@ -489,11 +489,22 @@ class AccountController extends BaseController
         URPUtilities::update_user_resource_profile($userResourceProfile);
 
         $credentialSummaryMap = $this->create_credential_summary_map(URPUtilities::get_all_ssh_pub_keys_summary_for_user());
-        $description = $credentialSummaryMap["$defaultToken"]["description"];
+        $description = $credentialSummaryMap[$defaultToken]["description"];
 
         return Redirect::to("account/credential-store")->with("message", "SSH Key '$description' is now the default");
     }
 
+    public function deleteCredential() {
+
+        $credentialStoreToken = Input::get("credentialStoreToken");
+        $credentialSummaryMap = $this->create_credential_summary_map(URPUtilities::get_all_ssh_pub_keys_summary_for_user());
+        $description = $credentialSummaryMap[$credentialStoreToken]["description"];
+
+        if (AdminUtilities::remove_ssh_token($credentialStoreToken)) {
+            return Redirect::to("account/credential-store")->with("message", "SSH Key '$description' is was deleted");
+        }
+    }
+
     private function create_credential_summary_map($credentialSummaries) {
 
         $credentialSummaryMap = array();

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/cd045ecf/app/routes.php
----------------------------------------------------------------------
diff --git a/app/routes.php b/app/routes.php
index 3fd11e6..a81816f 100755
--- a/app/routes.php
+++ b/app/routes.php
@@ -50,6 +50,7 @@ Route::post("allocation-request", "AccountController@allocationRequestSubmit");
 
 Route::get("account/credential-store", "AccountController@getCredentialStore");
 Route::post("account/set-default-credential", "AccountController@setDefaultCredential");
+Route::post("account/delete-credential", "AccountController@deleteCredential");
 
 Route::get("account/computeResources", "AccountController@getComputeResources");
 // TODO: just for testing

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/cd045ecf/app/views/account/credential-store.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/credential-store.blade.php b/app/views/account/credential-store.blade.php
index 58666b0..20eadcd 100644
--- a/app/views/account/credential-store.blade.php
+++ b/app/views/account/credential-store.blade.php
@@ -38,6 +38,7 @@
             <tr>
                 <th>Description</th>
                 <th>Public Key</th>
+                <th>Delete</th>
             </tr>
         </thead>
         <tbody>
@@ -49,15 +50,55 @@
                 <td>
                     {{ $credentialSummary["publicKey"] }}
                 </td>
+                <td>
+                    <span data-token="{{$credentialSummary["credentialStoreToken"]}}"
+                        data-description="{{$credentialSummary["description"]}}"
+                        class="glyphicon glyphicon-trash delete-credential"></span>
+                </td>
             </tr>
             @endforeach
         </tbody>
     </table>
 </div>
 
+<div class="modal fade" id="delete-credential-modal" tabindex="-1" role="dialog" aria-labelledby="delete-credential-modal-title"
+     aria-hidden="true">
+    <div class="modal-dialog">
+
+        <form action="{{URL::to('/')}}/account/delete-credential" method="POST">
+            <div class="modal-content">
+                <div class="modal-header">
+                    <h3 class="text-center" id="delete-credential-modal-title">Delete SSH Public Key</h3>
+                </div>
+                <div class="modal-body">
+                    <input type="hidden" class="form-control" name="credentialStoreToken"/>
+
+                    Do you really want to delete the <span class="credential-description"></span> SSH public key?
+                </div>
+                <div class="modal-footer">
+                    <div class="form-group">
+                        <input type="submit" class="btn btn-danger" value="Delete"/>
+                        <input type="button" class="btn btn-default" data-dismiss="modal" value="Cancel"/>
+                    </div>
+                </div>
+            </div>
+
+        </form>
+    </div>
+</div>
 @stop
 
 @section('scripts')
 @parent
-<script></script>
+<script>
+$('.delete-credential').on('click', function(){
+
+    var credentialStoreToken = $(this).data('token');
+    var credentialDescription = $(this).data('description');
+
+    $("#delete-credential-modal input[name=credentialStoreToken]").val(credentialStoreToken);
+    $("#delete-credential-modal .credential-description").text(credentialDescription);
+    $("#delete-credential-modal").modal("show");
+});
+</script>
 @stop
\ No newline at end of file


[18/20] airavata-php-gateway git commit: AIRAVATA-2156 UI refinements

Posted by sm...@apache.org.
AIRAVATA-2156 UI refinements


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/8a22f77d
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/8a22f77d
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/8a22f77d

Branch: refs/heads/develop
Commit: 8a22f77d789ce79a470257a140e63df94e96f07b
Parents: a666557
Author: Marcus Christie <ma...@iu.edu>
Authored: Fri Oct 28 11:47:45 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Fri Oct 28 11:47:45 2016 -0400

----------------------------------------------------------------------
 app/views/account/credential-store.blade.php | 100 ++++++++++------------
 app/views/account/dashboard.blade.php        |   2 +
 2 files changed, 45 insertions(+), 57 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/8a22f77d/app/views/account/credential-store.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/credential-store.blade.php b/app/views/account/credential-store.blade.php
index a1c382e..1cf2bec 100644
--- a/app/views/account/credential-store.blade.php
+++ b/app/views/account/credential-store.blade.php
@@ -2,20 +2,6 @@
 
 @section('page-header')
 @parent
-<style>
-.credential-item {
-    padding-right: 220px;
-    position: relative;
-}
-.credential-item .credential-buttons {
-    height: 34px;
-    width: 220px;
-    position: absolute;
-    top: 50%;
-    margin-top: -17px;
-    right: 0px;
-}
-</style>
 @stop
 
 @section('content')
@@ -40,28 +26,49 @@
 
     <h1>SSH Keys</h1>
 
-    <div class="panel panel-default">
-        <div class="panel-heading">
-            <h3 class="panel-title">Default SSH Key</h3>
-        </div>
-        <div class="panel-body">
-            <form class="form-inline" action="{{ URL::to('/') }}/account/set-default-credential" method="post">
-                <div class="form-group">
-                    <label for="defaultToken" class="sr-only">Select default SSH key</label>
-                    <select class="form-control" id="defaultToken" name="defaultToken">
-                        @foreach ($credentialSummaries as $credentialSummary)
-                        <option
-                        @if ($credentialSummary->token == $defaultCredentialSummary->token)
-                        selected
-                        @endif
-                        value="{{ $credentialSummary->token }}">{{ $credentialSummary->description }}</option>
-                        @endforeach
-                    </select>
+    <ul class="list-group">
+        @foreach ($credentialSummaries as $credentialSummary)
+        <li class="list-group-item credential-item">
+            <div class="row">
+                <div class="col-md-12">
+                    <p><strong>{{{ $credentialSummary->description }}}</strong></p>
                 </div>
-                <button type="submit" class="btn btn-default">Update default</button>
-            </form>
-        </div>
-    </div>
+            </div><!-- .row -->
+            <div class="row">
+                <div class="col-md-6">
+                    <div class="input-group">
+                        <input type="text" class="form-control" readonly
+                            id="credential-publickey-{{$credentialSummary->token}}"
+                            value="{{$credentialSummary->publicKey}}">
+                        <span class="input-group-btn">
+                            <button type="button" class="btn btn-default copy-credential"
+                                data-clipboard-target="#credential-publickey-{{$credentialSummary->token}}"
+                                data-toggle="tooltip" data-placement="bottom"
+                                data-title="Copied!" data-trigger="manual">
+                                Copy
+                            </button>
+                        </span>
+                    </div>
+                </div>
+                <div class="col-md-6">
+                    @if ($credentialSummary->token != $defaultCredentialSummary->token)
+                    <form style="display: inline" action="{{ URL::to('/') }}/account/set-default-credential" method="post">
+                        <input type="hidden" name="defaultToken" value="{{$credentialSummary->token}}"/>
+                        <button type="submit" class="btn btn-default">Make Default</button>
+                    </form>
+                    @else
+                    <small>This is the default SSH public key that the gateway will use to authenticate to your compute and storage accounts.</small>
+                    @endif
+                    @if ($credentialSummary->canDelete)
+                    <button data-token="{{$credentialSummary->token}}"
+                        data-description="{{$credentialSummary->description}}"
+                        class="btn btn-danger delete-credential">Delete</button>
+                    @endif
+                </div>
+            </div><!-- .row -->
+        </li>
+        @endforeach
+    </ul>
 
     <div class="panel panel-default">
         <div class="panel-heading">
@@ -83,27 +90,6 @@
             </form>
         </div>
     </div>
-
-    <div class="panel panel-default">
-      <div class="panel-heading">SSH Keys</div>
-      <ul class="list-group">
-        @foreach ($credentialSummaries as $credentialSummary)
-        <li class="list-group-item credential-item">
-            {{ $credentialSummary->description }}
-            <div class="credential-buttons">
-                <button type="button" class="btn btn-default copy-credential"
-                    data-clipboard-text="{{$credentialSummary->publicKey}}"
-                    data-toggle="tooltip" data-placement="bottom" data-title="Copied!" data-trigger="manual">Copy to clipboard</button>
-                @if ($credentialSummary->canDelete)
-                <button data-token="{{$credentialSummary->token}}"
-                    data-description="{{$credentialSummary->description}}"
-                    class="btn btn-default delete-credential">Delete</button>
-                @endif
-            </div>
-        </li>
-        @endforeach
-      </ul>
-    </div>
 </div>
 
 <div class="modal fade" id="delete-credential-modal" tabindex="-1" role="dialog" aria-labelledby="delete-credential-modal-title"
@@ -137,7 +123,7 @@
 @parent
 {{ HTML::script('js/clipboard.min.js') }}
 <script>
-$('.delete-credential').on('click', function(){
+$('.delete-credential').on('click', function(e){
 
     var credentialStoreToken = $(this).data('token');
     var credentialDescription = $(this).data('description');

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/8a22f77d/app/views/account/dashboard.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/dashboard.blade.php b/app/views/account/dashboard.blade.php
index c7d0e93..740dded 100644
--- a/app/views/account/dashboard.blade.php
+++ b/app/views/account/dashboard.blade.php
@@ -388,6 +388,8 @@
             <div class="row well">
 
                 <h3>Manage Personal Computing and Storage Resources</h3>
+                <p>Use these settings if you have your own compute and/or
+                storage resource accounts that you would like to use.</p>
 
                 <a href="{{URL::to('/')}}/account/computeResources">
                     <div class=" col-md-4 well">


[13/20] airavata-php-gateway git commit: AIRAVATA-2156 Client-side validate required SSH key description

Posted by sm...@apache.org.
AIRAVATA-2156 Client-side validate required SSH key description


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/83a83731
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/83a83731
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/83a83731

Branch: refs/heads/develop
Commit: 83a83731defcaf39013c335962ef933c75ab7991
Parents: 7c14035
Author: Marcus Christie <ma...@iu.edu>
Authored: Thu Oct 27 10:00:36 2016 -0400
Committer: Marcus Christie <ma...@iu.edu>
Committed: Thu Oct 27 10:00:36 2016 -0400

----------------------------------------------------------------------
 app/views/account/credential-store.blade.php | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/83a83731/app/views/account/credential-store.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/credential-store.blade.php b/app/views/account/credential-store.blade.php
index 9c9bca3..6908844 100644
--- a/app/views/account/credential-store.blade.php
+++ b/app/views/account/credential-store.blade.php
@@ -38,11 +38,11 @@
     {{ CommonUtilities::print_error_message($error) }}
     @endforeach
     @endif
-    <form class="form-inline" action="{{ URL::to('/') }}/account/add-credential" method="post">
-        <div class="form-group">
-            <label for="defaultToken" class="sr-only">Description for new SSH key</label>
+    <form id="add-credential" class="form-inline" action="{{ URL::to('/') }}/account/add-credential" method="post">
+        <div id="credential-description-form-group" class="form-group">
+            <label for="credential-description" class="sr-only">Description for new SSH key</label>
             <input type="text" id="credential-description" name="credential-description"
-                class="form-control" placeholder="Description" />
+                class="form-control" placeholder="Description" required/>
         </div>
         <button type="submit" class="btn btn-default">Add</button>
     </form>
@@ -115,5 +115,16 @@ $('.delete-credential').on('click', function(){
     $("#delete-credential-modal .credential-description").text(credentialDescription);
     $("#delete-credential-modal").modal("show");
 });
+
+$('#credential-description').on('invalid', function(event){
+    $('#credential-description-form-group').addClass('has-error');
+});
+$('#credential-description').on('keyup input change', function(event){
+    if (this.checkValidity) {
+        var valid = this.checkValidity();
+        this.setCustomValidity("Please provide a description");
+        $('#credential-description-form-group').toggleClass('has-error', !valid);
+    }
+});
 </script>
 @stop
\ No newline at end of file