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']
Returns all instances on all nodes.
dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/dimensiondata.py/DimensionDataNodeDriver.ex_create_anti_affinity_rule--crossover with--dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/objects/instance.py/InstanceList.get_all