From f5f9ad5a144999f7c788119cc21d967734ae0dba Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Tue, 21 May 2013 11:32:27 +0300 Subject: Various minor fixes. * doc/eclat.conf.5: Document EC2 maps. * etc/eclat.cfin: Provide default maps. * lib/Makefile.am (AM_LFLAGS): Remove -v. * lib/bidimap.c (cb_submap): Remove unused variable. * lib/forlan.c: Minor change. * lib/forlangrm.y: Declare prototype for yylex. * lib/forlanlex.l: Add option nounput * lib/libeclat.h (eclat_map) : New member. * lib/map.c (eclat_map_config): Warn if attempting to redeclare an existing map. * src/ec2map.c (ec2_map_get): Minor change. --- etc/eclat.cfin | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'etc') diff --git a/etc/eclat.cfin b/etc/eclat.cfin index 755187a..dc49368 100644 --- a/etc/eclat.cfin +++ b/etc/eclat.cfin @@ -31,3 +31,42 @@ format-file "FORMATDIR/FORMATNAME.forlan"; # Ask for confirmation before running a destructive command. confirm tty destructive; +# ##################################################################### +# Sample resource maps. +# +# These maps use the Describe* EC2 requests to translate symbolic +# resource names to the corresponding IDs. The resource name should be +# stored in the Name tag of the corresponding resource. +# ##################################################################### + +map "InstanceId" { + type ec2; + action DescribeInstances; + arguments ("Filter.1.Name=tag:Name", "Filter.1.Value.1=${key}"); + return ".DescribeInstancesResponse.reservationSet.item.instancesSet.item.instanceId"; +} + +map "ImageId" { + type ec2; + action DescribeImages; + arguments ("Owner.1=self", + "Filter.1.Name=tag:Name", + "Filter.1.Value.1=${key}"); + return ".DescribeImagesResponse.imagesSet.item.imageId"; +} + +map "VolumeId" { + type ec2; + action DescribeVolumes; + arguments ("Filter.1.Name=tag:Name", "Filter.1.Value.1=${key}"); + return ".DescribeVolumesResponse.volumeSet.item.volumeId"; +} + +map "SnapshotId" { + type ec2; + action DescribeSnapshots; + arguments ("Owner.1=self", + "Filter.1.Name=tag:Name", + "Filter.1.Value.1=${key}"); + return ".DescribeSnapshotsResponse.snapshotSet.snapshotId"; +} -- cgit v1.2.1