Created
June 15, 2021 13:15
-
-
Save gibizer/701ae458f5e673242e9428a9029da8fe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import openstack | |
def main(): | |
cloud = openstack.connect() | |
projects = cloud.list_projects() | |
for project in projects: | |
print('project_id:', project['id']) | |
floating_ips = cloud.list_floating_ips( | |
filters={"project_id": project["id"]}, | |
) | |
for floating_ip in floating_ips: | |
print( | |
' floating ip:', | |
floating_ip['floating_ip_address'], | |
) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment