~james-page/charms/oneiric/mysql/charm-tester

« back to all changes in this revision

Viewing changes to hooks/common.py

  • Committer: Clint Byrum
  • Date: 2011-05-30 16:58:52 UTC
  • Revision ID: clint@ubuntu.com-20110530165852-fa17stavaaxl4iru
- fixing to work without ip of remote unit

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
# We'll name the database the same as the service.
8
8
database_name, _ = change_unit.split("/")
9
9
# A user per service unit so we can deny access quickly
10
 
user = change_unit.replace("/","-")
 
10
user = change_unit.split("/")[0]
11
11
connection = None
12
12
lastrun_path = '/var/lib/ensemble/%s.%s.lastrun' % (database_name,user)
13
13