def mutilate_nic_mapping(self, template, node):
        # change names of those interfaces in NIC mapping for which networks
        # must be assigned after building of networks to nodes mapping; this
        # must result in error as look up by NIC name is performed for node
        # in such case, and network controllers of that node will have
        # different names, thus will not be returned by query

        node_nic_names = [nic.name for nic in node.nic_interfaces]
        # NOTE(aroma): in order to make this method more general let's use only
        # 'default' node group, as in some test cases modified template
        # is assigned for cluster before nodes, and consequently their node
        # groups are not yet known by the moment
        nic_mapping = \
            template['adv_net_template']['default']['nic_mapping']

        new_mapping = {}
        for substitute, iface_name in six.iteritems(nic_mapping['default']):
            if iface_name in node_nic_names:
                new_mapping[substitute] = uuid.uuid4().hex
            else:
                new_mapping[substitute] = iface_name

        nic_mapping['default'] = new_mapping

        return template
dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/integration/test_network_template_apply.py/TestNetTemplateMalformedNICMappingApply.mutilate_nic_mapping/original