[ovirt-users] python sdk and params

Fabrice Bacchella fabrice.bacchella at orange.fr
Mon Apr 11 09:51:15 UTC 2016


I'm playing with the python sdk.

When I want to delete a VM, I see that it takes a action with settings :

[@param action.force: boolean]
[@param action.vm.disks.detach_only: boolean]
[@param action.async: boolean]
[@param action.grace_period.expiry: long]
[@param correlation_id: any string]

But if I try

  action_params = params.Action(vm={'disks': {'detach_only': False}})
  print action_params.export_(sys.stdout, 0)

I'm getting :

   AttributeError: 'dict' object has no attribute 'export_'

How can I build the argument to params.Action ?




More information about the Users mailing list