From a32c2acdae16394613be0fe01fa5c439a0f247d0 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Thu, 19 Nov 2015 10:54:17 +0200 Subject: Add formats for new statements introduced by ed8a63af and 1473a448 --- etc/Makefile.am | 12 ++++++++++++ etc/attach-internet-gateway.fln | 22 ++++++++++++++++++++++ etc/create-internet-gateway.fln | 19 +++++++++++++++++++ etc/create-subnet.fln | 21 +++++++++++++++++++++ etc/create-vpc.fln | 21 +++++++++++++++++++++ etc/delete-internet-gateway.fln | 22 ++++++++++++++++++++++ etc/delete-subnet.fln | 22 ++++++++++++++++++++++ etc/delete-vpc.fln | 22 ++++++++++++++++++++++ etc/describe-internet-gateway.fln | 29 +++++++++++++++++++++++++++++ etc/describe-subnets.fln | 28 ++++++++++++++++++++++++++++ etc/detach-internet-gateway.fln | 22 ++++++++++++++++++++++ etc/modify-subnet-attribute.fln | 22 ++++++++++++++++++++++ etc/modify-vpc-attribute.fln | 22 ++++++++++++++++++++++ 13 files changed, 284 insertions(+) create mode 100644 etc/attach-internet-gateway.fln create mode 100644 etc/create-internet-gateway.fln create mode 100644 etc/create-subnet.fln create mode 100644 etc/create-vpc.fln create mode 100644 etc/delete-internet-gateway.fln create mode 100644 etc/delete-subnet.fln create mode 100644 etc/delete-vpc.fln create mode 100644 etc/describe-internet-gateway.fln create mode 100644 etc/describe-subnets.fln create mode 100644 etc/detach-internet-gateway.fln create mode 100644 etc/modify-subnet-attribute.fln create mode 100644 etc/modify-vpc-attribute.fln diff --git a/etc/Makefile.am b/etc/Makefile.am index 10de3fd..dfb87cc 100644 --- a/etc/Makefile.am +++ b/etc/Makefile.am @@ -18,23 +18,30 @@ noinst_PROGRAMS = flncat FLNFILES=\ allocate-address.fln\ + attach-internet-gateway.fln\ attach-volume.fln\ associate-address.fln\ copy-image.fln\ copy-snapshot.fln\ create-image.fln\ + create-internet-gateway.fln\ create-security-group.fln\ create-snapshot.fln\ + create-subnet.fln\ create-tags.fln\ create-volume.fln\ create-vpc.fln\ + delete-internet-gateway.fln\ delete-security-group.fln\ + delete-subnet.fln\ delete-snapshot.fln\ delete-tags.fln\ delete-volume.fln\ + delete-vpc.fln\ deregister-image.fln\ describe-addresses.fln\ describe-availability-zones.fln\ + describe-internet-gateway.fln\ describe-image-attribute.fln\ describe-images.fln\ describe-instance-attribute.fln\ @@ -44,9 +51,12 @@ FLNFILES=\ describe-security-groups.fln\ describe-snapshot-attribute.fln\ describe-snapshots.fln\ + describe-subnets.fln\ describe-tags.fln\ describe-volumes.fln\ + describe-vpc-attribute.fln\ describe-vpcs.fln\ + detach-internet-gateway.fln\ detach-volume.fln\ disassociate-address.fln\ get-console-output.fln\ @@ -54,6 +64,8 @@ FLNFILES=\ modify-image-attribute.fln\ modify-instance-attribute.fln\ modify-snapshot-attribute.fln\ + modify-subnet-attribute.fln\ + modify-vpc-attribute.fln\ reboot-instances.fln\ release-address.fln\ reset-snapshot-attribute.fln\ diff --git a/etc/attach-internet-gateway.fln b/etc/attach-internet-gateway.fln new file mode 100644 index 0000000..6644e36 --- /dev/null +++ b/etc/attach-internet-gateway.fln @@ -0,0 +1,22 @@ +/* This file is part of Eclat. + Copyright (C) 2012-2015 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 (.AttachInternetGatewayResponse.return) { + if (!.AttachInternetGatewayResponse.return[true]) { + error("Return: ",.AttachInternetGatewayResponse.return,"\n"); + exit(1); + } +} diff --git a/etc/create-internet-gateway.fln b/etc/create-internet-gateway.fln new file mode 100644 index 0000000..6f7c122 --- /dev/null +++ b/etc/create-internet-gateway.fln @@ -0,0 +1,19 @@ +/* This file is part of Eclat. + Copyright (C) 2012-2015 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 (.CreateInternetGatewayResponse.internetGateway) { + print(last.internetGatewayId,"\n"); +} diff --git a/etc/create-subnet.fln b/etc/create-subnet.fln new file mode 100644 index 0000000..077d9ee --- /dev/null +++ b/etc/create-subnet.fln @@ -0,0 +1,21 @@ +/* This file is part of Eclat. + Copyright (C) 2012-2015 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 (.CreateSubnetResponse.subnet) { + let s = last; + print(s.subnetId, "\t", s.state, "\t", s.vpcId, "\t", s.cidrBlock, "\t", + s.availableIpAddressCount, "\t", s.availabilityZone, "\n"); +} diff --git a/etc/create-vpc.fln b/etc/create-vpc.fln new file mode 100644 index 0000000..3abe2ca --- /dev/null +++ b/etc/create-vpc.fln @@ -0,0 +1,21 @@ +/* This file is part of Eclat. + Copyright (C) 2015 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 (.CreateVpcResponse.vpc) { + let var = .CreateVpcResponse.vpc; + print(var.vpcId, "\t", var.cidrBlock, "\t", var.dhcpOptionsId, "\t", + var.state, "\t", var.isDefault, "\n"); +} diff --git a/etc/delete-internet-gateway.fln b/etc/delete-internet-gateway.fln new file mode 100644 index 0000000..ac902cd --- /dev/null +++ b/etc/delete-internet-gateway.fln @@ -0,0 +1,22 @@ +/* This file is part of Eclat. + Copyright (C) 2012-2015 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 (.DeleteInternetGatewayResponse.return) { + if (!.DeleteInternetGatewayResponse.return[true]) { + error("Return: ",.DeleteInternetGatewayResponse.return,"\n"); + exit(1); + } +} diff --git a/etc/delete-subnet.fln b/etc/delete-subnet.fln new file mode 100644 index 0000000..1c683bb --- /dev/null +++ b/etc/delete-subnet.fln @@ -0,0 +1,22 @@ +/* This file is part of Eclat. + Copyright (C) 2012-2015 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 (.DeleteSubnetResponse.return) { + if (!.DeleteSubnetResponse.return[true]) { + error("Return: ",.DeleteSubnetResponse.return,"\n"); + exit(1); + } +} diff --git a/etc/delete-vpc.fln b/etc/delete-vpc.fln new file mode 100644 index 0000000..8abc42f --- /dev/null +++ b/etc/delete-vpc.fln @@ -0,0 +1,22 @@ +/* This file is part of Eclat. + Copyright (C) 2012-2015 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 (.DeleteVpcResponse.return) { + if (!.DeleteVpcResponse.return[true]) { + error("Return: ",.DeleteVpcResponse.return,"\n"); + exit(1); + } +} diff --git a/etc/describe-internet-gateway.fln b/etc/describe-internet-gateway.fln new file mode 100644 index 0000000..17b4e34 --- /dev/null +++ b/etc/describe-internet-gateway.fln @@ -0,0 +1,29 @@ +/* This file is part of Eclat. + Copyright (C) 2012-2015 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 (.DescribeInternetGatewaysResponse.internetGatewaySet) { + for (var in last.item) { + print(var.internetGatewayId); + if (!empty(var.attachmentSet)) + print("\t", var.attachmentSet.item.vpcId, "\t", + var.attachmentSet.item.state); + print("\n"); + if (!empty(var.tagSet)) { + for (tag in var.tagSet.item) + print("\t", tag.key,"=",tag.value,"\n"); + } + } +} diff --git a/etc/describe-subnets.fln b/etc/describe-subnets.fln new file mode 100644 index 0000000..74bb050 --- /dev/null +++ b/etc/describe-subnets.fln @@ -0,0 +1,28 @@ +/* This file is part of Eclat. + Copyright (C) 2012-2015 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 (.DescribeSubnetsResponse.subnetSet) { + let subnetSet = last; + for (s in subnetSet.item) { + print(s.subnetId, "\t", s.state, "\t", s.vpcId, "\t", s.cidrBlock, "\t", + s.availableIpAddressCount, "\t", s.availabilityZone, "\t", + s.defaultForAz, "\t", s.mapPublicIpOnLaunch, "\n"); + if (!empty(s.tagSet)) { + for (tag in var.tagSet.item) + print("\t", tag.key,"=",tag.value,"\n"); + } + } +} diff --git a/etc/detach-internet-gateway.fln b/etc/detach-internet-gateway.fln new file mode 100644 index 0000000..0ba493d --- /dev/null +++ b/etc/detach-internet-gateway.fln @@ -0,0 +1,22 @@ +/* This file is part of Eclat. + Copyright (C) 2012-2015 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 (.DetachInternetGatewayResponse.return) { + if (!.DetachInternetGatewayResponse.return[true]) { + error("Return: ",.DetachInternetGatewayResponse.return,"\n"); + exit(1); + } +} diff --git a/etc/modify-subnet-attribute.fln b/etc/modify-subnet-attribute.fln new file mode 100644 index 0000000..d77b821 --- /dev/null +++ b/etc/modify-subnet-attribute.fln @@ -0,0 +1,22 @@ +/* This file is part of Eclat. + Copyright (C) 2012-2015 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 (.ModifySubnetAttributeResponse.return) { + if (!.ModifySubnetAttributeResponse.return[true]) { + error("Return: ",.ModifySubnetAttributeResponse.return,"\n"); + exit(1); + } +} diff --git a/etc/modify-vpc-attribute.fln b/etc/modify-vpc-attribute.fln new file mode 100644 index 0000000..fc33ce0 --- /dev/null +++ b/etc/modify-vpc-attribute.fln @@ -0,0 +1,22 @@ +/* This file is part of Eclat. + Copyright (C) 2012-2015 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 (.ModifyVpcAttributeResponse.return) { + if (!.ModifyVpcAttributeResponse.return[true]) { + error("Return: ",.ModifyVpcAttributeResponse.return,"\n"); + exit(1); + } +} -- cgit v1.2.1