[wsas-java-dev] Scriptable admin client

Afkham Azeez azeez at wso2.com
Wed Apr 4 23:32:31 PDT 2007


I made another small improvement whereby several service groups can be
loaded/unloaded with a single WS call. The script also becomes simpler
in this case, we simply need to provide a comma separated list of
service group names. Here is the new script which unloads the echo &
version service groups.

------------------------------------------------------------------
#!/bin/sh

EPR=http://10.100.1.118:9762/services/WSO2WSASNodeManager

./admin.sh --epr $EPR --operation \
	unloadsgs --service-groups echo,version
if [ "$?" = "0" ]; then
     ./admin.sh --epr $EPR --operation commit
     echo Successfully committed.
else
     echo Unloading service groups failed
fi
-------------------------------------------------------------------


-- Azeez


Afkham Azeez wrote:
> I've written an admin script(admin.sh) for Node Management. Anybody can
> use this to write their own scripts to carry out Node Management
> functionality. I've added a sample that demonstrates how to write a
> simple script for unloading two service groups. See the sample below.
> 
> Please send your feedback on this approach.
> 
> -----------------------------------------------------------------------------------------
> #!/bin/sh
> 
> EPR=http://10.100.1.118:9762/services/WSO2WSASNodeManager
> 
> ./admin.sh --epr $EPR --operation unloadsg --service-group echo
> if [ "$?" = "0" ]; then
>      ./admin.sh --epr $EPR --operation unloadsg --service-group version
>      if [ "$?" = "0" ]; then
>             ./admin.sh --epr $EPR --operation commit
>             echo Successfully committed.
>      else
>             echo Unloading service group "Version" failed
>      fi
> else
>      echo Unloading service group "Echo" failed
> fi
> -------------------------------------------------------------------------------------------
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Wsas-java-dev mailing list
> Wsas-java-dev at wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/wsas-java-dev


-- 
Afkham Azeez
GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760

http://www.wso2.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : http://wso2.org/pipermail/wsas-java-dev/attachments/20070405/3ff2e8fb/signature.pgp


More information about the Wsas-java-dev mailing list