Skip to content

Instantly share code, notes, and snippets.

@underscorephil
Created November 13, 2013 16:22
Show Gist options
  • Save underscorephil/7451837 to your computer and use it in GitHub Desktop.
Save underscorephil/7451837 to your computer and use it in GitHub Desktop.
Capture an image for all block devices on a CCI
client = SoftLayer.Client()
cci = SoftLayer.CCIManager(client)
instance = cci.get_instance(cci_id)
disks = filter(lambda x: x['blockDevices'] != 1, instance['blockDevices']) # remove the swap disk
client['Virtual_Guest'].createArchiveTransaction(
"display name",
disks,
"Description here - My first capture",
id=cci_id,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment