libzds: add curl interface to access zosmf rest api

Add library functions that allow to communicate with z/OSMF REST services
using libcurl.
Following three functions are added:

lzds_rest_get_enq()
	to obtain an ENQ that will mark a dataset as in use to z/OS until
	it is released again
lzds_rest_release_enq()
	to release an ENQ and mark a dataset as no longer in use to z/OS
lzds_rest_ping()
	to ping a z/OSMF REST server to check if it accessible
	or to refresh an ENQ and prevent it from a timeout after 10 minutes

Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Stefan Haberland
2020-07-21 21:26:38 +02:00
committed by Jan Höppner
parent e584c88d8f
commit b044aec4ff
5 changed files with 344 additions and 7 deletions

View File

@@ -191,6 +191,8 @@
#define ENDTOKEN 0xFFFFFFFFFFFFFFFFULL
#define MAX_LINE_LENGTH 512
/**
* @brief This structure represents the count field in an ECKD record.
@@ -854,6 +856,7 @@ int lzds_zdsroot_extract_datasets_from_dasd(struct zdsroot *root,
void lzds_dslist_free(struct zdsroot *root);
int lzds_ping_rest(struct dshandle *dsh, char *server);
/** @} */ /* end of group libzds_functions_high */
@@ -878,6 +881,8 @@ int lzds_analyse_open_count(struct zdsroot *root, int warn);
/** @} */ /* end of group libzds_functions_helper */
int lzds_rest_get_enq(struct dshandle *dsh, char *server);
int lzds_rest_release_enq(struct dshandle *dsh, char *server);
int lzds_rest_ping(struct dshandle *dsh, char *server);
#endif /* LIB_LIBZDS_H */