Revision 9f5a24e9 src/cloud/ec2/bin/econe-describe-images

View differences:

src/cloud/ec2/bin/econe-describe-images
115 115

  
116 116
images = rc['imagesSet']['item']
117 117

  
118
fmt = "%-4s  %-36s  %s"  
118
fmt = "%-8s %-20s %-30s %-40s %s"  
119 119

  
120 120
if headers
121
    puts fmt % ["Owner", "ImageId", "Location"]
121
    puts fmt % ["Owner", "ImageId", "Status", "Visibility", "Location"]
122 122
    puts "------------------------------------------------------------------------------" 
123 123
end
124 124

  
125 125
if images 
126 126
    images.each { |img|
127
        puts fmt % [img['imageOwnerId'],img['imageId'],img['imageLocation']]
127
        if img['isPublic'] == 'true'
128
            visibility = "public"
129
        elsif img['isPublic'] == 'false'
130
            visibility = "private"
131
        end
132
        puts fmt % [img['imageOwnerId'],img['imageId'], img['imageState'], visibility,img['imageLocation']]
128 133
    }
129 134
end
130 135

  

Also available in: Unified diff