[openstack-dev] [all] Yakumo: Pythonic, unified OpenStack client library

Markus Zoeller mzoeller at linux.vnet.ibm.com
Wed May 3 06:59:46 UTC 2017


On 03.05.2017 04:46, Akira Yoshiyama wrote:
> Hello all,
> 
> I'm pleased to announce Yakumo, yet another unified OpenStack client
> library with an interactive shell. You can find Yakumo below:
> 
>    PyPI: https://pypi.python.org/pypi/yakumo/
>    Github: https://github.com/yosshy/python-yakumo/
> 
> Yakumo development focuses to:
> 
> * Pythonic: handles each cloud resource as an object in the same manner
> * Unified: handles all OpenStack APIs at once
> * Less dependency: no import of other OpenStack client libraries
> 
> Why do we have to specify IDs of cloud resources in Python
> programming? Python is an object-oriented programming language. IMO,
> we should use objects to represent cloud resources, including method
> arguments. It's one of the reasons I've started Yakumo project.
> 
> Yakumo 0.11.0 suports OpenStack APIs below:
> 
> * Identity API v2/v3
> * Compute API v2
> * Networking v2
> * Image Service API v1/v2
> * Block Storage v1/v2
> * Object Storage v1
> 
> Yakumo has 23 sample smoke tests below for the APIs now. It's useful
> to test your cloud and learn usage of Yakumo.
> 
>    https://github.com/yosshy/python-yakumo/tree/master/yakumo/smoketests
> 
> And also you can use 'ossh', an interactive python shell in Yakumo.
> It's a good example.
> # ossh --os-cloud=mypackstack
> 
> Finding existing resources:
> (c is an client object automatically generated for mypackstack environment)
>>>> i = c.image.find_one(name="trusty")
>>>> f = c.flavor.find_one(name='m1.small')
>>>> k = c.key_pair.find_one(name='key1')
>>>> n = c.network.find_one(name='private')
>>>> i, f, k, n
> (<yakumo.glance.v2.image.Resource
> (id="887b0393-5065-4bcf-941d-623100baa06e", name="trusty")>,
> <yakumo.nova.v2.flavor.Resource (id="2", name="m1.small")>,
> <yakumo.nova.v2.key_pair.Resource (name="key1")>,
> <yakumo.neutron.v2.network.Resource
> (id="22e3fa30-11c0-4065-bbf7-8d8bbb50f63b", name="private")>)
> 
> Creating a server:
>>>> s = c.server.create(name='vm1', image=i, flavor=f, networks=[n], key_pair=k)
>>>> s
> <yakumo.nova.v2.server.Resource
> (id="b1477f6c-bbc4-4c37-ba05-14b935a5d08c" empty)>
> 
> Waiting for building task finished:
>>>> s.wait_for_finished()
>>>> s.status
> u'ACTIVE'
> 
> Deleting the server:
>>>> s.delete()
> 
> See README for more usage and details:
> 
>    https://github.com/yosshy/python-yakumo/blob/master/README.md
> 
> Feedback is welcome!
> 
> Cheers,
> Akira Yoshiyama
> 
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 

The interface looks nice! The docs too! I like the openstack-client for
CLI stuff, but I think I will give your client a shot when I have to
hack functional tests in python scripts which don't need to be in Tempest.

-- 
Regards, Markus Zoeller (markus_z)




More information about the OpenStack-dev mailing list