def _remove_vlan_from_vnic_templates(self, handle, vlan_id, ucsm_ip):
ucsm = CONF.ml2_cisco_ucsm.ucsms[ucsm_ip]<EOL>vnic_template_info = ucsm.vnic_template_list.values()<EOL>vlan_name = self.make_vlan_name(vlan_id)<EOL>if not vnic_template_info:<EOL><INDENT>return<EOL><DEDENT>try:<EOL><INDENT>for temp_info in vnic_template_info:<EOL><INDENT>vnic_template = temp_info.template<EOL>vnic_template_path = temp_info.path<EOL>vnic_template_full_path = (vnic_template_path +<EOL>const.VNIC_TEMPLATE_PREFIX + str(vnic_template))<EOL>LOG.debug('<STR_LIT>',<EOL>vnic_template_full_path)<EOL>mo = handle.query_dn(vnic_template_full_path)<EOL>if not mo:<EOL><INDENT>LOG.error('<STR_LIT>'<EOL>'<STR_LIT>',<EOL>vnic_template_full_path)<EOL>continue<EOL><DEDENT>vlan_dn = (vnic_template_full_path +<EOL>const.VLAN_PATH_PREFIX + vlan_name)<EOL>LOG.debug('<STR_LIT>', vlan_dn)<EOL>eth_if = handle.query_dn(vlan_dn)<EOL>if not eth_if:<EOL><INDENT>LOG.error('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>',<EOL>{'<STR_LIT>': vlan_name,<EOL>'<STR_LIT>':<EOL>vnic_template_full_path})<EOL><DEDENT>if eth_if:<EOL><INDENT>handle.remove_mo(eth_if)<EOL><DEDENT><DEDENT>handle.commit()<EOL>return True<EOL><DEDENT>except Exception as e:<EOL><INDENT>return self._handle_ucsm_exception(e, '<STR_LIT>',<EOL>vlan_id, ucsm_ip)<EOL><DEDENT>
Removes VLAN from all VNIC templates that have it enabled.