summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2013-04-20 07:39:19 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2013-04-20 07:39:19 (GMT)
commit67dce06bb26798e2b11ee0883bdc7e08d7edb663 (patch) (side-by-side diff)
tree3f3655179dded2bbdd16c411d3f0558fe4515bf9
parent347387193da605922ed98742dbc7fa3f67a908f4 (diff)
downloadeclat-67dce06bb26798e2b11ee0883bdc7e08d7edb663.tar.gz
eclat-67dce06bb26798e2b11ee0883bdc7e08d7edb663.tar.bz2
Major rewrite. Provide short names for each command.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--doc/Makefile.am58
-rw-r--r--doc/eclat-allocaddr.1 (renamed from doc/eclat-allocate-address.1)14
-rw-r--r--doc/eclat-assocaddr.1 (renamed from doc/eclat-associate-address.1)22
-rw-r--r--doc/eclat-atvol.1 (renamed from doc/eclat-attach-volume.1)20
-rw-r--r--doc/eclat-conmesg.1 (renamed from doc/eclat-get-console-output.1)10
-rw-r--r--doc/eclat-deimg.1 (renamed from doc/eclat-deregister-image.1)16
-rw-r--r--doc/eclat-devol.1 (renamed from doc/eclat-detach-volume.1)20
-rw-r--r--doc/eclat-disasaddr.1 (renamed from doc/eclat-disassociate-address.1)14
-rw-r--r--doc/eclat-freeaddr.1 (renamed from doc/eclat-release-address.1)22
-rw-r--r--doc/eclat-lsaddr.1 (renamed from doc/eclat-describe-addresses.1)18
-rw-r--r--doc/eclat-lsiattr.1 (renamed from doc/eclat-describe-instance-attribute.1)14
-rw-r--r--doc/eclat-lsimg.1 (renamed from doc/eclat-describe-images.1)12
-rw-r--r--doc/eclat-lsinst.1 (renamed from doc/eclat-describe-instances.1)16
-rw-r--r--doc/eclat-lsistat.1 (renamed from doc/eclat-describe-instance-status.1)14
-rw-r--r--doc/eclat-lsreg.1 (renamed from doc/eclat-describe-regions.1)10
-rw-r--r--doc/eclat-lssattr.1 (renamed from doc/eclat-describe-snapshot-attribute.1)18
-rw-r--r--doc/eclat-lssg.1 (renamed from doc/eclat-describe-security-groups.1)8
-rw-r--r--doc/eclat-lssnap.1 (renamed from doc/eclat-describe-snapshots.1)12
-rw-r--r--doc/eclat-lstag.1 (renamed from doc/eclat-describe-tags.1)16
-rw-r--r--doc/eclat-lsvol.1 (renamed from doc/eclat-describe-volumes.1)10
-rw-r--r--doc/eclat-mkimg.1 (renamed from doc/eclat-create-image.1)12
-rw-r--r--doc/eclat-mksnap.1 (renamed from doc/eclat-create-snapshot.1)14
-rw-r--r--doc/eclat-mktag.1 (renamed from doc/eclat-create-tags.1)24
-rw-r--r--doc/eclat-mkvol.1 (renamed from doc/eclat-create-volume.1)18
-rw-r--r--doc/eclat-reboot.1 (renamed from doc/eclat-reboot-instances.1)14
-rw-r--r--doc/eclat-rmsnap.1 (renamed from doc/eclat-delete-snapshot.1)12
-rw-r--r--doc/eclat-rmtag.1 (renamed from doc/eclat-delete-tags.1)14
-rw-r--r--doc/eclat-rmvol.1 (renamed from doc/eclat-delete-volume.1)16
-rw-r--r--doc/eclat-setiattr.1 (renamed from doc/eclat-modify-instance-attribute.1)14
-rw-r--r--doc/eclat-start.1 (renamed from doc/eclat-start-instances.1)14
-rw-r--r--doc/eclat-stop.1 (renamed from doc/eclat-stop-instances.1)14
-rw-r--r--doc/eclat.1164
-rw-r--r--doc/eclat.conf.512
-rw-r--r--doc/lszon.1 (renamed from doc/eclat-describe-availability-zones.1)2
-rw-r--r--src/Makefile.am76
-rw-r--r--src/atvol.c (renamed from src/attvol.c)0
-rw-r--r--src/cmdline.opt7
-rw-r--r--src/deimg.c (renamed from src/drgimg.c)0
-rw-r--r--src/devol.c (renamed from src/detvol.c)0
-rw-r--r--src/disasaddr-cl.opt (renamed from src/disassaddr-cl.opt)0
-rw-r--r--src/disasaddr.c (renamed from src/disassaddr.c)2
-rw-r--r--src/eclat.c235
-rw-r--r--src/eclat.h12
-rw-r--r--src/freeaddr-cl.opt (renamed from src/reladdr-cl.opt)0
-rw-r--r--src/freeaddr.c (renamed from src/reladdr.c)2
-rw-r--r--src/lsaddr-cl.opt (renamed from src/dscraddrs-cl.opt)0
-rw-r--r--src/lsaddr.c (renamed from src/dscraddrs.c)2
-rw-r--r--src/lsiattr.c (renamed from src/dscrinstattr.c)0
-rw-r--r--src/lsimg-cl.opt (renamed from src/dscrimgs-cl.opt)0
-rw-r--r--src/lsimg.c (renamed from src/dscrimgs.c)2
-rw-r--r--src/lsinst.c (renamed from src/dscrinsts.c)0
-rw-r--r--src/lsistat-cl.opt (renamed from src/dscrinststat-cl.opt)0
-rw-r--r--src/lsistat.c (renamed from src/dscrinststat.c)2
-rw-r--r--src/lsreg.c (renamed from src/dscrregs.c)0
-rw-r--r--src/lssattr.c (renamed from src/dscrsnapattr.c)0
-rw-r--r--src/lssg-cl.opt (renamed from src/dscrsecgrps-cl.opt)0
-rw-r--r--src/lssg.c (renamed from src/dscrsecgrps.c)2
-rw-r--r--src/lssnap-cl.opt (renamed from src/dscrsnap-cl.opt)0
-rw-r--r--src/lssnap.c (renamed from src/dscrsnap.c)2
-rw-r--r--src/lstag-cl.opt (renamed from src/dscrtags-cl.opt)0
-rw-r--r--src/lstag.c (renamed from src/dscrtags.c)2
-rw-r--r--src/lsvol.c (renamed from src/dscrvols.c)0
-rw-r--r--src/lszon.c (renamed from src/dscrazs.c)0
-rw-r--r--src/mkimg-cl.opt (renamed from src/creimg-cl.opt)0
-rw-r--r--src/mkimg.c (renamed from src/creimg.c)2
-rw-r--r--src/mkinst-cl.opt (renamed from src/runinsts-cl.opt)0
-rw-r--r--src/mkinst.c (renamed from src/runinsts.c)2
-rw-r--r--src/mksnap.c (renamed from src/cresnap.c)0
-rw-r--r--src/mktags-cl.opt (renamed from src/cretags-cl.opt)0
-rw-r--r--src/mktags.c (renamed from src/cretags.c)2
-rw-r--r--src/mkvol-cl.opt (renamed from src/crevol-cl.opt)0
-rw-r--r--src/mkvol.c (renamed from src/crevol.c)2
-rw-r--r--src/rmsnap.c (renamed from src/delsnap.c)0
-rw-r--r--src/rmvol.c (renamed from src/delvol.c)0
-rw-r--r--src/setiattr.c (renamed from src/modinstattr.c)0
-rw-r--r--src/startinst.c87
76 files changed, 597 insertions, 532 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index a736b48..523cac1 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -16,36 +16,36 @@
MANPAGES1=\
eclat.1\
- eclat-allocate-address.1\
- eclat-associate-address.1\
- eclat-attach-volume.1\
- eclat-create-image.1\
- eclat-create-snapshot.1\
- eclat-create-tags.1\
- eclat-create-volume.1\
- eclat-delete-snapshot.1\
- eclat-delete-tags.1\
- eclat-deregister-image.1\
- eclat-describe-addresses.1\
+ eclat-allocaddr.1\
+ eclat-assocaddr.1\
+ eclat-atvol.1\
+ eclat-mkimg.1\
+ eclat-mksnap.1\
+ eclat-mktag.1\
+ eclat-mkvol.1\
+ eclat-rmsnap.1\
+ eclat-rmtag.1\
+ eclat-deimg.1\
+ eclat-lsaddr.1\
eclat-describe-availability-zones.1\
- eclat-describe-images.1\
- eclat-describe-instance-attribute.1\
- eclat-describe-instance-status.1\
- eclat-describe-instances.1\
- eclat-describe-regions.1\
- eclat-describe-security-groups.1\
- eclat-describe-snapshot-attribute.1\
- eclat-describe-snapshots.1\
- eclat-describe-tags.1\
- eclat-describe-volumes.1\
- eclat-detach-volume.1\
- eclat-disassociate-address.1\
- eclat-modify-instance-attribute.1\
- eclat-get-console-output.1\
- eclat-start-instances.1\
- eclat-stop-instances.1\
- eclat-reboot-instances.1\
- eclat-release-address.1
+ eclat-lsimg.1\
+ eclat-lsiattr.1\
+ eclat-lsistat.1\
+ eclat-lsinst.1\
+ eclat-lsreg.1\
+ eclat-lssg.1\
+ eclat-lssattr.1\
+ eclat-lssnap.1\
+ eclat-lstag.1\
+ eclat-lsvol.1\
+ eclat-devol.1\
+ eclat-disasaddr.1\
+ eclat-setiattr.1\
+ eclat-conmesg.1\
+ eclat-start.1\
+ eclat-stop.1\
+ eclat-reboot.1\
+ eclat-freeaddr.1
MANPAGES5=\
eclat.conf.5
diff --git a/doc/eclat-allocate-address.1 b/doc/eclat-allocaddr.1
index 75f4241..2c97280 100644
--- a/doc/eclat-allocate-address.1
+++ b/doc/eclat-allocaddr.1
@@ -13,16 +13,16 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH ALLOCATE\-ADDRESS 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH ALLOCADDR 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat allocate\-address \- allocate an Elastic IP address
+eclat allocaddr \- allocate an Elastic IP address
.SH SYNOPSIS
-\fBeclat allocate\-address\fR [\fB\-v\fR] [\f\--vpc\fR]
+\fBeclat allocaddr\fR [\fB\-v\fR] [\f\--vpc\fR]
-\fBeclat allocate\-address\fR \fB\-\-help\fR
+\fBeclat allocaddr\fR \fB\-\-help\fR
.SH DESCRIPTION
The
-.B allocate\-address
+.B allocaddr
command allocates an Elastic IP address. It does not take arguments.
.PP
.SH OPTIONS
@@ -37,8 +37,8 @@ On success, the code 0 is returned to the shell. Non-zero status code
is returned on error.
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-associate\-address (1),
-.BR eclat\-release\-address (1).
+.BR eclat\-assocaddr (1),
+.BR eclat\-freeaddr (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-associate-address.1 b/doc/eclat-assocaddr.1
index cc45341..5c84232 100644
--- a/doc/eclat-associate-address.1
+++ b/doc/eclat-assocaddr.1
@@ -13,18 +13,18 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH ASSOCIATE\-ADDRESS 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH ASSOCADDR 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat associate\-address \- associate an IP address with an instance
+eclat assocaddr \- associate an IP address with an instance
.SH SYNOPSIS
-\fBeclat associate\-address\fR [\fIOPTIONS\fR] \fIINSTANCE\fR \fIIP\fR
+\fBeclat assocaddr\fR [\fIOPTIONS\fR] \fIINSTANCE\fR \fIIP\fR
-\fBeclat associate\-address\fR [\fIOPTIONS\fR] \fIINSTANCE\fR \fIALLOC\-ID\fR
+\fBeclat assocaddr\fR [\fIOPTIONS\fR] \fIINSTANCE\fR \fIALLOC\-ID\fR
-\fBeclat associate\-address\fR \fB\-\-help\fR
+\fBeclat assocaddr\fR \fB\-\-help\fR
.SH DESCRIPTION
The
-.B associate\-address
+.B assocaddr
command associates an Elastic IP address with an non-VPC instance or
associates a VPC Elastic IP address with an instance in your VPC.
.PP
@@ -62,19 +62,19 @@ is unable to recognize the response.
Assign an Elastic IP to the instance:
.P
.nf
-.B eclat associate\-address i\-2ea64347 192.0.2.1
+.B eclat assocaddr i\-2ea64347 192.0.2.1
.fi
.SS 2.
Associate an IP address with an instance in the VPC:
.P
.nf
-.B eclat associate\-address \-\-vpc i\-4fd2431a eipalloc\-5723d13e
+.B eclat assocaddr \-\-vpc i\-4fd2431a eipalloc\-5723d13e
.fi
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-allocate\-address (1),
-.BR eclat\-release\-address (1),
-.BR eclat\-disassociate\-address (1).
+.BR eclat\-allocaddr (1),
+.BR eclat\-freeaddr (1),
+.BR eclat\-disassaddr (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-attach-volume.1 b/doc/eclat-atvol.1
index 7566eca..87c85bf 100644
--- a/doc/eclat-attach-volume.1
+++ b/doc/eclat-atvol.1
@@ -13,15 +13,15 @@
.\"
.\" 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\-ATTACH\-VOLUME 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH ECLAT\-ATVOL 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat attach\-volume \- attach a volume to an instance
+eclat atvol \- attach a volume to an instance
.SH SYNOPSIS
-\fBeclat attach\-volume\fR \fBVOL\-ID\fR \fBINST\-ID\fR \fBDEV\-NAME\fR
+\fBeclat atvol\fR \fBVOL\-ID\fR \fBINST\-ID\fR \fBDEV\-NAME\fR
-\fBeclat attach\-volume\fR \fB\-\-help\fR
+\fBeclat atvol\fR \fB\-\-help\fR
.SH DESCRIPTION
-The \fBattach\-volume\fR command attaches an existing volume to an EC2
+The \fBatvol\fR command attaches an existing volume to an EC2
instance. The
.B VOL\-ID
argument specifies the identifier of the volume to attach. If ID
@@ -40,15 +40,15 @@ argument specifies the name of the device to use for this volume.
.SH EXAMPLE
.nf
.sp 2
-$ \fBeclat attach\-volume vol-12340156 i-40ed7ef3 /dev/xvdf\fR
+$ \fBeclat atvol vol-12340156 i-40ed7ef3 /dev/xvdf\fR
vol-12340156 attaching i-40ed7ef3 /dev/xvdf
.fi
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat-create-volume (1),
-.BR eclat-delete-volume (1),
-.BR eclat-describe-volumes (1),
-.BR eclat-detach-volume (1).
+.BR eclat-mkvol (1),
+.BR eclat-rmvol (1),
+.BR eclat-lsvol (1),
+.BR eclat-devol (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-get-console-output.1 b/doc/eclat-conmesg.1
index bb30637..60c2011 100644
--- a/doc/eclat-get-console-output.1
+++ b/doc/eclat-conmesg.1
@@ -13,16 +13,16 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH GET\-CONSOLE\-OUTPUT 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH MESG 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat get\-console\-output \- get console output from the instance
+eclat conmesg \- get console output from the instance
.SH SYNOPSIS
-\fBeclat get\-console\-output\fR \fIINSTANCE\-ID\fR
+\fBeclat conmesg\fR \fIINSTANCE\-ID\fR
-\fBeclat get\-console\-output\fR \fB\-\-help\fR
+\fBeclat conmesg\fR \fB\-\-help\fR
.SH DESCRIPTION
The command
-.B get\-console\-output
+.B conmesg
retrieves and prints on the standard output the console output for the
specified instance.
.SH "SEE ALSO"
diff --git a/doc/eclat-deregister-image.1 b/doc/eclat-deimg.1
index 95030d5..8da014c 100644
--- a/doc/eclat-deregister-image.1
+++ b/doc/eclat-deimg.1
@@ -13,13 +13,13 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH DEREGISTER\-IMAGE 1 "April 11, 2013" "ECLAT" "Eclat User Reference"
+.TH DEIMG 1 "April 11, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat deregister\-image \- deregister an EC2 image
+eclat deimg \- deregister an EC2 image
.SH SYNOPSIS
-\fBeclat deregister\-image\fR \fBID\fR
+\fBeclat deimg\fR \fBID\fR
-\fBeclat deregister\-image\fR \fB\-\-help\fR
+\fBeclat deimg\fR \fB\-\-help\fR
.SH DESCRIPTION
This command deregisters an existing Amazon image (AMI) identified by
\fBID\fR.
@@ -31,7 +31,7 @@ the command treat the ID as a symbolic name and uses the \fBImageId\fR
map to translate it.
.PP
Note that this command does not destroy other resources associated with the
-image, such as snapshots. Use the \fBeclat delete\-snapshot\fR
+image, such as snapshots. Use the \fBeclat rmsnap\fR
command for that.
.SH OPTIONS
.TP
@@ -39,9 +39,9 @@ command for that.
Display a short usage summary.
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-delete\-snapshot (1),
-.BR eclat\-create\-image (1),
-.BR eclat\-describe\-images (1).
+.BR eclat\-rmsnap (1),
+.BR eclat\-mkimg (1),
+.BR eclat\-lsimg (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-detach-volume.1 b/doc/eclat-devol.1
index 00b2246..a06417c 100644
--- a/doc/eclat-detach-volume.1
+++ b/doc/eclat-devol.1
@@ -13,16 +13,16 @@
.\"
.\" 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\-DETACH\-VOLUME 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH ECLAT\-DEVOL 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat detach\-volume \- detach a volume from an instance
+eclat devol \- detach a volume from an instance
.SH SYNOPSIS
-\fBeclat detach\-volume\fR [\fB\-f\fR] [\fB\-\-force\fR] \fBVOL\-ID\fR\
+\fBeclat devol\fR [\fB\-f\fR] [\fB\-\-force\fR] \fBVOL\-ID\fR\
[\fBINST\-ID\fR [\fBDEV\-NAME\fR]]
-\fBeclat detach\-volume\fR \fB\-\-help\fR
+\fBeclat devol\fR \fB\-\-help\fR
.SH DESCRIPTION
-The \fBdetach\-volume\fR command detaches a volume from an EC2
+The \fBdevol\fR command detaches a volume from an EC2
instance. The volume is identified by the
.B VOL\-ID
argument, which specifies its identifier or symbolic name (if
@@ -41,15 +41,15 @@ specifies the name of the device that refers to this volume.
.SH EXAMPLE
.nf
.sp 2
-$ \fBeclat detach\-volume vol-12340156 i-40ed7ef3 /dev/xvdf\fR
+$ \fBeclat devol vol-12340156 i-40ed7ef3 /dev/xvdf\fR
vol-12340156 detaching i-40ed7ef3 /dev/xvdf
.fi
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat-attach-volume (1),
-.BR eclat-create-volume (1),
-.BR eclat-delete-volume (1),
-.BR eclat-describe-volumes (1).
+.BR eclat-atvol (1),
+.BR eclat-mkvol (1),
+.BR eclat-rmvol (1),
+.BR eclat-lsvol (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-disassociate-address.1 b/doc/eclat-disasaddr.1
index 81529f1..a76659b 100644
--- a/doc/eclat-disassociate-address.1
+++ b/doc/eclat-disasaddr.1
@@ -13,13 +13,13 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH DISASSOCIATE\-ADDRESS 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH DISASSOCADDR 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat disassociate\-address \- disassociate IP address from EC2 instance.
+eclat disassaddr \- disassociate IP address from EC2 instance.
.SH SYNOPSIS
-\fBeclat disassociate\-address\fR [\fB\-\-vpc\fR] [\fB\-v\fR] IP
+\fBeclat disassaddr\fR [\fB\-\-vpc\fR] [\fB\-v\fR] IP
-\fBeclat disassociate\-address\fR \fB\-\-help\fR
+\fBeclat disassaddr\fR \fB\-\-help\fR
.SH DESCRIPTION
This command disassociates IP address from the EC2 instance.
.SH OPTIONS
@@ -41,17 +41,17 @@ is unable to recognize the response.
Disassociate the Elastic IP:
.P
.nf
-.B eclat disassociate\-address 192.0.2.1
+.B eclat disassaddr 192.0.2.1
.fi
.SS 2.
Disassociate the VPC Elastic IP:
.P
.nf
-.B eclat disassociate\-address \-\-vpc eipalloc\-5723d13e
+.B eclat disassaddr \-\-vpc eipalloc\-5723d13e
.fi
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-associate\-address (1).
+.BR eclat\-assocaddr (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-release-address.1 b/doc/eclat-freeaddr.1
index f1b0224..847e7d5 100644
--- a/doc/eclat-release-address.1
+++ b/doc/eclat-freeaddr.1
@@ -13,17 +13,17 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH DISASSOCIATE\-ADDRESS 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH DISASSOCADDR 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat release\-address \- release Elastic IP address.
+eclat freeaddr \- release Elastic IP address.
.SH SYNOPSIS
-\fBeclat release\-address\fR [\fB\-\-vpc\fR] [\fB\-v\fR] \fIIP\-OR\-ALLOCID\fR
+\fBeclat freeaddr\fR [\fB\-\-vpc\fR] [\fB\-v\fR] \fIIP\-OR\-ALLOCID\fR
-\fBeclat release\-address\fR \fB\-\-help\fR
+\fBeclat freeaddr\fR \fB\-\-help\fR
.SH DESCRIPTION
This command releases an Elastic IP address. The address must have been
previously allocated using the
-.B allocate-address
+.B allocaddr
command.
.SH OPTIONS
.TP
@@ -46,26 +46,26 @@ The code 16 is returned if the operation is not confirmed.
Release the Elastic IP:
.P
.nf
-.B $ eclat release\-address 192.0.2.1
+.B $ eclat freeaddr 192.0.2.1
Really release IP 192.0.2.1 [Y/n] y
.fi
.SS 2.
Same, with confirmation disabled:
.P
.nf
-.B $ eclat -Y release\-address 192.0.2.1
+.B $ eclat -Y freeaddr 192.0.2.1
.fi
.SS 3.
Release the VPC Elastic IP:
.P
.nf
-.B eclat release\-address \-\-vpc eipalloc\-5723d13e
+.B eclat freeaddr \-\-vpc eipalloc\-5723d13e
.fi
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-allocate\-address (1),
-.BR eclat\-associate\-address (1),
-.BR eclat\-disassociate\-address (1).
+.BR eclat\-allocaddr (1),
+.BR eclat\-assocaddr (1),
+.BR eclat\-disassaddr (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-describe-addresses.1 b/doc/eclat-lsaddr.1
index bbfd4ca..8ae1565 100644
--- a/doc/eclat-describe-addresses.1
+++ b/doc/eclat-lsaddr.1
@@ -13,14 +13,14 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH DESCRIBE\-ADDRESSES 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH LSADDR 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat describe\-addresses \- return information about IP addresses in
+eclat lsaddr \- return information about IP addresses in
your account
.SH SYNOPSIS
-\fBeclat describe\-addresses\fR [\fB\-v\fR] [\fB\-\-vpc\fR] [\fBFILTER\fR...]
+\fBeclat lsaddr\fR [\fB\-v\fR] [\fB\-\-vpc\fR] [\fBFILTER\fR...]
-\fBeclat describe\-addresses\fR \fB\-\-help\fR
+\fBeclat lsaddr\fR \fB\-\-help\fR
.SH DESCRIPTION
This command returns information about Elastic IP addresses allocated
for your account. By default all allocated addresses are described.
@@ -67,17 +67,17 @@ allocation ID and association ID.
.sp
.nf
.in +2
-$ eclat describe-addresses
+$ eclat lsaddr
standard 192.0.2.1 i-f15ebb98
standard 198.51.100.2
.in
.fi
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-allocate\-address (1),
-.BR eclat\-release\-address (1),
-.BR eclat\-associate\-address (1),
-.BR eclat\-disassociate\-address (1).
+.BR eclat\-allocaddr (1),
+.BR eclat\-freeaddr (1),
+.BR eclat\-assocaddr (1),
+.BR eclat\-disassaddr (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-describe-instance-attribute.1 b/doc/eclat-lsiattr.1
index d4ce503..403c156 100644
--- a/doc/eclat-describe-instance-attribute.1
+++ b/doc/eclat-lsiattr.1
@@ -13,13 +13,13 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH DESCRIBE\-INSTANCE\-ATTRIBUTE 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH LSIATTR 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat describe\-instance\-attribute \- describes attribute of an instance
+eclat lsiattr \- describes attribute of an instance
.SH SYNOPSIS
-\fBeclat describe\-instance\-attribute\fR \fIINSTANCE-ID\fR \fIATTR\fR
+\fBeclat lsiattr\fR \fIINSTANCE-ID\fR \fIATTR\fR
-\fBeclat describe\-instance\-attribute\fR \fB\-\-help\fR
+\fBeclat lsiattr\fR \fB\-\-help\fR
.SH DESCRIPTION
Describes the specified attribute of an instance. Only one attribute
can be described at a time.
@@ -45,9 +45,9 @@ The \fIATTR\fR argument can be one of the following:
.BR ebsOptimized .
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat-modify-instance-attribute (1),
-.BR eclat-describe-instance-status (1),
-.BR eclat-describe-instances (1).
+.BR eclat-setiattr (1),
+.BR eclat-lsistat (1),
+.BR eclat-lsinst (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-describe-images.1 b/doc/eclat-lsimg.1
index b939cc7..da945bb 100644
--- a/doc/eclat-describe-images.1
+++ b/doc/eclat-lsimg.1
@@ -13,17 +13,17 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH DESCRIBE\-IMAGES 1 "April 18, 2013" "ECLAT" "Eclat User Reference"
+.TH LSIMG 1 "April 18, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat describe\-images \- describe available Amazon images
+eclat lsimg \- describe available Amazon images
.SH SYNOPSIS
-\fBeclat describe\-images\fB\
+\fBeclat lsimg\fB\
[\fB\-a\fR] [\fB\-u\fR \fIID\fR]\
[\fB\-x\fR \fIID\fR] [\fB\-\-owner\fR=\fIID\fR]
[\fB\-\-executable\-by\fR=\fIID\fR]\
[\fIFILTER\fR...] [\fIAMI\fR...]
-\fBeclat describe\-images\fB \fB\-\-help\fR
+\fBeclat lsimg\fB \fB\-\-help\fR
.SH DESCRIPTION
This command lists available Amazon images.
.PP
@@ -181,8 +181,8 @@ tag:Name="db server"
.SH EXAMPLE
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-create\-image (1),
-.BR eclat\-deregister\-image (1).
+.BR eclat\-mkimg (1),
+.BR eclat\-deimg (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-describe-instances.1 b/doc/eclat-lsinst.1
index e0126cc..e2d21a0 100644
--- a/doc/eclat-describe-instances.1
+++ b/doc/eclat-lsinst.1
@@ -13,13 +13,13 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH DESCRIBE\-INSTANCES 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH LSINST 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat describe\-instances \- describe available EC2 instances
+eclat lsinst \- describe available EC2 instances
.SH SYNOPSIS
-\fBeclat describe\-instances\fR [\fIFILTER\fR...]
+\fBeclat lsinst\fR [\fIFILTER\fR...]
-\fBeclat describe\-instances\fR \fB\-\-help\fR
+\fBeclat lsinst\fR \fB\-\-help\fR
.SH DESCRIPTION
This command lists your EC2 instances.
.SH FILTERS
@@ -335,10 +335,10 @@ End of instance
.fi
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-describe\-instance\-attribute (1),
-.BR eclat\-reboot\-instances (1),
-.BR eclat\-start\-instances (1),
-.BR eclat\-stop\-instances (1).
+.BR eclat\-lsiattr (1),
+.BR eclat\-reboot (1),
+.BR eclat\-start (1),
+.BR eclat\-stop (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-describe-instance-status.1 b/doc/eclat-lsistat.1
index f1a47bf..6e9b9d7 100644
--- a/doc/eclat-describe-instance-status.1
+++ b/doc/eclat-lsistat.1
@@ -13,13 +13,13 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH DESCRIBE\-INSTANCE\-STATUS 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH LSISTAT 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat describe\-instance\-status \- describe status of EC2 instances
+eclat lsistat \- describe status of EC2 instances
.SH SYNOPSIS
-\fBeclat describe\-instance\-status\fR [\fB\-a\fR] [\fB\-\-all\fR] [\fBFILTER\fR...]
+\fBeclat lsistat\fR [\fB\-a\fR] [\fB\-\-all\fR] [\fBFILTER\fR...]
-\fBeclat describe\-instance\-status\fR \fB\-\-help\fR
+\fBeclat lsistat\fR \fB\-\-help\fR
.SH DESCRIPTION
Describes the status of selected EC2 instances including any scheduled
events. This information includes:
@@ -147,7 +147,7 @@ In the example below the long lines are split for readability:
.sp
.nf
.in +2
-$ eclat describe\-instance\-status \-a
+$ eclat lsistat \-a
i\-283f9f47 us\-east\-1d running impaired\
Sys.reachability=failed Inst.reachability=failed
i\-283f9f47 Event: "The instance is running on degraded hardware"
@@ -157,8 +157,8 @@ i\-d2e36dbd us\-east\-1d running ok\
.fi
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-describe\-instances (1),
-.BR eclat\-describe\-instance\-attribute (1).
+.BR eclat\-lsinst (1),
+.BR eclat\-lsiattr (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-describe-regions.1 b/doc/eclat-lsreg.1
index f0e5f65..4ee550c 100644
--- a/doc/eclat-describe-regions.1
+++ b/doc/eclat-lsreg.1
@@ -13,13 +13,13 @@
.\"
.\" 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\-DESCRIBE\-REGIONS 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH ECLAT\-LSREG 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat describe\-regions \- describe EC2 regions
+eclat lsreg \- describe EC2 regions
.SH SYNOPSIS
-\fBeclat describe\-regions\fR [\fBFILTER\fR...] [\fBREGION\fR...]
+\fBeclat lsreg\fR [\fBFILTER\fR...] [\fBREGION\fR...]
-\fBeclat describe\-regions\fR \fB\-\-help\fR
+\fBeclat lsreg\fR \fB\-\-help\fR
.SH DESCRIPTION
This command lists the EC2 regions. If no arguments are provided, it
lists all regions available to the account. Otherwise, each argument
@@ -41,7 +41,7 @@ horizontal tab character.
.SH EXAMPLE
.nf
.sp 2
-$ \fBeclat describe-regions\fR
+$ \fBeclat lsreg\fR
eu-west-1 ec2.eu-west-1.amazonaws.com
sa-east-1 ec2.sa-east-1.amazonaws.com
us-east-1 ec2.us-east-1.amazonaws.com
diff --git a/doc/eclat-describe-snapshot-attribute.1 b/doc/eclat-lssattr.1
index fdc26a2..161a388 100644
--- a/doc/eclat-describe-snapshot-attribute.1
+++ b/doc/eclat-lssattr.1
@@ -13,13 +13,13 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH DESCRIBE\-SNAPSHOT\-ATTRIBUTE 1 "April 18, 2013" "ECLAT" "Eclat User Reference"
+.TH LSSATTR 1 "April 18, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat describe\-snapshot\-attribute \- lists the attribute of a EBS snapshot
+eclat lssattr \- lists the attribute of a EBS snapshot
.SH SYNOPSIS
-\fBeclat describe\-snapshot\-attribute\fB \fBSNAP\-ID\fR [\fBATTR\fR]
+\fBeclat lssattr\fB \fBSNAP\-ID\fR [\fBATTR\fR]
-\fBeclat describe\-snapshot\-attribute\fB \fB\-\-help\fR
+\fBeclat lssattr\fB \fB\-\-help\fR
.SH DESCRIPTION
Thic command outputs the value of the attribute \fBATTR\fR of the EBS
snapshot \fBSNAP\-ID\fR. The latter is either the snapshot
@@ -38,11 +38,11 @@ Describes the create volume permissions of the snapshot.
Describes the product codes associated with the snapshot.
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-create\-snapshot (1),
-.BR eclat\-delete\-snapshot (1),
-.BR eclat\-describe\-snapshots (1),
-.BR eclat\-modify\-snapshot\-attribute (1),
-.BR eclat\-reset\-snapshot\-attribute (1).
+.BR eclat\-mksnap (1),
+.BR eclat\-rmsnap (1),
+.BR eclat\-lssnap (1),
+.BR eclat\-setsattr (1),
+.BR eclat\-clrsattr (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-describe-security-groups.1 b/doc/eclat-lssg.1
index fa8e44b..86ab244 100644
--- a/doc/eclat-describe-security-groups.1
+++ b/doc/eclat-lssg.1
@@ -13,14 +13,14 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH DESCRIBE\-SECURITY\-GROUPS 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH LSSEC 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat describe\-security\-groups \- return information about security groups
+eclat lssg \- return information about security groups
.SH SYNOPSIS
-\fBeclat describe\-security\-groups\fR [\fB\-n\fR] [\fB\-\-name\fR]\
+\fBeclat lssg\fR [\fB\-n\fR] [\fB\-\-name\fR]\
[\fBFILTER\fR...] [\fBID\fR]
-\fBeclat describe\-security\-groups\fR \fB\-\-help\fR
+\fBeclat lssg\fR \fB\-\-help\fR
.SH DESCRIPTION
This command returns information about security groups. By default,
all security groups pertaining to your account will be described.
diff --git a/doc/eclat-describe-snapshots.1 b/doc/eclat-lssnap.1
index 223d59b..cecb7af 100644
--- a/doc/eclat-describe-snapshots.1
+++ b/doc/eclat-lssnap.1
@@ -13,16 +13,16 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH DESCRIBE\-SNAPSHOTS 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH LSSNAP 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat describe\-snapshots \- describes available Amazon EBS snapshots
+eclat lssnap \- describes available Amazon EBS snapshots
.SH SYNOPSIS
-\fBeclat describe\-snapshots\fR [\fB\-r\fR \fIID\fR] [\fB\-u \fIID\fR]\
+\fBeclat lssnap\fR [\fB\-r\fR \fIID\fR] [\fB\-u \fIID\fR]\
[\fI\-\-restorable\-by \fIID\fR]
[\fB\-\-owner \fINAME\fR]\
[\fISNAPSHOT\-ID\fR...] [\fBFILTER\fI...]
-\fBeclat describe\-snapshots\fR \fB\-\-help\fR
+\fBeclat lssnap\fR \fB\-\-help\fR
.SH DESCRIPTION
This command lists the Amazon EBS snapshots available to you. These include
public snapshots available to any AWS account, your private snapshots and
@@ -139,8 +139,8 @@ snap\-12345678 vol\-4d826724 10 completed 100% 2012\-04\-07T00:00:00.000Z
.fi
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-delete\-snapshot (1),
-.BR eclat\-create\-snapshot (1).
+.BR eclat\-rmsnap (1),
+.BR eclat\-mksnap (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-describe-tags.1 b/doc/eclat-lstag.1
index a63c90c..af48c2a 100644
--- a/doc/eclat-describe-tags.1
+++ b/doc/eclat-lstag.1
@@ -13,18 +13,18 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH DESCRIBE\-TAGS 1 "February 9, 2013" "ECLAT" "Eclat User Reference"
+.TH LSTAG 1 "February 9, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat describe\-tags \- list the EC2 tags
+eclat lstag \- list the EC2 tags
.SH SYNOPSIS
-\fBeclat describe\-tags\fR [\fB\-a\fR \fIID\fR] [\fB\-i\fR \fIID\fR]\
+\fBeclat lstag\fR [\fB\-a\fR \fIID\fR] [\fB\-i\fR \fIID\fR]\
[\fB\-r\fR [\fIMAP\fR:]\fIID\fR] [\fB\-s \fIID\fR] [\fB\-v\fR \fIID\fR]
[\fB\-T\fR \fIFILE\fR]
[\fB\-\-ami\fR \fIID\fR] [\fB\-\-instance\fR \fIID\fR] [\fB\-\-resource\-id\fR [\fIMAP\fR:]\fIID\fR]
[\fB\-\-volume\fR \fIID\fR] [\fB\-\-snapshot\fR \fIID\fR]
[\fBFILTER\fR...]
-\fBeclat describe\-tags\fR \fB\-\-help\fR
+\fBeclat lstag\fR \fB\-\-help\fR
.SH DESCRIPTION
This command lists the EC2 tags. If no filter has been supplied, all
tags are listed.
@@ -69,7 +69,7 @@ request its translation using this map. For example:
.sp
.nf
.in +2
-eclat \-x describe\-tags resource\-id=InstanceId:webserver
+eclat \-x lstag resource\-id=InstanceId:webserver
.in
.fi
.sp
@@ -101,13 +101,13 @@ i-12345678 instance database_server
.sp
.nf
.in +2
-eclat describe\-tags resource-id=i-5f4e3d2a key=Name
+eclat lstag resource-id=i-5f4e3d2a key=Name
.in
.fi
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-create\-tags (1),
-.BR eclat\-delete\-tags (1).
+.BR eclat\-mktag (1),
+.BR eclat\-rmtag (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-describe-volumes.1 b/doc/eclat-lsvol.1
index 3407131..1d2731d 100644
--- a/doc/eclat-describe-volumes.1
+++ b/doc/eclat-lsvol.1
@@ -13,13 +13,13 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH DESCRIBE\-VOLUMES 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH LSVOL 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat describe\-volumes \- list EBS volumes
+eclat lsvol \- list EBS volumes
.SH SYNOPSIS
-\fBeclat describe\-volumes\fR [\fBFILTER\fR...] [\fBID\fR...]
+\fBeclat lsvol\fR [\fBFILTER\fR...] [\fBID\fR...]
-\fBeclat describe\-volumes\fR \fB\-\-help\fR
+\fBeclat lsvol\fR \fB\-\-help\fR
.SH DESCRIPTION
This command displays the EBS volumes in your account. By default,
all volumes are shown. To select particular volumes, give their IDs
@@ -102,7 +102,7 @@ their symbolic name, e.g.:
.sp
.nf
.in +2
-eclat \-x describe\-volumes root volume\-id=vol\-1aeb5008 srv
+eclat \-x lsvol root volume\-id=vol\-1aeb5008 srv
.in
.fi
.TP
diff --git a/doc/eclat-create-image.1 b/doc/eclat-mkimg.1
index 1889f9b..ac6e7d5 100644
--- a/doc/eclat-create-image.1
+++ b/doc/eclat-mkimg.1
@@ -13,11 +13,11 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH CREATE\-IMAGE 1 "April 11, 2013" "ECLAT" "Eclat User Reference"
+.TH MKIMG 1 "April 11, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat create\-image \- create an AMI image
+eclat mkimg \- create an AMI image
.SH SYNOPSIS
-\fBeclat create\-image\fR\
+\fBeclat mkimg\fR\
[\fB\-N\fR]\
[\fB\-d\fR \fIDESCR\fR]\
[\fB\-m\fR \fIDEV\fR=\fISPEC\fR]\
@@ -28,7 +28,7 @@ eclat create\-image \- create an AMI image
[\fB\-\-block\-device\-mapping\fR=\fIDEV\fR=\fISPEC\fR]
\fBNAME\fR \fBINSTANCE\-ID\fR
-\fBeclat create\-image\fR \fB\-\-help\fR
+\fBeclat mkimg\fR \fB\-\-help\fR
.SH DESCRIPTION
This command creates an Amazon EBS-backed AMI from an existing
instance \fBINSTANCE\-ID\fR. If the instance is running it will be
@@ -83,8 +83,8 @@ supply the number of IOPS that the volume supports in the
Display a short usage summary.
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-describe\-images (1),
-.BR eclat\-deregister\-image (1).
+.BR eclat\-lsimg (1),
+.BR eclat\-deimg (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-create-snapshot.1 b/doc/eclat-mksnap.1
index f13d5f4..efb3db2 100644
--- a/doc/eclat-create-snapshot.1
+++ b/doc/eclat-mksnap.1
@@ -13,13 +13,13 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH CREATE\-SNAPSHOT 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH MKSNAP 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat create\-snapshot \- creates a snapshot of an Amazon EBS volume
+eclat mksnap \- creates a snapshot of an Amazon EBS volume
.SH SYNOPSIS
-\fBeclat create\-snapshot\fR \fIVOLUME\-ID\fR [\fIDESCR\fR]
+\fBeclat mksnap\fR \fIVOLUME\-ID\fR [\fIDESCR\fR]
-\fBeclat create\-snapshot\fR \fB\-\-help\fR
+\fBeclat mksnap\fR \fB\-\-help\fR
.SH DESCRIPTION
This command creates a snapshot of an Amazon EBS volume \fIVOLUME\-ID\fR
and stores it in Amazon S3. Any surplus arguments are taken as a
@@ -44,15 +44,15 @@ snap\-78a54011 vol\-4d826724 10 pending 60% 2008\-05\-07T12:51:50.000Z
.sp
.nf
.in +2
-eclat create\-snapshot vol\-4d826724 Full backup
+eclat mksnap vol\-4d826724 Full backup
.in
.fi
.sp
Note that it is not necessary to quote the description.
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-describe\-snapshots (1),
-.BR eclat\-delete\-snapshot (1).
+.BR eclat\-lssnap (1),
+.BR eclat\-rmsnap (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-create-tags.1 b/doc/eclat-mktag.1
index 7ed40f4..06811a4 100644
--- a/doc/eclat-create-tags.1
+++ b/doc/eclat-mktag.1
@@ -13,18 +13,18 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH CREATE\-TAGS 1 "January 22, 2013" "ECLAT" "Eclat User Reference"
+.TH MKTAG 1 "January 22, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat create\-tags \- create or replace tags for a resource
+eclat mktag \- create or replace tags for a resource
.SH SYNOPSIS
-\fBeclat create\-tags\fR [\fB\-a\fR \fIID\fR] [\fB\-i\fR \fIID\fR]\
+\fBeclat mktag\fR [\fB\-a\fR \fIID\fR] [\fB\-i\fR \fIID\fR]\
[\fB\-r\fR [\fIMAP\fR:]\fIID\fR] [\fB\-s \fIID\fR] [\fB\-v\fR \fIID\fR]
[\fB\-T\fR \fIFILE\fR]
[\fB\-\-ami\fR \fIID\fR] [\fB\-\-instance\fR \fIID\fR] [\fB\-\-resource\-id\fR [\fIMAP\fR:]\fIID\fR]
[\fB\-\-volume\fR \fIID\fR] [\fB\-\-snapshot\fR \fIID\fR]
[\fB\-\-from\-file\fR \fIFILE\fR] \fITAG\fR[=\fIVAL\fR]...
-\fBeclat create\-tags\fR \fB\-\-help\fR
+\fBeclat mktag\fR \fB\-\-help\fR
.SH DESCRIPTION
This command creates or replaces one or more tags for a given
resource. Tags are specified by their names. If a tag name is
@@ -87,7 +87,7 @@ Create two tags for an instance:
.sp
.nf
.in +2
-eclat create\-tags \-i i\-12345678 Name=Webserver test
+eclat mktag \-i i\-12345678 Name=Webserver test
.in
.fi
.sp
@@ -102,26 +102,26 @@ Copy tags between instances:
eclat -e 'if (.DescribeTagsResponse)
for (var in .DescribeTagsResponse.tagSet.item)
print(var.key,"=",var.value,"\\n");' \\
- describe\-tags resource\-id=i\-12345678 |
- eclat create\-tags \-i i\-fe2345ed \-T \-
+ lstag resource\-id=i\-12345678 |
+ eclat mktag \-i i\-fe2345ed \-T \-
.in
.fi
.sp
This example uses the
-.B describe-tags
+.B lstag
command to obtain tags from the instance
.B i-12345678
and a custom format to represent them in a form suitable as input
to
-.BR create-tags .
+.BR mktag .
The obtained data are piped to the
-.B create-tags
+.B mktag
command which is instructed to read them from the standard input using
.BR "\-T \-" .
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-delete\-tags (1),
-.BR eclat\-describe\-tags (1).
+.BR eclat\-rmtag (1),
+.BR eclat\-lstag (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-create-volume.1 b/doc/eclat-mkvol.1
index 7bd83e5..b25630e 100644
--- a/doc/eclat-create-volume.1
+++ b/doc/eclat-mkvol.1
@@ -13,14 +13,14 @@
.\"
.\" 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\-CREATE\-VOLUME 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH ECLAT\-MKVOL 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat create\-volume \- create an Amazon EBS volume
+eclat mkvol \- create an Amazon EBS volume
.SH SYNOPSIS
-\fBeclat create\-volume\fR [\fB\-i\fR \fIN\fR] [\fB\-s\fR]\
+\fBeclat mkvol\fR [\fB\-i\fR \fIN\fR] [\fB\-s\fR]\
[\fB\-\-iops\fR=\fIN\fR] [\fB\-\-snapshot\fR=\fIID\fR] \fBSIZE\fR \fBZONE\fR
-\fBeclat create\-volume\fR \fB\-\-help\fR
+\fBeclat mkvol\fR \fB\-\-help\fR
.SH DESCRIPTION
This command creates a new Amazon EBS volume of size \fBSIZE\fR in the
availability zone \fBZONE\fR. The created volume can then be attached
@@ -38,15 +38,15 @@ its status.
.SH EXAMPLE
.nf
.sp 2
-$ \fBeclat create-volume 80 eu-west-1b\fR
+$ \fBeclat mkvol 80 eu-west-1b\fR
vol-de1203fa creating
.fi
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-delete\-volume (1),
-.BR eclat\-describe\-volumes (1),
-.BR eclat\-attach\-volume (1),
-.BR eclat\-detach\-volume (1),
+.BR eclat\-rmvol (1),
+.BR eclat\-lsvol (1),
+.BR eclat\-atvol (1),
+.BR eclat\-devol (1),
.BR eclat\-describe\-availability\-zones (1).
.SH AUTHORS
Sergey Poznyakoff
diff --git a/doc/eclat-reboot-instances.1 b/doc/eclat-reboot.1
index faa6908..3130393 100644
--- a/doc/eclat-reboot-instances.1
+++ b/doc/eclat-reboot.1
@@ -13,16 +13,16 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH REBOOT\-INSTANCES 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH REBOOT 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat reboot\-instances \- reboot EC2 instances
+eclat reboot \- reboot EC2 instances
.SH SYNOPSIS
-\fBeclat reboot\-instances\fR \fIID\fR [\fIID\fR...]
+\fBeclat reboot\fR \fIID\fR [\fIID\fR...]
-\fBeclat reboot\-instances\fR \fB\-\-help\fR
+\fBeclat reboot\fR \fB\-\-help\fR
.SH DESCRIPTION
The command
-.B reboot\-instances
+.B reboot
reboots running Amazon EBS-backed instances.
.SH OUTPUT
The default output format lists o each line the instance ID, its
@@ -30,8 +30,8 @@ previous and current states, separated by single horizontal tab
characters.
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-start\-instances (1),
-.BR eclat\-stop\-instances (1).
+.BR eclat\-start (1),
+.BR eclat\-stop (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-delete-snapshot.1 b/doc/eclat-rmsnap.1
index 0dd1017..4887239 100644
--- a/doc/eclat-delete-snapshot.1
+++ b/doc/eclat-rmsnap.1
@@ -13,13 +13,13 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH DELETE\-SNAPSHOT 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH RMSNAP 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat delete\-snapshot \- delete a snapshot of an Amazon EBS volume
+eclat rmsnap \- delete a snapshot of an Amazon EBS volume
.SH SYNOPSIS
-\fBeclat delete\-snapshot\fR \fISNAPSHOT\-ID\fR
+\fBeclat rmsnap\fR \fISNAPSHOT\-ID\fR
-\fBeclat delete\-snapshot\fR \fB\-\-help\fR
+\fBeclat rmsnap\fR \fB\-\-help\fR
.SH DESCRIPTION
This command deletes the snapshot of an Amazon EBS volume identified by
its resource ID. If ID translation is enabled (see the section \fBMAPS\fR
@@ -32,8 +32,8 @@ On success, the command is silent. On error, it prints on the standard
error the error message received from Amazon.
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-describe\-snapshots (1),
-.BR eclat\-create\-snapshot (1).
+.BR eclat\-lssnap (1),
+.BR eclat\-mksnap (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-delete-tags.1 b/doc/eclat-rmtag.1
index ba733eb..8e205c2 100644
--- a/doc/eclat-delete-tags.1
+++ b/doc/eclat-rmtag.1
@@ -13,18 +13,18 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH DELETE\-TAGS 1 "January 24, 2013" "ECLAT" "Eclat User Reference"
+.TH RMTAG 1 "January 24, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat delete\-tags \- delete or replace tags for a resource
+eclat rmtag \- delete or replace tags for a resource
.SH SYNOPSIS
-\fBeclat delete\-tags\fR [\fB\-a\fR \fIID\fR] [\fB\-i\fR \fIID\fR]\
+\fBeclat rmtag\fR [\fB\-a\fR \fIID\fR] [\fB\-i\fR \fIID\fR]\
[\fB\-r\fR [\fIMAP\fR:]\fIID\fR] [\fB\-s \fIID\fR] [\fB\-v\fR \fIID\fR]
[\fB\-T\fR \fIFILE\fR]
[\fB\-\-ami\fR \fIID\fR] [\fB\-\-instance\fR \fIID\fR] [\fB\-\-resource\-id\fR [\fIMAP\fR:]\fIID\fR]
[\fB\-\-volume\fR \fIID\fR] [\fB\-\-snapshot\fR \fIID\fR]
[\fB\-\-from\-file\fR \fIFILE\fR] [\fITAG\fR[=\fIVAL\fR]...]
-\fBeclat delete\-tags\fR \fB\-\-help\fR
+\fBeclat rmtag\fR \fB\-\-help\fR
.SH DESCRIPTION
This command deletes tags from a given resource. The names of tags to
delete are supplied in the command line. If a tag name is followed by
@@ -82,7 +82,7 @@ error.
.sp
.nf
.in +2
-eclat delete\-tags \-i i\-12345678 Name=Webserver test
+eclat rmtag \-i i\-12345678 Name=Webserver test
.in
.fi
.sp
@@ -91,8 +91,8 @@ This command deletes two tags from the instance \fBi\-12345678\fR: the tag
no matter what its value is.
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-create\-tags (1),
-.BR eclat\-describe\-tags (1).
+.BR eclat\-mktag (1),
+.BR eclat\-lstag (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-delete-volume.1 b/doc/eclat-rmvol.1
index e709a4e..0648aa4 100644
--- a/doc/eclat-delete-volume.1
+++ b/doc/eclat-rmvol.1
@@ -13,13 +13,13 @@
.\"
.\" 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\-DELETE\-VOLUME 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH ECLAT\-RMVOL 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat delete\-volume \- delete an EC2 volume
+eclat rmvol \- delete an EC2 volume
.SH SYNOPSIS
-\fBeclat delete\-volume\fR \fBVOL\-ID\fR
+\fBeclat rmvol\fR \fBVOL\-ID\fR
-\fBeclat delete\-volume\fR \fB\-\-help\fR
+\fBeclat rmvol\fR \fB\-\-help\fR
.SH DESCRIPTION
This command deletes an Amazon EBS volume. The volume must be in the
available state, i.e. it must not be attached to an instance.
@@ -31,10 +31,10 @@ this command treats the \fBVOL\-ID\fR as volume names and translates
it to the AWS IDs using the \fBVolumeId\fR map.
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-create\-volume (1),
-.BR eclat\-describe\-volumes (1),
-.BR eclat\-attach\-volume (1),
-.BR eclat\-detach\-volume (1),
+.BR eclat\-mkvol (1),
+.BR eclat\-lsvol (1),
+.BR eclat\-atvol (1),
+.BR eclat\-devol (1),
.BR eclat\-describe\-availability\-zones (1).
.SH AUTHORS
Sergey Poznyakoff
diff --git a/doc/eclat-modify-instance-attribute.1 b/doc/eclat-setiattr.1
index b0e8261..5b2ad40 100644
--- a/doc/eclat-modify-instance-attribute.1
+++ b/doc/eclat-setiattr.1
@@ -13,14 +13,14 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH MODIFY\-INSTANCE\-ATTRIBUTE 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH SETIATTR 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat modify\-instance\-attribute \- modifies attribute of an instance
+eclat setiattr \- modifies attribute of an instance
.SH SYNOPSIS
-\fBeclat modify\-instance\-attribute\fR \fIINSTANCE-ID\fR \fIATTR\fR\
+\fBeclat setiattr\fR \fIINSTANCE-ID\fR \fIATTR\fR\
\fIVALUE\fR [\fIVALUE\fR...]
-\fBeclat modify\-instance\-attribute\fR \fB\-\-help\fR
+\fBeclat setiattr\fR \fB\-\-help\fR
.SH DESCRIPTION
Modifies the specified attribute of an instance. Only one attribute
can be modified at a time.
@@ -80,9 +80,9 @@ Controls whether the instance is optimized for EBS I/O. Allowed
values are \fBtrue\fR or \fBfalse\fR.
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat-describe-instance-attribute (1),
-.BR eclat-describe-instance-status (1),
-.BR eclat-describe-instances (1).
+.BR eclat-lsiattr (1),
+.BR eclat-lsistat (1),
+.BR eclat-lsinst (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-start-instances.1 b/doc/eclat-start.1
index 87a28e8..1fdd9e0 100644
--- a/doc/eclat-start-instances.1
+++ b/doc/eclat-start.1
@@ -13,16 +13,16 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH START\-INSTANCES 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH START 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat start\-instances \- start EC2 instances
+eclat start \- start EC2 instances
.SH SYNOPSIS
-\fBeclat start\-instances\fR \fIID\fR [\fIID\fR...]
+\fBeclat start\fR \fIID\fR [\fIID\fR...]
-\fBeclat start\-instances\fR \fB\-\-help\fR
+\fBeclat start\fR \fB\-\-help\fR
.SH DESCRIPTION
The command
-.B start\-instances
+.B start
starts Amazon EBS-backed instances you have stopped previously.
.SH OUTPUT
The default output format lists on each line the instance ID, its
@@ -30,8 +30,8 @@ previous and current states, separated by single horizontal tab
characters.
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-stop\-instances (1),
-.BR eclat\-reboot\-instances (1).
+.BR eclat\-stop (1),
+.BR eclat\-reboot (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat-stop-instances.1 b/doc/eclat-stop.1
index dc4a5d1..d1c1767 100644
--- a/doc/eclat-stop-instances.1
+++ b/doc/eclat-stop.1
@@ -13,16 +13,16 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH STOP\-INSTANCES 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH STOP 1 "January 19, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
-eclat stop\-instances \- stop EC2 instances
+eclat stop \- stop EC2 instances
.SH SYNOPSIS
-\fBeclat stop\-instances\fR \fIID\fR [\fIID\fR...]
+\fBeclat stop\fR \fIID\fR [\fIID\fR...]
-\fBeclat stop\-instances\fR \fB\-\-help\fR
+\fBeclat stop\fR \fB\-\-help\fR
.SH DESCRIPTION
The command
-.B stop\-instances
+.B stop
stops running Amazon EBS-backed instances.
.SH OUTPUT
The default output format lists on each line the instance ID, its
@@ -30,8 +30,8 @@ previous and current states, separated by single horizontal tab
characters.
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-start\-instances (1),
-.BR eclat\-reboot\-instances (1).
+.BR eclat\-start (1),
+.BR eclat\-reboot (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/doc/eclat.1 b/doc/eclat.1
index bbacbb5..aaf6102 100644
--- a/doc/eclat.1
+++ b/doc/eclat.1
@@ -13,7 +13,7 @@
.\"
.\" 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 9, 2013" "ECLAT" "Eclat User Reference"
+.TH ECLAT 1 "April 20, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
eclat \- EC2 Command Line Administrator Tool
.SH SYNOPSIS
@@ -188,14 +188,14 @@ request their translation. For example,
.sp
.nf
.in +2
-eclat \-x describe\-tags resource\-id=InstanceId:webserver
+eclat \-x lstag resource\-id=InstanceId:webserver
.in
.fi
.sp
will first translate the name "webserver" using the "InstanceId" map,
and then will replace the entier "InstanceId:webserver" construct with
the obtained identifier. See also
-.BR eclat\-describe\-tags (1).
+.BR eclat\-lstag (1).
.PP
The name of the map to use can also be supplied explicitly, using the
\fI\-\-map\fR (\fI\-M\fR) option.
@@ -205,45 +205,21 @@ For a detailed description of maps, see the section
in
.BR eclat.conf (5).
.SH COMMANDS
-To get a help on a particular command, refer to \fBeclat\-\fIcommand\fR
-(1), where \fIcommand\fR is the command name. Currently the following
-commands are implemented:
-.BR allocate\-address ,
-.BR associate\-address ,
-.BR attach\-volume ,
-.BR create\-tags ,
-.BR create\-snapshot ,
-.BR create\-volume ,
-.BR delete\-tags ,
-.BR delete\-snapshot ,
-.BR delete\-volume ,
-.BR describe\-addresses ,
-.BR describe\-availability\-zones ,
-.BR describe\-instance\-attribute ,
-.BR describe\-instance\-status ,
-.BR describe\-instances ,
-.BR describe\-security\-groups ,
-.BR describe\-snapshots ,
-.BR describe\-tags ,
-.BR describe\-volumes ,
-.BR disassociate\-address ,
-.BR get\-console\-output ,
-.BR reboot\-instances ,
-.BR release\-address ,
-.BR start\-instances ,
-.BR stop\-instances .
-.PP
-Each command understands a \fB\-\-help\fR (\fB\-h\fR) command line
-option which outputs a terse summary on using this particular command.
-.PP
-Any non\-ambiguous abbreviation can be used in place of
-.BR command .
-Moreover, each segment (i.e. the sequence of characters delimited by
-dashes), can be abbreviated independently. For example, \fBd\-t\fR matches
-\fBdescribe\-tags\fR, whereas \fBd\-i\fR matches three command names:
-\fBdescribe\-instance\-attribute\fR, \fBdescribe\-instance\-status\fR and
-\fBdescribe\-instances\fR.
-.PP
+Each command is associated with two \fBidentifiers\fR, by which it can
+be invoked: the \fBeclat command name\fR and the \fBEC2 command
+name\fR. Eclat command names are short strings of up to 10 letters,
+which are selected to be convenient in use and consistent with the
+UNIX command naming tradition. EC2 command names are long descriptive
+identifiers, consisting of letters and dashes and corresponding to the
+EC2 operation codes. These are designed for use in such contexts
+where the typing shortcuts are not required, but the self-documenting
+commands are preferred instead, e.g. in shell scripts. Nevertheless,
+any non\-ambiguous abbreviation can be used in place of a full EC2
+command name. Moreover, each segment (i.e. the sequence of characters
+delimited by dashes), can be abbreviated independently. For example,
+\fBd\-t\fR matches \fBdescribe-tags\fR, whereas \fBd\-i\fR matches three command names:
+\fBdescribe-instance-attribute\fR, \fBdescribe-instance-status\fR and
+\fBdescribe-instances\fR.
If an ambiguous abbreviation is supplied,
.B eclat
will print a list of matching command names on the standard error and
@@ -273,6 +249,52 @@ With the completion facility enabled, hitting
after a partial command name will show you the list of possible
completions. If there is only one completion, it will be used in
place of the partial name.
+.PP
+To get a help on a particular command, refer to \fBeclat\-\fIcommand\fR
+(1), where \fIcommand\fR is the command name. Currently the following
+commands are implemented:
+.nf
+.ta 8n 20n
+.ul
+ Eclat name EC2 name
+ \fBallocaddr\fR \fBallocate-address\fR
+ \fBassocaddr\fR \fBassociate-address\fR
+ \fBatvol\fR \fBattach-volume\fR
+ \fBmkimg\fR \fBcreate-image\fR
+ \fBmksnap\fR \fBcreate-snapshot\fR
+ \fBmktag\fR \fBcreate-tags\fR
+ \fBmkvol\fR \fBcreate-volume\fR
+ \fBrmsnap\fR \fBdelete-snapshot\fR
+ \fBrmtag\fR \fBdelete-tags\fR
+ \fBrmvol\fR \fBdelete-volume\fR
+ \fBdeimg\fR \fBderegister-image\fR
+ \fBlsaddr\fR \fBdescribe-addresses\fR
+ \fBlszon\fR \fBdescribe-availability-zones\fR
+ \fBlsimg\fR \fBdescribe-images\fR
+ \fBlsiattr\fR \fBdescribe-instance-attribute\fR
+ \fBlsistat\fR \fBdescribe-instance-status\fR
+ \fBlsinst\fR \fBdescribe-instances\fR
+ \fBlsreg\fR \fBdescribe-regions\fR
+ \fBlssg\fR \fBdescribe-security-groups\fR
+ \fBlssattr\fR \fBdescribe-snapshot-attribute\fR
+ \fBlssnap\fR \fBdescribe-snapshots\fR
+ \fBlstag\fR \fBdescribe-tags\fR
+ \fBlsvol\fR \fBdescribe-volumes\fR
+ \fBdevol\fR \fBdetach-volume\fR
+ \fBdisasaddr\fR \fBdisassociate-address\fR
+ \fBconmesg\fR \fBget-console-output\fR
+ \fBsetiattr\fR \fBmodify-instance-attribute\fR
+ \fBsetsattr\fR \fBmodify-snapshot-attribute\fR
+ \fBreboot\fR \fBreboot-instances\fR
+ \fBfreeaddr\fR \fBrelease-address\fR
+ \fBclrsattr\fR \fBreset-snapshot-attribute\fR
+ \fBmkinst\fR \fBrun-instances\fR
+ \fBstart\fR \fBstart-instances\fR
+ \fBstop\fR \fBstop-instances\fR
+.fi
+.PP
+Each command understands a \fB\-\-help\fR (\fB\-h\fR) command line
+option which outputs a terse summary on using this particular command.
.SH OPTIONS
.SS Selecting program mode
.TP
@@ -439,30 +461,40 @@ can contain a list of default options for
These options are processed before the actual command line options.
.SH "SEE ALSO"
.BR eclat.conf (5),
-.BR eclat\-allocate\-address (1),
-.BR eclat\-associate\-address (1),
-.BT eclat\-attach\-volume (1),
-.BR eclat\-create\-tags (1),
-.BR eclat\-create\-snapshot (1),
-.BR eclat\-create\-volume (1),
-.BR eclat\-delete\-tags (1),
-.BR eclat\-delete\-snapshot (1),
-.BR eclat\-delete\-volume (1),
-.BR eclat\-describe\-addresses (1),
-.BR eclat\-describe\-availability\-zones (1),
-.BR eclat\-describe\-instance\-attribute (1),
-.BR eclat\-describe\-instance\-status (1),
-.BR eclat\-describe\-instances (1),
-.BR eclat\-describe\-security\-groups (1),
-.BR eclat\-describe\-snapshots (1),
-.BR eclat\-describe\-tags (1),
-.BR eclat\-describe\-volumes (1),
-.BR eclat\-disassociate\-address (1),
-.BR eclat\-get\-console\-output (1),
-.BR eclat\-reboot\-instances (1),
-.BR eclat\-release\-address (1),
-.BR eclat\-start\-instances (1),
-.BR eclat\-stop\-instances (1),
+.BR eclat-allocaddr (1),
+.BR eclat-assocaddr (1),
+.BR eclat-atvol (1),
+.BR eclat-mkimg (1),
+.BR eclat-mksnap (1),
+.BR eclat-mktag (1),
+.BR eclat-mkvol (1),
+.BR eclat-rmsnap (1),
+.BR eclat-rmtag (1),
+.BR eclat-rmvol (1),
+.BR eclat-deimg (1),
+.BR eclat-lsaddr (1),
+.BR eclat-lszon (1),
+.BR eclat-lsimg (1),
+.BR eclat-lsiattr (1),
+.BR eclat-lsistat (1),
+.BR eclat-lsinst (1),
+.BR eclat-lsreg (1),
+.BR eclat-lssg (1),
+.BR eclat-lssattr (1),
+.BR eclat-lssnap (1),
+.BR eclat-lstag (1),
+.BR eclat-lsvol (1),
+.BR eclat-devol (1),
+.BR eclat-disasaddr (1),
+.BR eclat-conmesg (1),
+.BR eclat-setiattr (1),
+.BR eclat-setsattr (1),
+.BR eclat-reboot (1),
+.BR eclat-freeaddr (1),
+.BR eclat-clrsattr (1),
+.BR eclat-mkinst (1),
+.BR eclat-start (1),
+.BR eclat-stop (1),
.BR forlan (5).
.SH AUTHORS
Sergey Poznyakoff
diff --git a/doc/eclat.conf.5 b/doc/eclat.conf.5
index 00fcc4c..9b43dbe 100644
--- a/doc/eclat.conf.5
+++ b/doc/eclat.conf.5
@@ -502,9 +502,9 @@ format\-file "/usr/share/eclat/$command.forlan";
.in
.fi
.sp
-Given this statement, the command \fBeclat describe\-tags\fR, for
+Given this statement, the command \fBeclat lstag\fR, for
instance, will read configuration from file
-\fB/usr/share/eclat/describe\-tags.forlan\fR.
+\fB/usr/share/eclat/lstag.forlan\fR.
.sp
.PP
When selecting the format to use,
@@ -596,13 +596,13 @@ to ask for confirmation if one of the destructive commands is
requested, or if the command is start-instance or stop-instance.
.PP
Here is an example of how this modifies the behavior of
-.B release-address
+.B freeaddr
command:
.PP
.nf
.if +2
-$ \fBeclat release-address 192.168.0.1\fR
-Proceed with release-address [Y/n] _
+$ \fBeclat freeaddr 192.168.0.1\fR
+Proceed with freeaddr [Y/n] _
.fi
.PP
If the response begins with \fBY\fR (case-insensitive), it is taken
@@ -617,7 +617,7 @@ confirmation mode for the requested command, e.g.:
.PP
.nf
.in +2
-$ \fBeclat -Y delete-volume vol-d1234aef\fR
+$ \fBeclat -Y rmvol vol-d1234aef\fR
.fi
.SH MAPS
Maps provide a way to translate arbitrary symbolic names to the Amazon
diff --git a/doc/eclat-describe-availability-zones.1 b/doc/lszon.1
index 90626bc..d0900b6 100644
--- a/doc/eclat-describe-availability-zones.1
+++ b/doc/lszon.1
@@ -67,7 +67,7 @@ eu-west-1c available
.fi
.SH "SEE ALSO"
.BR eclat (1),
-.BR eclat\-describe\-regions (1).
+.BR eclat\-lsreg (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
diff --git a/src/Makefile.am b/src/Makefile.am
index 8638b45..ff13ecf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -20,38 +20,38 @@ eclat_SOURCES=\
accfile.c\
allocaddr.c\
asscaddr.c\
- attvol.c\
+ atvol.c\
cmdline.h\
config.c\
- creimg.c\
- cretags.c\
- cresnap.c\
- crevol.c\
- delsnap.c\
- delvol.c\
- detvol.c\
- disassaddr.c\
- drgimg.c\
- dscraddrs.c\
- dscrazs.c\
- dscrsnap.c\
- dscrsnapattr.c\
- dscrregs.c\
- dscrtags.c\
- dscrimgs.c\
- dscrinstattr.c\
- dscrinsts.c\
- dscrinststat.c\
- dscrsecgrps.c\
- dscrvols.c\
+ deimg.c\
+ devol.c\
+ disasaddr.c\
eclat.c\
eclat.h\
+ freeaddr.c\
genericcl.c\
getconout.c\
- modinstattr.c\
- reladdr.c\
- runinsts.c\
- startinst.c\
+ lsaddr.c\
+ lsiattr.c\
+ lsimg.c\
+ lsinst.c\
+ lsistat.c\
+ lsreg.c\
+ lssattr.c\
+ lssg.c\
+ lssnap.c\
+ lstag.c\
+ lsvol.c\
+ lszon.c\
+ mkimg.c\
+ mkinst.c\
+ mksnap.c\
+ mktags.c\
+ mkvol.c\
+ rmsnap.c\
+ rmvol.c\
+ setiattr.c\
+ startstop.c\
util.c
LDADD=../lib/libeclat.a @LIBOBJS@ ../grecs/src/libgrecs.a $(CURL_LIBS) @MAPLIBS@
@@ -65,20 +65,20 @@ AM_CPPFLAGS = \
OPTFILES=\
allocaddr-cl.opt\
asscaddr-cl.opt\
- creimg-cl.opt\
- cretags-cl.opt\
- crevol-cl.opt\
detvol-cl.opt\
- disassaddr-cl.opt\
- dscraddrs-cl.opt\
- dscrimgs-cl.opt\
- dscrinststat-cl.opt\
- dscrsecgrps-cl.opt\
- dscrsnap-cl.opt\
- dscrtags-cl.opt\
+ disasaddr-cl.opt\
+ freeaddr-cl.opt\
generic-cl.opt\
- reladdr-cl.opt\
- runinsts-cl.opt
+ lsaddr-cl.opt\
+ lsimg-cl.opt\
+ lsistat-cl.opt\
+ lssg-cl.opt\
+ lssnap-cl.opt\
+ lstag-cl.opt\
+ mkimg-cl.opt\
+ mkinst-cl.opt\
+ mktags-cl.opt\
+ mkvol-cl.opt
eclat_SOURCES += $(OPTFILES:.opt=.h)
diff --git a/src/attvol.c b/src/atvol.c
index de81454..de81454 100644
--- a/src/attvol.c
+++ b/src/atvol.c
diff --git a/src/cmdline.opt b/src/cmdline.opt
index 23a0858..05e3e8a 100644
--- a/src/cmdline.opt
+++ b/src/cmdline.opt
@@ -187,6 +187,13 @@ BEGIN
translate_option = 1;
END
+OPTION(list-commands,l,FMT,
+ [<list commands using the supplied format>])
+BEGIN
+ listcmd(optarg);
+ exit(0);
+END
+
GROUP(Preprocessor control)
OPTION(include-directory,I,DIR,
diff --git a/src/drgimg.c b/src/deimg.c
index 73fda13..73fda13 100644
--- a/src/drgimg.c
+++ b/src/deimg.c
diff --git a/src/detvol.c b/src/devol.c
index c4642f8..c4642f8 100644
--- a/src/detvol.c
+++ b/src/devol.c
diff --git a/src/disassaddr-cl.opt b/src/disasaddr-cl.opt
index 9be979b..9be979b 100644
--- a/src/disassaddr-cl.opt
+++ b/src/disasaddr-cl.opt
diff --git a/src/disassaddr.c b/src/disasaddr.c
index ad56632..93492f4 100644
--- a/src/disassaddr.c
+++ b/src/disasaddr.c
@@ -16,7 +16,7 @@
#include "eclat.h"
static int vpc;
-#include "disassaddr-cl.h"
+#include "disasaddr-cl.h"
int
eclat_disassociate_address(eclat_command_env_t *env, int argc, char **argv)
diff --git a/src/eclat.c b/src/eclat.c
index ef2f348..13b8e74 100644
--- a/src/eclat.c
+++ b/src/eclat.c
@@ -196,89 +196,81 @@ node_ident_cmp(struct grecs_node const *a, struct grecs_node const *b)
return strcmp(a->ident, b->ident);
}
+void listcmd(char *fmt);
+
#include "cmdline.h"
#define CMD_MOD 0x01
#define CMD_DESTR 0x02
#define CMD_NOQRY 0x04
-struct command {
- const char *ident;
- const char *tag;
- eclat_command_handler_t handler;
- int flags;
- enum eclat_confirm_mode confirm;
- char *fmt;
- struct grecs_locus locus;
-};
-
-struct command cmdtab[] = {
- { "start-instances", "StartInstances", eclat_start_instance,
+struct eclat_command cmdtab[] = {
+ { "start", "start-instances", "StartInstances", eclat_start_instance,
CMD_MOD },
- { "stop-instances", "StopInstances", eclat_stop_instance,
+ { "stop", "stop-instances", "StopInstances", eclat_stop_instance,
CMD_MOD },
- { "reboot-instances", "RebootInstances", eclat_reboot_instance,
+ { "reboot", "reboot-instances", "RebootInstances", eclat_reboot_instance,
CMD_MOD },
- { "describe-addresses", "DescribeAddresses",
+ { "lsaddr", "describe-addresses", "DescribeAddresses",
eclat_describe_addresses },
- { "describe-tags", "DescribeTags", eclat_describe_tags },
- { "describe-instance-attribute", "DescribeInstanceAttribute",
+ { "lstag", "describe-tags", "DescribeTags", eclat_describe_tags },
+ { "lsiattr", "describe-instance-attribute", "DescribeInstanceAttribute",
eclat_describe_instance_attribute },
- { "describe-instance-status", "DescribeInstanceStatus",
+ { "lsistat", "describe-instance-status", "DescribeInstanceStatus",
eclat_describe_instance_status },
- { "describe-instances", "DescribeInstances",
+ { "lsinst", "describe-instances", "DescribeInstances",
eclat_describe_instances },
- { "describe-volumes", "DescribeVolumes",
+ { "lsvol", "describe-volumes", "DescribeVolumes",
eclat_describe_volumes },
- { "allocate-address", "AllocateAddress",
+ { "allocaddr", "allocate-address", "AllocateAddress",
eclat_allocate_address, CMD_MOD },
- { "release-address", "ReleaseAddress",
+ { "freeaddr", "release-address", "ReleaseAddress",
eclat_release_address, CMD_MOD|CMD_DESTR },
- { "associate-address", "AssociateAddress",
+ { "assocaddr", "associate-address", "AssociateAddress",
eclat_associate_address, CMD_MOD },
- { "disassociate-address", "DisassociateAddress",
+ { "disasaddr", "disassociate-address", "DisassociateAddress",
eclat_disassociate_address, CMD_MOD },
- { "create-tags", "CreateTags",
+ { "mktag", "create-tags", "CreateTags",
eclat_create_tags, CMD_MOD },
- { "delete-tags", "DeleteTags",
+ { "rmtag", "delete-tags", "DeleteTags",
eclat_delete_tags, CMD_MOD|CMD_DESTR },
- { "get-console-output", "GetConsoleOutput",
+ { "conmesg", "get-console-output", "GetConsoleOutput",
eclat_get_console_output },
- { "describe-security-groups", "DescribeSecurityGroups",
+ { "lssg", "describe-security-groups", "DescribeSecurityGroups",
eclat_describe_security_groups },
- { "create-snapshot", "CreateSnapshot",
+ { "mksnap", "create-snapshot", "CreateSnapshot",
eclat_create_snapshot },
- { "describe-snapshots", "DescribeSnapshots",
+ { "lssnap", "describe-snapshots", "DescribeSnapshots",
eclat_describe_snapshots },
- { "describe-snapshot-attribute", "DescribeSnapshotAttribute",
+ { "lssattr", "describe-snapshot-attribute", "DescribeSnapshotAttribute",
eclat_describe_snapshot_attribute },
- { "modify-snapshot-attribute", "ModifySnapshotAttribute",
+ { "setsattr", "modify-snapshot-attribute", "ModifySnapshotAttribute",
eclat_modify_snapshot_attribute, CMD_MOD },
- { "reset-snapshot-attribute", "ResetSnapshotAttribute",
+ { "clrsattr", "reset-snapshot-attribute", "ResetSnapshotAttribute",
eclat_reset_snapshot_attribute, CMD_MOD|CMD_DESTR },
- { "delete-snapshot", "DeleteSnapshot",
+ { "rmsnap", "delete-snapshot", "DeleteSnapshot",
eclat_delete_snapshot, CMD_MOD|CMD_DESTR },
- { "describe-avaialbility-zones", "DescribeAvaialbilityZones",
+ { "lszon", "describe-availability-zones", "DescribeAvailabilityZones",
eclat_describe_avaialbility_zones },
- { "describe-regions", "DescribeRegions",
+ { "lsreg", "describe-regions", "DescribeRegions",
eclat_describe_regions },
- { "create-volume", "CreateVolume",
+ { "mkvol", "create-volume", "CreateVolume",
eclat_create_volume, CMD_MOD },
- { "delete-volume", "DeleteVolume",
+ { "rmvol", "delete-volume", "DeleteVolume",
eclat_delete_volume, CMD_MOD|CMD_DESTR },
- { "attach-volume", "AttachVolume",
+ { "atvol", "attach-volume", "AttachVolume",
eclat_attach_volume, CMD_MOD },
- { "detach-volume", "DetachVolume",
+ { "devol", "detach-volume", "DetachVolume",
eclat_detach_volume, CMD_MOD|CMD_DESTR },
- { "modify-instance-attribute", "ModifyInstanceAttribute",
+ { "setiattr", "modify-instance-attribute", "ModifyInstanceAttribute",
eclat_modify_instance_attribute, CMD_MOD },
- { "describe-images", "DescribeImages",
+ { "lsimg", "describe-images", "DescribeImages",
eclat_describe_images },
- { "run-instances", "RunInstances",
+ { "mkinst", "run-instances", "RunInstances",
eclat_run_instances, CMD_MOD },
- { "create-image", "CreateImage",
+ { "mkimg", "create-image", "CreateImage",
eclat_create_image, CMD_MOD },
- { "deregister-image", "DeregisterImage",
+ { "deimg", "deregister-image", "DeregisterImage",
eclat_deregister_image, CMD_MOD|CMD_DESTR }
};
size_t cmdcnt = sizeof(cmdtab) / sizeof(cmdtab[0]);
@@ -286,8 +278,8 @@ size_t cmdcnt = sizeof(cmdtab) / sizeof(cmdtab[0]);
static int
cmdcmp(const void *a, const void *b)
{
- struct command const *cmda = a;
- struct command const *cmdb = b;
+ struct eclat_command const *cmda = a;
+ struct eclat_command const *cmdb = b;
return strcmp(cmda->ident, cmdb->ident);
}
@@ -297,14 +289,115 @@ sortcmds()
qsort(cmdtab, cmdcnt, sizeof(cmdtab[0]), cmdcmp);
}
+/* Format:
+
+ %[pfx:][sfx][ni]
+
+ For example, to format the table of available commands for doc/eclat.1:
+
+ eclat -l '\t\\fB%n\\fR\t\\fB%i\\fR\n'
+
+ To format a "see also" list of commands (ibidem):
+
+ eclat -l '%.BR eclat-: (1)n,\n'
+*/
+
+int
+parsespec(char *start, char **endp, char *fchr, char *s[], int l[])
+{
+ char *p;
+ int n = 0;
+
+ ++start;
+ s[0] = start;
+ s[1] = NULL;
+ l[0] = l[1] = 0;
+ for (p = start; *p; p++) {
+ if (*p == ':' || strchr(fchr, *p)) {
+ if (n > 1)
+ return -1;
+ l[n++] = p - start;
+ if (*p != ':') {
+ *endp = p + 1;
+ return *p;
+ }
+ if (n == 1)
+ s[n] = start = p + 1;
+ }
+ }
+ return -1;
+}
+
void
-listcmd()
+fmtstr(const char *str, int len)
{
- struct command *cp;
+ while (len--) {
+ int c = *str++;
+ if (c == '\\') {
+ if (len) {
+ len--;
+ c = wordsplit_c_unquote_char(*str++);
+ }
+ }
+ fputc(c, stdout);
+ }
+}
- printf("Available commands:\n");
+void
+listcmd(char *fmt)
+{
+ struct eclat_command *cp;
+
+ for (cp = cmdtab; cp < cmdtab + cmdcnt; cp++) {
+ char *p = fmt;
+ char *start = fmt;
+ char *end;
+ char *s[2];
+ int l[2];
+ const char *str;
+
+ while (*p) {
+ if (*p == '%') {
+ switch (parsespec(p, &end, "ni", s, l)) {
+ case 'n':
+ str = cp->name;
+ break;
+ case 'i':
+ str = cp->ident;
+ break;
+ default:
+ p++;
+ continue;
+ }
+
+ if (p != start)
+ fmtstr(start, p - start);
+ fmtstr(s[0], l[0]);
+ printf("%s", str);
+ fmtstr(s[1], l[1]);
+ start = p = end;
+ } else {
+ p++;
+ }
+ }
+ if (p != start)
+ fmtstr(start, p - start);
+ }
+}
+
+void
+listcmdhook()
+{
+ struct eclat_command *cp;
+
+ printf("Available commands\n");
+ printf("Eclat name EC2 Name\n");
+ printf("-----------+---------\n");
for (cp = cmdtab; cp < cmdtab + cmdcnt; cp++)
- printf(" %s\n", cp->ident);
+ if (cp->name)
+ printf(" %-10s %s\n", cp->name, cp->ident);
+ else
+ printf(" %10s %s\n", "", cp->ident);
printf("\nRun \"%s COMMAND --help\" to get help on a particular command.\n",
program_name);
@@ -312,12 +405,13 @@ listcmd()
putchar('\n');
}
+
#define NO_MATCH 0
#define EXACT_MATCH 1
#define PARTIAL_MATCH 2
static int
-name_matches(const char *p, const char *q)
+ident_matches(const char *p, const char *q)
{
int match = EXACT_MATCH;
@@ -339,13 +433,15 @@ name_matches(const char *p, const char *q)
return NO_MATCH;
}
-struct command *
+struct eclat_command *
find_command_name(const char *name)
{
- struct command *cp, *match = NULL;
+ struct eclat_command *cp, *match = NULL;
for (cp = cmdtab; cp < cmdtab + cmdcnt; cp++) {
- switch (name_matches(cp->ident, name)) {
+ if (strcmp(cp->name, name) == 0)
+ return cp;
+ switch (ident_matches(cp->ident, name)) {
case NO_MATCH:
break;
case EXACT_MATCH:
@@ -359,7 +455,7 @@ find_command_name(const char *name)
err(" %s", match->ident);
err(" %s", cp->ident);
while (++cp < cmdtab + cmdcnt)
- if (name_matches(cp->ident, name) !=
+ if (ident_matches(cp->ident, name) !=
NO_MATCH)
err(" %s", cp->ident);
exit(EX_USAGE);
@@ -372,17 +468,21 @@ find_command_name(const char *name)
static void
print_matching_commands(const char *pat)
{
- struct command *cp;
+ struct eclat_command *cp;
+ size_t patlen = strlen (pat);
- for (cp = cmdtab; cp < cmdtab + cmdcnt; cp++)
- if (name_matches(cp->ident, pat) != NO_MATCH)
+ for (cp = cmdtab; cp < cmdtab + cmdcnt; cp++) {
+ if (cp->name && strlen (cp->name) >= patlen && memcmp (cp->name, pat, patlen) == 0)
+ printf("%s\n", cp->name);
+ if (ident_matches(cp->ident, pat) != NO_MATCH)
printf("%s\n", cp->ident);
+ }
}
-struct command *
+struct eclat_command *
find_command_tag(const char *tag)
{
- struct command *cp;
+ struct eclat_command *cp;
for (cp = cmdtab; cp < cmdtab + cmdcnt; cp++) {
if (eclat_actcmp(cp->tag, tag) == 0)
@@ -395,7 +495,7 @@ void
set_command_confirmation(const char *name, enum eclat_confirm_mode cfmode,
grecs_locus_t *locus)
{
- struct command *cp;
+ struct eclat_command *cp;
int flag = 0;
if (strcmp(name, "all") == 0)
@@ -421,7 +521,7 @@ set_command_confirmation(const char *name, enum eclat_confirm_mode cfmode,
void
set_command_format(const char *name, const char *format, grecs_locus_t *locus)
{
- struct command *cp = find_command_tag(name);
+ struct eclat_command *cp = find_command_tag(name);
if (!cp) {
grecs_error(locus, 0, "unknown command");
@@ -571,7 +671,7 @@ find_format(const char *name)
}
static forlan_eval_env_t
-read_format(struct command *cmd)
+read_format(struct eclat_command *cmd)
{
forlan_eval_env_t env = NULL;
@@ -647,11 +747,11 @@ main(int argc, char **argv)
eclat_partial_tree_t part;
struct grecs_node *xmltree;
forlan_eval_env_t env = NULL;
- struct command *command = NULL;
+ struct eclat_command *command = NULL;
eclat_command_env_t cmdenv;
set_program_name(argv[0]);
- proginfo.print_help_hook = listcmd;
+ proginfo.print_help_hook = listcmdhook;
debug_init();
forlan_init();
eclat_map_init();
@@ -672,7 +772,7 @@ main(int argc, char **argv)
if (match_command_mode) {
if (argc > 1)
die(EX_USAGE, "wrong number of arguments");
- print_matching_commands(argc == 1 ? argv[0] : "-");
+ print_matching_commands(argc == 1 ? argv[0] : "");
return 0;
}
@@ -786,6 +886,7 @@ main(int argc, char **argv)
/* Prepare environment */
memset(&cmdenv, 0, sizeof(cmdenv));
+ cmdenv.cmd = command;
cmdenv.curl = curl;
if (!(command->flags & CMD_NOQRY)) {
diff --git a/src/eclat.h b/src/eclat.h
index 36a5349..1848cd0 100644
--- a/src/eclat.h
+++ b/src/eclat.h
@@ -64,6 +64,7 @@ void config_finish(struct grecs_node *tree);
int run_config_finish_hooks(void);
struct eclat_command_env {
+ struct eclat_command const *cmd;
CURL *curl;
struct ec2_query *query;
};
@@ -72,6 +73,17 @@ typedef struct eclat_command_env eclat_command_env_t;
typedef int (*eclat_command_handler_t) (eclat_command_env_t *env, int argc, char **argv);
+struct eclat_command {
+ const char *name;
+ const char *ident;
+ const char *tag;
+ eclat_command_handler_t handler;
+ int flags;
+ enum eclat_confirm_mode confirm;
+ char *fmt;
+ struct grecs_locus locus;
+};
+
int eclat_start_instance(eclat_command_env_t *env, int argc, char **argv);
int eclat_stop_instance(eclat_command_env_t *env, int argc, char **argv);
int eclat_reboot_instance(eclat_command_env_t *env, int argc, char **argv);
diff --git a/src/reladdr-cl.opt b/src/freeaddr-cl.opt
index 73a241a..73a241a 100644
--- a/src/reladdr-cl.opt
+++ b/src/freeaddr-cl.opt
diff --git a/src/reladdr.c b/src/freeaddr.c
index 6fc8097..2cb2ce6 100644
--- a/src/reladdr.c
+++ b/src/freeaddr.c
@@ -16,7 +16,7 @@
#include "eclat.h"
static int vpc;
-#include "reladdr-cl.h"
+#include "freeaddr-cl.h"
int
eclat_release_address(eclat_command_env_t *env, int argc, char **argv)
diff --git a/src/dscraddrs-cl.opt b/src/lsaddr-cl.opt
index 9cab163..9cab163 100644
--- a/src/dscraddrs-cl.opt
+++ b/src/lsaddr-cl.opt
diff --git a/src/dscraddrs.c b/src/lsaddr.c
index 7e522f0..09541ad 100644
--- a/src/dscraddrs.c
+++ b/src/lsaddr.c
@@ -16,7 +16,7 @@
#include "eclat.h"
static int vpc = 0;
-#include "dscraddrs-cl.h"
+#include "lsaddr-cl.h"
int
eclat_describe_addresses(eclat_command_env_t *env, int argc, char **argv)
diff --git a/src/dscrinstattr.c b/src/lsiattr.c
index d6d8b64..d6d8b64 100644
--- a/src/dscrinstattr.c
+++ b/src/lsiattr.c
diff --git a/src/dscrimgs-cl.opt b/src/lsimg-cl.opt
index a176e60..a176e60 100644
--- a/src/dscrimgs-cl.opt
+++ b/src/lsimg-cl.opt
diff --git a/src/dscrimgs.c b/src/lsimg.c
index 51d85b1..4be377b 100644
--- a/src/dscrimgs.c
+++ b/src/lsimg.c
@@ -15,7 +15,7 @@
along with Eclat. If not, see <http://www.gnu.org/licenses/>. */
#include "eclat.h"
-#include "dscrimgs-cl.h"
+#include "lsimg-cl.h"
int
eclat_describe_images(eclat_command_env_t *env, int argc, char **argv)
diff --git a/src/dscrinsts.c b/src/lsinst.c
index 8101a71..8101a71 100644
--- a/src/dscrinsts.c
+++ b/src/lsinst.c
diff --git a/src/dscrinststat-cl.opt b/src/lsistat-cl.opt
index 20202c0..20202c0 100644
--- a/src/dscrinststat-cl.opt
+++ b/src/lsistat-cl.opt
diff --git a/src/dscrinststat.c b/src/lsistat.c
index 2bfeca0..00dd101 100644
--- a/src/dscrinststat.c
+++ b/src/lsistat.c
@@ -16,7 +16,7 @@
#include "eclat.h"
static int all_option;
-#include "dscrinststat-cl.h"
+#include "lsistat-cl.h"
int
eclat_describe_instance_status(eclat_command_env_t *env, int argc, char **argv)
diff --git a/src/dscrregs.c b/src/lsreg.c
index 0d2ba2d..0d2ba2d 100644
--- a/src/dscrregs.c
+++ b/src/lsreg.c
diff --git a/src/dscrsnapattr.c b/src/lssattr.c
index 92778db..92778db 100644
--- a/src/dscrsnapattr.c
+++ b/src/lssattr.c
diff --git a/src/dscrsecgrps-cl.opt b/src/lssg-cl.opt
index 2f6ad69..2f6ad69 100644
--- a/src/dscrsecgrps-cl.opt
+++ b/src/lssg-cl.opt
diff --git a/src/dscrsecgrps.c b/src/lssg.c
index 6add4ec..d691f47 100644
--- a/src/dscrsecgrps.c
+++ b/src/lssg.c
@@ -16,7 +16,7 @@
#include "eclat.h"
static int name_option;
-#include "dscrsecgrps-cl.h"
+#include "lssg-cl.h"
int
eclat_describe_security_groups(eclat_command_env_t *env, int argc, char **argv)
diff --git a/src/dscrsnap-cl.opt b/src/lssnap-cl.opt
index a524165..a524165 100644
--- a/src/dscrsnap-cl.opt
+++ b/src/lssnap-cl.opt
diff --git a/src/dscrsnap.c b/src/lssnap.c
index 9f3747f..3494a8b 100644
--- a/src/dscrsnap.c
+++ b/src/lssnap.c
@@ -15,7 +15,7 @@
along with Eclat. If not, see <http://www.gnu.org/licenses/>. */
#include "eclat.h"
-#include "dscrsnap-cl.h"
+#include "lssnap-cl.h"
static char *snapshot_status_str[] = {
"pending", "completed", "error", NULL
diff --git a/src/dscrtags-cl.opt b/src/lstag-cl.opt
index 4adfea0..4adfea0 100644
--- a/src/dscrtags-cl.opt
+++ b/src/lstag-cl.opt
diff --git a/src/dscrtags.c b/src/lstag.c
index 3530e62..49c165b 100644
--- a/src/dscrtags.c
+++ b/src/lstag.c
@@ -15,7 +15,7 @@
along with Eclat. If not, see <http://www.gnu.org/licenses/>. */
#include "eclat.h"
-#include "dscrtags-cl.h"
+#include "lstag-cl.h"
int
eclat_describe_tags(eclat_command_env_t *env, int argc, char **argv)
diff --git a/src/dscrvols.c b/src/lsvol.c
index 030701b..030701b 100644
--- a/src/dscrvols.c
+++ b/src/lsvol.c
diff --git a/src/dscrazs.c b/src/lszon.c
index 499c3bc..499c3bc 100644
--- a/src/dscrazs.c
+++ b/src/lszon.c
diff --git a/src/creimg-cl.opt b/src/mkimg-cl.opt
index 18c9716..18c9716 100644
--- a/src/creimg-cl.opt
+++ b/src/mkimg-cl.opt
diff --git a/src/creimg.c b/src/mkimg.c
index bcc52f6..021dce9 100644
--- a/src/creimg.c
+++ b/src/mkimg.c
@@ -18,7 +18,7 @@
int noreboot;
char *descr;
struct grecs_list *devmap;
-#include "creimg-cl.h"
+#include "mkimg-cl.h"
int
eclat_create_image(eclat_command_env_t *env, int argc, char **argv)
diff --git a/src/runinsts-cl.opt b/src/mkinst-cl.opt
index 9852e70..9852e70 100644
--- a/src/runinsts-cl.opt
+++ b/src/mkinst-cl.opt
diff --git a/src/runinsts.c b/src/mkinst.c
index c13361a..8871f0e 100644
--- a/src/runinsts.c
+++ b/src/mkinst.c
@@ -15,7 +15,7 @@
along with Eclat. If not, see <http://www.gnu.org/licenses/>. */
#include "eclat.h"
-#include "runinsts-cl.h"
+#include "mkinst-cl.h"
/* format:
diff --git a/src/cresnap.c b/src/mksnap.c
index 5a6378f..5a6378f 100644
--- a/src/cresnap.c
+++ b/src/mksnap.c
diff --git a/src/cretags-cl.opt b/src/mktags-cl.opt
index 0ca52e3..0ca52e3 100644
--- a/src/cretags-cl.opt
+++ b/src/mktags-cl.opt
diff --git a/src/cretags.c b/src/mktags.c
index 08aa201..3a7a272 100644
--- a/src/cretags.c
+++ b/src/mktags.c
@@ -15,7 +15,7 @@
along with Eclat. If not, see <http://www.gnu.org/licenses/>. */
#include "eclat.h"
-#include "cretags-cl.h"
+#include "mktags-cl.h"
static int
process_tags(eclat_command_env_t *env, int argc, char **argv, int require_tags)
diff --git a/src/crevol-cl.opt b/src/mkvol-cl.opt
index a3ae861..a3ae861 100644
--- a/src/crevol-cl.opt
+++ b/src/mkvol-cl.opt
diff --git a/src/crevol.c b/src/mkvol.c
index 350f4d8..265f012 100644
--- a/src/crevol.c
+++ b/src/mkvol.c
@@ -18,7 +18,7 @@
char *zone;
char *snapshot;
char *iops;
-#include "crevol-cl.h"
+#include "mkvol-cl.h"
int
eclat_create_volume(eclat_command_env_t *env, int argc, char **argv)
diff --git a/src/delsnap.c b/src/rmsnap.c
index 4f32185..4f32185 100644
--- a/src/delsnap.c
+++ b/src/rmsnap.c
diff --git a/src/delvol.c b/src/rmvol.c
index bf0f565..bf0f565 100644
--- a/src/delvol.c
+++ b/src/rmvol.c
diff --git a/src/modinstattr.c b/src/setiattr.c
index c84345f..c84345f 100644
--- a/src/modinstattr.c
+++ b/src/setiattr.c
diff --git a/src/startinst.c b/src/startinst.c
deleted file mode 100644
index 216ee1c..0000000
--- a/src/startinst.c
+++ b/dev/null
@@ -1,87 +0,0 @@
-/* This file is part of Eclat.
- Copyright (C) 2012, 2013 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/>. */
-
-#include "eclat.h"
-
-static void
-parse_options(const char *progname, const char *docstring,
- int argc, char *argv[], int *index)
-{
- generic_proginfo->args_doc = "ID [ID...]";
- return generic_parse_options(progname, docstring, argc, argv, index);
-}
-
-static int
-start_stop_instance(eclat_command_env_t *env, int argc, char **argv)
-{
- int i;
- struct ec2_query *q = env->query;
- char buf[128], *bend;
- size_t bs;
-
- if (argc == 0)
- die(EX_USAGE, "no instance ids");
- translate_ids(argc, argv, "InstanceId");
-
- strcpy(buf, "InstanceId.");
- bend = buf + strlen(buf);
- bs = sizeof(buf) - strlen(buf);
- for (i = 0; i < argc; i++) {
- snprintf(bend, bs, "%lu", (unsigned long)(i + 1));
- eclat_query_add_param(q, buf, argv[i]);
- }
-
- return 0;
-}
-
-int
-eclat_start_instance(eclat_command_env_t *env, int argc, char **argv)
-{
- int i;
-
- parse_options("eclat start-instances",
- "Start named instances",
- argc, argv, &i);
-
- debug(ECLAT_DEBCAT_MAIN, 1, ("starting instances"));
- return start_stop_instance(env, argc - i, argv + i);
-}
-
-int
-eclat_stop_instance(eclat_command_env_t *env, int argc, char **argv)
-{
- int i;
-
- parse_options("eclat stop-instances",
- "Stop named instances",
- argc, argv, &i);
-
- debug(ECLAT_DEBCAT_MAIN, 1, ("stopping instances"));
- return start_stop_instance(env, argc - i, argv + i);
-}
-
-int
-eclat_reboot_instance(eclat_command_env_t *env, int argc, char **argv)
-{
- int i;
-
- parse_options("eclat reboot-instances",
- "Reboot named instances",
- argc, argv, &i);
-
- debug(ECLAT_DEBCAT_MAIN, 1, ("rebooting instances"));
- return start_stop_instance(env, argc - i, argv + i);
-}

Return to:

Send suggestions and report system problems to the System administrator.