[ovirt-users] Request for oVirt Ansible modules testing feedback

Nathanaël Blanchet blanchet at abes.fr
Wed Jan 4 16:38:25 UTC 2017



Le 04/01/2017 à 15:41, Juan Hernández a écrit :
> On 01/04/2017 12:30 PM, Yaniv Kaul wrote:
>>
>> On Wed, Jan 4, 2017 at 1:04 PM, Nicolas Ecarnot <nicolas at ecarnot.net
>> <mailto:nicolas at ecarnot.net>> wrote:
>>
>>      Hello,
>>
>>      Le 04/01/2017 à 11:49, Nathanaël Blanchet a écrit :
>>
>>
>>
>>          Le 04/01/2017 à 10:09, Andrea Ghelardi a écrit :
>>
>>
>>              Personally I don’t think ansible and ovirt-shell are
>>              mutually exclusive.
>>
>>              Those who are in ansible and devops realms are not really
>>              scared by
>>              making python/ansible work with ovirt.
>>
>>              From what I gather, playbooks are quite a de-facto
>>              pre-requisite to
>>              build up a real SaaC “Software as a Code” environment.
>>
>>
>>
>>              On the other hand, ovirt-shell can and is a fast/easy way to
>>              perform
>>              “normal daily tasks”.
>>
>>          totally agree but ovirt-shell is deprecated in 4.1 et will be
>>          removed in
>>          4.2. Ansible or sdk4 are proposed as an alternative.
>>
>>
>>      Could someone point me to an URL where sdk4 is fully documented, as
>>      I have to get ready for ovirt-shell deprecation?
>>
>>
>> The Rest API is partially documented under https://<engine>/api/model .
>> It's not complete yet. All new features in 4.0 are documented and we are
>> working on the 'older' features now.
>> (contributions are welcome!)
>>
>>
>>      I'm sure no one at Redhat thought about deprecating a tool in favor
>>      of a new one before providing a complete user doc!
>>
>>
>> In addition, the SDK RPM itself contains many examples. See [1].
>> (contributions are welcome!)
>>
>> Y.
>>
>> [1] https://github.com/oVirt/ovirt-engine-sdk/tree/master/sdk/examples
>>
Although these examples, I can successfully create a snapshot, but I 
didn't find the way to delete it...
Regarding many example, it should be possible to locate any service by :
name_service = connection.system_service().name.service()

So logically it should be doable with snapshot like
snapshots_service = connection.system_service().snapshots.service()
but : AttributeError: 'SystemService' object has no attribute 'snapshots

I saw an example into the ansible [ working ] way to do the same thing 
and I found this :
snapshot = 
snapshots_service.snapshot_service(module.params['snapshot_id']).get()

How can I get this working with sdk, I mean giving snapshot_id as a 
parameter?


> Also the complete reference documentation of the Python SDK is available
> here:
>
>    http://ovirt.github.io/ovirt-engine-sdk/v4.0/4.0.3/index.html
>
> There also SDKs for Ruby and Java, in case Python is not your preferred
> language:
>
>    Ruby:
>    https://github.com/oVirt/ovirt-engine-sdk-ruby/tree/master/sdk
>    https://github.com/oVirt/ovirt-engine-sdk-ruby/tree/master/sdk/examples
>    http://www.rubydoc.info/gems/ovirt-engine-sdk
>
>    Java:
>    https://github.com/oVirt/ovirt-engine-sdk-java/tree/master/sdk
>
> https://github.com/oVirt/ovirt-engine-sdk-java/tree/master/sdk/src/test/java/org/ovirt/engine/sdk4/examples
>    http://www.javadoc.io/doc/org.ovirt.engine.api/sdk
>
>>
>>      --
>>      Nicolas ECARNOT
>>
>>      _______________________________________________
>>      Users mailing list
>>      Users at ovirt.org <mailto:Users at ovirt.org>
>>      http://lists.ovirt.org/mailman/listinfo/users
>>      <http://lists.ovirt.org/mailman/listinfo/users>
>>
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users
>>
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users

-- 
Nathanaël Blanchet

Supervision réseau
Pôle Infrastrutures Informatiques
227 avenue Professeur-Jean-Louis-Viala
34193 MONTPELLIER CEDEX 5 	
Tél. 33 (0)4 67 54 84 55
Fax  33 (0)4 67 54 84 14
blanchet at abes.fr



More information about the Users mailing list