Thanks!

-Tennis
On Tue, Feb 2, 2010 at 1:46 PM, David Bender <bda...@us.ibm.com> wrote:

>
> The STAF Ant User's Guide includes the following note regarding
> resultPrefix:
>
> Note that since Ant properties are immutable, meaning that they cannot be
> changed after being set, to get the correct return code and result value
> from the STAF Ant Task, you need to use a unique *resultPrefix* every time
> the STAF Ant Task is used.
>
> So you need to specify a unique resultPrefix value for each iteration of
> the <for> task, most likely using the value (or a substring of the value)
> specified for the "param" attribute.  For example, you could try something
> like:
>
>     <staf location="local"
>         service="respool"
>         request="request pool ipaddrs garbagecollect no"
>         resultPrefix="getp...@{file}"
>         throwBuildException="1"/>
>     <echo>passing: ${getp...@{file}.result}</echo>
>
> Thanks,
> David
>
> ------------------------------
>  *David 
> Bender*<http://w3.ibm.com/bluepages/simpleSearch.wss?searchBy=Name&searchFor=David+Bender>
> STAF/STAX Development
> IBM Software Group, WPLC
>   11501 Burnet Rd.
> Bldg. 903-5B002
> Austin, TX 78758-3400
>   Phone (T/L): 1-512-286-5315 (363-5315)
> ITN: 23635315
> Email: *bda...@us.ibm.com* <bda...@us.ibm.com>
>
>
> ------------------------------
>
>
>
>  From: Tennis Smith <ten...@tripit.com> To:
> staf-users@lists.sourceforge.net Date: 02/02/2010 03:19 PM Subject: 
> [staf-users]
> Strange STAF/Ant/Respool problem.
> ------------------------------
>
>
>
> Hi,
>
> I'm using the Ant interface to STAF so I can use the ResPool service.  I
> have a for loop like this:
>
>                 <for list="${tests.found}" delimiter=":" param="file"
>                      parallel="yes" keepgoing="yes" threadCount="1">
>                     <sequential>
>                         <staf location="local"
>                               service="respool"
>                               request="request pool ipaddrs garbagecollect
> no"
>                               resultPrefix="getpool"
>                               throwBuildException="1"/>
>                         <echo>passing: ${getpool.result}</echo>
>                         <runscript script-dir="${dir}"
>                               script-name="@{file}"
>                               script-ip-address="${getpool.result}"/>
>                     </sequential>
>                 </for>
>
>
> I noticed that the value in ${getpool.result} didn't seem to change, so I
> added the "<echo>" (above).  The output looks like this:
>      [staf] RC=0, Result=192.168.0.206
>      [echo] passing: 192.168.0.207
>
>
> It turns out that staf is returning the correct value (192.168.0.20*6*),
> but that I cannot access it by using the result var.  When I try to access
> the var myself, a previous value (192.168.0.20*7*) is still set.
>
> Anyone see this before, or have a work-around to suggest? :)
>
> --
>
> Tks,
> -T
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> staf-users mailing list
> staf-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/staf-users
>
>
>


-- 

Tks,
-T
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to