Bug 24584: Rewrite optional/sample_z3950_servers to YAML
authorBernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Wed, 5 Feb 2020 12:53:12 +0000 (09:53 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 9 Mar 2020 13:54:39 +0000 (13:54 +0000)
YAML version of optional sample_z3950_servers

To test:
1) Same test plan of first patch, only check table
   z3950servers

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

installer/data/mysql/en/optional/sample_z3950_servers.sql [deleted file]
installer/data/mysql/en/optional/sample_z3950_servers.txt [deleted file]
installer/data/mysql/en/optional/sample_z3950_servers.yml [new file with mode: 0644]

diff --git a/installer/data/mysql/en/optional/sample_z3950_servers.sql b/installer/data/mysql/en/optional/sample_z3950_servers.sql
deleted file mode 100644 (file)
index 1168fe1..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-INSERT INTO z3950servers
-(host, port, db, userid, password, servername, checked, `rank`, syntax, encoding,recordtype) VALUES
-('lx2.loc.gov',210,'LCDB','','','LIBRARY OF CONGRESS',1,1,'USMARC','utf8','biblio'),
-('lx2.loc.gov',210,'NAF','','','LIBRARY OF CONGRESS NAMES',1,1,'USMARC','utf8','authority'),
-('lx2.loc.gov',210,'SAF','','','LIBRARY OF CONGRESS SUBJECTS',1,2,'USMARC','utf8','authority');
-
-#Insert SRU server
-INSERT INTO z3950servers
-(host, port, db, servername, syntax, encoding, servertype, sru_fields)
-VALUES
-('lx2.loc.gov',210,'LCDB','LIBRARY OF CONGRESS SRU','USMARC','utf8','sru','title=dc.title,isbn=bath.isbn,srchany=cql.anywhere,author=dc.author,issn=bath.issn,subject=dc.subject,stdid=bath.standardIdentifier');
diff --git a/installer/data/mysql/en/optional/sample_z3950_servers.txt b/installer/data/mysql/en/optional/sample_z3950_servers.txt
deleted file mode 100644 (file)
index b7a48c0..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-Allow access to the following servers to search and download record information:
-LIBRARY OF CONGRESS
-LIBRARY OF CONGRESS NAMES (authority records)
-LIBRARY OF CONGRESS SUBJECTS (authority records)
-COLUMBIA UNIVERSITY
diff --git a/installer/data/mysql/en/optional/sample_z3950_servers.yml b/installer/data/mysql/en/optional/sample_z3950_servers.yml
new file mode 100644 (file)
index 0000000..7cd1f6f
--- /dev/null
@@ -0,0 +1,82 @@
+---
+#
+#  Copyright 2020 Koha Development Team
+#
+#  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 2 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, write to the Free Software Foundation, Inc.,
+#  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+
+description:
+  - "Allow access to the following servers to search and download record information:"
+  - "LIBRARY OF CONGRESS"
+  - "LIBRARY OF CONGRESS NAMES (authority records)"
+  - "LIBRARY OF CONGRESS SUBJECTS (authority records)"
+  - "COLUMBIA UNIVERSITY"
+
+
+tables:
+  - z3950servers:
+      translatable: [ servername ]
+      multiline: []
+      rows:
+        - host: "lx2.loc.gov"
+          port: 210
+          db: LCDB
+          userid: ""
+          password: ""
+          servername: "LIBRARY OF CONGRESS"
+          checked: 1
+          rank: 1
+          syntax: USMARC
+          encoding: utf8
+          recordtype: biblio
+
+        - host: "lx2.loc.gov"
+          port: 210
+          db: NAF
+          userid: ""
+          password: ""
+          servername: "LIBRARY OF CONGRESS NAMES"
+          checked: 1
+          rank: 1
+          syntax: USMARC
+          encoding: utf8
+          recordtype: authority
+
+        - host: "lx2.loc.gov"
+          port: 210
+          db: SAF
+          userid: ""
+          password: ""
+          servername: "LIBRARY OF CONGRESS SUBJECTS"
+          checked: 1
+          rank: 2
+          syntax: USMARC
+          encoding: utf8
+          recordtype: authority
+
+  - z3950servers:
+      translatable: [ servername ]
+      multiline: []
+      rows:
+        # Insert SRU server
+        - host: "lx2.loc.gov"
+          port: 210
+          db: LCDB
+          servername: "LIBRARY OF CONGRESS SRU"
+          syntax: USMARC
+          encoding: utf8
+          servertype: sru
+          sru_fields: "title=dc.title,isbn=bath.isbn,srchany=cql.anywhere,author=dc.author,issn=bath.issn,subject=dc.subject,stdid=bath.standardIdentifier"