Skip to content
Snippets Groups Projects
Commit 7f4e0480 authored by Mateus Caruccio's avatar Mateus Caruccio Committed by k8s-ci-robot
Browse files

kubespray-aws-inventory.py ported to python 3 (#3528)

parent 5a5cf15c
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python #!/usr/bin/env python
from __future__ import print_function
import boto3 import boto3
import os import os
import argparse import argparse
...@@ -13,7 +14,7 @@ class SearchEC2Tags(object): ...@@ -13,7 +14,7 @@ class SearchEC2Tags(object):
self.search_tags() self.search_tags()
if self.args.host: if self.args.host:
data = {} data = {}
print json.dumps(data, indent=2) print(json.dumps(data, indent=2))
def parse_args(self): def parse_args(self):
...@@ -56,6 +57,6 @@ class SearchEC2Tags(object): ...@@ -56,6 +57,6 @@ class SearchEC2Tags(object):
} }
hosts['k8s-cluster'] = {'children':['kube-master', 'kube-node']} hosts['k8s-cluster'] = {'children':['kube-master', 'kube-node']}
print json.dumps(hosts, sort_keys=True, indent=2) print(json.dumps(hosts, sort_keys=True, indent=2))
SearchEC2Tags() SearchEC2Tags()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment