'Create an anti affinity rule given a list of nodes
Anti affinity rules ensure that servers will not reside
on the same VMware ESX host
:param node_list: The list of nodes to create a rule for
:type  node_list: ``list`` of :class:`Node` or
``list`` of ``str``
:rtype: ``bool``'

def ex_create_anti_affinity_rule(self, node_list):

    if (not isinstance(node_list, (list, tuple))):
        raise TypeError('Node    list    must    be    a    list    or    a    tuple.')
    anti_affinity_xml_request = ET.Element('NewAntiAffinityRule', {'xmlns': SERVER_NS})
    for node in node_list:
        ET.SubElement(anti_affinity_xml_request, 'serverId').text = self._node_to_node_id(node)
    result = self.connection.request_with_orgId_api_1('antiAffinityRule', method='POST', data=ET.tostring(anti_affinity_xml_request)).object
    response_code = findtext(result, 'result', GENERAL_NS)
    return (response_code in ['IN_PROGRESS', 'SUCCESS'])
