public static function create_or_update_gateway_profile( $inputs, $update = false){ $computeResourcePreferences = array(); if( isset( $input["crPreferences"]) ) $computeResourcePreferences = $input["crPreferences"]; $gatewayProfile = new GatewayResourceProfile( array( "gatewayName" => $inputs["gatewayName"], "gatewayDescription" => $inputs["gatewayDescription"], "computeResourcePreferences" => $computeResourcePreferences ) ); if( $update){ $gatewayProfile = new GatewayResourceProfile( array( "gatewayName" => $inputs["gatewayName"], "gatewayDescription" => $inputs["gatewayDescription"] ) ); $gatewayProfileId = Airavata::updateGatewayResourceProfile( $inputs["edit-gpId"], $gatewayProfile); } else $gatewayProfileId = Airavata::registerGatewayResourceProfile( $gatewayProfile); }
public static function updateGatewayProfile($data) { $gatewayResourceProfile = Airavata::getGatewayResourceProfile(Session::get('authz-token'), $data["gateway_id"]); $gatewayResourceProfile->credentialStoreToken = $data["cst"]; return Airavata::updateGatewayResourceProfile(Session::get('authz-token'), $data["gateway_id"], $gatewayResourceProfile); }