Refactored and added comments

This commit is contained in:
M.Ravi 2017-08-30 09:43:54 +02:00
parent 92e47b6f90
commit 666cf187ea

View file

@ -504,11 +504,16 @@ class OpenNebulaManager():
except ConnectionError: except ConnectionError:
raise raise
def save_public_key(self, keys): def manage_public_key(self, keys):
""" """
A function that saves the supplied keys to the authorized_keys file A function that manages the supplied keys in the authorized_keys file
:param keys: List of ssh keys that are to be added :param keys: List of ssh keys that are to be added/removed
A key should be a dict of the form
{
'value': 'sha-.....', # public key as string
'state': True # whether key is to be added or
} # removed
:return: :return:
""" """
owner = CustomUser.objects.filter( owner = CustomUser.objects.filter(