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
| <?php | |
| include('softlayer-api-php-client/SoftLayer/SoapClient.class.php'); | |
| /* | |
| * Loop through all permissions and remove permission objects who's key | |
| * appears in the $permissionsToRemove array | |
| */ | |
| function unsetArray($allPermissions, $permissionsToRemove) { | |
| foreach($permissionsToRemove as $permissionToRemove) { | |
| foreach($allPermissions as $index => $permission){ |
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, | |
| ) |
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
| import SoftLayer.API | |
| from pprint import pprint as pp | |
| api_username = '' | |
| api_key = '' | |
| client = SoftLayer.Client( | |
| username=api_username, | |
| api_key=api_key, |
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
| import SoftLayer.API | |
| from pprint import pprint as pp | |
| apiUsername = '' | |
| apiKey = '' | |
| client = SoftLayer.Client( | |
| username=apiUsername, | |
| api_key=apiKey, | |
| ) |
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
| import SoftLayer.API | |
| apiUsername = '' | |
| apiKey = '' | |
| client = SoftLayer.Client( | |
| username=apiUsername, | |
| api_key=apiKey, | |
| ) |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| namespace SLAPI_TEST | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) |
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
| import SoftLayer.API | |
| from pprint import pprint as pp | |
| apiUsername = '' | |
| apiKey = '' | |
| client = SoftLayer.Client( | |
| username=apiUsername, | |
| api_key=apiKey, | |
| ) |
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
| require 'rubygems' | |
| require 'softlayer_api' | |
| require 'net/https' | |
| require 'pp' | |
| require 'json' | |
| order_client = SoftLayer::Service.new('SoftLayer_Product_Order', | |
| :username => "", | |
| :api_key => "") |
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
| require 'rubygems' | |
| require 'softlayer_api' | |
| require 'net/https' | |
| require 'pp' | |
| virtual_guest_service = SoftLayer::Service.new("SoftLayer_Virtual_Guest", | |
| :username => "", | |
| :api_key => "") |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| namespace SLAPI_TEST | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) |