~ionutbalutoiu/charms/trusty/mysql/trunk

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/contrib/database/mysql.py

  • Committer: Ionut Balutoiu
  • Date: 2015-12-06 00:43:31 UTC
  • Revision ID: ibalutoiu@cloudbasesolutions.com-20151206004331-ubbp89qajxg77sg0
Fixed remote_ip

Show diffs side-by-side

added added

removed removed

Lines of Context:
247
247
            # TODO: add support for ipv6 dns
248
248
            return hostname
249
249
 
250
 
        if hostname != unit_get('private-address'):
251
 
            return get_host_ip(hostname, fallback=hostname)
252
 
 
253
 
        # Otherwise assume localhost
254
 
        return '127.0.0.1'
 
250
        return get_host_ip(hostname, fallback=hostname)
 
251
        # if hostname != unit_get('private-address'):
 
252
        #     return get_host_ip(hostname, fallback=hostname)
 
253
        #
 
254
        # # Otherwise assume localhost
 
255
        # return '127.0.0.1'
255
256
 
256
257
    def get_allowed_units(self, database, username, relation_id=None):
257
258
        """Get list of units with access grants for database with username.