Skip to content

Commit aa72f9f

Browse files
committed
Merge remote-tracking branch 'original/Version_2.2.0'
Conflicts: lib/softlayer/VirtualServer.rb
2 parents 1c978ad + 3423274 commit aa72f9f

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

CHANGELOG.textile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
* The routine to retreive the open tickets on an account has been moved from the Ticket class. The set of open tickets is now a dynamic property of an account object.
88

99
*2.2*
10-
* Added the ability to set a timout for network requests. The timeout is given when a client is created by passing the :timeout hash parameter when creating a client. The value of the parameter is an integer number of seconds.
10+
* Added the ability to set a timout for network requests. The timeout is given when a client is created by passing the :timeout hash parameter when creating a client. The value of the parameter is an integer number of seconds.
11+
* Fixed a bug in VirtualServer#capture_image
1112

1213
*2.1.1*
1314
* Virtual server upgrades no longer raise exceptions

lib/softlayer/VirtualServer.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,16 @@ def cancel!
8787
# You may use the wait_until_ready routine of SoftLayer::ImageTemplate to
8888
# wait on it.
8989
#
90-
def capture_image(image_name, include_attached_storage = false, image_notes = nil)
90+
def capture_image(image_name, include_attached_storage = false, image_notes = '')
91+
image_notes = '' if !image_notes
92+
image_name = 'Captured Image' if !image_name
93+
9194
disk_filter = lambda { |disk| disk['device'] == '0' }
9295
disk_filter = lambda { |disk| disk['device'] != '1' } if include_attached_storage
9396

9497
disks = self.blockDevices.select(&disk_filter)
9598

96-
self.service.createArchiveTransaction(image_name, disks, notes ? notes : "") if disks && !disks.empty?
99+
self.service.createArchiveTransaction(image_name, disks, image_notes) if disks && !disks.empty?
97100

98101
image_templates = SoftLayer::ImageTemplate.find_private_templates(:name => image_name)
99102
image_templates[0] if !image_templates.empty?

0 commit comments

Comments
 (0)