diff --git a/confluent_server/bin/osimage b/confluent_server/bin/osimage index 9193de5a..76dd425c 100644 --- a/confluent_server/bin/osimage +++ b/confluent_server/bin/osimage @@ -21,7 +21,7 @@ def osimport(imagefile): for rsp in c.create('/deployment/importing/', {'filename': imagefile}): if 'target' in rsp: importing = True - shortname = rsp['target'].split('/')[-1] + shortname = rsp['name'] print('Importing from {0} to {1}'.format(imagefile, rsp['target'])) else: print(repr(rsp)) diff --git a/confluent_server/confluent/core.py b/confluent_server/confluent/core.py index c155356f..c4164134 100644 --- a/confluent_server/confluent/core.py +++ b/confluent_server/confluent/core.py @@ -166,7 +166,8 @@ def handle_deployment(configmanager, inputdata, pathcomponents, return elif operation == 'create': importer = osimage.MediaImporter(inputdata['filename']) - yield msg.KeyValueData({'target': importer.targpath}) + yield msg.KeyValueData({'target': importer.targpath, + 'name': importer.importkey}) return elif len(pathcomponents) == 3: if operation == 'retrieve': diff --git a/confluent_server/confluent/osimage.py b/confluent_server/confluent/osimage.py index a04b40d3..3521edaa 100644 --- a/confluent_server/confluent/osimage.py +++ b/confluent_server/confluent/osimage.py @@ -339,6 +339,7 @@ class MediaImporter(object): raise Exception('Media import already in progress for this media') self.importkey = importkey importing[importkey] = self + self.importkey = importkey self.osname = identity['name'] self.oscategory = identity.get('category', None) targpath = identity['name']