Skip to content

The metrics view API response is not super-set of resources response keys #3831

@yadvr

Description

@yadvr

The API responses for metrics views APIs, such as listZonesMetrics don't have all the same keys in the API response as the listZones. If this gets fixed in 4.14, Primate can leverage one API to do both metrics and resource view listings. Would be great if this is fixed in 4.13.1.0/4.14.0.0 milestone.

Illustration, output of listZonesMetrics:

    {
      "allocationstate": "Disabled",
      "clusters": "1 / 1",
      "cputotal": "0.00 Ghz",
      "dhcpprovider": "VirtualRouter",
      "id": "b00e2dca-9032-4f1d-aada-8b2cdc19e745",
      "localstorageenabled": true,
      "memorytotal": "0.00 GB",
      "name": "DummyInvalidZone",
      "securitygroupsenabled": true,
      "state": "Disabled",
      "tags": [],
      "zonetoken": "1dbe40a9-46e0-33a8-9b93-44066c94fdfa"
    }

Output of listZones:

    {
      "allocationstate": "Disabled",
      "dhcpprovider": "VirtualRouter",
      "dns1": "8.8.8.8",
      "id": "b00e2dca-9032-4f1d-aada-8b2cdc19e745",
      "internaldns1": "8.8.8.8",
      "localstorageenabled": true,
      "name": "DummyInvalidZone",
      "networktype": "Basic",
      "securitygroupsenabled": true,
      "tags": [],
      "zonetoken": "1dbe40a9-46e0-33a8-9b93-44066c94fdfa"
    }

The networktype is missing. There are also disprepancies seen in the listHosts, listHostsMetrics API responses, but did not check other APIs related to volume, vm, cluster and storage pool. It's possible the way a java object is parsed and serialised needs checking/fixing.

ISSUE TYPE
  • Bug Report
COMPONENT NAME
API
CLOUDSTACK VERSION
4.13, 4.14/master

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions