def create_record(self, name, zone, type, data, extra=None):
        action = '/dns/%s/addRR' % zone.domain
        payload = {'name': name, 'data': data, 'type': type}
        if extra is not None and extra.get('ttl', None) is not None:
            payload['ttl'] = extra['ttl']
        try:
            self.connection.request(action=action, data=payload, method='POST')
        except BaseHTTPError:
            e = sys.exc_info()[1]
            exists_re = re.compile(r'That RR already exists on the domain')
            if e.code == httplib.BAD_REQUEST and \
               re.search(exists_re, e.message) is not None:
                value = '"%s" already exists in %s' % (name, zone.domain)
                raise RecordAlreadyExistsError(value=value, driver=self,
                                               record_id=None)
            raise e
        return self.ex_get_records_by(zone=zone, name=name, type=type)[0]
Read in a Numpy structured array saved to a .npy or .npz file.
dataset/ETHPy150Open apache/libcloud/libcloud/dns/drivers/nfsn.py/NFSNDNSDriver.create_record--crossover with--dataset/ETHPy150Open glue-viz/glue/glue/core/data_factories/npy.py/npy_reader