Skip to content

Server.image_name should actually return a name, not a self-link #390

@Temikus

Description

@Temikus

image_name should actually return a name, not a self-link

def image_name
boot_disk = disks.first
unless boot_disk.is_a?(Disk)
source = boot_disk[:source]
match = source.match(%r{/zones/(.*)/disks/(.*)$})
boot_disk = service.disks.get(match[2], match[1])
end
boot_disk.source_image.nil? ? nil : boot_disk.source_image
end
def destroy(async = true)
requires :name, :zone
data = service.delete_server(name, zone_name)
operation = Fog::Compute::Google::Operations
.new(:service => service)
.get(data.name, data.zone)
operation.wait_for { ready? } unless async
operation

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions