novajoin/ipa.py
def add_ip(self, hostname, floating_ip):
        """Add a floating IP to a given hostname."""
        LOG.debug('In add_ip')

        if not self._ipa_client_configured():
            LOG.debug('IPA is not configured')
            return

        params = [{"__dns_name__": CONF.domain + "."},
                  {"__dns_name__": hostname}]
        kw = {'a_part_ip_address': floating_ip}

        try:
            self._call_ipa('dnsrecord_add', *params, **kw)
        except (errors.DuplicateEntry, errors.ValidationError):
            pass
Add a floating IP to a given hostname.
Add a floating IP to a given hostname.
Add a floating IP to a given hostname .
def add_ip(self, hostname, floating_ip):
        LOG.debug('In add_ip')
        if not self._ipa_client_configured():
            LOG.debug('IPA is not configured')
            return
        params = [{"__dns_name__": CONF.domain + "."},
                  {"__dns_name__": hostname}]
        kw = {'a_part_ip_address': floating_ip}
        try:
            self._call_ipa('dnsrecord_add', *params, **kw)
        except (errors.DuplicateEntry, errors.ValidationError):
            pass
def add_ip ( self , hostname , floating_ip ) : LOG . debug ( 'In add_ip' ) if not self . _ipa_client_configured ( ) : LOG . debug ( 'IPA is not configured' ) return params = [ { "__dns_name__" : CONF . domain + "." } , { "__dns_name__" : hostname } ] kw = { 'a_part_ip_address' : floating_ip } try : self . _call_ipa ( 'dnsrecord_add' , * params , ** kw ) except ( errors . DuplicateEntry , errors . ValidationError ) : pass
Add a floating IP to a given hostname.
Add a floating IP to a given hostname .
"""Add a floating IP to a given hostname."""
self
hostname
floating_ip