diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2015-11-19 17:25:45 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2015-11-19 17:25:45 +0200 |
commit | 50c1b58a6ed382baaf86a9df7f9eee68d19948ca (patch) | |
tree | 6f82f50e31b23c22d0f7487b8d291bfdb33bf39e /etc | |
parent | 0a3f8aae4a41c4aa8435214e235af509cd5f4435 (diff) | |
download | eclat-50c1b58a6ed382baaf86a9df7f9eee68d19948ca.tar.gz eclat-50c1b58a6ed382baaf86a9df7f9eee68d19948ca.tar.bz2 |
Fix formats
* etc/allocate-address.fln: Print allocation ID, if available.
* etc/describe-instances.fln: Fix printing group sets.
* etc/describe-subnets.fln: Fix undefined variable.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/allocate-address.fln | 9 | ||||
-rw-r--r-- | etc/describe-instances.fln | 6 | ||||
-rw-r--r-- | etc/describe-subnets.fln | 2 |
3 files changed, 11 insertions, 6 deletions
diff --git a/etc/allocate-address.fln b/etc/allocate-address.fln index 89b0e38..da9301f 100644 --- a/etc/allocate-address.fln +++ b/etc/allocate-address.fln @@ -14,6 +14,11 @@ You should have received a copy of the GNU General Public License along with Eclat. If not, see <http://www.gnu.org/licenses/>. */ -if (.AllocateAddressResponse.publicIp) { - print(last,"\n"); +if (.AllocateAddressResponse) { + let ip = last; + print(ip.publicIp); + if (ip.allocationId) { + print("\t", ip.allocationId); + } + print("\n"); } diff --git a/etc/describe-instances.fln b/etc/describe-instances.fln index 37afa7d..cde1e69 100644 --- a/etc/describe-instances.fln +++ b/etc/describe-instances.fln @@ -18,7 +18,7 @@ if (.DescribeInstancesResponse.reservationSet) { for (var in .DescribeInstancesResponse.reservationSet.item) { print("Reservation ID: ", var.reservationId, "\n"); print("Owner ID: ", var.ownerId, "\n"); - if (var.groupSet) { + if (!empty(var.groupSet)) { print("Groups:\n"); for (grp in var.groupSet.item) print("\t", grp.groupId,"\t", grp.groupName, "\n"); @@ -41,10 +41,10 @@ if (.DescribeInstancesResponse.reservationSet) { print("\tTenancy: ", inst.placement.tenancy, "\n"); print("\tPrivate IP: ", inst.privateIpAddress, "\n"); print("\tPublic IP: ", inst.ipAddress, "\n"); - if (inst.groupSet.item) { + if (!empty(inst.groupSet)) { print("\tGroups:\n"); for (grp in inst.groupSet.item) - print("\t\t", inst.groupSet.item.groupId, " -- ", inst.groupSet.item.groupName, "\n"); + print("\t\t", grp.groupId, " -- ", grp.groupName, "\n"); } print("\tRoot Device Type: ", inst.rootDeviceType, "\n"); print("\tRoot Device Name: ", inst.rootDeviceName, "\n"); diff --git a/etc/describe-subnets.fln b/etc/describe-subnets.fln index 74bb050..2e6c17c 100644 --- a/etc/describe-subnets.fln +++ b/etc/describe-subnets.fln @@ -21,7 +21,7 @@ if (.DescribeSubnetsResponse.subnetSet) { s.availableIpAddressCount, "\t", s.availabilityZone, "\t", s.defaultForAz, "\t", s.mapPublicIpOnLaunch, "\n"); if (!empty(s.tagSet)) { - for (tag in var.tagSet.item) + for (tag in s.tagSet.item) print("\t", tag.key,"=",tag.value,"\n"); } } |