This file contains 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
def managePom(update=False): | |
from xml.etree import ElementTree as et | |
ns = "http://maven.apache.org/POM/4.0.0" | |
et.register_namespace('', ns) | |
tree = et.ElementTree() | |
tree.parse('pom.xml') | |
p = tree.getroot().find("{%s}version" % ns) | |
if update: | |
p.text = update | |
tree.write('pom.xml') |
This file contains 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
#!/usr/bin/env python | |
from __future__ import print_function | |
import boto3 | |
def get_instances(r): | |
return r['Instances'] | |
def private_ip(i): | |
if i[0].has_key('PrivateIpAddress'): | |
return i[0]['PrivateIpAddress'] |