aboutsummaryrefslogtreecommitdiff
path: root/src/disasaddr.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2013-04-20 10:39:19 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2013-04-20 10:39:19 +0300
commit67dce06bb26798e2b11ee0883bdc7e08d7edb663 (patch)
tree3f3655179dded2bbdd16c411d3f0558fe4515bf9 /src/disasaddr.c
parent347387193da605922ed98742dbc7fa3f67a908f4 (diff)
downloadeclat-67dce06bb26798e2b11ee0883bdc7e08d7edb663.tar.gz
eclat-67dce06bb26798e2b11ee0883bdc7e08d7edb663.tar.bz2
Major rewrite. Provide short names for each command.
Diffstat (limited to 'src/disasaddr.c')
-rw-r--r--src/disasaddr.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/disasaddr.c b/src/disasaddr.c
new file mode 100644
index 0000000..93492f4
--- /dev/null
+++ b/src/disasaddr.c
@@ -0,0 +1,37 @@
+/* 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 int vpc;
+#include "disasaddr-cl.h"
+
+int
+eclat_disassociate_address(eclat_command_env_t *env, int argc, char **argv)
+{
+ int i;
+ struct ec2_query *q = env->query;
+
+ parse_options(argc, argv, &i);
+ argc -= i;
+ argv += i;
+
+ if (argc != 1)
+ die(EX_USAGE, "wrong number of arguments to disassociate-address");
+
+ eclat_query_add_param(q, vpc ? "AssociationId" : "PublicIp", argv[0]);
+
+ return 0;
+}

Return to:

Send suggestions and report system problems to the System administrator.