Skip to content

Commit d60feb1

Browse files
caberoscaberos
authored andcommitted
slcli vs capture uses a deprecated API
1 parent 09125be commit d60feb1

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

SoftLayer/CLI/virt/capture.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ def cli(env, identifier, name, all, note):
2525

2626
capture = vsi.capture(vs_id, name, all, note)
2727

28+
print(capture)
29+
2830
table = formatting.KeyValueTable(['name', 'value'])
2931
table.align['name'] = 'r'
3032
table.align['value'] = 'l'
3133

32-
table.add_row(['vs_id', capture['guestId']])
34+
table.add_row(['globalIdentifier', capture['globalIdentifier']])
3335
table.add_row(['date', capture['createDate'][:10]])
3436
table.add_row(['time', capture['createDate'][11:19]])
3537
table.add_row(['transaction', formatting.transaction_status(capture)])

SoftLayer/fixtures/SoftLayer_Virtual_Guest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,14 +716,15 @@
716716
setUserMetadata = ['meta']
717717
reloadOperatingSystem = 'OK'
718718
setTags = True
719-
createArchiveTransaction = {
719+
createArchiveTemplate = {
720720
'createDate': '2018-12-10T17:29:18-06:00',
721721
'elapsedSeconds': 0,
722722
'guestId': 12345678,
723723
'hardwareId': None,
724724
'id': 12345,
725725
'modifyDate': '2018-12-10T17:29:18-06:00',
726-
'statusChangeDate': '2018-12-10T17:29:18-06:00'
726+
'statusChangeDate': '2018-12-10T17:29:18-06:00',
727+
'globalIdentifier': '495c47c2-80af-4fef-87a9-97faf132345678'
727728
}
728729

729730
executeRescueLayer = True

SoftLayer/managers/vs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ def capture(self, instance_id, name, additional_disks=False, notes=None):
996996

997997
disks_to_capture.append(block_device)
998998

999-
return self.guest.createArchiveTransaction(
999+
return self.guest.createArchiveTemplate(
10001000
name, disks_to_capture, notes, id=instance_id)
10011001

10021002
def upgrade(self, instance_id, cpus=None, memory=None, nic_speed=None, public=True, preset=None, disk=None):

0 commit comments

Comments
 (0)