diff options
Diffstat (limited to 'config-db/OpenSLX/MetaDB/Base.pm')
-rw-r--r-- | config-db/OpenSLX/MetaDB/Base.pm | 256 |
1 files changed, 127 insertions, 129 deletions
diff --git a/config-db/OpenSLX/MetaDB/Base.pm b/config-db/OpenSLX/MetaDB/Base.pm index f42b5412..41d35d9f 100644 --- a/config-db/OpenSLX/MetaDB/Base.pm +++ b/config-db/OpenSLX/MetaDB/Base.pm @@ -21,11 +21,11 @@ sub new confess "Don't create OpenSLX::MetaDB::Base - objects directly!"; } -sub connectConfigDB +sub connect { } -sub disconnectConfigDB +sub disconnect { } @@ -36,51 +36,51 @@ sub quote ################################################################################ ### data access interface ################################################################################ -sub fetchVendorOSesByFilter +sub fetchVendorOSByFilter { } -sub fetchVendorOSesByID +sub fetchVendorOSByID { } -sub fetchSystemsByFilter +sub fetchExportByFilter { } -sub fetchSystemsByID +sub fetchExportByID { } -sub fetchSystemIDsOfVendorOS +sub fetchExportIDsOfVendorOS { } -sub fetchSystemIDsOfClient +sub fetchSystemByFilter { } -sub fetchSystemIDsOfGroup +sub fetchSystemByID { } -sub fetchSystemVariantsByFilter +sub fetchSystemIDsOfExport { } -sub fetchSystemVariantsByID +sub fetchSystemIDsOfClient { } -sub fetchSystemVariantIDsOfSystem +sub fetchSystemIDsOfGroup { } -sub fetchClientsByFilter +sub fetchClientByFilter { } -sub fetchClientsByID +sub fetchClientByID { } @@ -92,11 +92,11 @@ sub fetchClientIDsOfGroup { } -sub fetchGroupsByFilter +sub fetchGroupByFilter { } -sub fetchGroupsByID +sub fetchGroupByID { } @@ -136,27 +136,27 @@ sub changeVendorOS { } -sub addSystem +sub addExport { } -sub removeSystem +sub removeExport { } -sub changeSystem +sub changeExport { } -sub addSystemVariant +sub addSystem { } -sub removeSystemVariant +sub removeSystem { } -sub changeSystemVariant +sub changeSystem { } @@ -425,7 +425,7 @@ allow the user to access data: =over -=item C<fetchVendorOSesByFilter([%$filter], [$resultCols])> +=item C<fetchVendorOSByFilter([%$filter], [$resultCols])> Fetches and returns information about all vendor-OSes that match the given filter. @@ -447,7 +447,7 @@ An array of hash-refs containing the resulting data rows. =back -=item C<fetchVendorOSesByID(@$ids, [$resultCols])> +=item C<fetchVendorOSByID(@$ids, [$resultCols])> Fetches and returns information the vendor-OSes with the given IDs. @@ -467,21 +467,21 @@ An array of hash-refs containing the resulting data rows. =back -=item C<fetchSystemsByFilter([%$filter], [$resultCols])> +=item C<fetchExportByFilter([%$filter], [$resultCols])> -Fetches and returns information about all systems that match the given filter. +Fetches and returns information about all exports that match the given +filter. =over -=item Param C<$filter> +=item Param C<filter> A hash-ref containing the filter criteria that shall be applied - default is no filtering. See L</"Filters"> for more info. -=item Param C<$resultCols> [Optional] +=item Param C<resultCols> -A comma-separated list of colunm names that shall be returned. If not defined, -all available data must be returned. +A string listing the columns that shall be returned - default is all columns. =item Return Value @@ -489,15 +489,15 @@ An array of hash-refs containing the resulting data rows. =back -=item C<fetchSystemsByID(@$ids, [$resultCols])> +=item C<fetchExportByID(@$ids, [$resultCols])> -Fetches and returns information the systems with the given IDs. +Fetches and returns information the exports with the given IDs. =over =item Param C<ids> -An array of the system-IDs you are interested in. +An array of the export-IDs you are interested in. =item Param C<resultCols> @@ -509,15 +509,15 @@ An array of hash-refs containing the resulting data rows. =back -=item C<fetchSystemIDsOfVendorOS($id)> +=item C<fetchExportIDsOfVendorOS($id)> -Fetches the IDs of all systems that make use of the vendor-OS with the given ID. +Fetches the IDs of all exports that make use of the vendor-OS with the given ID. =over =item Param C<id> -ID of the vendor-OS whose systems shall be returned. +ID of the vendor-OS whose exports shall be returned. =item Return Value @@ -525,101 +525,99 @@ An array of system-IDs. =back -=item C<fetchSystemIDsOfClient($id)> +=item C<fetchSystemByFilter([%$filter], [$resultCols])> -Fetches the IDs of all systems that are used by the client with the given -ID. +Fetches and returns information about all systems that match the given filter. =over -=item Param C<id> +=item Param C<$filter> -ID of the client whose systems shall be returned. +A hash-ref containing the filter criteria that shall be applied - default +is no filtering. See L</"Filters"> for more info. + +=item Param C<$resultCols> [Optional] + +A comma-separated list of colunm names that shall be returned. If not defined, +all available data must be returned. =item Return Value -An array of system-IDs. +An array of hash-refs containing the resulting data rows. =back -=item C<fetchSystemIDsOfGroup($id)> +=item C<fetchSystemByID(@$ids, [$resultCols])> -Fetches the IDs of all systems that are part of the group with the given -ID. +Fetches and returns information the systems with the given IDs. =over -=item Param C<id> +=item Param C<ids> -ID of the group whose systems shall be returned. +An array of the system-IDs you are interested in. + +=item Param C<resultCols> + +A string listing the columns that shall be returned - default is all columns. =item Return Value -An array of system-IDs. +An array of hash-refs containing the resulting data rows. =back -=item C<fetchSystemVariantsByFilter([%$filter], [$resultCols])> +=item C<fetchSystemIDsOfExport($id)> -Fetches and returns information about all system variants that match the given -filter. +Fetches the IDs of all systems that make use of the export with the given ID. =over -=item Param C<$filter> - -A hash-ref containing the filter criteria that shall be applied - default -is no filtering. See L</"Filters"> for more info. - -=item Param C<$resultCols> [Optional] +=item Param C<id> -A comma-separated list of colunm names that shall be returned. If not defined, -all available data must be returned. +ID of the export whose systems shall be returned. =item Return Value -An array of hash-refs containing the resulting data rows. +An array of system-IDs. =back -=item C<fetchSystemVariantsByID(@$ids, [$resultCols])> +=item C<fetchSystemIDsOfClient($id)> -Fetches and returns information the systems variants with the given IDs. +Fetches the IDs of all systems that are used by the client with the given +ID. =over -=item Param C<ids> - -An array of the system-variant-IDs you are interested in. - -=item Param C<resultCols> +=item Param C<id> -A string listing the columns that shall be returned - default is all columns. +ID of the client whose systems shall be returned. =item Return Value -An array of hash-refs containing the resulting data rows. +An array of system-IDs. =back -=item C<fetchSystemVariantIDsOfSystem($id)> +=item C<fetchSystemIDsOfGroup($id)> -Fetches the IDs of all system variants that belong to the system with the given +Fetches the IDs of all systems that are part of the group with the given ID. =over =item Param C<id> -ID of the system whose variants shall be returned. +ID of the group whose systems shall be returned. =item Return Value -An array of system-variant-IDs. +An array of system-IDs. =back -=item C<fetchClientsByFilter([%$filter], [$resultCols])> +=item C<fetchClientByFilter([%$filter], [$resultCols])> Fetches and returns information about all clients that match the given filter. @@ -641,7 +639,7 @@ An array of hash-refs containing the resulting data rows. =back -=item C<fetchClientsByID(@$ids, [$resultCols])> +=item C<fetchClientByID(@$ids, [$resultCols])> Fetches and returns information the clients with the given IDs. @@ -697,7 +695,7 @@ An array of client-IDs. -=item C<fetchGroupsByFilter([%$filter], [$resultCols])> +=item C<fetchGroupByFilter([%$filter], [$resultCols])> Fetches and returns information about all groups that match the given filter. @@ -721,7 +719,7 @@ An array of hash-refs containing the resulting data rows. -=item C<fetchGroupsByID(@$ids, [$resultCols])> +=item C<fetchGroupByID(@$ids, [$resultCols])> Fetches and returns information the groups with the given IDs. @@ -861,163 +859,163 @@ C<1> if the vendorOS(es) could be changed, C<undef> if not. -=item C<addSystem(@$valRows)> +=item C<addExport(@$valRows)> -Adds one or more systems to the database. +Adds one or more export to the database. =over =item Param C<valRows> -An array-ref containing hash-refs with the data of the new system(s). +An array-ref containing hash-refs with the data of the new export(s). =item Return Value -The IDs of the new system(s), C<undef> if the creation failed. +The IDs of the new export(s), C<undef> if the creation failed. =back -=item C<removeSystem(@$systemIDs)> +=item C<removeExport(@$exportIDs)> -Removes one or more systems from the database. +Removes one or more export from the database. =over -=item Param C<systemIDs> +=item Param C<exportIDs> -An array-ref containing the IDs of the systems that shall be removed. +An array-ref containing the IDs of the exports that shall be removed. =item Return Value -C<1> if the system(s) could be removed, C<undef> if not. +C<1> if the export(s) could be removed, C<undef> if not. =back -=item C<changeSystem(@$systemIDs, @$valRows)> +=item C<changeExport(@$exportIDs, @$valRows)> -Changes the data of one or more systems. +Changes the data of one or more export. =over -=item Param C<systemIDs> +=item Param C<vendorOSIDs> -An array-ref containing the IDs of the systems that shall be changed. +An array-ref containing the IDs of the exports that shall be changed. =item Param C<valRows> -An array-ref containing hash-refs with the new data for the system(s). +An array-ref containing hash-refs with the new data for the export(s). =item Return Value -C<1> if the system(s) could be changed, C<undef> if not. +C<1> if the export(s) could be changed, C<undef> if not. =back -=item C<setClientIDsOfSystem($systemID, @$clientIDs)> +=item C<addSystem(@$valRows)> -Specifies all clients that should offer the given system for booting. +Adds one or more systems to the database. =over -=item Param C<systemID> - -The ID of the system whose clients you'd like to specify. - -=item Param C<clientIDs> +=item Param C<valRows> -An array-ref containing the IDs of the clients that shall be connected to the -system. +An array-ref containing hash-refs with the data of the new system(s). =item Return Value -C<1> if the system/client references could be set, C<undef> if not. +The IDs of the new system(s), C<undef> if the creation failed. =back -=item C<setGroupIDsOfSystem($systemID, @$groupIDs)> +=item C<removeSystem(@$systemIDs)> -Specifies all groups that should offer the given system for booting. +Removes one or more systems from the database. =over -=item Param C<systemID> - -The ID of the system whose groups you'd like to specify. - -=item Param C<clientIDs> +=item Param C<systemIDs> -An array-ref containing the IDs of the groups that shall be connected to the -system. +An array-ref containing the IDs of the systems that shall be removed. =item Return Value -C<1> if the system/group references could be set, C<undef> if not. +C<1> if the system(s) could be removed, C<undef> if not. =back -=item C<addSystemVariant(@$valRows)> +=item C<changeSystem(@$systemIDs, @$valRows)> -Adds one or more system-variants to the database. +Changes the data of one or more systems. =over +=item Param C<systemIDs> + +An array-ref containing the IDs of the systems that shall be changed. + =item Param C<valRows> -An array-ref containing hash-refs with the data of the new system-variant(s). +An array-ref containing hash-refs with the new data for the system(s). =item Return Value -The IDs of the new system-variant(s), C<undef> if the creation failed. +C<1> if the system(s) could be changed, C<undef> if not. =back -=item C<removeSystemVariant(@$systemVariantIDs)> +=item C<setClientIDsOfSystem($systemID, @$clientIDs)> -Removes one or more system-variants from the database. +Specifies all clients that should offer the given system for booting. =over -=item Param C<systemIDs> +=item Param C<systemID> + +The ID of the system whose clients you'd like to specify. -An array-ref containing the IDs of the system-variants that shall be removed. +=item Param C<clientIDs> + +An array-ref containing the IDs of the clients that shall be connected to the +system. =item Return Value -C<1> if the system-variant(s) could be removed, C<undef> if not. +C<1> if the system/client references could be set, C<undef> if not. =back -=item C<changeSystemVariant(@$systemVariantIDs, @$valRows)> +=item C<setGroupIDsOfSystem($systemID, @$groupIDs)> -Changes the data of one or more system-variants. +Specifies all groups that should offer the given system for booting. =over -=item Param C<systemVariantIDs> +=item Param C<systemID> -An array-ref containing the IDs of the system-variants that shall be changed. +The ID of the system whose groups you'd like to specify. -=item Param C<valRows> +=item Param C<clientIDs> -An array-ref containing hash-refs with the new data for the system-variant(s). +An array-ref containing the IDs of the groups that shall be connected to the +system. =item Return Value -C<1> if the system-variant(s) could be changed, C<undef> if not. +C<1> if the system/group references could be set, C<undef> if not. =back @@ -1255,6 +1253,6 @@ C<1> if the settings could be changed, C<undef> if not. The following methods need to be implemented in a MetaDB driver in order to be able to automatically adjust to new database schema versions (by adding -and/or removing tables and table-columns). +and/or removing tables and table-columns). =cut |