softlayer / softlayer-go

SoftLayer API Client for the Go Language
Apache License 2.0
53 stars 46 forks source link

Filters were not working for multi-level #150

Closed narkarum closed 4 years ago

narkarum commented 4 years ago

Example:

slcli -v  --format=json call-api SoftLayer_Account getNetworkStorage --limit=1000 --mask="mask[id;serviceResource.datacenter.name]" --json-filter='{"networkStorage":{"datacenter":{"name":{"operation":"mon01"}}}}'

Above command is not filtering the datacenter name. It is displaying all volumes and from all datacenters.

narkarum commented 4 years ago

Example:

--json-filter='{"networkStorage":{"datacenter":{"name":{"operation":"mon01"}}}}'

allmightyspiff commented 4 years ago

Hey @narkarum , Issues with the SLCLI go in softlayer-python

That being said, your filter is not quite correct, try the following.

slcli -v  --format=json call-api SoftLayer_Account getNetworkStorage --limit=1000 --mask="mask[id;serviceResource.datacenter.name]" --json-filter='{"networkStorage":{"serviceResource":{"datacenter":{"name":{"operation":"mon01"}}}}}'