70 likes | 186 Views
Examples of the SRM client. Author E.Slabospitskaya Location IHEP, Protvino, Russia. What is SRM?.
E N D
Examples of the SRM client Author E.Slabospitskaya Location IHEP, Protvino, Russia
What is SRM? • Storage Resource Manager is a middleware component that provides a common iterface to different Mass Storage System or simple disk caches on a Grid. The SRM does not perform any file transfer itself,but can invoke middleware components that perform file transfers, such as GridFTP.
SRM client anatomy • SRM’ wsdl are existing in different versions • http://sdm.lbl.gov/srm-wg/intefaces.html • Makefile gcc -g -DGFAL_ENABLE_RFIO -DGFAL_ENABLE_DCAP -DGFAL_SECURE-I/afs/cern.ch/user/l/lspitsky/Cern2004/SRM_TESTS/gsoap-linux-2.3 -o srm_libFull srm_libFull.c stdsoap2.o srmC.o srmClient.o -lcgsi_plugin_gsoap_2.3 -L/opt/globus/lib -lglobus_gssapi_gsi_gcc32dbg -lglobus_gss_assist_gcc32dbg
Examples of SRM functions 1.Functions are working : soap_call_tns__ping soap_call_tns__getProtocols soap_call_tns__put, soap_call_tns__get, soap_call_tns__getMetafileData soap_call_tns__setFileStatus (' Done') soap_call_tns__setFileStatus (' Running') 2. Don't working: multiple files' support 3. Stubs: soap_call_tns__getEstGetTime soap_call_tns__getEstPutTime soap_call_tns__pin, Unpin soap_call_tns__mkPermanent .
Examples of clients • Lxb1523% ./srm_testping http://lxb0740:8443/srm/managerv1 SRM server is alive. • lxb1523% ./srm_testgetProtocolshttp://lxb0740:8443/srm/managerv1 Supported protocols are: gsidcap gsiftp dcap
srm_testping.c #include <stdio.h> #include "srmH.h“ #include "soapSRMServerV1.nsmap“ main(argc, argv) int argc; char **argv; { struct tns__pingResponse out; struct soap soap; soap_init (&soap); if (soap_call_tns__ping (&soap, argv[1], "ping", &out)) { soap_print_fault (&soap, stderr); exit (1); } if (out._Result) printf ("SRM server is alive\n"); else printf ("SRM server is not responding\n"); exit (0);}
srm_testgetprotocols.c • #include <stdio.h> • #include "srmH.h“ • #include "soapSRMServerV1.nsmap“ • main(argc, argv)int argc;char **argv { • int i; struct tns__getProtocolsResponse out; struct soap soap; • soap_init (&soap); • if (soap_call_tns__getProtocols (&soap, argv[1], "getProtocols", &out)) { • soap_print_fault (&soap, stderr); • exit (1); } • printf ("Supported protocols are:"); • if (out._Result) • for (i = 0; i < out._Result->__size; i++) • printf (" %s", out._Result->__ptr[i]); printf ("\n"); exit (0);}