def _get_swift_container(self, image_id):
        seed_num_chars = CONF.glance.swift_store_multiple_containers_seed

        if seed_num_chars > 0:
            image_id = str(image_id).lower()

            num_dashes = image_id[:seed_num_chars].count('-')
            num_chars = seed_num_chars + num_dashes
            name_suffix = image_id[:num_chars]
            new_container_name = (CONF.glance.swift_container +
                                  '_' + name_suffix)
            return new_container_name
        else:
            return CONF.glance.swift_container
Get the Swift container the image is stored in.
dataset/ETHPy150Open openstack/ironic/ironic/common/glance_service/v2/image_service.py/GlanceImageService._get_swift_container