<dtml-var standard_html_header>
<link rel="stylesheet" type="text/css" title="zenoss" href="/zport/portal_skins/zenoss.css">
<a href="cmdbifcfglook">view</a>
<br>
<FORM ACTION="passtest" METHOD="POST">
<dtml-let devname="this().getId()">
<dtml-in expr="grabifcfg(cmdb_name=devname)">
<table width=100% height=1%>
<tr>
<td class="tablevalues" align="center">if</td>
<td class="tablevalues" align="center" style = "background: #ffffcc"><input type="text" name="ifedit_iface" value="<dtml-var iface>" /></td>
<td class="tablevalues" align="center">addr</td>
<td class="tablevalues" align="center" style = "background: #ffffcc"><input type="text" name="ifedit_addr" value="<dtml-var addr>" /></td>
<td class="tablevalues" align="center">bcast</td>
<td class="tablevalues" align="center" style = "background: #ffffcc"><input type="text" name="ifedit_bcast" value="<dtml-var bcast>" /></td>
<td class="tablevalues" align="center">mask</td>
<td class="tablevalues" align="center" style = "background: #ffffcc"><input type="text" name="ifedit_mask" value="<dtml-var mask>" /></td>
<td class="tablevalues" align="center">hwaddy</td>
<td class="tablevalues" align="center" style = "background: #ffffcc"><input type="text" name="ifedit_hwaddy" value="<dtml-var hwaddy>" /></td>
</tr>
<td class="tablevalues" align="center" style = "background: #ffffcc"><input type="hidden" name="ifedit_id" value="<dtml-var id>" /></td>
</tr>
<td class="tablevalues" align="center"><INPUT NAME="submit_bigedit_field_value" TYPE="submit" value="update cmdb"></td>
<tr>
</tr>
</FORM>
</dtml-in>
</dtml-let>
____________________________________-
My problem is, the method im passing to only likes 1 value for each variable. If grabifcfg comes back with more then one value, and i enter my loop, now im passing passtest multiple values for each var:
ifedit_addr ['10.110.0.110', '10.110.0.111', '10.110.0.112', '10.110.0.113']
ifedit_mask ['255.255.0.0', '255.255.0.0', '255.255.0.0', '255.255.0.0']
Rather then passing it multiple values, how do i run it once time for each iteration, rather then trying to cram all values into one pass.
Here is the method calls my zsql directly
<dtml-var standard_html_header>
<dtml-let devname="this().getId()">
<dtml-in expr="if_insert(if_id=ifedit_id,if_iface=ifedit_iface,if_addr=ifedit_addr,if_bcast=ifedit_bcast,if_mask=ifedit_mask,if_hwaddy=ifedit_hwaddy)"></dtml-in>
<meta http-equiv="refresh" content="2; URL=zport/dmd/Devices/Server/Linux/devices/<dtml-var devname>/ifedit">
</dtml-let>
<dtml-var standard_html_footer>