openstack交互接口记录

来源:互联网 发布:西安java程序员招聘 编辑:程序博客网 时间:2024/05/17 08:38
1. http://xx.xx.xx.xx:8774/v2/a33ddd1f88e84670932250dcc635c396/os-hypervisors/


    {
        "hypervisors":
        [
            {
                "status": "enabled",
                "state": "up",
                "id": 2,
                "hypervisor_hostname": "NOCCluster143.A211695C-316A-4C90-B416-F559A834DD6D"
            },
            {
                "status": "enabled",
                "state": "up",
                "id": 31,
                "hypervisor_hostname": "8ea5485b-371a-4dc5-9ac6-c9a80c5fb453"
            },
            {
                "status": "enabled",
                "state": "up",
                "id": 35,
                "hypervisor_hostname": "68845e24-fa25-44da-ada8-45f4c1331adb"
            }
        ]
    }




http://xx.xx.xx.xx:8774/v2/a33ddd1f88e84670932250dcc635c396/os-hypervisors/detail




    {
        "hypervisors":
        [
            {
                "cpu_info": "",
                "disk_allocation_ratio": 1,
                "free_disk_gb": 4738,
                "memory_mb_used": 101381,
                "service":
                {
                    "host": "host-xx.xx.xx.xx",
                    "disabled_reason": null,
                    "id": 13
                },
                "esxi_host_info":
                [
                    {
                        "name": "xx.xx.xx.xx",
                        "vcpus_used": 17,
                        "memory_mb": 524123,
                        "vcpus": 64,
                        "running_vms": 7,
                        "memory_mb_used": 30720
                    },
                    {
                        "name": "xx.xx.xx.xx",
                        "vcpus_used": 24,
                        "memory_mb": 524123,
                        "vcpus": 64,
                        "running_vms": 12,
                        "memory_mb_used": 49152
                    }
                ],
                "local_gb_used": 845,
                "id": 2,
                "current_workload": 1,
                "state": "up",
                "status": "enabled",
                "cpu_allocation_ratio": 1,
                "host_ip": "xx.xx.xx.xx",
                "hypervisor_hostname": "NOCCluster143.A211695C-316A-4C90-B416-F559A834DD6D",
                "hypervisor_version": 5005000,
                "disk_available_least": null,
                "local_gb": 5583,
                "free_ram_mb": 946865,
                "vcpus_used": 41,
                "hypervisor_type": "VMware vCenter Server",
                "memory_mb": 1048246,
                "vcpus": 128,
                "running_vms": 19,
                "ram_allocation_ratio": 1
            },
            {
                "cpu_info": "",
                "disk_allocation_ratio": 1,
                "free_disk_gb": 464,
                "memory_mb_used": 0,
                "service":
                {
                    "host": "host-xx.xx.xx.xx",
                    "disabled_reason": null,
                    "id": 15
                },
                "esxi_host_info": null,
                "local_gb_used": 0,
                "id": 31,
                "current_workload": 0,
                "state": "up",
                "status": "enabled",
                "cpu_allocation_ratio": 1,
                "host_ip": "xx.xx.xx.xx",
                "hypervisor_hostname": "8ea5485b-371a-4dc5-9ac6-c9a80c5fb453",
                "hypervisor_version": 1,
                "disk_available_least": 464,
                "local_gb": 464,
                "free_ram_mb": 131072,
                "vcpus_used": 0,
                "hypervisor_type": "ironic",
                "memory_mb": 131072,
                "vcpus": 32,
                "running_vms": 0,
                "ram_allocation_ratio": 1
            },
            {
                "cpu_info": "",
                "disk_allocation_ratio": 1,
                "free_disk_gb": 0,
                "memory_mb_used": 0,
                "service":
                {
                    "host": "host-xx.xx.xx.xx",
                    "disabled_reason": null,
                    "id": 15
                },
                "esxi_host_info": null,
                "local_gb_used": 0,
                "id": 35,
                "current_workload": 0,
                "state": "up",
                "status": "enabled",
                "cpu_allocation_ratio": 1,
                "host_ip": "xx.xx.xx.xx",
                "hypervisor_hostname": "68845e24-fa25-44da-ada8-45f4c1331adb",
                "hypervisor_version": 1,
                "disk_available_least": 0,
                "local_gb": 0,
                "free_ram_mb": 0,
                "vcpus_used": 0,
                "hypervisor_type": "ironic",
                "memory_mb": 0,
                "vcpus": 0,
                "running_vms": 0,
                "ram_allocation_ratio": 1
            }
        ]
    }




2.http://xx.xx.xx.xx:8774/v2/a33ddd1f88e84670932250dcc635c396/os-hypervisors/statistics




    {
        "hypervisor_statistics":
        {
            "count": 3,
            "vcpus_used": 41,
            "local_gb_used": 845,
            "memory_mb": 1179318,
            "current_workload": 1,
            "vcpus": 160,
            "running_vms": 19,
            "free_disk_gb": 5202,
            "disk_available_least": 464,
            "local_gb": 6047,
            "free_ram_mb": 1077937,
            "memory_mb_used": 101381
        }
    }






