charmhelpers.contrib.unison package¶
- charmhelpers.contrib.unison.collect_authed_hosts(peer_interface)¶
Iterate through the units on peer interface to find all that have the calling host in its authorized hosts list
- charmhelpers.contrib.unison.create_private_key(user, priv_key_path)¶
- charmhelpers.contrib.unison.create_public_key(user, priv_key_path, pub_key_path)¶
- charmhelpers.contrib.unison.ensure_user(user, group=None)¶
- charmhelpers.contrib.unison.get_homedir(user)¶
- charmhelpers.contrib.unison.get_keypair(user)¶
- charmhelpers.contrib.unison.run_as_user(user, cmd, gid=None)¶
Main setup function, should be called from both peer -changed and -joined hooks with the same parameters.
- charmhelpers.contrib.unison.sync_path_to_host(path, host, user, verbose=False, cmd=None, gid=None, fatal=False)¶
Sync path to an specific peer host
Propagates exception if operation fails and fatal=True.
- charmhelpers.contrib.unison.sync_to_peer(host, user, paths=None, verbose=False, cmd=None, gid=None, fatal=False)¶
Sync paths to an specific peer host
Propagates exception if any operation fails and fatal=True.
- charmhelpers.contrib.unison.sync_to_peers(peer_interface, user, paths=None, verbose=False, cmd=None, gid=None, fatal=False)¶
Sync all hosts to an specific path
The type of group is integer, it allows user has permissions to operate a directory have a different group id with the user id.
Propagates exception if any operation fails and fatal=True.
- charmhelpers.contrib.unison.write_known_hosts(user, hosts)¶