diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-05-04 23:01:13 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-05-04 23:09:30 +0300 |
commit | 9ead52193e7edb563ec58ef1a15ee9291b418c8e (patch) | |
tree | 4990815b2bc4fc93c2d0ef72d1038ffaf32f9a83 /src/eclat.h | |
parent | e59f4da93d617eab8a5c0f85681aed1351011a03 (diff) | |
download | eclat-9ead52193e7edb563ec58ef1a15ee9291b418c8e.tar.gz eclat-9ead52193e7edb563ec58ef1a15ee9291b418c8e.tar.bz2 |
Implement EC2 map.
EC2 map allows to use AWS services as eclap maps. For example,
one may use an EC2 tag to map resource names to resource IDs, etc.
* src/ec2map.c: New file.
* src/io.c: New file.
* src/Makefile.am (eclat_SOURCES): Add new files.
* src/eclat.c (dump,eclat_trace_fun)
(dumpxml,write_callback): Move to io.c
(main): Register ec2 map.
Use eclat_io framework.
* src/eclat.h (eclat_io): New struct.
(eclat_io_init, eclat_io_free)
(eclat_io_shutdown, eclat_io_finish): New functions.
(eclat_map_drv_ec2): New extern.
Diffstat (limited to 'src/eclat.h')
-rw-r--r-- | src/eclat.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/eclat.h b/src/eclat.h index 72691ca..3ece7fd 100644 --- a/src/eclat.h +++ b/src/eclat.h @@ -87,7 +87,19 @@ struct eclat_command { struct eclat_command *find_command_name(const char *name); int eclat_do_command(eclat_command_env_t *env, struct eclat_command *command, int argc, char **argv); + +struct eclat_io { + XML_Parser parser; + eclat_partial_tree_t part; + CURL *curl; +}; + +struct eclat_io *eclat_io_init(int errfatal); +void eclat_io_free(struct eclat_io *io); +void eclat_io_shutdown(struct eclat_io *io); +struct grecs_node *eclat_io_finish(struct eclat_io *io); + int eclat_start_instance(eclat_command_env_t *env, int argc, char **argv); int eclat_stop_instance(eclat_command_env_t *env, int argc, char **argv); int eclat_reboot_instance(eclat_command_env_t *env, int argc, char **argv); @@ -196,3 +208,4 @@ extern struct grecs_proginfo *generic_proginfo; void set_command_confirmation(const char *name, enum eclat_confirm_mode cfmode, grecs_locus_t *locus); +extern struct eclat_map_drv eclat_map_drv_ec2; |