Revision ffc64d7c image_creator/main.py

b/image_creator/main.py
83 83

  
84 84
    parser.add_option("-u", "--upload", dest="upload", type="string",
85 85
                      default=False,
86
                      help="upload the image to pithos with name FILENAME",
86
                      help="upload the image to the cloud with name FILENAME",
87 87
                      metavar="FILENAME")
88 88

  
89 89
    parser.add_option("-r", "--register", dest="register", type="string",
90 90
                      default=False,
91
                      help="register the image with ~okeanos as IMAGENAME",
91
                      help="register the image with a cloud as IMAGENAME",
92 92
                      metavar="IMAGENAME")
93 93

  
94 94
    parser.add_option("-m", "--metadata", dest="metadata", default=[],
......
129 129
                      help="don't shrink any partition", action="store_false")
130 130

  
131 131
    parser.add_option("--public", dest="public", default=False,
132
                      help="register image with cyclades as public",
132
                      help="register image with the cloud as public",
133 133
                      action="store_true")
134 134

  
135 135
    parser.add_option("--tmpdir", dest="tmp", type="string", default=None,
......
231 231

  
232 232
    if options.upload and not options.force:
233 233
        if kamaki.object_exists(options.upload):
234
            raise FatalError("Remote pithos object `%s' exists "
234
            raise FatalError("Remote storage service object: `%s' exists "
235 235
                             "(use --force to overwrite it)." % options.upload)
236 236
        if kamaki.object_exists("%s.md5sum" % options.upload):
237
            raise FatalError("Remote pithos object `%s.md5sum' exists "
238
                             "(use --force to overwrite it)." % options.upload)
237
            raise FatalError("Remote storage service object: `%s.md5sum' "
238
                             "exists (use --force to overwrite it)." %
239
                             options.upload)
239 240

  
240 241
    if options.register and not options.force:
241 242
        if kamaki.object_exists("%s.meta" % options.upload):
242
            raise FatalError("Remote pithos object `%s.meta' exists "
243
            raise FatalError("Remote storage service object `%s.meta' exists "
243 244
                             "(use --force to overwrite it)." % options.upload)
244 245

  
245 246
    disk = Disk(options.source, out, options.tmp)
......
306 307
        try:
307 308
            uploaded_obj = ""
308 309
            if options.upload:
309
                out.output("Uploading image to pithos:")
310
                out.output("Uploading image to the storage service:")
310 311
                with open(snapshot, 'rb') as f:
311 312
                    uploaded_obj = kamaki.upload(
312 313
                        f, size, options.upload,
......
323 324

  
324 325
            if options.register:
325 326
                img_type = 'public' if options.public else 'private'
326
                out.output('Registering %s image with ~okeanos ...' % img_type,
327
                           False)
327
                out.output('Registering %s image with the compute service ...'
328
                           % img_type, False)
328 329
                result = kamaki.register(options.register, uploaded_obj,
329 330
                                         metadata, options.public)
330 331
                out.success('done')
......
344 345

  
345 346
                out.output()
346 347
        except ClientError as e:
347
            raise FatalError("Pithos client: %d %s" % (e.status, e.message))
348
            raise FatalError("Service client: %d %s" % (e.status, e.message))
348 349

  
349 350
    finally:
350 351
        out.output('cleaning up ...')

Also available in: Unified diff