Skip to content
Permalink
Browse files
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)"
    }
  ]
}
```
  • Loading branch information
ustcweizhou committed Jan 5, 2021
1 parent bc6cdc7 commit 7be6828e52814f156d887a749b7bedb05d6988f3
Showing 1 changed file with 1 addition and 2 deletions.
@@ -58,8 +58,7 @@ func (s *ConfigurationService) ListCapabilities(p *ListCapabilitiesParams) (*Lis
}

type ListCapabilitiesResponse struct {
Count int `json:"count"`
Capabilities []*Capability `json:"capability"`
Capabilities *Capability `json:"capability"`
}

type Capability struct {

0 comments on commit 7be6828

Please sign in to comment.