openstack的镜像管理模块glance,采用了一个名为image_properties的表来记录各镜像的属性信息,例如该某个镜像使用的系统架构(architecture)、操作系统的版本(os_version)等。

该表采用了一种key-value的方式来记录这些属性,常见的key有:kernel_id、ramdisk_id、instance_uuid、architecture、os_distro、os_version等

而文件schema-image.json就是对这些字段进行解释说明的,如下:

{
    "kernel_id": {
        "type": "string",
        "pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$",
        "description": "ID of image stored in Glance that should be used as the kernel when booting an AMI-style image."
    },
    "ramdisk_id": {
        "type": "string",
        "pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$",
        "description": "ID of image stored in Glance that should be used as the ramdisk when booting an AMI-style image."
    },
    "instance_uuid": {
        "type": "string",
        "description": "ID of instance used to create this image."
    },
    "architecture": {
        "description": "Operating system architecture as specified in http://docs.openstack.org/trunk/openstack-compute/admin/content/adding-images.html",
        "type": "string"
    },
    "os_distro": {
        "description": "Common name of operating system distribution as specified in http://docs.openstack.org/trunk/openstack-compute/admin/content/adding-images.html",
        "type": "string"
    },
    "os_version": {
        "description": "Operating system version as specified by the distributor",
        "type": "string"
    }
}

 

 

Logo

开源、云原生的融合云平台

更多推荐