Created
October 15, 2013 16:19
-
-
Save underscorephil/6994265 to your computer and use it in GitHub Desktop.
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
| namespace SLAPI_TEST | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| String username = ""; | |
| String apiKey = ""; | |
| authenticate authenticate = new authenticate(); | |
| authenticate.username = username; | |
| authenticate.apiKey = apiKey; | |
| SoftLayer_Virtual_GuestService guestService = new SoftLayer_Virtual_GuestService(); | |
| guestService.authenticateValue = authenticate; | |
| SoftLayer_Virtual_Guest newGuest = new SoftLayer_Virtual_Guest(); | |
| newGuest.hostname = "host1"; | |
| newGuest.domain = "example.com"; | |
| newGuest.startCpus = 1; | |
| newGuest.maxMemory = 2048; | |
| newGuest.hourlyBillingFlag = true; | |
| newGuest.localDiskFlag = false; | |
| newGuest.blockDeviceTemplateGroup = new SoftLayer_Virtual_Guest_Block_Device_Template_Group(); | |
| // Image template GUID | |
| newGuest.blockDeviceTemplateGroup.globalIdentifier = ""; | |
| newGuest.startCpusSpecified = true; | |
| newGuest.maxMemorySpecified = true; | |
| newGuest.hourlyBillingFlagSpecified = true; | |
| newGuest.localDiskFlagSpecified = true; | |
| SoftLayer_Virtual_Guest orderedGuest = guestService.createObject(newGuest); | |
| Console.WriteLine(orderedGuest.id); | |
| Console.ReadLine(); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment