

def ex_list_anti_affinity_rules(self, network=None, network_domain=None, node=None, filter_id=None, filter_state=None):
    '\n        List anti affinity rules for a network, network domain, or node\n\n        :param network: The network to list anti affinity rules for\n                        One of network, network_domain, or node is required\n        :type  network: :class:`DimensionDataNetwork` or ``str``\n\n        :param network_domain: The network domain to list anti affinity rules\n                               One of network, network_domain,\n                               or node is required\n        :type  network_domain: :class:`DimensionDataNetworkDomain` or ``str``\n\n        :param node: The node to list anti affinity rules for\n                     One of network, netwok_domain, or node is required\n        :type  node: :class:`Node` or ``str``\n\n        :param filter_id: This will allow you to filter the rules\n                          by this node id\n        :type  filter_id: ``str``\n\n        :type  filter_state: This will allow you to filter rules by\n                             node state (i.e. NORMAL)\n        :type  filter_state: ``str``\n\n        :rtype: ``list`` of :class:`DimensionDataAntiAffinityRule`\n        '
    not_none_arguments = [key for key in (network, network_domain, network) if (key is not None)]
    if (len(not_none_arguments) != 1):
        raise ValueError('One and ONLY one of network, network_domain, or node must be set')
    params = {
        
    }
    if (network_domain is not None):
        params['networkDomainId'] = self._network_domain_to_network_domain_id(network_domain)
    if (network is not None):
        params['networkId'] = self._network_to_network_id(network)
    if (node is not None):
        params['serverId'] = self._node_to_node_id(node)
    if (filter_id is not None):
        params['id'] = filter_id
    if (filter_state is not None):
        params['state'] = filter_state
    paged_result = self.connection.paginated_request_with_orgId_api_2('server/antiAffinityRule', method='GET', params=params)
    rules = []
    for result in paged_result:
        rules.extend(self._to_anti_affinity_rules(result))
    return rules

dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/dimensiondata.py DimensionDataNodeDriver.ex_list_anti_affinity_rules/VarMisuse@44/451 `node`->`network`