Fix bug while list capabilties
authorWei Zhou <w.zhou@global.leaseweb.com>
Tue, 5 Jan 2021 13:03:48 +0000 (13:03 +0000)
committerWei Zhou <w.zhou@global.leaseweb.com>
Tue, 5 Jan 2021 13:05:16 +0000 (13:05 +0000)
commit7be6828e52814f156d887a749b7bedb05d6988f3
tree5c75c70a5a54e8f72f0ce4f5fdbb6bd576d8ffdb
parentbc6cdc7c37e55960b527c5484fb403c9dea1710d
Fix bug while list capabilties

Different from other list commands, listcapabilities does not return an array list.

```
(localcloud) 🐱 > list capabilities
{
  "capability": {
    "allowusercreateprojects": true,
    "allowuserexpungerecovervm": true,
    "allowuserexpungerecovervolume": true,
    "allowuserviewalldomainaccounts": false,
    "allowuserviewdestroyedvm": true,
    "cloudstackversion": "4.15.0.0",
    "customdiskofferingmaxsize": 1024,
    "customdiskofferingminsize": 1,
    "dynamicrolesenabled": true,
    "kubernetesclusterexperimentalfeaturesenabled": false,
    "kubernetesserviceenabled": true,
    "kvmsnapshotenabled": true,
    "projectinviterequired": false,
    "regionsecondaryenabled": false,
    "securitygroupsenabled": false,
    "supportELB": "false",
    "userpublictemplateenabled": true
  }
}
```

for other list apis, e.g. list templates
```
(localcloud) 🐱 > list templates templatefilter=all filter=id,name
{
  "count": 2,
  "template": [
    {
      "id": "b54e8a17-ebe5-4849-a015-2698e1d01768",
      "name": "SystemVM Template (KVM)"
    },
    {
      "id": "63985306-48ee-11eb-8680-069fc4003392",
      "name": "CentOS 5.5(64-bit) no GUI (KVM)"
    }
  ]
}
```
cloudstack/ConfigurationService.go