Skip to content

Instantly share code, notes, and snippets.

@soulston
Last active August 29, 2015 13:55
Show Gist options
  • Save soulston/8716383 to your computer and use it in GitHub Desktop.
Save soulston/8716383 to your computer and use it in GitHub Desktop.
if bootUp.args.instanceType in ["All", "ebs-vol"]:
reportLines = []
mainLogger.info ("Looking for EBS Volumes in region: %s." % (region.name))
conEC2 = boto.ec2.connect_to_region (region.name,
aws_access_key_id=bootUp.args.awsAccessKey,
aws_secret_access_key=bootUp.args.awsSecretKey)
for ebsvolume in conEC2.get_all_volumes ():
rl = lnAwsEBSVolumeReportLine (region.name, "ebs-vol", ebsvolume.id)
rl.furtherInfo (ebsvolume)
mainLogger.info ("Processed details for: %s." % (rl))
reportLines.append (rl)
if len(reportLines) > 0:
bootUp.showTable (reportLines, rl.headings ())
@alexandercthomp
Copy link

To my knowledge reportLines is empty and this need to filled, When it is filled this need to be store in a variable.

after that this variable need to inputted into this section:

def sendEmail (self):

    #r = showTable()
    #sendEmail(r)
    #Email address used.
    fromaddr = '[email protected]'
    DevOpsTream = ['[email protected]', '[email protected]']

    msg = email.mime.Multipart.MIMEMultipart()
    msg['Subject'] = 'Show tags report'
    msg['From'] = fromaddr
    msg['To'] = ",".join(DevOpsTream)
    #msg['To'] = toaddr


    #msg.attach(email.mime.Text.MIMEText())

    # The main body is just another attachment
    #body = showTable()
    #msg.attach(email.mime.Text.MIMEText(body))

that im not sure on how to do :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment