2017 bis heute 2016 2015 2014 | 2013 | 2012 | 2011 2010 2009 | 2008 | 2007

(ältere Archiveinträge vor 2007 nicht dargestellt, aber in der Suche enthalten)

Mailingliste - Einträge 2007


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [QF-Test] Help regarding Unknown property dialog


  • Subject: Re: [QF-Test] Help regarding Unknown property dialog
  • From: Martin Moser <martin.moser@?.de>
  • Date: Wed, 04 Apr 2007 09:50:28 +0200

Hello Alfred,

there are two mistakes in your script:

1.)
Line > rc.setLocal('type',"Switch."+str(rc.lookup('switchname')))
There you should use "Switches" instead of Switch :-)

2.)
The syntax ${var} won't make use of variable-expansion in a server script,
so you have to use the rc.lookup syntax here.
So try this one:
	print rc.lookup("SwitchGroup", str(type))



Regards,
Martin

--On Mittwoch, April 04, 2007 00:18:50 -0600 Alfred Mathavan
<amathava@?.com> wrote:

Hi ,



Senario:-



When I try to fetch a property by substituting dynamic value to the
key(PropertyName) to the syntax $(GroupName:PropertyName) I get an
Unknown property Error Dialog.



Ref:-

Property File Content

Switches.300 = ['172.31.11.181',]

Switches.400 = ['172.31.11.182','172.31.11.182',]

Switches.valueChoices=['300','400',]



Server Script that gets executed in a for loop with respect to the
number of valueChoices



            name = ${SwitchGroup:Switches.valueChoices}[$(i)]

rc.setLocal('switchname',name)



rc.setLocal('type',"Switch."+str(rc.lookup('switchname')))



print rc.lookup('type')
--------------------------------------------------------> Prints
Switches.300

print ${SwitchGroup:Switches.300}
--------------------------------------------------------> Prints
['172.31.11.181']



print ${SwitchGroup:rc.lookup('type')}
------------------------------------------------------->





Could you let me know where I am going wrong?



Greetings,

Alfred




--
Martin Moser                           martin.moser@?.de
Quality First Software GmbH            http://www.qfs.de
Tulpenstr. 41                          Tel: +49 8171 919874
DE-82538 Geretsried                    Fax: +49 8171 919876
GF: Gregor Schmid, Karlheinz Kellerer  HRB München 14083