Bugzilla – Attachment 178567 Details for
Bug 39190
Rework new (S)FTP classes to be polymorphic classes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39190: Remove replaced test_connection
Bug-39190-Remove-replaced-testconnection.patch (text/plain), 4.69 KB, created by
Martin Renvoize (ashimema)
on 2025-02-24 13:14:51 UTC
(
hide
)
Description:
Bug 39190: Remove replaced test_connection
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-02-24 13:14:51 UTC
Size:
4.69 KB
patch
obsolete
>From ec5add2ec19294f1426fe77bc61e49f624298147 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 14 Feb 2025 16:26:48 +0000 >Subject: [PATCH] Bug 39190: Remove replaced test_connection > >--- > Koha/REST/V1/SFTPServer.pm | 55 --------------------- > api/v1/swagger/paths/test_sftp_servers.yaml | 48 ------------------ > api/v1/swagger/swagger.yaml | 4 +- > 3 files changed, 1 insertion(+), 106 deletions(-) > delete mode 100644 Koha/REST/V1/SFTPServer.pm > delete mode 100644 api/v1/swagger/paths/test_sftp_servers.yaml > >diff --git a/Koha/REST/V1/SFTPServer.pm b/Koha/REST/V1/SFTPServer.pm >deleted file mode 100644 >index d0a5641e1eb..00000000000 >--- a/Koha/REST/V1/SFTPServer.pm >+++ /dev/null >@@ -1,55 +0,0 @@ >-package Koha::REST::V1::SFTPServer; >- >-# This file is part of Koha. >-# >-# Koha is free software; you can redistribute it and/or modify it >-# under the terms of the GNU General Public License as published by >-# the Free Software Foundation; either version 3 of the License, or >-# (at your option) any later version. >-# >-# Koha is distributed in the hope that it will be useful, but >-# WITHOUT ANY WARRANTY; without even the implied warranty of >-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >-# GNU General Public License for more details. >-# >-# You should have received a copy of the GNU General Public License >-# along with Koha; if not, see <http://www.gnu.org/licenses>. >- >-use Modern::Perl; >- >-use Mojo::Base 'Mojolicious::Controller'; >- >-use Koha::SFTP::Servers; >- >-use Try::Tiny qw( catch try ); >- >-=head1 API >- >-=head2 Methods >- >-=head3 test >- >-Controller method that invokes Koha::SFTP::Server->test_conn >- >-=cut >- >-sub test { >- my $c = shift->openapi->valid_input or return; >- >- return try { >- my $sftp_server = Koha::SFTP::Servers->find( $c->param('sftp_server_id') ); >- return $c->render_resource_not_found("FTP/SFTP Server") >- unless $sftp_server; >- >- my $sftp_server_test_conn = $sftp_server->test_conn; >- >- return $c->render( >- status => 200, >- openapi => $sftp_server_test_conn, >- ); >- } catch { >- $c->unhandled_exception($_); >- }; >-} >- >-1; >diff --git a/api/v1/swagger/paths/test_sftp_servers.yaml b/api/v1/swagger/paths/test_sftp_servers.yaml >deleted file mode 100644 >index 3fab229fc28..00000000000 >--- a/api/v1/swagger/paths/test_sftp_servers.yaml >+++ /dev/null >@@ -1,48 +0,0 @@ >---- >-"/sftp_server/{sftp_server_id}/test_connection": >- get: >- x-mojo-to: SFTPServer#test >- operationId: testSFTPServer >- tags: >- - sftp_servers >- summary: Test FTP/SFTP server >- produces: >- - application/json >- parameters: >- - $ref: "../swagger.yaml#/parameters/sftp_server_id_pp" >- responses: >- "200": >- description: Results of FTP/SFTP server test >- schema: >- type: object >- items: >- $ref: "../swagger.yaml#/definitions/sftp_server" >- "400": >- description: | >- Bad request. Possible `error_code` attribute values: >- >- * `invalid_query` >- schema: >- $ref: "../swagger.yaml#/definitions/error" >- "404": >- description: Not Found >- schema: >- $ref: "../swagger.yaml#/definitions/error" >- "403": >- description: Access forbidden >- schema: >- $ref: "../swagger.yaml#/definitions/error" >- "500": >- description: | >- Internal server error. Possible `error_code` attribute values: >- >- * `internal_server_error` >- schema: >- $ref: "../swagger.yaml#/definitions/error" >- "503": >- description: Under maintenance >- schema: >- $ref: "../swagger.yaml#/definitions/error" >- x-koha-authorization: >- permissions: >- parameters: manage_sftp_servers >\ No newline at end of file >diff --git a/api/v1/swagger/swagger.yaml b/api/v1/swagger/swagger.yaml >index 03c1d51ad0b..67583211285 100644 >--- a/api/v1/swagger/swagger.yaml >+++ b/api/v1/swagger/swagger.yaml >@@ -559,8 +559,6 @@ paths: > $ref: "./paths/rotas.yaml#/~1rotas~1{rota_id}" > "/rotas/{rota_id}/stages/{stage_id}/position": > $ref: "./paths/rotas.yaml#/~1rotas~1{rota_id}~1stages~1{stage_id}~1position" >- "/sftp_server/{sftp_server_id}/test_connection": >- $ref: "./paths/test_sftp_servers.yaml#/~1sftp_server~1{sftp_server_id}~1test_connection" > /suggestions: > $ref: ./paths/suggestions.yaml#/~1suggestions > "/suggestions/{suggestion_id}": >@@ -1308,4 +1306,4 @@ tags: > x-displayName: Two factor authentication > - description: "Manage vendors for the acquisitions module\n" > name: vendors >- x-displayName: Vendors >\ No newline at end of file >+ x-displayName: Vendors >-- >2.48.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39190
:
178555
|
178556
|
178557
|
178558
|
178559
|
178560
|
178561
|
178562
|
178563
|
178564
|
178565
|
178566
|
178567
|
178568
|
178569
|
178570
|
178571
|
179252
|
179253
|
179254
|
179255
|
179256
|
179257
|
179258
|
179259
|
179260
|
179261
|
179262
|
179263
|
179264
|
179265
|
179266
|
179267
|
179268
|
179396
|
179397
|
179398
|
179399
|
179400
|
179401
|
179402
|
179403
|
179404
|
179405
|
179406
|
179407
|
179408
|
179409
|
179410
|
179411
|
179412
|
179413
|
179589
|
179590
|
179591
|
179592
|
179593
|
179594
|
179595
|
179596
|
179597
|
179598
|
179599
|
179600
|
179601
|
179602
|
179603
|
179604
|
179605
|
179606
|
179646
|
179647
|
179648
|
179649
|
179650
|
179651
|
179652
|
179653
|
179654
|
179655
|
179656
|
179657
|
179658
|
179659
|
179660
|
179661
|
179662
|
179663
|
179992
|
179993
|
179994
|
179995
|
179996
|
179997
|
179998
|
179999
|
180000
|
180001
|
180002
|
180003
|
180004
|
180005
|
180006
|
180010
|
180011
|
180012
|
180013
|
180014
|
180015
|
180016
|
180017
|
180018
|
180019
|
180020
|
180021
|
180022
|
180023
|
180024
|
180025