pdion891 opened a new issue #63:
URL: https://github.com/apache/cloudstack-cloudmonkey/issues/63


   Here is a test of list hosts api where using filter for 2 fields: name and 
oscategoryname which is OS preference in cloudstack UI. if I'm using table 
output , I only get on column because only one host have the OS preference set. 
but if I'm using json output I get all the information.
   
   This seams to be true also I filter is not used, where the column 
oscategoryname is not displayed.
   
   
   table output that is incorrect: (missing column)
   ```
   (staging1)  > list hosts filter=oscategoryname,id
   count = 13
   host:
   +--------------------------------------+
   |                  ID                  |
   +--------------------------------------+
   | 1b7d55f0-95bd-4aa0-a247-fa5bc99972cf |
   | eb3c8438-c8a0-44ee-a770-797feb684fc9 |
   | 1a7c2d6b-e4db-4e53-a623-3f9ba55746de |
   | 07cbb1ab-d0c5-43c7-9460-3ce8db7445de |
   | 57c2557f-3352-4849-aab3-23237023900b |
   | 5baf9623-2099-4ce0-8a1e-2bf6e6f776a6 |
   | be0a9906-acec-4bf3-b525-e38aba09a1ee |
   | ea90f627-e4ef-40a3-8359-cab5eb7c6e35 |
   | 5ff06d4a-d447-4e3e-8c2d-0bc85c013fca |
   | 0b2ac79f-6b95-422b-b2f3-72389887a367 |
   | 4afd50a7-2140-4d10-94d8-c7c77c005c36 |
   | 5307f1c4-8a46-45d8-b5cf-188da557719b |
   | f6d8fa63-6b28-4e16-956f-3b140d2f4214 |
   +--------------------------------------+
   (staging1)  > list hosts filter=oscategoryname
   count = 13
   host:
   +----------------+
   | OSCATEGORYNAME |
   +----------------+
   | Windows        |
   +----------------+
   ```
   
   json output that expose expected results: 
   ```
   (staging1)  > set display json
   (staging1)  > list hosts filter=oscategoryname
   {
     "count": 13,
     "host": [
       {},
       {},
       {},
       {},
       {},
       {
         "oscategoryname": "Windows"
       },
       {},
       {},
       {},
       {},
       {},
       {},
       {}
     ]
   }
   (staging1)  > list hosts filter=oscategoryname,name
   {
     "count": 13,
     "host": [
       {
         "name": "stg-xen05"
       },
       {
         "name": "stg-xen06"
       },
       {
         "name": "stg-xen76-01"
       },
       {
         "name": "stg-xen76-02"
       },
       {
         "name": "stg-xen76-03"
       },
       {
         "name": "stg-xen01",
         "oscategoryname": "Windows"
       },
       {
         "name": "s-3438-VM"
       },
       {
         "name": "test-xen01"
       },
       {
         "name": "stg-xen02"
       },
       {
         "name": "stg-xen03"
       },
       {
         "name": "v-3437-VM"
       },
       {
         "name": "stg-xen04"
       },
       {
         "name": "test-xen02"
       }
     ]
   }```
   
   
   I think it's just a matter of suporting empty fields in the table output.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to