diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-10-07 20:12:34 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-10-07 20:12:34 +0300 |
commit | 1fbcbdb432e945aa3f63be5b9170e94a0c9ef6c3 (patch) | |
tree | 209822ff7ef7766b94a714438473dcf8f12c4e1f /src/asscaddr.c | |
parent | cabb35e68d34bcccaa39a223eaa037b335c81558 (diff) | |
download | eclat-1fbcbdb432e945aa3f63be5b9170e94a0c9ef6c3.tar.gz eclat-1fbcbdb432e945aa3f63be5b9170e94a0c9ef6c3.tar.bz2 |
Implement resource identifier mapping.
Resource identifier mapping permits to use more customized identifiers
instead of the Amazon resource identifiers. For instance, you can use
hostnames instead of the instance IDs, etc.
* lib/Makefile.am: Add new files.
* lib/filemap.c: New file.
* lib/map.c: New file.
* lib/libeclat.h (eclat_map_drv,eclat_map): New structs.
(eclat_map_status): New enum.
(eclat_map_init,eclat_map_lookup,eclat_map_config)
(eclat_map_free,eclat_map_open,eclat_map_close)
(eclat_map_get,eclat_map_strerror,eclat_map_drv_register)
(eclat_map_foreach,eclat_map_free_all)
(eclat_get_string_node): New protos.
(eclat_map_drv_file): New extern.
* src/accfile.c (access_file_lookup): Fix memory leak.
* src/cmdline.opt: New option: --translate (-x)
* src/config.c (eclat_kw) <map>: New block statement.
(config_finish): Parse map configs.
* src/asscaddr.c: Translate key.
* src/dscrinstattr.c: Likewise.
* src/dscrinsts.c: Likewise.
* src/dscrinststat.c: Likewise.
* src/dscrsecgrps.c: Likewise.
* src/getconout.c: Likewise.
* src/startinst.c: Likewise.
* src/eclat.c (main): Initialize maps and free them when no
more needed.
* src/eclat.h (translate_option): New extern.
(translate_ids): New proto.
* src/util.c (translate_option): New variable.
(translate_ids): New function.
Diffstat (limited to 'src/asscaddr.c')
-rw-r--r-- | src/asscaddr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/asscaddr.c b/src/asscaddr.c index a5ba86e..ea4488d 100644 --- a/src/asscaddr.c +++ b/src/asscaddr.c @@ -36,6 +36,7 @@ eclat_associate_address(CURL *curl, int argc, char **argv) q = eclat_query_create(use_ssl ? EC2_QF_HTTPS : 0, endpoint, "/"); eclat_query_add_param(q, "Action", "AssociateAddress"); + translate_ids(1, argv, "InstanceId"); eclat_query_add_param(q, "InstanceId", argv[0]); if (vpc) { eclat_query_add_param(q, "AllocationId", argv[1]); |