From 155a76453f41b7ad80af4f8b4bf0539f2df32498 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Thu, 28 Nov 2013 16:06:56 +0200 Subject: Implement sg command * etc/sg.fln: New file. * etc/Makefile.am (FLNFILES): Add sg.fln * src/sg.c: New file. * src/sg-cl.opt: New file. * src/Makefile.am (eclat_SOURCES): Add sg.c (OPTFILES): Add sg-cl.opt * src/eclat.c (cmdtab): Add entry for "sg". (eclat_do_command): Ignore tag if it is NULL. * src/eclat.h (eclat_sg): New proto. --- etc/Makefile.am | 1 + etc/sg.fln | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 etc/sg.fln (limited to 'etc') diff --git a/etc/Makefile.am b/etc/Makefile.am index 9fe475e..1f53924 100644 --- a/etc/Makefile.am +++ b/etc/Makefile.am @@ -51,6 +51,7 @@ FLNFILES=\ release-address.fln\ reset-snapshot-attribute.fln\ run-instances.fln\ + sg.fln\ start-instances.fln\ stop-instances.fln diff --git a/etc/sg.fln b/etc/sg.fln new file mode 100644 index 0000000..82247be --- /dev/null +++ b/etc/sg.fln @@ -0,0 +1,28 @@ +/* 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 . */ + +if (.AuthorizeSecurityGroupIngressResponse.return) { + if (!.AuthorizeSecurityGroupIngressResponse.return[true]) { + error("Return: ",.AuthorizeSecurityGroupIngressResponse.return,"\n"); + exit(1); + } +} else if (.RevokeSecurityGroupIngressResponse.return) { + if (!.RevokeSecurityGroupIngressResponse.return[true]) { + error("Return: ",.RevokeSecurityGroupIngressResponse.return,"\n"); + exit(1); + } +} + -- cgit v1.2.1