snowch / ibm-analytics-engine-python

Python library for IBM Analytics Engine - https://console.bluemix.net/docs/services/AnalyticsEngine/index.html
Apache License 2.0
11 stars 2 forks source link

Provide an API method to list all clusters that I have access to across all my spaces #10

Closed snowch closed 6 years ago

snowch commented 6 years ago
import pprint
pp = pprint.PrettyPrinter(indent=4)

for org in cf.orgs_and_spaces():
    for space in org['spaces']:
        print('ORG {} | SPACE {}'.format(org['name'], space['name']))
        print()

        clusters = iae.clusters(space_guid=space['guid'])
        if len(clusters) > 0:
            for cluster in clusters:
                pp.pprint(cluster)
                print()
snowch commented 6 years ago

Done: https://github.com/snowch/ibm-analytics-engine-python/commit/4c9818d2fbe4aa8070eae5e632dca8ec58be1a22#diff-3bd56d45a6a2ef4c79eb3a5f8b471816R211