Ejemplo n.º 1
0
    def linkRecord(self, existing_domain, new_domain, rtype,
                   callback=None, errback=None, **kwargs):

        """
        Create a new linked record in this zone. These records use the
        configuration (answers, ttl, filters, etc) from an existing record
        in the NSONE platform.

        :param str existing_domain: FQDN of the target record whose config \
            should be used. Does not have to be in the same zone.
        :param str new_domain: Name of the new (linked) record. Zone name is\
            appended automatically.
        :param str rtype: DNS record type, which must match the target record.
        :rtype: nsone.records.Record
        :return: new Record
        """

        if '.' not in existing_domain:
            existing_domain = existing_domain + '.' + self.zone

        record = Record(self, new_domain, rtype)
        return record.create(answers=[],
                             link=existing_domain,
                             callback=callback,
                             errback=errback,
                             **kwargs)
Ejemplo n.º 2
0
    def linkRecord(self,
                   existing_domain,
                   new_domain,
                   rtype,
                   callback=None,
                   errback=None,
                   **kwargs):
        """
        Create a new linked record in this zone. These records use the
        configuration (answers, ttl, filters, etc) from an existing record
        in the NSONE platform.

        :param str existing_domain: FQDN of the target record whose config \
            should be used. Does not have to be in the same zone.
        :param str new_domain: Name of the new (linked) record. Zone name is\
            appended automatically.
        :param str rtype: DNS record type, which must match the target record.
        :rtype: nsone.records.Record
        :return: new Record
        """

        if '.' not in existing_domain:
            existing_domain = existing_domain + '.' + self.zone

        record = Record(self, new_domain, rtype)
        return record.create(answers=[],
                             link=existing_domain,
                             callback=callback,
                             errback=errback,
                             **kwargs)
Ejemplo n.º 3
0
 def add_X(domain, answers, callback=None, errback=None, **kwargs):
     kwargs['answers'] = answers
     record = Record(self, domain, rtype)
     return record.create(callback=callback, errback=errback, **kwargs)
Ejemplo n.º 4
0
 def add_X(domain, answers, callback=None, errback=None, **kwargs):
     kwargs['answers'] = answers
     record = Record(self, domain, rtype)
     return record.create(callback=callback, errback=errback, **kwargs)