1
0
Fork 0
mirror of https://github.com/fog/fog-aws.git synced 2022-11-09 13:50:52 -05:00

add creation date to image object

This commit is contained in:
Puneet Loya 2016-11-21 23:29:15 -08:00
parent c4b619d0f4
commit ed009a83b9
4 changed files with 5 additions and 2 deletions

View file

@ -22,6 +22,7 @@ module Fog
attribute :tags, :aliases => 'tagSet' attribute :tags, :aliases => 'tagSet'
attribute :name attribute :name
attribute :virtualization_type, :aliases => 'virtualizationType' attribute :virtualization_type, :aliases => 'virtualizationType'
attribute :creation_date, :aliases => 'creationDate'
def deregister(delete_snapshot = false) def deregister(delete_snapshot = false)
service.deregister_image(id) service.deregister_image(id)

View file

@ -32,7 +32,8 @@ module Fog
# ramdisk_id=nil, # ramdisk_id=nil,
# root_device_type=nil, # root_device_type=nil,
# root_device_name=nil, # root_device_name=nil,
# tags=nil # tags=nil,
# creation_date=nil
# > # >
# #

View file

@ -66,7 +66,7 @@ module Fog
end end
else else
case name case name
when 'architecture', 'description', 'hypervisor', 'imageId', 'imageLocation', 'imageOwnerAlias', 'imageOwnerId', 'imageState', 'imageType', 'kernelId', 'name', 'platform', 'ramdiskId', 'rootDeviceType','rootDeviceName','virtualizationType' when 'architecture', 'description', 'hypervisor', 'imageId', 'imageLocation', 'imageOwnerAlias', 'imageOwnerId', 'imageState', 'imageType', 'kernelId', 'name', 'platform', 'ramdiskId', 'rootDeviceType','rootDeviceName','virtualizationType','creationDate'
@image[name] = value @image[name] = value
when 'isPublic' when 'isPublic'
if value == 'true' if value == 'true'

View file

@ -36,6 +36,7 @@ module Fog
# * 'rootDeviceName'<~String> - Root device name, e.g. /dev/sda1 # * 'rootDeviceName'<~String> - Root device name, e.g. /dev/sda1
# * 'rootDeviceType'<~String> - Root device type, ebs or instance-store # * 'rootDeviceType'<~String> - Root device type, ebs or instance-store
# * 'virtualizationType'<~String> - Type of virtualization # * 'virtualizationType'<~String> - Type of virtualization
# * 'creationDate'<~Date> - Date the image was created
# #
# {Amazon API Reference}[http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeImages.html] # {Amazon API Reference}[http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeImages.html]
def describe_images(filters = {}) def describe_images(filters = {})