diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2014-02-04 11:59:16 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2014-02-04 12:06:44 +0200 |
commit | 9ab2885b1ab9daef69b231c36f662daae30175b7 (patch) | |
tree | 8cac5f9ca98d95e5e5a30b5af8519e3531575c44 /doc | |
parent | c3feab15f38588dbd677234c17a109c2378308f7 (diff) | |
download | eclat-9ab2885b1ab9daef69b231c36f662daae30175b7.tar.gz eclat-9ab2885b1ab9daef69b231c36f662daae30175b7.tar.bz2 |
New commands: lsaattr and setaattr.
* TODO: Update.
* doc/Makefile.inc: Add new files.
* doc/eclat-lsaattr.1: New file.
* doc/eclat-setaattr.1: New file.
* etc/Makefile.am (FLNFILES): Add new files.
* etc/describe-image-attribute.fln: New file.
* etc/modify-image-attribute.fln: New file.
* src/Makefile.am (eclat_SOURCES,OPTFILES): Add new files.
* src/eclat.c (cmdtab): New commands: lsaattr and setaattr.
* src/eclat.h (eclat_describe_image_attribute)
(eclat_modify_image_attribute,canonattrname): New protos.
* src/lsaattr.c: New file.
* src/lsiattr.c: Use canonattrname to simplify usage.
* src/lssattr.c (canonattrname): Remove. Use external version.
* src/setaattr-cl.opt: New file.
* src/setaattr.c: New file.
* src/setiattr.c: New file.
* src/util.c (canonattrname): New function.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/Makefile.inc | 2 | ||||
-rw-r--r-- | doc/eclat-lsaattr.1 | 72 | ||||
-rw-r--r-- | doc/eclat-setaattr.1 | 109 |
3 files changed, 183 insertions, 0 deletions
diff --git a/doc/Makefile.inc b/doc/Makefile.inc index 6925cc5..f777f59 100644 --- a/doc/Makefile.inc +++ b/doc/Makefile.inc @@ -30,6 +30,7 @@ MANPAGES1=\ eclat-devol.1\ eclat-disasaddr.1\ eclat-lsaddr.1\ + eclat-lsaattr.1\ eclat-lsiattr.1\ eclat-lsimg.1\ eclat-lsinst.1\ @@ -53,6 +54,7 @@ MANPAGES1=\ eclat-rmsg.1\ eclat-rmsnap.1\ eclat-rmtag.1\ + eclat-setaattr.1\ eclat-setiattr.1\ eclat-setsattr.1\ eclat-sg.1\ diff --git a/doc/eclat-lsaattr.1 b/doc/eclat-lsaattr.1 new file mode 100644 index 0000000..f108949 --- /dev/null +++ b/doc/eclat-lsaattr.1 @@ -0,0 +1,72 @@ +.\" This file is part of Eclat -*- nroff -*- +.\" Copyright (C) 2012-2014 Sergey Poznyakoff +.\" +.\" Eclat is free software; you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation; either version 3, or (at your option) +.\" any later version. +.\" +.\" Eclat is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License +.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>. +.TH ECLAT 1 "February 3, 2014" "ECLAT" "Eclat User Reference" +.SH NAME +eclat lsaattr, describe\-image\-attribute \- lists the attribute of an image. +.SH SYNOPSI +\fBeclat lsaattr\fB \fIAMI\-ID\fR [\fIATTR\fR] +.br +\fBeclat lsaattr\fB \fB\-\-help\fR +.SH DESCRIPTION +Thic command outputs the value of the attribute \fIATTR\fR of the AWS +image \fIAMI-ID\fR. The latter is either the image +identifier, or, if ID mapping is enabled (see the section \fBMAPS\fR +in +.BR eclat (1)), +its symbolic name, which will be translated using +the \fBImageId\fR map. +.PP +The \fBATTR\fR must be one of the following (case-insensitive): +.BR description , +.BR blockDeviceMapping , +.BR launchPermission , +.BR productCodes , +.BR kernel , +.BR ramdisk +.BR sriovNetSupport . +.SH "SEE ALSO" +.BR eclat (1), +.BR eclat\-setaattr (1). +.BR eclat\-mkimg (1), +.BR eclat\-mkinst (1). +.SH BUGS +Reportedly, AWS is unable to return +.BR blockDeviceMapping . +Instead it returns an error code saying "Unauthorized attempt to +access restricted resource", even if you supply the right +credentials. This is an AWS bug, not +.BR eclat 's. +.SH AUTHORS +Sergey Poznyakoff +.SH "BUG REPORTS" +Report bugs to <bug\-eclat@gnu.org.ua>. +.SH COPYRIGHT +Copyright \(co 2012, 2013 Sergey Poznyakoff +.br +.na +License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> +.br +.ad +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +.\" Local variables: +.\" eval: (add-hook 'write-file-hooks 'time-stamp) +.\" time-stamp-start: ".TH [A-Z_][A-Z0-9_.\\-]* [0-9] \"" +.\" time-stamp-format: "%:B %:d, %:y" +.\" time-stamp-end: "\"" +.\" time-stamp-line-limit: 20 +.\" end: + diff --git a/doc/eclat-setaattr.1 b/doc/eclat-setaattr.1 new file mode 100644 index 0000000..ba5c91a --- /dev/null +++ b/doc/eclat-setaattr.1 @@ -0,0 +1,109 @@ +.\" This file is part of Eclat -*- nroff -*- +.\" Copyright (C) 2012-2014 Sergey Poznyakoff +.\" +.\" Eclat is free software; you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation; either version 3, or (at your option) +.\" any later version. +.\" +.\" Eclat is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License +.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>. +.TH ECLAT 1 "February 3, 2014" "ECLAT" "Eclat User Reference" +.SH NAME +eclat setaattr, modify-image-attribute \- modify attributes of an image +.SH SYNOPSIS +\fBeclat setaattr\fB \fIAMI\-ID\fR \fBdescription\fR \fIVALUE\fR +.br +\fBeclat setaattr\fB \fIAMI\-ID\fR \fBProductCode\fR \fICODE\fR [\fICODE\fR...] +.br +\fBeclat setaattr\fB \fIAMI\-ID\fR \fBLaunchPermission\fR\ + [\fIOPTION\fR] \fIVALUE\fR [[\fIOPTION\fR] \fIVALUE\fR...] +.br +\fBeclat setaattr\fB \fIAMI\-ID\fR \fBLaunchPermission\fR {\fB\-a\fR|\fB\-d\fR}\ + {\fB\-\-add\fR|\fB\-\-delete\fR} {\fB\-\-group\-name\fR|\fB\-\-user\-id\fR}\ + \fIVALUE\fR +.SH DESCRIPTION +Set or remove attributes of an AWS image. +.PP +Only three attributes can be modified: +.BR description , +.BR ProductCode ", and" +.BR LaunchPermission . +All three names are case-insensitive. +.PP +Setting the description requires a single value (see the first form in +the synopsis). +.PP +The \fBProductCode\fR attribute can be assigned multiple values in the +single invocation (second form in the synopsis). Note, that this +operation is irreversible: after a product code is added to an AMI, it +can't be removed. +.PP +The third form adds or removes AWS accounts to the +\fBLaunchPermission\fR list. It allows for the following options: +.TP +.BR \-a ", " \-\-add +Add the accounts that follow this option. +.TP +.BR \-d ", " \-\-delete +Delete the accounts that follow this option. +.PP +This two options invert each other's effect. The default action is +\fB\-\-add\fR, so the use of the \fB\-\-add\fR option is optional if +it is the only option in the command line. +.TP +.BR \-g ", " \-\-group\-name +Treat the arguments that follow as group names, instead of the account +numbers. According to the AWS documentation, the only valid value +that can be used with this option is \fBall\fR, which means all Amazon +EC2 users. +.TP +.BR \-u ", " \-\-user\-id +Treat the arguments that follow as user (account) IDs. This is the +default. This option is intended to be used after +\fB\-\-group\-name\fR to cancel its effect. +.SH EXAMPLE +.nr step 1 1 +.IP \n[step]. +Add a description : +.PP +.EX +.B eclat setaattr ami-abcde012 description "Database server" +.EE +.IP \n+[step]. +Allow account \fB123456701234\fR to launch instances from +\fBami-abcde012\fR, and revoke that permission from the rest of EC2 users. +.PP +.EX +.B eclat setaattr ami-abcde012 LaunchPermission --add 123456701234 \\\\ +.B --del --group all +.EE +.SH "SEE ALSO" +.BR eclat (1), +.BR eclat\-lsaattr (1). +.SH AUTHORS +Sergey Poznyakoff +.SH "BUG REPORTS" +Report bugs to <bug\-eclat@gnu.org.ua>. +.SH COPYRIGHT +Copyright \(co 2012, 2013 Sergey Poznyakoff +.br +.na +License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> +.br +.ad +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +.\" Local variables: +.\" eval: (add-hook 'write-file-hooks 'time-stamp) +.\" time-stamp-start: ".TH [A-Z_][A-Z0-9_.\\-]* [0-9] \"" +.\" time-stamp-format: "%:B %:d, %:y" +.\" time-stamp-end: "\"" +.\" time-stamp-line-limit: 20 +.\" end: + |