def list_records(self, zone):
        schema_params = SCHEMA_BUILDER_MAP.get('list_records')
        attributes = schema_params.get('attributes')
        schema = api_schema_builder(schema_params.get('urn_nid'),
                                    schema_params.get('method'),
                                    attributes)
        params = {'apiuser': self.key, 'apikey': self.secret,
                  'zonename': zone.id}
        urn = schema.getchildren()[0]
        for child in urn:
            key = child.tag.split(':')[2]
            if key in attributes:
                child.text = str(params.get(key))
        req_data = tostring(schema)
        action = '/services/dns/listRecords.php?'
        params = {}
        headers = {"SOAPAction": "urn:listRecordswsdl#listRecords"}
        try:
            response = self.connection.request(action=action, params=params,
                                               data=req_data, method="POST",
                                               headers=headers)
        except DurableDNSException:
            e = sys.exc_info()[1]
            if 'Zone does not exist' in e.message:
                raise ZoneDoesNotExistError(zone_id=zone.id, driver=self,
                                            value=e.message)
            raise e

        # listRecords method doens't return full data in records as getRecord
        # method does.
        records = []
        for data in response.objects:
            record = self.get_record(zone.id, data.get('id'))
            records.append(record)

        return records
Return a list of records for the provided zone.
dataset/ETHPy150Open apache/libcloud/libcloud/dns/drivers/durabledns.py/DurableDNSDriver.list_records