If I want to see what instances in a project are in the destroyed state via 
Cloudmonkey, I should be able to use both the API call and the native 
Cloudmonkey call.


[root@sjmpc-mgr1 cloudmanager_utils]# cloudmonkey -d json api 
listVirtualMachines domainid=c4fe811a-eeb5-4826-85a6-67c8d3f26234 
projectid=6629b1a5-1014-49d9-b5b8-af78914b6051 state="Destroyed" filter=id,name

{

  "count": 2,

  "virtualmachine": [

    {

      "id": "be10acfc-f11e-4667-a36b-2ed30f1cca45",

      "name": "foo2"

    },

    {

      "id": "71766548-49fb-4327-bad7-a8c546c9c29b",

      "name": "foo1"

    }

  ]

}

Unfortunately, a problem arises when I try to change the output format from 
json to default, where apparently NIC ID/name leakage appears in the output…


cloudmonkey -d default api listVirtualMachines 
domainid=c4fe811a-eeb5-4826-85a6-67c8d3f26234 
projectid=6629b1a5-1014-49d9-b5b8-af78914b6051 state="Destroyed" filter=id,name

id = be10acfc-f11e-4667-a36b-2ed30f1cca45

name = foo2

id = ecbd8703-79c3-4db0-97cc-bd4b02a6eefb

================================================================================

id = d2fc481a-e049-4a37-8906-027ba37522d3

name = default

================================================================================

================================================================================

id = 71766548-49fb-4327-bad7-a8c546c9c29b

name = foo1

id = 1619ec83-7a40-401a-b4be-fb2367ea1baf

================================================================================

id = d2fc481a-e049-4a37-8906-027ba37522d3

name = default

================================================================================

================================================================================


This makes it hard to use cloudmonkey in bash scripts…


Ideas?


  -Ian

Reply via email to