resolve issue with passed volume ids failing to parse, modify tag input to work with aws cli tool, use --output text to parse text instead of json when parsing output of aws cli commands

This commit is contained in:
Colin Johnson
2014-03-02 18:47:30 +00:00
parent b9e4240646
commit eca59ba434
3 changed files with 22 additions and 22 deletions

View File

@@ -1,4 +1,4 @@
ec2ab_exec=/Temp/aws-missing-tools/ec2-automate-backup/ec2-automate-backup.sh
ec2ab_exec=/Temp/aws-missing-tools/ec2-automate-backup/ec2-automate-backup-awscli.sh
#create two volumes
volume_1=`ec2-create-volume --size 2 GB --availability-zone us-east-1a`
volume_2=`ec2-create-volume --size 2 GB --availability-zone us-east-1a`
@@ -9,6 +9,8 @@ volume_2_id=`echo "$volume_2" | cut -f 2`
ec2-create-tags $volume_1_id --tag Backup=true
#test backing up only volume with tag Backup=true
$ec2ab_exec -s tag -t Backup=true
# if testing ec2-automate-backup-awscli.sh
# $ec2ab_exec -s tag -t Backup,Values=true
#expected result - snapshot only taken of volume_1
#
#test backing up only EBS volume with IDs "x" and "y"