Esempio n. 1
0
File: cli.py Progetto: gmr/infoblox
    def delete_old_host(self, hostname):
        """Remove all records for the host.

        :param str hostname: Hostname to remove
        :rtype: bool

        """
        host = Host(self.session, name=hostname)
        return host.delete()
Esempio n. 2
0
    def delete_old_host(self, hostname):
        """Remove all records for the host.

        :param str hostname: Hostname to remove
        :rtype: bool

        """
        host = Host(self.session, name=hostname)
        return host.delete()
Esempio n. 3
0
File: cli.py Progetto: gmr/infoblox
    def add_new_host(self, hostname, ipv4addr, comment=None):
        """Add or update a host in the infoblox, overwriting any IP address
        entries.

        :param str hostname: Hostname to add/set
        :param str ipv4addr: IP Address to add/set
        :param str comment: The comment for the record

        """
        host = Host(self.session, name=hostname)
        if host.ipv4addrs:
            host.ipv4addrs = []
        host.add_ipv4addr(ipv4addr)
        host.comment = comment
        return host.save()
Esempio n. 4
0
    def add_new_host(self, hostname, ipv4addr, comment=None):
        """Add or update a host in the infoblox, overwriting any IP address
        entries.

        :param str hostname: Hostname to add/set
        :param str ipv4addr: IP Address to add/set
        :param str comment: The comment for the record

        """
        host = Host(self.session, name=hostname)
        if host.ipv4addrs:
            host.ipv4addrs = []
        host.add_ipv4addr(ipv4addr)
        host.comment = comment
        return host.save()