http://xx.xx.xx.xx:8774/v2/a33ddd1f88e84670932250dcc635c396/os-availability-zone/detail




    {
        "availabilityZoneInfo":
        [
            {
                "zoneState":
                {
                    "available": true
                },
                "hosts":
                {
                    "host-xx.xx.xx.xx":
                    {
                        "nova-conductor":
                        {
                            "available": true,
                            "active": true,
                            "updated_at": "2017-04-27T12:00:41.000000"
                        },
                        "nova-consoleauth":
                        {
                            "available": true,
                            "active": true,
                            "updated_at": "2017-04-27T12:00:47.000000"
                        },
                        "nova-cert":
                        {
                            "available": true,
                            "active": true,
                            "updated_at": "2017-04-27T12:00:42.000000"
                        },
                        "nova-scheduler":
                        {
                            "available": true,
                            "active": true,
                            "updated_at": "2017-04-27T12:00:42.000000"
                        }
                    }
                },
                "zoneName": "internal"
            },
            {
                "zoneState":
                {
                    "available": true
                },
                "hosts":
                {
                    "host-xx.xx.xx.xx":
                    {
                        "nova-compute":
                        {
                            "available": true,
                            "active": true,
                            "updated_at": "2017-04-27T12:00:39.000000"
                        }
                    }
                },
                "zoneName": "xx.xx.xx.xx"
            },
            {
                "zoneState":
                {
                    "available": true
                },
                "hosts":
                {
                    "host-172-17-33-160":
                    {
                        "nova-compute":
                        {
                            "available": true,
                            "active": true,
                            "updated_at": "2017-04-27T12:00:46.000000"
                        }
                    }
                },
                "zoneName": "nova"
            }
        ]
    }



3.
http://xx.xx.xx.xx:8774/v2/a33ddd1f88e84670932250dcc635c396/os-services




    {
        "services":
        [
            {
                "status": "enabled",
                "binary": "nova-cert",
                "host": "host-xx.xx.xx.xx“,
                "zone": "internal",
                "state": "up",
                "disabled_reason": null,
                "id": 7,
                "updated_at": "2017-04-27T12:01:32.000000"
            },
            {
                "status": "enabled",
                "binary": "nova-consoleauth",
                "host": "host-xx.xx.xx.xx",
                "zone": "internal",
                "state": "up",
                "disabled_reason": null,
                "id": 8,
                "updated_at": "2017-04-27T12:01:27.000000"
            },
            {
                "status": "enabled",
                "binary": "nova-scheduler",
                "host": "host-172-17-33-145",
                "zone": "internal",
                "state": "up",
                "disabled_reason": null,
                "id": 9,
                "updated_at": "2017-04-27T12:01:32.000000"
            },
            {
                "status": "enabled",
                "binary": "nova-conductor",
                "host": "host-xx.xx.xx.xx",
                "zone": "internal",
                "state": "up",
                "disabled_reason": null,
                "id": 10,
                "updated_at": "2017-04-27T12:01:31.000000"
            },
            {
                "status": "enabled",
                "binary": "nova-compute",
                "host": "host-xx.xx.xx.xx",
                "zone": "xx.xx.xx.xx",
                "state": "up",
                "disabled_reason": null,
                "id": 13,
                "updated_at": "2017-04-27T12:01:32.000000"
            },
            {
                "status": "enabled",
                "binary": "nova-compute",
                "host": "host-xx.xx.xx.xx",
                "zone": "nova",
                "state": "up",
                "disabled_reason": null,
                "id": 15,
                "updated_at": "2017-04-27T12:01:26.000000"
            }
        ]
    }




4.http://xx.xx.xx.xx:8774/v2/a33ddd1f88e84670932250dcc635c396/os-hosts




    {
        "hosts":
        [
            {
                "zone": "xx.xx.xx.xx",
                "host_name": "172.17.32.143:host-172-17-33-146:NOCCluster143.A211695C-316A-4C90-B416-F559A834DD6D:172.17.32.134",
                "service": "compute"
            },
            {
                "zone": "xx.xx.xx.xx",
                "host_name": "172.17.32.143:host-172-17-33-146:NOCCluster143.A211695C-316A-4C90-B416-F559A834DD6D:172.17.32.135",
                "service": "compute"
            }
        ]
    }




