diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-12-19 22:54:20 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-12-19 23:03:45 +0200 |
commit | 8d43103165e7e2f16c10d0592e5a51d86dac01ed (patch) | |
tree | c479c34f16e8a1d989fb95af462e47c318565cd8 | |
parent | 2a69cacdfe3f43c61c65ea4359c821236b7f141c (diff) | |
download | eclat-8d43103165e7e2f16c10d0592e5a51d86dac01ed.tar.gz eclat-8d43103165e7e2f16c10d0592e5a51d86dac01ed.tar.bz2 |
Implement security group creation and deletion.
* doc/eclat-lssg.1: New file.
* doc/eclat-sg.1: New file.
* doc/Makefile.inc: Add new files.
* etc/create-security-group.fln: New file.
* etc/delete-security-group.fln: New file.
* etc/Makefile.am: Add new files.
* src/mksg-cl.opt: New file.
* src/mksg.c: New file.
* src/rmsg-cl.opt: New file.
* src/rmsg.c: New file.
* src/sg.h: New file.
* src/Makefile.am: Add new files.
* src/eclat.c (cmdtab): New commands "mksg" and
"rmsg".
* src/eclat.h (eclat_create_security_group)
(eclat_delete_security_group): New protos.
* src/lssg.c: Include sg.h. Use groupkw instead of the
static rt[], which is removed.
* src/sg-cl.opt: Use groupkw
* src/sg.c (groupkw): New global.
* TODO: Update.
-rw-r--r-- | TODO | 4 | ||||
-rw-r--r-- | doc/Makefile.inc | 38 | ||||
-rw-r--r-- | doc/eclat-lssg.1 | 8 | ||||
-rw-r--r-- | doc/eclat-sg.1 | 6 | ||||
-rw-r--r-- | etc/Makefile.am | 2 | ||||
-rw-r--r-- | etc/create-security-group.fln | 23 | ||||
-rw-r--r-- | etc/delete-security-group.fln | 22 | ||||
-rw-r--r-- | src/Makefile.am | 5 | ||||
-rw-r--r-- | src/eclat.c | 4 | ||||
-rw-r--r-- | src/eclat.h | 6 | ||||
-rw-r--r-- | src/lssg.c | 12 | ||||
-rw-r--r-- | src/mksg-cl.opt | 34 | ||||
-rw-r--r-- | src/mksg.c | 38 | ||||
-rw-r--r-- | src/rmsg-cl.opt | 35 | ||||
-rw-r--r-- | src/rmsg.c | 36 | ||||
-rw-r--r-- | src/sg-cl.opt | 10 | ||||
-rw-r--r-- | src/sg.c | 11 | ||||
-rw-r--r-- | src/sg.h | 9 |
18 files changed, 256 insertions, 47 deletions
@@ -41,7 +41,7 @@ CreatePlacementGroup - [ ] [ ] | |||
41 | CreateReservedInstancesListing - [ ] [ ] | 41 | CreateReservedInstancesListing - [ ] [ ] |
42 | CreateRoute - [ ] [ ] | 42 | CreateRoute - [ ] [ ] |
43 | CreateRouteTable - [ ] [ ] | 43 | CreateRouteTable - [ ] [ ] |
44 | CreateSecurityGroup - [ ] [ ] | 44 | CreateSecurityGroup mksg [X] [X] |
45 | CreateSnapshot mksnap [X] [X] | 45 | CreateSnapshot mksnap [X] [X] |
46 | CreateSpotDatafeedSubscription - [ ] [ ] | 46 | CreateSpotDatafeedSubscription - [ ] [ ] |
47 | CreateSubnet - [ ] [ ] | 47 | CreateSubnet - [ ] [ ] |
@@ -61,7 +61,7 @@ DeleteNetworkInterface - [ ] [ ] | |||
61 | DeletePlacementGroup - [ ] [ ] | 61 | DeletePlacementGroup - [ ] [ ] |
62 | DeleteRoute - [ ] [ ] | 62 | DeleteRoute - [ ] [ ] |
63 | DeleteRouteTable - [ ] [ ] | 63 | DeleteRouteTable - [ ] [ ] |
64 | DeleteSecurityGroup - [ ] [ ] | 64 | DeleteSecurityGroup rmsg [X] [X] |
65 | DeleteSnapshot rmsnap [X] [X] | 65 | DeleteSnapshot rmsnap [X] [X] |
66 | DeleteSpotDatafeedSubscription - [ ] [ ] | 66 | DeleteSpotDatafeedSubscription - [ ] [ ] |
67 | DeleteSubnet - [ ] [ ] | 67 | DeleteSubnet - [ ] [ ] |
diff --git a/doc/Makefile.inc b/doc/Makefile.inc index 4c10f82..0fa843f 100644 --- a/doc/Makefile.inc +++ b/doc/Makefile.inc | |||
@@ -20,42 +20,44 @@ | |||
20 | 20 | ||
21 | MANPAGES1=\ | 21 | MANPAGES1=\ |
22 | eclat.1\ | 22 | eclat.1\ |
23 | eclat-mkaddr.1\ | ||
24 | eclat-assocaddr.1\ | 23 | eclat-assocaddr.1\ |
25 | eclat-atvol.1\ | 24 | eclat-atvol.1\ |
26 | eclat-clrsattr.1\ | 25 | eclat-clrsattr.1\ |
26 | eclat-conmesg.1\ | ||
27 | eclat-cpimg.1\ | 27 | eclat-cpimg.1\ |
28 | eclat-cpsnap.1\ | 28 | eclat-cpsnap.1\ |
29 | eclat-mkinst.1\ | ||
30 | eclat-mkimg.1\ | ||
31 | eclat-mksnap.1\ | ||
32 | eclat-mktag.1\ | ||
33 | eclat-mkvol.1\ | ||
34 | eclat-rmsnap.1\ | ||
35 | eclat-rmtag.1\ | ||
36 | eclat-deimg.1\ | 29 | eclat-deimg.1\ |
30 | eclat-devol.1\ | ||
31 | eclat-disasaddr.1\ | ||
37 | eclat-lsaddr.1\ | 32 | eclat-lsaddr.1\ |
38 | eclat-lszon.1\ | ||
39 | eclat-lsimg.1\ | ||
40 | eclat-lsiattr.1\ | 33 | eclat-lsiattr.1\ |
41 | eclat-lsistat.1\ | 34 | eclat-lsimg.1\ |
42 | eclat-lsinst.1\ | 35 | eclat-lsinst.1\ |
36 | eclat-lsistat.1\ | ||
43 | eclat-lsreg.1\ | 37 | eclat-lsreg.1\ |
44 | eclat-lssg.1\ | ||
45 | eclat-lssattr.1\ | 38 | eclat-lssattr.1\ |
39 | eclat-lssg.1\ | ||
46 | eclat-lssnap.1\ | 40 | eclat-lssnap.1\ |
47 | eclat-lstag.1\ | 41 | eclat-lstag.1\ |
48 | eclat-lsvol.1\ | 42 | eclat-lsvol.1\ |
49 | eclat-devol.1\ | 43 | eclat-lszon.1\ |
50 | eclat-disasaddr.1\ | 44 | eclat-mkaddr.1\ |
45 | eclat-mkimg.1\ | ||
46 | eclat-mkinst.1\ | ||
47 | eclat-mksg.1\ | ||
48 | eclat-mksnap.1\ | ||
49 | eclat-mktag.1\ | ||
50 | eclat-mkvol.1\ | ||
51 | eclat-reboot.1\ | ||
52 | eclat-rmaddr.1\ | ||
53 | eclat-rmsg.1\ | ||
54 | eclat-rmsnap.1\ | ||
55 | eclat-rmtag.1\ | ||
51 | eclat-setiattr.1\ | 56 | eclat-setiattr.1\ |
52 | eclat-setsattr.1\ | 57 | eclat-setsattr.1\ |
53 | eclat-sg.1\ | 58 | eclat-sg.1\ |
54 | eclat-conmesg.1\ | ||
55 | eclat-start.1\ | 59 | eclat-start.1\ |
56 | eclat-stop.1\ | 60 | eclat-stop.1 |
57 | eclat-reboot.1\ | ||
58 | eclat-rmaddr.1 | ||
59 | 61 | ||
60 | MANPAGES5=\ | 62 | MANPAGES5=\ |
61 | eclat.conf.5 | 63 | eclat.conf.5 |
diff --git a/doc/eclat-lssg.1 b/doc/eclat-lssg.1 index 69c31c9..50ce425 100644 --- a/doc/eclat-lssg.1 +++ b/doc/eclat-lssg.1 | |||
@@ -13,13 +13,13 @@ | |||
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 LSSEC 1 "December 16, 2013" "ECLAT" "Eclat User Reference" | 16 | .TH LSSEC 1 "December 19, 2013" "ECLAT" "Eclat User Reference" |
17 | .SH NAME | 17 | .SH NAME |
18 | eclat lssg, describe\-security\-groups \- return information about security groups | 18 | eclat lssg, describe\-security\-groups \- return information about security groups |
19 | .SH SYNOPSIS | 19 | .SH SYNOPSIS |
20 | \fBeclat lssg\fR [\fB\-n\fR] [\fB\-\-name\fR]\ | 20 | \fBeclat lssg\fR [\fB\-n\fR] [\fB\-\-name\fR]\ |
21 | [\fIFILTER\fR...] [\fIID\fR] | 21 | [\fIFILTER\fR...] [\fIID\fR] |
22 | 22 | .br | |
23 | \fBeclat lssg\fR \fB\-\-help\fR | 23 | \fBeclat lssg\fR \fB\-\-help\fR |
24 | .SH DESCRIPTION | 24 | .SH DESCRIPTION |
25 | This command returns information about security groups. By default, | 25 | This command returns information about security groups. By default, |
@@ -109,7 +109,9 @@ Outgoing: | |||
109 | .EE | 109 | .EE |
110 | .SH "SEE ALSO" | 110 | .SH "SEE ALSO" |
111 | .BR eclat (1), | 111 | .BR eclat (1), |
112 | .BR eclat\-sg (1). | 112 | .BR eclat\-sg (1), |
113 | .BR eclat\-mksg (1), | ||
114 | .BR eclat\-rmsg (1). | ||
113 | .SH AUTHORS | 115 | .SH AUTHORS |
114 | Sergey Poznyakoff | 116 | Sergey Poznyakoff |
115 | .SH "BUG REPORTS" | 117 | .SH "BUG REPORTS" |
diff --git a/doc/eclat-sg.1 b/doc/eclat-sg.1 index 6e9e708..7dcac0f 100644 --- a/doc/eclat-sg.1 +++ b/doc/eclat-sg.1 | |||
@@ -13,7 +13,7 @@ | |||
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 SG 1 "December 17, 2013" "ECLAT" "Eclat User Reference" | 16 | .TH SG 1 "December 19, 2013" "ECLAT" "Eclat User Reference" |
17 | .SH NAME | 17 | .SH NAME |
18 | eclat sg \- manipulate security groups | 18 | eclat sg \- manipulate security groups |
19 | .SH SYNOPSIS | 19 | .SH SYNOPSIS |
@@ -130,7 +130,9 @@ Give a terse help summary. | |||
130 | List command line syntax and available options. | 130 | List command line syntax and available options. |
131 | .SH "SEE ALSO" | 131 | .SH "SEE ALSO" |
132 | .BR eclat (1), | 132 | .BR eclat (1), |
133 | .BR eclat\-lssg (1). | 133 | .BR eclat\-lssg (1), |
134 | .BR eclat\-mksg (1), | ||
135 | .BR eclat\-rmsg (1). | ||
134 | .SH AUTHORS | 136 | .SH AUTHORS |
135 | Sergey Poznyakoff | 137 | Sergey Poznyakoff |
136 | .SH "BUG REPORTS" | 138 | .SH "BUG REPORTS" |
diff --git a/etc/Makefile.am b/etc/Makefile.am index caa780c..c62369b 100644 --- a/etc/Makefile.am +++ b/etc/Makefile.am | |||
@@ -23,9 +23,11 @@ FLNFILES=\ | |||
23 | copy-image.fln\ | 23 | copy-image.fln\ |
24 | copy-snapshot.fln\ | 24 | copy-snapshot.fln\ |
25 | create-image.fln\ | 25 | create-image.fln\ |
26 | create-security-group.fln\ | ||
26 | create-snapshot.fln\ | 27 | create-snapshot.fln\ |
27 | create-tags.fln\ | 28 | create-tags.fln\ |
28 | create-volume.fln\ | 29 | create-volume.fln\ |
30 | delete-security-group.fln\ | ||
29 | delete-snapshot.fln\ | 31 | delete-snapshot.fln\ |
30 | delete-tags.fln\ | 32 | delete-tags.fln\ |
31 | delete-volume.fln\ | 33 | delete-volume.fln\ |
diff --git a/etc/create-security-group.fln b/etc/create-security-group.fln new file mode 100644 index 0000000..06d021d --- /dev/null +++ b/etc/create-security-group.fln | |||
@@ -0,0 +1,23 @@ | |||
1 | /* This file is part of Eclat. | ||
2 | Copyright (C) 2012, 2013 Sergey Poznyakoff. | ||
3 | |||
4 | Eclat is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation; either version 3, or (at your option) | ||
7 | any later version. | ||
8 | |||
9 | Eclat is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
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/>. */ | ||
16 | |||
17 | if (.CreateSecurityGroupResponse.return) { | ||
18 | if (!.CreateSecurityGroupResponse.return[true]) { | ||
19 | print("Return: ",.CreateSecurityGroupResponse.return,"\n"); | ||
20 | exit(1); | ||
21 | } else | ||
22 | print(.CreateSecurityGroupResponse.groupId,"\n"); | ||
23 | } | ||
diff --git a/etc/delete-security-group.fln b/etc/delete-security-group.fln new file mode 100644 index 0000000..ca1c611 --- /dev/null +++ b/etc/delete-security-group.fln | |||
@@ -0,0 +1,22 @@ | |||
1 | /* This file is part of Eclat. | ||
2 | Copyright (C) 2012, 2013 Sergey Poznyakoff. | ||
3 | |||
4 | Eclat is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||