Job creation for multiple clients

Implements: blueprint freezer-api-web-ui

Change-Id: I6d2b29b18909cef627646b437454d6075b725df5
This commit is contained in:
Memo Garcia
2015-07-06 11:17:50 +01:00
parent 5573da32c0
commit 249f287af9

View File

@@ -21,6 +21,7 @@ Hudson (tjh@cryptsoft.com).
import elasticsearch
import logging
import uuid
from freezer_api.common.utils import BackupMetadataDoc
from freezer_api.common.utils import JobDoc
from freezer_api.common.utils import ActionDoc
@@ -314,7 +315,8 @@ class ElasticSearchEngine(object):
message=('Client already registered with '
'ID {0}'.format(client_id)))
client_doc = {'client': doc,
'user_id': user_id}
'user_id': user_id,
'uuid': uuid.uuid4().hex}
self.client_manager.insert(client_doc)
logging.info('Client registered, client_id: {0}'.
format(client_id))