5.http://xx.xx.xx.xx:8774/v2/a33ddd1f88e84670932250dcc635c396/os-aggregates




    {
        "aggregates":
        [
            {
                "name": "NOCCluster143.A211695C-316A-4C90-B416-F559A834DD6D",
                "availability_zone": "xx.xx.xx.xx",
                "deleted": false,
                "created_at": "2017-01-12T09:37:59.000000",
                "updated_at": null,
                "hosts":
                [
                    "xx.xx.xx.xx:host-1xx.xx.xx.xx:NOCCluster143.A211695C-316A-4C90-B416-F559A834DD6D:172.17.32.134",
                    "xx.xx.xx.xx:host-xx.xx.xx.xx:NOCCluster143.A211695C-316A-4C90-B416-F559A834DD6D:172.17.32.135"
                ],
                "deleted_at": null,
                "id": 1,
                "metadata":
                {
                    "hugepagesize": "",
                    "Phynets": "dvSwitch1",
                    "disk_allocation_ratio": "1",
                    "cpu_allocation_ratio": "1",
                    "isSSD": "false",
                    "ram_allocation_ratio": "1"
                }
            }
        ]
    }






6.http://xx.xx.xx.xx:8776/v2/2350c305a7ba407cbc9bdc1ca8e080ac/scheduler-stats/get_pools?detail=True




    {
        "pools":
        [
            {
                "name": "cinder@vmware#vmware",
                "capabilities":
                {
                    "pool_name": "vmware",
                    "filter_function": null,
                    "goodness_function": null,
                    "multiattach": true,
                    "provisioned_capacity_gb": 7677,
                    "timestamp": "2017-04-27T12:06:22.464465",
                    "allocated_capacity_gb": 291,
                    "volume_backend_name": "vmware",
                    "thin_provisioning_support": true,
                    "free_capacity_gb": 14932,
                    "driver_version": "1.7.0",
                    "total_capacity_gb": 21762,
                    "reserved_percentage": 0,
                    "max_over_subscription_ratio": 20,
                    "vendor_name": "VMware",
                    "storage_protocol": "vmdk",
                    "datastore_metadata":
                    [
                        {
                            "datacenter_name": "E9000",
                            "provisioned_capacity_gb": 3091,
                            "host_names": "1xx.xx.xx.xx2.135",
                            "free_capacity_gb": 2226,
                            "cluster_name": "NOCCluster143",
                            "total_capacity_gb": 5026,
                            "storage_type": "VMFS",
                            "datastore_name": "Huawei-lun-30"
                        },
                        {
                            "datacenter_name": "E9000",
                            "provisioned_capacity_gb": 995,
                            "host_names": "xx.xx.xx.xx35",
                            "free_capacity_gb": 4254,
                            "cluster_name": "NOCCluster143",
                            "total_capacity_gb": 5026,
                            "storage_type": "VMFS",
                            "datastore_name": "Huawei-lun-31"
                        },
                        {
                            "datacenter_name": "E9000",
                            "provisioned_capacity_gb": 1646,
                            "host_names": "xx.xx.xx.xx2.135",
                            "free_capacity_gb": 4269,
                            "cluster_name": "NOCCluster143",
                            "total_capacity_gb": 5584,
                            "storage_type": "VMFS",
                            "datastore_name": "Huawei-lun-33"
                        },
                        {
                            "datacenter_name": "E9000",
                            "provisioned_capacity_gb": 1886,
                            "host_names": "xx.xx.xx.xx135",
                            "free_capacity_gb": 3698,
                            "cluster_name": "NOCCluster143",
                            "total_capacity_gb": 5584,
                            "storage_type": "VMFS",
                            "datastore_name": "Huawei-lun-32"
                        },
                        {
                            "datacenter_name": "E9000",
                            "provisioned_capacity_gb": 1,
                            "host_names": "xx.xx.xx.xx",
                            "free_capacity_gb": 271,
                            "cluster_name": "NOCCluster143",
                            "total_capacity_gb": 271,
                            "storage_type": "VMFS",
                            "datastore_name": "xx.xx.xx.xx"
                        },
                        {
                            "datacenter_name": "E9000",
                            "provisioned_capacity_gb": 0,
                            "host_names": "xx.xx.xx.xx",
                            "free_capacity_gb": 0,
                            "cluster_name": "NOCCluster143",
                            "total_capacity_gb": 0,
                            "storage_type": "NFS",
                            "datastore_name": "64f36d9e79d23b64bf6cb2968e773590"
                        },
                        {
                            "datacenter_name": "E9000",
                            "provisioned_capacity_gb": 58,
                            "host_names": "xx.xx.xx.xx",
                            "free_capacity_gb": 214,
                            "cluster_name": "NOCCluster143",
                            "total_capacity_gb": 271,
                            "storage_type": "VMFS",
                            "datastore_name": "xx.xx.xx.xx"
                        },
                        {
                            "datacenter_name": "E9000",
                            "provisioned_capacity_gb": 0,
                            "host_names": "xx.xx.xx.xx",
                            "free_capacity_gb": 0,
                            "cluster_name": "NOCCluster143",
                            "total_capacity_gb": 0,
                            "storage_type": "NFS",
                            "datastore_name": "7348e49dc0e0310ca345f15faabe25eb"
                        }
                    ]
                }
            }
        ]
    }



7.changeSince接口
http://xx.xx.xx.xx:9804/v2/a7178d15229f4fc0a4d16acd2bf3ca84/servers/detail?all_tenants=1&changes-since=2001-07-01T07:22:39
原创粉丝点击