aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFiles
2023-10-30Update copyleft datesHEADmasterSergey Poznyakoff33
2022-04-05BugfixSergey Poznyakoff1
* lib/getyn.c (eclat_vgetyn): Use va_copy to reuse the va_list argument.
2021-01-06Update copyright yearsSergey Poznyakoff33
2018-12-15Implement ModifyVolume and DescribeVolumesModificationsSergey Poznyakoff1
2018-03-15Update copyright yearsSergey Poznyakoff16
2018-03-15Minor fixesSergey Poznyakoff5
2018-03-15Upgrade grecsSergey Poznyakoff15
* 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.
2018-03-14Implement exponential backoff with jitter to handle RequestLimitExceededSergey Poznyakoff5
* src/eclat.h (eclat_command_env) <curl>: Remove. <xmltree>: New field. * src/util.c (translate_ids): Close the map when no longer needed (eclat_send_request): Implement exponential backoff. * src/ec2map.c: Reflect the above changes. * src/eclat.c: Likewise. * lib/libeclat.h (eclat_request_dup): New proto. * lib/reqcreat.c (eclat_request_dup): New function. * src/config.c: New configuration statements: max-retry-interval and retry-timeout.
2015-11-19Implement subnet commandsSergey Poznyakoff1
New commands: mksubnet, rmsubnet, lssubnet, setsubnetattr. * TODO: Update. * lib/libeclat.h (EC2_API_VERSION): Update. * src/Makefile.am: Add subnet.c. * src/subnet.c: New file. * src/eclat.c (cmdtab): Register new commands. * src/eclat.h: Add new prototypes.
2015-02-02New options: --check-permissions and --add-parameterSergey Poznyakoff5
* NEWS: Update. * doc/eclat-stop.1: Update. * doc/eclat.1man: Update. * etc/default.fln: Special handling for DryRunOperation and UnauthorizedOperation codes. * lib/paramlist.c: New file. * lib/Makefile.am (libeclat_a_SOURCES): Add paramlist.c * lib/forlan.c: New function dequote. * lib/libeclat.h (eclat_request_add_param0) (ec2_param_free, ec2_param_list_create) (ec2_param_list_append) (eclat_request_add_param_list): New protos. * lib/reqcreat.c (ec2_param_free): Remove static qualifier. * src/stop-cl.opt: New file. * src/Makefile.am (OPTFILES): Add stop-cl.opt * src/cmdline.opt: New options: --check-permissions and --add-parameter. * src/eclat.c (extra_param): New global. (find_format): print error message if no such format is found. * src/startstop.c (eclat_stop_instance): Use parse_stop_options
2015-01-23Implement HTTP POSTSergey Poznyakoff4
* NEWS: Update. * doc/eclat.conf.5: Document http-method. Reorganize description of endpoints and regions. * lib/libeclat.h (ec2_request) <postdata>: New member (eclat_request_finalize): New proto. * lib/req2url.c (eclat_request_to_url): Remove second argument. All uses changed. (eclat_request_finalize): New function. * lib/reqfree.c: Free postdata. * lib/reqsign.c (requestsign4): Implement post. * src/config.c: New configuration statement http-method. * src/eclat.c (use_post): New variable. * src/eclat.h (use_post): New extern. * src/util.c (eclat_send_request): Implement post.
2015-01-23Namespace fixup: use "request" consistentlySergey Poznyakoff8
2015-01-22Update copyright years.Sergey Poznyakoff29
2015-01-22authentication-provider instance-store does not require role name argumentSergey Poznyakoff4
* NEWS: Update. * doc/eclat.conf.5: Update. * lib/Makefile.am: Add new sources. * lib/istore.c: New file. * lib/path.c: New file. * lib/libeclat.h (path_concat) (instance_store_curl_new) (instance_store_read): New protos. * src/config.c (cb_authentication_provider): second argument is optional for instance-store type. New compound statement: instance-store. * src/eclat.h (instance_store_base_url) (instance_store_port,instance_store_document_path): (instance_store_credentials_path): New externs. * src/ispeek.c: Rewrite using new functions. * src/util.c: Likewise.
2015-01-21Add ispeek.Sergey Poznyakoff3
* src/ispeek.c: New file. * src/ispeek-cl.opt: New file * src/Makefile.am: Add ispeek * src/io.c (dump, eclat_trace_fun): Moved to the library. (eclat_io_setup): Use eclat_set_curl_trace. * NEWS: Document ispeek. * doc/Makefile.inc: Add ispeek.1 * doc/eclat.1man: Mention ispeek(1) in the "see also" section. * doc/eclat.conf.5: Update. * doc/ispeek.1: New file. * lib/Makefile.am (libeclat_a_SOURCES): Add trace.c * lib/libeclat.h (eclat_trace_fun) (eclat_set_curl_trace): New proto. * lib/trace.c: New file.
2015-01-19Minor improvementSergey Poznyakoff1
* lib/reqsign.c (querysign4): Pass credentials in HTTP headers, instead of parameters.
2015-01-19Implement IAM in request signing v.4Sergey Poznyakoff1
* lib/reqsign.c (querysign4): Add X-Amz-Security-Token param.
2015-01-19BugfixSergey Poznyakoff1
* lib/reqsign.c (eclat_hex_encode): add terminating zero
2015-01-19Initial support for IAMSergey Poznyakoff9
* 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 Poznyakoff2
* 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-07-10Improvements to signature version 4 implementationSergey Poznyakoff2
* lib/qaddparm.c (eclat_query_add_header): Remove leading and trailing whitespace. * lib/reqsign.c (querysign4): Add all custom headers to signed headers. Abort if EC2_QF_POST flag is set (not implemented yet).
2014-07-09Implement signature version 4 signing processSergey Poznyakoff6
* lib/libeclat.h (ec2_param) <encoded>: New member. (ec2_query) <signature>: Remove. <headers,region,access_key>: New members (eclat_query_create): Take two more arguments. All uses changed. (eclat_query_add_param_encoded) (eclat_query_add_header): New functions. * lib/q2url.c (eclat_query_to_url): Don't create Signature param: it is already in the param list (for v2 process). * lib/qaddparm.c (eclat_query_add_param_encoded): New function. (eclat_query_add_header): New function. * lib/qcreat.c (eclat_query_create): Take region and access key as additional parameters. * lib/qencode.c (encode_param): Skip parameters that have encoded set to true. * lib/reqsign.c (querysign2): Store access key in AWSAccessKeyId and the generated signature in the Signature parameters. (eclat_hex_encode): New function. (querysign4): Implement signature version 4 signing process. * src/ec2map.c: Update call to eclat_query_create. * src/eclat.c: Likewise. * src/util.c (eclat_send_query): Sign the query and add requested headers prior to sending. * doc/eclat.conf.5: Document signature-version. * NEWS: Likewise.
2014-02-03Update copyright yearsSergey Poznyakoff29
2013-11-28Do not depend on alignof.hSergey Poznyakoff1
2013-11-17BigfixSergey Poznyakoff1
* lib/ldapmap.c (ldap_map_open): Return if unable to open map.
2013-07-31Prepare for Signature Version 4.Sergey Poznyakoff6
* 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-07-05Further fixes in eclat_encode_devmapSergey Poznyakoff2
* lib/envmap.c: Rename to ... * src/devmap.c (eclat_encode_devmap): Translate snapshot identifiers. Fix check for the number of parts in device specification. * lib/Makefile.am: Update. * src/Makefile.am: Update.
2013-07-05BugfixSergey Poznyakoff1
* lib/envmap.c (eclat_encode_devmap): Fix recognition of optional parts.
2013-05-21Various minor fixes.Sergey Poznyakoff7
* 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) <locus>: New member. * lib/map.c (eclat_map_config): Warn if attempting to redeclare an existing map. * src/ec2map.c (ec2_map_get): Minor change.
2013-04-23Implement copy-image and copy-snapshot.Sergey Poznyakoff1
* TODO: Update. * lib/libeclat.h (EC2_API_VERSION): Update. * src/Makefile.am: Add new file. * src/cpimg-cl.opt: New file. * src/cpimg.c: New file. * src/cpsnap-cl.opt: New file. * src/cpsnap.c: New file. * src/eclat.c (cmdtab): Add new commands. * src/eclat.h (eclat_copy_image) (eclat_copy_snapshot): New protos. * etc/copy-snapshot.fln: New file. * etc/copy-image.fln: New file. * etc/Makefile.am (FLNFILES): Add copy-image.fln
2013-04-05Implement create-image and deregister-image.Sergey Poznyakoff3
* TODO: Update. * etc/create-image.fln: New file. * etc/deregister-image.fln: New file. * etc/Makefile.am (FLNFILES): Add new files. * lib/envmap.c: New file. * lib/Makefile.am (libeclat_a_SOURCES): Add new files. * lib/libeclat.h (eclat_encode_devmap): New proto. * src/creimg-cl.opt: New file. * src/creimg.c: New file. * src/drgimg.c: New file. * src/Makefile.am: Add new files. * src/dscrimgs-cl.opt: Change short option to -u for consistency with other commands. * src/eclat.c: New commands create-image and deregister-image. * src/eclat.h (eclat_create_image) (eclat_deregister_image): New prototypes. * src/runinsts.c (encode_devmap): Move to the library.
2013-02-15Implement DescribeImages and RunInstances.Sergey Poznyakoff4
* TODO: Update. * etc/describe-images.fln: New file. * etc/run-instances.fln: New file. * etc/Makefile.am: Add new files. * lib/q2url.c (add_param): Accept NULL values. * lib/qaddparm.c (eclat_query_add_param): Likewise. * lib/qencode.c (encode_param): Likewise. * lib/reqsign.c (eclat_query_signature): Likewise. * src/dscrimgs-cl.opt: New file. * src/dscrimgs.c: New file. * src/runinsts-cl.opt: New file. * src/runinsts.c: New file. * src/Makefile.am: Add new files. * src/eclat.c (cmdtab): Register new commands. * src/eclat.h (eclat_run_instances) (eclat_describe_images): New protos.
2013-01-19Update copyright years.Sergey Poznyakoff27
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 map lookup functions in forlan.Sergey Poznyakoff2
* lib/forlan.c: New functions "has_map" and "lookup". * lib/map.c (eclat_map_open): Don't issue error message if failed to open the map. Leave that to the caller. * src/util.c (translate_ids) (translate_resource_ids): Issue an error message if eclat_map_open fails.
2012-12-15Implement direct and reverse map lookups.Sergey Poznyakoff9
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-07Re-implement confirmation support.Sergey Poznyakoff4
* doc/eclat-delete-volume.1: Update. * doc/eclat-release-address.1: Update. * doc/eclat.1: Update. * doc/eclat.conf.5: New section "CONFIRMATION" * lib/getyn.c (eclat_vgetyn): Negative default stands for no default at all. * lib/confirm.c (eclat_confirm_mode): Remove. (eclat_confirm): Change signature. Act according to the first argument. * lib/libeclat.h (eclat_confirm_mode): New enum. (eclat_confirm): Change signature. * src/cmdline.opt: Change handling of -Y and -N options. * src/config.c: New statement "confirm". * src/cretags.c: Remove call to eclat_confirm. This is done by the caller. * src/delvol.c: Likewise. * src/reladdr.c: Likewise. * src/eclat.c (confirm_mode): New variable. (command) <flags>: New member. (cmdtab): Mark commands with appropriate flags. (main): Call eclat_confirm to confirm the command. * src/eclat.h (confirm_mode): New extern. (set_command_confirmation): New proto. * etc/eclat.cfin: Set a reasonably safe confirmation default. * lib/forlan.c (strtots): Remove unused variable.
2012-12-05Implement release-address.Sergey Poznyakoff4
* TODO: Update. * doc/Makefile.am: Add new files. * doc/eclat-allocate-address.1: New file. * doc/eclat-release-address.1: New file. * doc/eclat-associate-address.1: Update. * doc/eclat-describe-addresses.1: Update. * doc/eclat-disassociate-address.1: Update. * doc/eclat.1: Update. * etc/Makefile.am: Add new files. * etc/release-address.fln: New file. * lib/Makefile.am: Add new files. * lib/confirm.c: New file. * lib/getyn.c: New file. * lib/libeclat.h (eclat_getyn,eclat_vgetyn) (eclat_confirm): New protos. (eclat_confirm_mode): New extern. * src/Makefile.am: Add new files. * src/cmdline.opt: New options -Y (--yes) and -N (--no). * src/eclat.c: Register the release-address command. * src/eclat.h (EX_CANCELLED): New constant. (eclat_release_address): New proto. * src/reladdr-cl.opt: New file. * src/reladdr.c: New file.
2012-10-14Improve the sort function.Sergey Poznyakoff2
* 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 Poznyakoff1
* 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 Poznyakoff11
2012-10-10Improve map support.Sergey Poznyakoff4
* 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-09Improve the docs.Sergey Poznyakoff4
* doc/eclat.conf.5: New file. * doc/Makefile.am: Add new file. * doc/eclat.1: Update. * lib/expand.c (eclat_expand_kw): New macro: login. * lib/filemap.c: Add the "key" statement. * lib/gdbmmap.c: Likewise. * lib/ldapmap.c: Likewise. (ldap_map_open): Always expand binddn.
2012-10-08Remove spurious code.Sergey Poznyakoff1
2012-10-08Improve configuration syntax help.Sergey Poznyakoff5
* grecs: Upgrade. * lib/filemap.c: Revamp configuration routine. Provide configuration syntax help. * lib/gdbmmap.c: Likewamp. * lib/ldapmap.c: Provide configuration syntax help. * lib/libeclat.h (eclat_map_drv) <map_confhelp>: New member. (eclat_map_confhelp): New proto. * lib/map.c (eclat_map_confhelp): New function. * src/config.c (config_help): Call eclat_map_confhelp.
2012-10-08Improve LDAP map.Sergey Poznyakoff6
* lib/expand.c: New file. * lib/getans.c: New file. * lib/Makefile.am: Add new files. * lib/ldapmap.c (ldap_map) <passfile,prompt>: New members. (ldapmap_kw) <passfile,prompt>: New keywords. (ldap_map_open): Prompt for undefined credentials if the "prompt" statement is set to true. (ldap_map_get): Use eclat_expand_kw to expand the filter. * lib/libeclat.h (eclat_trimnl,eclat_getans) (eclat_expand_kw): New protos. * lib/map.c (eclat_map_get): Use eclat_expand_kw. * src/eclat.c (read_format): Likewise.
2012-10-08Minor fixes.Sergey Poznyakoff2
* lib/diag.c (parse_debug_level): Allow for category specifications without level (100 is assumed). * lib/ldapmap.c (ldap_map_config): Error checking. (ldap_map_free): Free all allocated memory. (parse_ldap_uri): Cleanup.
2012-10-08Implement LDAP backend.Sergey Poznyakoff3
* configure.ac: Check for openldap. * lib/Makefile.am (maps) [COND_LDAP]: Add ldapmap.c * lib/ldapmap.c: New file. * lib/libeclat.h (eclat_map_drv_ldap): New extern. * src/eclat.c (main) [WITH_LDAP]: Register eclat_map_drv_ldap.
2012-10-07Implement GDBM map backend.Sergey Poznyakoff3
* README: Document --with-gdbm * configure.ac: Detect libgdbm. New option --with-gdbm. * lib/gdbmmap.c * lib/Makefile.am (maps) [COND_GDBM]: Add new file. * lib/libeclat.h (eclat_map_drv_gdbm): New extern. * src/Makefile.am (LDADD): Add MAPLIBS. * src/eclat.c (mail) [WITH_GDBM]: Register eclat_map_drv_gdbm.

Return to:

Send suggestions and report system problems to the System administrator.