aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFiles
2023-10-30Update copyleft datesHEADmasterSergey Poznyakoff57
2021-01-06Update copyright yearsSergey Poznyakoff57
2018-11-17Version 2.0.90Sergey Poznyakoff1
2018-11-17Implement the terminate-instances commandSergey Poznyakoff3
* TODO: Update. * doc/Makefile.inc: Add new files. * doc/eclat-mkinst.1: Mention the terminate command. * doc/eclat-terminate.1: New file. * etc/Makefile.am: Add new files. * etc/terminate-instances.fln: New file. * src/eclat.c (cmdtab): Register new command. * src/eclat.h (eclat_terminate_instances): New proto. * src/startstop.c (eclat_terminate_instances): New function. * tests/Makefile.am: Add new test. * tests/testsuite.at: Likewise. * tests/terminate-instances.at: New test.
2018-03-15Update copyright yearsSergey Poznyakoff55
2018-03-15Upgrade grecsSergey Poznyakoff2
* grecs: pull * configure.ac: Enable json * lib/Makefile.am (AM_CPPFLAGS): Use @GRECS_INCLUDES@ (libeclat_a_SOURCES): Remove json sources. * src/Makefile.am (AM_CPPFLAGS): Use @GRECS_INCLUDES@ * tests/Makefile.am: Likewise. * lib/json.h: Remove. * lib/jsongrm.y: Remove. * lib/jsonlex.l: Remove. * tests/tjson.c: Remove. * src/config.c (eclat_kw): Mark statically initialized memory locations as such. * src/mktags.c (process_tags): Use wordsplit to process quoted arguments. * lib/bidimap.c (bidimap_config): Fill allocated memory with 0's * lib/filemap.c (filemap_config): Likewise. * lib/gdbmmap.c (gdbm_map_config): Likewise. * lib/seqmap.c (seqmap_config): Likewise.
2015-11-19Raise patchlevel number.Sergey Poznyakoff1
* NEWS: Document changes. * configure.ac: Update. * tests/describe-instances.at: sync with the previous commit.
2015-01-22Update copyright years.Sergey Poznyakoff57
2015-01-19Initial support for IAMSergey Poznyakoff3
* NEWS: Update. * doc/eclat.1man: Update. * lib/.gitignore: Update. * lib/Makefile.am (libeclat_a_SOURCES): Add new files. * lib/json.h: New file. * lib/jsongrm.y: New file. * lib/jsonlex.l: New file. * lib/yytrans: New file. * lib/libeclat.h (ec2_query) <token>: New member (eclat_query_create): Change signature. * lib/qcreat.c (eclat_query_create): Take security token as 5th argument. * lib/reqsign.c (querysign2): Add security token. * src/cmdline.opt: Update copyright years * src/ec2map.c (ec2_map_get): Pass security token to eclat_query_create. * src/eclat.c (security_token): New variable. (eclat_do_command): Pass security token to eclat_query_create. (main): Get authentication credentials from the instance store, if not found in the access file. * src/eclat.h (security_token): New extern. (eclat_get_instance_creds): New proto. * src/util.c (eclat_get_instance_zone): Use json parser. (eclat_get_instance_creds): New function. * tests/Makefile.am (noinst_PROGRAMS): add tjson * tests/tjson.c: New file.
2014-12-10Fix coredump when comparing non-existing nodes.Sergey Poznyakoff8
* lib/forlan.c (coerce_value): Handle NULL nodes. (values_equal): Handle NULL strings. (dump_expr): Handle EQ and NE. * lib/forlanlex.l: Fix distinction before negative numeric and identifier. * etc/describe-security-groups.fln: ipProtocol == "-1" means "all". * tests/Makefile.am: Add new tests. * tests/testsuite.at: Likewise. * tests/comp00.at: New file. * tests/comp01.at: New file. * tests/comp02.at: New file. * tests/comp03.at: New file. * tests/comp04.at: New file. * tests/tforlan.c (main): Optionally read XML from standard input.
2014-02-03Update copyright yearsSergey Poznyakoff51
2013-07-31Prepare for Signature Version 4.Sergey Poznyakoff4
* lib/hmac_sha256.c: New file. * lib/sha256.c: New file. * lib/sha256.h: New file. * lib/Makefile.am (libeclat_a_SOURCES): Add new files. * lib/libeclat.h (hmac_sha256): New proto. (eclat_query_signature): Rename to eclat_query_sign, take signature version as argument. (eclat_encode_devmap): Remove prototype. * lib/reqsign.c: Use HMAC256 * src/config.c (eclat_kw): New keyword: signature-version, * src/devmap.c (eclat_encode_devmap): Bugfixes. Translate snapshot ids. * src/eclat.c (signature_version): New variable. * src/eclat.h (signature_version): New proto. (eclat_encode_devmap): New proto. * src/util.c (eclat_send_query): Use eclat_query_sign. * tests/hmac01.at: Update. * tests/hmac02.at: Update. * tests/hmac03.at: Update. * tests/thmac.c: Use HMAC256
2013-01-19Update copyright years.Sergey Poznyakoff50
2013-01-19Use AM_CPPFLAGS instead of the obsolete INCLUDES.Sergey Poznyakoff1
* lib/Makefile.am: Update. * src/Makefile.am: Update. * tests/Makefile.am: Update.
2012-12-15Implement direct and reverse map lookups.Sergey Poznyakoff4
Not all maps support reverse lookups generically (for example, gdbm does not), therefore introduce a new "bidi" (bi-directional) map, which is a compound of two maps, each one used for a particular lookup direction. * lib/Makefile.am (maps): List all maps here. * lib/bidimap.c: New file. Implementation of a bi-directional map. * lib/filemap.c: Update to the changes in API. Implement reverse lookup. * lib/gdbmmap.c: Update to the changes in API. * lib/nullmap.c: Likewise. * lib/seqmap.c: Likewise. * lib/ldapmap.c: Update to the changes in API. Implement reverse lookup. New configuration keywords: reverse-filter, reverse-attr. * lib/libeclat.h (eclat_map_drv) <map_get>: Change signature, take search direction as a new argument. (eclat_map_get): Likewise. (eclat_map) <eclat_map_bad_dir>: New status code. (MAP_DIR, MAP_REV): New macros. (eclat_map_name_split): New function. (eclat_map_drv_bidi): New extern. * lib/map.c (eclat_map_get): Change signature, take search direction as a new argument. Pass new keyword to the "key" translation: "dir". (eclat_map_strerror): Handle new status code. (eclat_map_name_split): New function. * src/eclat.c (main): Register eclat_map_drv_bidi. * src/util.c (translate_ids): Use eclat_map_name_split to obtain direction code from the map name. (translate_resource_ids): Use direct lookups. * tests/Makefile.am: Add new testcases. * tests/testsuite.at: Likewise. * tests/bidimap.at: New testcase. * tests/filemap.at: Test reverse lookups.
2012-12-06Implement describe-availability-zonesSergey Poznyakoff3
* TODO: Update. * doc/Makefile.am: Add new files. * doc/eclat-describe-availability-zones.1: New file. * doc/eclat.1: Mention describe-availability-zones. * src/Makefile.am: Add new files. * src/dscrazs.c: New file. * src/eclat.c: Register the describe-availability-zones command. * src/eclat.h (eclat_describe_availability_zones): New proto. * tests/describe-availability-zones.at: New file. * tests/Makefile.am: Add new file. * tests/testsuite.at: Include new test.
2012-12-05Implement allocate-address command.Sergey Poznyakoff3
* etc/Makefile.am: Add new files. * etc/allocate-address.fln: new file. * src/Makefile.am: Add new files. * src/allocaddr-cl.opt: New file. * src/allocaddr.c: New file. * src/eclat.c (): Add allocate-address. * src/eclat.h (eclat_allocate_address): New command. * tests/Makefile.am: Add new files. * tests/allocate-address.at: New file. * tests/testsuite.at: Include allocate-address.at * TODO: Update. * doc/eclat-create-tags.1: New file. * doc/eclat.1: Update. * doc/eclat-create-tags.1: Minor fix.
2012-10-15Add testcases for snapshot-management commands.Sergey Poznyakoff4
* tests/delete-snapshot.at: New file. * tests/describe-snapshots.at: New file. * tests/Makefile.am: Add new files. * tests/testsuite.at: Likewise.
2012-10-14Improve the sort function.Sergey Poznyakoff6
* grecs: Upgrade. * lib/forlan.c (strtots): New function. (func_sort): Rewrite. The "sort" built-in takes two optional arguments: a path to the node to use as a key, and a string of flags that set the comparison function and sorting order. * lib/forlangrm.y: Bugfix in argument verification code. * src/dscrsnap-cl.opt: Document filters. * tests/sortnum.at: New file. * tests/sortrevnum.at: New file. * tests/sortstring.at: New file. * tests/sortts.at: New file. * tests/Makefile.am: Add new test cases. * tests/testsuite.at: Likewise.
2012-10-14Implement snapshot-management commands.Sergey Poznyakoff3
* TODO: Update. * configure.ac: Update. * doc/eclat.1: Update. * etc/create-snapshot.fln: New file. * etc/delete-snapshot.fln: New file. * etc/describe-snapshots.fln: New file. * etc/Makefile.am: Add new files. * lib/forlan.c (eval_func): Set return type according to that of the called function. (empty,timestamp): New built-in functions. * src/Makefile.am: Add new files. * src/cresnap.c: New file. * src/delsnap.c: New file. * src/dscrsnap-cl.opt: New file. * src/dscrsnap.c: New file. * src/eclat.c: Register new commands. * src/eclat.h: Add new prototypes. * tests/create-snapshot.at: New file. * tests/Makefile.am: Add new file. * tests/testsuite.at: Likewise.
2012-10-12Implement sequence map.Sergey Poznyakoff3
* doc/eclat.conf.5: Document sequence maps. * lib/Makefile.am: Add new files. * lib/libeclat.h (eclat_map_drv_seq): New extern. * lib/seqmap.c: New file. * src/eclat.c: Minor fixes. * tests/Makefile.am: Add new testcase. * tests/testsuite.at: Likewise. * tests/seqmap.at: New file.
2012-10-11Trivial fixes.Sergey Poznyakoff2
2012-10-10Improve map support.Sergey Poznyakoff8
* doc/eclat.conf.5: Document the null map. * lib/nullmap.c: New file. * lib/Makefile.am: Add new files. * lib/gdbmmap.c (gdbm_map_open): Fix gdbm_open arguments. Report a detailed error description if it fails. * lib/libeclat.h (eclat_map_drv_null): New extern. * src/eclat.c (main): Register the null map. * tests/.gitignore: Update. * tests/Makefile.am: Add new files. * tests/filemap.at: New file. * tests/gdbmload.c: New file. * tests/gdbmmap.at: New file. * tests/nullmap.at: New file. * tests/atlocal.in (GDBMLOAD): New variable. * tests/testsuite.at: Include new files.
2012-10-04Implement eq/ne comparisons in forlan; Implement describe-security-groups ↵Sergey Poznyakoff3
command. * etc/Makefile.am: Add new file. * etc/describe-security-groups.fln: New file. * lib/forlan.c: Implement equality and inequality comparisons. * lib/forlan.h (forlan_opcode_eq) (forlan_opcode_ne): New opcodes. (FORLAN_NTYPES): New constants. * lib/forlangrm.y: Add equality and inequality productions. * lib/forlanlex.l: New tokens: == and != * src/dscrsecgrps-cl.opt: New file. * src/dscrsecgrps.c: New file. * src/Makefile.am: Add new files. * src/eclat.c: Implement describe-security-groups * src/eclat.h (eclat_describe_security_groups): New proto. * src/cretags.c: Fix memory leaks. * src/deltags.c: Likewise. * src/dscrtags.c: Likewise. * tests/describe-security-groups.at: New test case. * tests/testsuite.at: Include new test case. * tests/Makefile.am: Add new test case.
2012-10-02Implement describe-instance-attributeSergey Poznyakoff3
* etc/describe-instance-attribute.fln: New file. * etc/Makefile.am: Add new file. * src/dscrinstattr.c: New file. * src/Makefile.am: Add new file. * src/eclat.c: New command describe-instance-attribute. * src/eclat.h: New proto. * tests/describe-instance-attribute.at: New test case. * tests/Makefile.am: Add new file. * tests/testsuite.at: Likewise.
2012-10-01Implement exit; add some docs.Sergey Poznyakoff5
* Makefile.am (SUBDIRS): Add doc. * configure.ac: Build doc/Makefile * doc/Makefile.am: New file. * doc/eclat-associate-address.1: New file. * doc/eclat.1: New file. * etc/associate-address.fln: Call exit if the request fails. * etc/default.fln: Call exit if error is returned or if the response is not recognized. * lib/forlan.c (forlan_eval_env) <exit_code>: New member. New built-in function: exit. (forlan_run): Return exit code. * lib/forlan.h (forlan_run): Change return type. * lib/forlanlex.l: Treat unquoted decimal number as a quoted string. * src/asscaddr-cl.opt: Minor changes. * src/cmdline.opt: Minor changes. * src/eclat.c: Return EX_NOPERM on unsufficient permissions to open the configuration file. * tests/exit.at: New file. * tests/Makefile.am: Add new files. * tests/testsuite.at: Include new test cases. * tests/tforlan.c: Propagate the return from forlan_run to the shell.
2012-10-01Implement get-console-output command.Sergey Poznyakoff5
* etc/Makefile.am: Add new files. * etc/get-console-output.fln: New file. * lib/forlan.c: New built-in function "decode". * lib/forlangrm.y: Fix grammar to allow functions to return any data type, not only node. * src/Makefile.am (eclat_SOURCES): Add new files. * src/eclat.c: Register get-console-output command. * src/eclat.h (eclat_get_console_output): New proto. * src/getconout.c: New file. * tests/Makefile.am: Add new files. * tests/testsuite.at: Include new files. * tests/decode.at: New test case. * tests/get-console-output.at: New test case. * tests/last.at: Minor change.
2012-09-30Implement the describe-volumes command.Sergey Poznyakoff3
* etc/Makefile.am (FLNFILES): Add describe-volumes.fln (install-formats): New rule. * etc/describe-volumes.fln: New file. * src/Makefile.am (eclat_SOURCES): Add dscrvols.c (AM_LDFLAGS): Remove. (LDADD): Add $(CURL_LIBS) * src/accfile.c (get_access_creds): Minor changes. * src/cmdline.opt: New option --format-expression. * src/dscrinsts.c: Minor change. * src/dscrvols.c: New file. * src/eclat.c: New command "describe-volumes". * src/eclat.h (eclat_describe_volumes): New proto. * tests/describe-volumes.at: New file. * tests/Makefile.am: Add new file. * tests/testsuite.at: Include new file.
2012-09-29Implement describe-addresses; improve assign-address (vpc functionality)Sergey Poznyakoff3
* etc/Makefile.am: Add new files. * etc/describe-addresses.fln * src/Makefile.am: Add new files. * src/asscaddr-cl.opt: New file. * src/asscaddr.c: Handle VPC addresses. * src/dscraddrs-cl.opt: New file. * src/dscraddrs.c: New file. * src/eclat.c: Add new commands. * src/eclat.h: Update. * tests/Makefile.am: Add new test suites. * tests/testsuite.at: Likewise. * tests/describe-addresses.at: New file.
2012-09-28Initial implementation of associate/dissociate address requests.Sergey Poznyakoff3
* etc/Makefile.am: Add new files. * etc/associate-address.fln: New file. * etc/disassociate-address.fln: New file. * lib/forlan.c (eval_expr): Fix boolean NOT. * src/Makefile.am: Add new files. * src/asscaddr.c: New file. * src/dscrtags.c (eclat_describe_tags): Remove unused variables. * src/eclat.c (cmdtab): Register new commands. * src/eclat.h (eclat_associate_address) (eclat_disassociate_address): New commands. * src/util.c: Add AWSAccessKeyId param in eclat_send_query instead of in describe_query_create. * tests/Makefile.am: Add new files. * tests/testsuite.at: Include new test cases. * tests/associate-address.at: New test case.
2012-09-28Improve testsuite. Reorganize directory structure.Sergey Poznyakoff10
* Makefile.am (SUBDIRS): Add etc (distuninstallcheck_listfiles): Ignore *.forlan files. * configure.ac: New options --split-format and --format-dir * etc/Makefile.am: New file. * etc/default.fln: New file. * etc/describe-instance-status.fln: New file. * etc/describe-instances.fln: New file. * etc/describe-tags.fln: New file. * etc/eclat.cfin: New file. * etc/flncat.c: New file. * etc/start-instances.fln: New file. * etc/stop-instances.fln: New file. * src/Makefile.am: Remove eclat.conf. It is built in /etc now. * src/eclat.conf: Remove. * src/cmdline.opt: Update. * src/config.c: New configuration statement "format-file". * src/eclat.c (format_file_option): New global. (main): Read format from format-file, if supplied. Expand keywords in its argument. * src/eclat.h (format_file_option): New extern. * tests/.gitignore: Update. * tests/Makefile.am: Add new files. * tests/describe-instance-status.at: New test case. * tests/describe-instances.at: New test case. * tests/describe-tags.at: New test case. * tests/dscrinststat.at: New test case. * tests/start-instances.at: New test case. * tests/stop-instances.at: New test case. * tests/testsuite.at (ECLAT_TEST_FORMAT): New macro. Include new test cases. * tests/trws.c: New file.
2012-09-25Use forlan to format the output.Sergey Poznyakoff1
* lib/forlan.h (forlan_lex_begin): Remove (forlan_lex_from_buffer) (forlan_lex_from_file): New protos. (forlan_parse): Remove. (forlan_parse_bufferm,forlan_parse_file): New protos. * lib/forlangrm.y (forlan_parse): Remove. (forlan_parse_bufferm,forlan_parse_file): New functions. * lib/forlanlex.l (YY_INPUT): Optionally, read input from file. (forlan_lex_begin): Remove (forlan_lex_from_buffer) (forlan_lex_from_file): New functions. * src/cmdline.opt: New options: --format, --sort * src/config.c: New statement: format. * src/eclat.c: Use output format scripts, if provided. * src/eclat.conf: Define output format for DescribeTags. * src/eclat.h: Include forlan.h (define_format): New proto. * tests/tforlan.c: New option: -s
2012-09-25Implement variables and loops in forlan.Sergey Poznyakoff14
* lib/forlan.c (free_type_comp): Free labels and argv. (dump_comp): Rewrite. (eval_node_finder): Remove. (eval_comp): Rewrite. (eval_comp0): New function. (free_type_loop, dump_loop, eval_loop) (dump_continue, eval_continue) (dump_break, eval_break) (dump_stop, eval_stop): New methods. (f_tab): Add new methods. * lib/forlan.h (forlan_node_comp): Change structure. * lib/forlangrm.y: Implement loops. * tests/Makefile.am: Add new tests. * tests/testsuite.at: Likewise. * tests/forlan01.at: Update. * tests/tforlan.c: New option -s (sort tree). * tests/dump01.at: New file. * tests/dump02.at: New file. * tests/last.at: New file. * tests/let.at: New file. * tests/listall.at: New file. * tests/print01.at: New file. * tests/print02.at: New file. * tests/print03.at: New file. * tests/tags.xml: New file. * tests/tagshairy.at: New file.
2012-09-24Implement loops and variablesSergey Poznyakoff1
* lib/forlan.c: Implement loops and variables. * lib/forlangrm.y: Likewise. * lib/forlanlex.l: Likewise. * lib/forlan.h (forlan_parse): Change return type. (forlan_type): New types. (forlan_dump_tree): Change signature. (forlan_value_type) <forlan_value_boolean>: New type. * tests/tforlan.c: Update.
2012-09-22Introduce forlan functions.Sergey Poznyakoff1
* lib/forlan.c (forlan_find_function): New function. (func_dump, func_print) (func_error,func_parent): Function placeholders. * lib/forlan.h (forlan_node_func) <fp>: Change datatype. (forlan_eval_env_t): New typedef. (forlan_value_type): New enum. (forlan_value,forlan_function): New struct. * lib/forlangrm.y: Check number of arguments passed to functions. * tests/forlan01.at: Update.
2012-09-22Introduce output formatting languageSergey Poznyakoff5
* configure.ac: Check for lex and yacc. * lib/diag.c: New file (moved from ../src with edits) * lib/forlan.c: New file. * lib/forlan.h: New file. * lib/forlangrm.y: New file. * lib/forlanlex.l: New file. * lib/.gitignore: Add new files. * lib/Makefile.am: Add new file. * lib/libeclat.h: Add diagnostics-related stuff. * src/Makefile.am (eclat_SOURCES): Remove diag.c * src/cmdline.opt (set_program_name): Move to ../lib/diag.c * src/diag.c: Remove (see above). * src/config.c: Reflect changes to the diagnostics subsystem. * src/eclat.c: Likewise. * src/eclat.h: Remove diagnostics-related stuff. It lives in libeclat.h from now on. * src/error.c: Remove. * tests/forlan01.at: New testcase. * tests/testsuite.at: Include forlan01.at * tests/tforlan.c: New file. * tests/.gitignore: Add new files. * tests/Makefile.am: Add new files.
2012-09-20Parse returned XML into a grecs tree structure.Sergey Poznyakoff5
* lib/xmltree.c: New file. * lib/Makefile.am: Add new file. * lib/libeclat.h: Include expat.h and grecs.h (eclat_partial_tree_t): New typedef. (eclat_partial_tree_create,eclat_partial_tree_destroy) (eclat_partial_tree_finish,eclat_partial_tree_data_handler) (eclat_partial_tree_start_handler) (eclat_partial_tree_end_handler): New protos. * src/eclat.c (main): Initialize XML parser with eclat_partial_tree handlers and bind it to the CURL output handler. * tests/.gitignore: Add txml * tests/Makefile.am (TESTSUITE_AT): Add xml01.at Build txml * tests/testsuite.at: Include xml01.at * tests/txml.c: New file. * tests/xml01.at: New file.
2012-09-19Initial commitSergey Poznyakoff10

Return to:

Send suggestions and report system problems to the System administrator.