

def ex_set_firewall_rule_state(self, rule, state):
    '\n        Change the state (enabled or disabled) of a rule\n\n        :param rule: The rule to delete\n        :type  rule: :class:`DimensionDataFirewallRule`\n\n        :param state: The desired state enabled (True) or disabled (False)\n        :type  state: ``bool``\n\n        :rtype: ``bool``\n        '
    update_node = ET.Element('editFirewallRule', {
        'xmlns': TYPES_URN,
    })
    update_node.set('id', rule.id)
    ET.SubElement(update_node, 'enabled').text = str(state).lower()
    result = self.connection.request_with_orgId_api_2('network/editFirewallRule', method='POST', data=ET.tostring(update_node)).object
    response_code = findtext(result, 'responseCode', TYPES_URN)
    return (update_node in ['IN_PROGRESS', 'OK'])

dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/dimensiondata.py DimensionDataNodeDriver.ex_set_firewall_rule_state/VarMisuse@104/263 `response_code`->`update_node`