diff options
-rw-r--r-- | NEWS | 20 | ||||
-rw-r--r-- | doc/eclat-stop.1 | 8 | ||||
-rw-r--r-- | doc/eclat.1man | 10 | ||||
-rw-r--r-- | etc/default.fln | 9 | ||||
-rw-r--r-- | lib/Makefile.am | 1 | ||||
-rw-r--r-- | lib/forlan.c | 17 | ||||
-rw-r--r-- | lib/libeclat.h | 9 | ||||
-rw-r--r-- | lib/paramlist.c | 57 | ||||
-rw-r--r-- | lib/reqcreat.c | 2 | ||||
-rw-r--r-- | src/Makefile.am | 3 | ||||
-rw-r--r-- | src/cmdline.opt | 16 | ||||
-rw-r--r-- | src/eclat.c | 8 | ||||
-rw-r--r-- | src/startstop.c | 12 | ||||
-rw-r--r-- | src/stop-cl.opt | 33 |
14 files changed, 192 insertions, 13 deletions
@@ -1,7 +1,7 @@ | |||
1 | Eclat NEWS -- history of user-visible changes. 2015-01-23 | 1 | Eclat NEWS -- history of user-visible changes. 2015-02-02 |
2 | Copyright (C) 2012-2015 Sergey Poznyakoff | 2 | Copyright (C) 2012-2015 Sergey Poznyakoff |
3 | See the end of file for copying conditions. | 3 | See the end of file for copying conditions. |
4 | 4 | ||
5 | Please send Eclat bug reports to <gray+eclat@gnu.org.ua> | 5 | Please send Eclat bug reports to <gray+eclat@gnu.org.ua> |
6 | 6 | ||
7 | 7 | ||
@@ -9,12 +9,30 @@ Version 1.0.92, (Git) | |||
9 | 9 | ||
10 | * New commands: | 10 | * New commands: |
11 | 11 | ||
12 | lsaattr describe-image-attribute | 12 | lsaattr describe-image-attribute |
13 | setaattr modify-image-attribute | 13 | setaattr modify-image-attribute |
14 | 14 | ||
15 | * New options: | ||
16 | |||
17 | -A, --add-parameter=NAME=VALUE | ||
18 | |||
19 | Adds parameter NAME with the given VALUE to the generated AWS request. | ||
20 | This option is intended for testing new AWS functionality for which | ||
21 | eclat does not yet provide native support. | ||
22 | |||
23 | -p, --check-permissions | ||
24 | |||
25 | Checks if you have the required permissions for the action, without | ||
26 | actually making the request. | ||
27 | |||
28 | * forcibly stop the instance | ||
29 | |||
30 | eclat stop now supports -f (--force) option, which stops the instance | ||
31 | forcibly. | ||
32 | |||
15 | * Implement signature version 4 signing | 33 | * Implement signature version 4 signing |
16 | 34 | ||
17 | The signature version 4 signing process is now the default. Version | 35 | The signature version 4 signing process is now the default. Version |
18 | 2 can enabled by using the following statement in the eclat | 36 | 2 can enabled by using the following statement in the eclat |
19 | configuration file: | 37 | configuration file: |
20 | 38 | ||
diff --git a/doc/eclat-stop.1 b/doc/eclat-stop.1 index 5adbe61..a8f61a8 100644 --- a/doc/eclat-stop.1 +++ b/doc/eclat-stop.1 | |||
@@ -10,23 +10,27 @@ | |||
10 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | .\" GNU General Public License for more details. | 12 | .\" GNU General Public License for more details. |
13 | .\" | 13 | .\" |
14 | .\" You should have received a copy of the GNU General Public License | 14 | .\" You should have received a copy of the GNU General Public License |
15 | .\" along with Eclat. If not, see <http://www.gnu.org/licenses/>. | 15 | .\" along with Eclat. If not, see <http://www.gnu.org/licenses/>. |
16 | .TH ECLAT-STOP 1 "January 26, 2015" "ECLAT" "Eclat User Reference" | 16 | .TH ECLAT-STOP 1 "February 2, 2015" "ECLAT" "Eclat User Reference" |
17 | .SH NAME | 17 | .SH NAME |
18 | eclat-stop, eclat-stop-instances \- stop EC2 instances | 18 | eclat-stop, eclat-stop-instances \- stop EC2 instances |
19 | .SH SYNOPSIS | 19 | .SH SYNOPSIS |
20 | \fBeclat stop\fR \fIID\fR [\fIID\fR...] | 20 | \fBeclat stop\fR [\fB\-f\fR] [\fB\-\-force\fR] \fIID\fR [\fIID\fR...] |
21 | .PP | 21 | .PP |
22 | \fBeclat stop\fR \fB\-\-help\fR | 22 | \fBeclat stop\fR \fB\-\-help\fR |
23 | .SH DESCRIPTION | 23 | .SH DESCRIPTION |
24 | The command | 24 | The command |
25 | .B stop | 25 | .B stop |
26 | stops running Amazon EBS-backed instances. | 26 | stops running Amazon EBS-backed instances. |
27 | .SH OPTIONS | ||
28 | .TP | ||
29 | \fB\-f\fR, \fB\-\-force\fR | ||
30 | Forcibly stop the instance. | ||
27 | .SH OUTPUT | 31 | .SH OUTPUT |
28 | The default output format lists on each line the instance ID, its | 32 | The default output format lists on each line the instance ID, its |
29 | previous and current states, separated by single horizontal tab | 33 | previous and current states, separated by single horizontal tab |
30 | characters. | 34 | characters. |
31 | .SH "SEE ALSO" | 35 | .SH "SEE ALSO" |
32 | .BR eclat (1), | 36 | .BR eclat (1), |
diff --git a/doc/eclat.1man b/doc/eclat.1man index 50cc3e2..829bec6 100644 --- a/doc/eclat.1man +++ b/doc/eclat.1man | |||
@@ -10,13 +10,13 @@ | |||
10 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | .\" GNU General Public License for more details. | 12 | .\" GNU General Public License for more details. |
13 | .\" | 13 | .\" |
14 | .\" You should have received a copy of the GNU General Public License | 14 | .\" You should have received a copy of the GNU General Public License |
15 | .\" along with Eclat. If not, see <http://www.gnu.org/licenses/>. | 15 | .\" along with Eclat. If not, see <http://www.gnu.org/licenses/>. |
16 | .TH ECLAT 1 "January 21, 2015" "ECLAT" "Eclat User Reference" | 16 | .TH ECLAT 1 "February 2, 2015" "ECLAT" "Eclat User Reference" |
17 | .SH NAME | 17 | .SH NAME |
18 | eclat \- EC2 Command Line Administrator Tool | 18 | eclat \- EC2 Command Line Administrator Tool |
19 | .SH SYNOPSIS | 19 | .SH SYNOPSIS |
20 | .B eclat | 20 | .B eclat |
21 | [\fIOPTIONS\fR] | 21 | [\fIOPTIONS\fR] |
22 | .B command | 22 | .B command |
@@ -463,12 +463,20 @@ Set debugging level. | |||
463 | .TP | 463 | .TP |
464 | \fB\-\-dump\-grammar\-trace\fR | 464 | \fB\-\-dump\-grammar\-trace\fR |
465 | Dump configuration grammar traces. | 465 | Dump configuration grammar traces. |
466 | .TP | 466 | .TP |
467 | \fB\-\-dump\-lex\-trace\fR | 467 | \fB\-\-dump\-lex\-trace\fR |
468 | Dump lexical analyzer traces. | 468 | Dump lexical analyzer traces. |
469 | .TP | ||
470 | \fB\-p\fR, \fB\-\-check\-permissions\fR | ||
471 | Check if you have the required permissions for the action, without | ||
472 | actually making the request. This is equivalent to | ||
473 | \fB\-\-add\-parameter=DryRun=true\fR. | ||
474 | .TP | ||
475 | \fB\-A\fR, \fB\-\-add\-parameter=\fINAME\fB=\fIVALUE\fR | ||
476 | Add parameter to the AWS request. | ||
469 | .SS Help and additional information | 477 | .SS Help and additional information |
470 | .TP | 478 | .TP |
471 | \fB\-\-config\-help | 479 | \fB\-\-config\-help |
472 | Show configuration file summary. | 480 | Show configuration file summary. |
473 | .TP | 481 | .TP |
474 | \fB\-V\fR, \fB\-\-version\fR | 482 | \fB\-V\fR, \fB\-\-version\fR |
diff --git a/etc/default.fln b/etc/default.fln index 178af18..d3da5eb 100644 --- a/etc/default.fln +++ b/etc/default.fln | |||
@@ -12,13 +12,20 @@ | |||
12 | GNU General Public License for more details. | 12 | GNU General Public License for more details. |
13 | 13 | ||
14 | You should have received a copy of the GNU General Public License | 14 | You should have received a copy of the GNU General Public License |
15 | along with Eclat. If not, see <http://www.gnu.org/licenses/>. */ | 15 | along with Eclat. If not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 | ||
17 | if (.Response.Errors) { | 17 | if (.Response.Errors) { |
18 | error("Error: ",.Response.Errors.Error.Message,"\n"); | 18 | if (.Response.Errors.Error.Code[DryRunOperation]) { |
19 | print(dequote(.Response.Errors.Error.Message),"\n"); | ||
20 | } else if (.Response.Errors.Error.Code[UnauthorizedOperation]) { | ||
21 | error(dequote(.Response.Errors.Error.Message),"\n"); | ||
19 | exit(1); | 22 | exit(1); |
20 | } else { | 23 | } else { |
24 | error("Error: ",dequote(.Response.Errors.Error.Message),"\n"); | ||
25 | exit(1); | ||
26 | } | ||
27 | } else { | ||
21 | error("Unrecognized response:\n"); | 28 | error("Unrecognized response:\n"); |
22 | dump(.); | 29 | dump(.); |
23 | exit(2); | 30 | exit(2); |
24 | } | 31 | } |
diff --git a/lib/Makefile.am b/lib/Makefile.am index 5cfa67a..711bc98 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am | |||
@@ -50,12 +50,13 @@ libeclat_a_SOURCES=\ | |||
50 | getans.c\ | 50 | getans.c\ |
51 | getyn.c\ | 51 | getyn.c\ |
52 | hmac_sha1.c\ | 52 | hmac_sha1.c\ |
53 | hmac_sha256.c\ | 53 | hmac_sha256.c\ |
54 | libeclat.h\ | 54 | libeclat.h\ |
55 | map.c\ | 55 | map.c\ |
56 | paramlist.c\ | ||
56 | path.c\ | 57 | path.c\ |
57 | req2url.c\ | 58 | req2url.c\ |
58 | reqaddparm.c\ | 59 | reqaddparm.c\ |
59 | reqcreat.c\ | 60 | reqcreat.c\ |
60 | reqencode.c\ | 61 | reqencode.c\ |
61 | reqfree.c\ | 62 | reqfree.c\ |
diff --git a/lib/forlan.c b/lib/forlan.c index 2275bc7..977271d 100644 --- a/lib/forlan.c +++ b/lib/forlan.c | |||
@@ -1046,12 +1046,28 @@ func_decode(forlan_eval_env_t env, struct grecs_list *list) | |||
1046 | grecs_txtacc_grow_char(acc, 0); | 1046 | grecs_txtacc_grow_char(acc, 0); |
1047 | env->retval.v.string = grecs_txtacc_finish(acc, 1); | 1047 | env->retval.v.string = grecs_txtacc_finish(acc, 1); |
1048 | grecs_txtacc_free(acc); | 1048 | grecs_txtacc_free(acc); |
1049 | } | 1049 | } |
1050 | 1050 | ||
1051 | static void | 1051 | static void |
1052 | func_dequote(forlan_eval_env_t env, struct grecs_list *list) | ||
1053 | { | ||
1054 | struct forlan_value *val = list->head->data; | ||
1055 | char *s = val->v.string; | ||
1056 | size_t l = strlen(s); | ||
1057 | |||
1058 | if (l >= 2 && s[0] == '"' && s[l-1] == '"') { | ||
1059 | s++; | ||
1060 | l -= 2; | ||
1061 | } | ||
1062 | env->retval.v.string = grecs_malloc(l + 1); | ||
1063 | memcpy(env->retval.v.string, s, l); | ||
1064 | env->retval.v.string[l] = 0; | ||
1065 | } | ||
1066 | |||
1067 | static void | ||
1052 | func_exit(forlan_eval_env_t env, struct grecs_list *list) | 1068 | func_exit(forlan_eval_env_t env, struct grecs_list *list) |
1053 | { | 1069 | { |
1054 | struct forlan_value *val = list->head->data; | 1070 | struct forlan_value *val = list->head->data; |
1055 | unsigned long code; | 1071 | unsigned long code; |
1056 | char *p; | 1072 | char *p; |
1057 | 1073 | ||
@@ -1124,12 +1140,13 @@ static struct forlan_function functab[] = { | |||
1124 | { "dump", forlan_value_void, "n", 1, 1, func_dump }, | 1140 | { "dump", forlan_value_void, "n", 1, 1, func_dump }, |
1125 | { "print", forlan_value_void, "", 1, -1, func_print }, | 1141 | { "print", forlan_value_void, "", 1, -1, func_print }, |
1126 | { "error", forlan_value_void, "", 1, -1, |