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);
}