Created
November 13, 2013 16:22
-
-
Save underscorephil/7451837 to your computer and use it in GitHub Desktop.
Capture an image for all block devices on a CCI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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