In the video below I walk through how to parse JSON data from a REST API using Python and the Requests library and json standard library for Python. I also drop a little nugget on duck typing. Hope you enjoy!
Continue ReadingTag: JSON
Fun with Python, Tabular & AWS IP ranges
I have been spending a lot of time designing a Hybrid Cloud that consists of Openstack and public cloud platforms. In particular I have been spending a lot of time designing the AWS portion of the Hybrid Cloud Platform. Today I found myself continually needing to look up AWS public address space and then parsing out […]
Continue ReadingHow To: curl the Openstack API’s (v3 Keystone Auth)
While Openstack provides a python client(s) for interactions….
1 2 3 4 5 6 7 8 |
[root@diamond ~]# source keystonerc_tuxninja [root@diamond ~(keystone_tuxninja)]# openstack server list +--------------------------------------+-------+--------+----------------------------------------+ | ID | Name | Status | Networks | +--------------------------------------+-------+--------+----------------------------------------+ | e5b35d6a-a9ba-4714-a9e1-6361706bd047 | spin1 | ACTIVE | private_tuxlabs=10.0.0.8, 192.168.1.52 | +--------------------------------------+-------+--------+----------------------------------------+ [root@diamond ~(keystone_tuxninja)]# |
I frequently, finding myself needing to get data out of it without the pain of awk/sed’ing out the ASCII art. Thus to quickly access the raw data, we can directly query the API’s using curl & parsing JSON instead, which is much better 🙂 Authentication Before […]
Continue Reading