def add_vnic_template(self, vlan_id, ucsm_ip, vnic_template, physnet):
if not self.get_vnic_template_vlan_entry(vlan_id, vnic_template,<EOL>ucsm_ip, physnet):<EOL><INDENT>vnic_t = ucsm_model.VnicTemplate(vlan_id=vlan_id,<EOL>vnic_template=vnic_template,<EOL>device_id=ucsm_ip,<EOL>physnet=physnet,<EOL>updated_on_ucs=False)<EOL>with self.session.begin(subtransactions=True):<EOL><INDENT>self.session.add(vnic_t)<EOL><DEDENT>return vnic_t<EOL><DEDENT>
Adds an entry for a vlan_id on a SP template to the table.