Correcting the wrong API method invocation in Wsis.php
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/c1174e1e Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/c1174e1e Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/c1174e1e Branch: refs/heads/master Commit: c1174e1e7716c8fa1d11406bb77edfa7c6791857 Parents: 01d2420 Author: Supun Nakandala <[email protected]> Authored: Sat May 9 14:27:15 2015 +0530 Committer: Supun Nakandala <[email protected]> Committed: Sat May 9 14:27:15 2015 +0530 ---------------------------------------------------------------------- app/libraries/Wsis/Wsis.php | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/c1174e1e/app/libraries/Wsis/Wsis.php ---------------------------------------------------------------------- diff --git a/app/libraries/Wsis/Wsis.php b/app/libraries/Wsis/Wsis.php index ede9774..2588012 100755 --- a/app/libraries/Wsis/Wsis.php +++ b/app/libraries/Wsis/Wsis.php @@ -2,8 +2,8 @@ namespace Wsis; -use Illuminate\Support\Facades\Config; use Wsis\Stubs\UserStoreManager; +use Wsis\Stubs\TenantManager; class Wsis { @@ -14,6 +14,12 @@ class Wsis { private $userStoreManager; /** + * @var + * @access private + */ + private $tenantManager; + + /** * @var string * @access private */ @@ -63,6 +69,7 @@ class Wsis { try { $this->userStoreManager = new UserStoreManager($service_url, $parameters); + $this->tenantManager = new TenantManager($service_url, $parameters); } catch (Exception $ex) { print_r( $ex); exit; throw new Exception("Unable to instantiate client", 0, $ex); @@ -265,16 +272,26 @@ class Wsis { /** * Function create a new Tenant - * - * @param Tenant $parameters - * @return void + * @param $active + * @param $adminUsername + * @param $adminPassword + * @param $email + * @param $firstName + * @param $lastName + * @param $tenantDomain + * @throws Exception */ - public function create_tenant( $inputs){ + public function create_tenant($active, $adminUsername, $adminPassword, $email, + $firstName, $lastName, $tenantDomain){ try { - return $this->userStoreManager->createTenant( $inputs); + return $this->tenantManager->addTenant($active, $adminUsername, $adminPassword, $email, + $firstName, $lastName, $tenantDomain); } catch (Exception $ex) { - var_dump( $ex); - throw new Exception("Unable to create Tenant.", 0, $ex); + /** + * Fixme - There is an issue in the Remote IS which throws an exception when called this method + * But the tenant creation works. Therefore ignores the exception for the moment. + */ + //throw new Exception("Unable to create Tenant.", 0, $ex); } } } \ No newline at end of file
