← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1562758] [NEW] generate an uuid for image id

 

Public bug reported:

Why  not use `oslo_utils.uuidutils.generate_uuid` function

 def new_image(self, image_id=None, name=None, visibility='private',
                  min_disk=0, min_ram=0, protected=False, owner=None,
                  disk_format=None, container_format=None,
                  extra_properties=None, tags=None, **other_args):
        extra_properties = extra_properties or {}
        self._check_readonly(other_args)
        self._check_unexpected(other_args)
        self._check_reserved(extra_properties)

        if image_id is None:
            image_id = str(uuid.uuid4())                                                                                                                                                      
        created_at = timeutils.utcnow()
        updated_at = created_at
        status = 'queued'


I think :
           image_id = uuidtils.generate_uuid()
don't use 
          mage_id = str(uuid.uuid4())

** Affects: glance
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1562758

Title:
  generate  an uuid for image id

Status in Glance:
  New

Bug description:
  Why  not use `oslo_utils.uuidutils.generate_uuid` function

   def new_image(self, image_id=None, name=None, visibility='private',
                    min_disk=0, min_ram=0, protected=False, owner=None,
                    disk_format=None, container_format=None,
                    extra_properties=None, tags=None, **other_args):
          extra_properties = extra_properties or {}
          self._check_readonly(other_args)
          self._check_unexpected(other_args)
          self._check_reserved(extra_properties)

          if image_id is None:
              image_id = str(uuid.uuid4())                                                                                                                                                      
          created_at = timeutils.utcnow()
          updated_at = created_at
          status = 'queued'


  I think :
             image_id = uuidtils.generate_uuid()
  don't use 
            mage_id = str(uuid.uuid4())

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1562758/+subscriptions


Follow ups