diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-04-26 17:18:53 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-04-26 17:48:21 +0300 |
commit | 699ba6cd496d8401959a0581a1d49c448d3f3c7c (patch) | |
tree | e576553ef6531cdf7b1f9b375036f9dd28f2332d /src/mktags-cl.opt | |
parent | af02bbe4ab84ddd6a5ec8da3bab0fa360e8bded2 (diff) | |
download | eclat-699ba6cd496d8401959a0581a1d49c448d3f3c7c.tar.gz eclat-699ba6cd496d8401959a0581a1d49c448d3f3c7c.tar.bz2 |
Improve ID mapping.
* doc/eclat.conf.5: Update.
* src/cmdline.opt: New option --no-translate (-X)
* src/config.c (eclat_kw): New statement: translate.
* src/eclat.c (main): override the value of translation_enabled
from the command line.
* src/eclat.h (translate_option): Rename to translation_enabled.
All uses changed.
(MAP_IMAGE,MAP_INSTANCE)
(MAP_GROUPID,MAP_GROUPNAME)
(MAP_SNAPSHOT,MAP_VOLUME)
(MAP_AZ,MAP_REG): New defines, to use instead of literal
map names. All sources updated accordingly.
* src/util.c (translate_option): Rename to translation_enabled.
(translate_ids): It is not an error if the name is not found in
the map. Use it as the resource ID in that case.
Diffstat (limited to 'src/mktags-cl.opt')
-rw-r--r-- | src/mktags-cl.opt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mktags-cl.opt b/src/mktags-cl.opt index e622db8..58111e3 100644 --- a/src/mktags-cl.opt +++ b/src/mktags-cl.opt | |||
@@ -45,7 +45,7 @@ OPTION(instance,i,[<ID>], | |||
45 | [<instance ID>]) | 45 | [<instance ID>]) |
46 | BEGIN | 46 | BEGIN |
47 | struct resource *res = grecs_malloc(sizeof(*res)); | 47 | struct resource *res = grecs_malloc(sizeof(*res)); |
48 | res->map = "InstanceId"; | 48 | res->map = MAP_INSTANCE; |
49 | res->resid = optarg; | 49 | res->resid = optarg; |
50 | grecs_list_append(reslist, res); | 50 | grecs_list_append(reslist, res); |
51 | END | 51 | END |
@@ -54,7 +54,7 @@ OPTION(volume,v,[<ID>], | |||
54 | [<volume ID>]) | 54 | [<volume ID>]) |
55 | BEGIN | 55 | BEGIN |
56 | struct resource *res = grecs_malloc(sizeof(*res)); | 56 | struct resource *res = grecs_malloc(sizeof(*res)); |
57 | res->map = "VolumeId"; | 57 | res->map = MAP_VOLUME; |
58 | res->resid = optarg; | 58 | res->resid = optarg; |
59 | grecs_list_append(reslist, res); | 59 | grecs_list_append(reslist, res); |
60 | END | 60 | END |
@@ -63,7 +63,7 @@ OPTION(ami,a,[<ID>], | |||
63 | [<AMI ID>]) | 63 | [<AMI ID>]) |
64 | BEGIN | 64 | BEGIN |
65 | struct resource *res = grecs_malloc(sizeof(*res)); | 65 | struct resource *res = grecs_malloc(sizeof(*res)); |
66 | res->map = "ImageId"; | 66 | res->map = MAP_IMAGE; |
67 | res->resid = optarg; | 67 | res->resid = optarg; |
68 | grecs_list_append(reslist, res); | 68 | grecs_list_append(reslist, res); |
69 | END | 69 | END |
@@ -72,7 +72,7 @@ OPTION(snapshot,s,[<ID>], | |||
72 | [<snapshot ID>]) | 72 | [<snapshot ID>]) |
73 | BEGIN | 73 | BEGIN |
74 | struct resource *res = grecs_malloc(sizeof(*res)); | 74 | struct resource *res = grecs_malloc(sizeof(*res)); |
75 | res->map = "SnapshotId"; | 75 | res->map = MAP_SNAPSHOT; |
76 | res->resid = optarg; | 76 | res->resid = optarg; |
77 | grecs_list_append(reslist, res); | 77 | grecs_list_append(reslist, res); |
78 | END | 78 | END |