云管、SDN、OpenStack组成的虚拟化云计算:主机集群建立过程

 

最终返回集群(aggregate)实例json
集群实例举例:
{
    "aggregate": {
        "availability_zone": "a",
        "created_at": "2019-12-27T23:47:30",
        "deleted": false,
        "deleted_at": null,
        "hosts": [
            "compute1","compute2","compute3"
        ],
        "id": 1,
       "metadata": {
          "hypervisor_vendor": "certus",
          "availability_zone": "a"
       },
        "name": "name",
        "updated_at": null,
        "uuid": "d184237289c54fbd5d2e16c8",
        "isHa": "false"
    }
}


物理机

"hypervisor": {
        "cpu_info": {
            "arch": "x86_64",
            "model": "Nehalem",
            "vendor": "Intel",
            "features": [
                "pge",
                "clflush"
            ],
            "topology": {
                "cores": 1,
                "threads": 1,
                "sockets": 4
            }
        },
        "state": "up",
        "status": "enabled",
    "availabilityZone": "a",
        "servers": [#虚拟机
            {
                "name": "test_server1",
                "uuid": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
            },
            {
                "name": "test_server2",
                "uuid": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
            }
        ],
        "current_workload": 0,
        "disk_available_least": 0,
        "host_ip": "1.1.1.1",
        "free_disk_gb": 1028,
        "free_ram_mb": 7680,
        "hypervisor_hostname": "CVK#11",
        "hypervisor_type": "kqemu",
        "hypervisor_version": 1000,
        "id": "b1e43b5f-eec1-44e0-9f10-7b4945c0226d",
        "local_gb": 1028,
        "local_gb_used": 0,
        "memory_mb": 8192,
        "memory_mb_used": 512,
        "running_vms": 0,
        "service": {
            "host": "043b3cacf6f34c90a7245151fc8ebcda",
            "id": "5d343e1d-938e-4284-b98b-6a2b5406ba76",
            "disabled_reason": null
        },
       "securityGroups": [
         {
           "name": "default"
         }
        ],
        "vcpus": 2,
        "vcpus_used": 0"tag": {
                "hypervisor_type": "kqemu",
                "az": "cas",
           },
    "addresses": {
              "NX_dayang_net48": [
          {
            "macAddr": "fa:16:3e:c9:e0:0e",
            "version": 4,
            "addr": "172.29.248.51",
            "inAvgBandwidth": 0,
            "outAvgBandwidth": 0,
            "type": "fixed"
          }
        ]
     }
    }