|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Using C#, I've gotten my code to create my CCI instances. Now I'm trying to retrieve the IP addresses, username, and passwords for each instance.
I'm assuming there's no simple way to get this from the placeOrder call, as I didn't see anything there that would do it. So now my working assumption is that I've got to use getVirtualGuests to loop through all the guests running. By rolling in an object mask for the 'networkHardware' I've been able to retrieve the Primary IP address and Backend IP address. I'm at a loss as to where to look for the CCI's username/password though. I've tried skimming through getSoftwareComponents but didn't see anything there. So my question is, Is there a simple way to retrieve this info from my initial placeOrder call? If not, in C#, how do I navigate through this API to find those three things I'm looking for? Thanks, Adam |
|
#2
|
||||
|
||||
|
Some of this information isn't available until later in the provisioning process so your best bet would be to grab it after the provision of the cci is complete.
The username password should be under the software component for the OS, and it should also be available via the operatingSystem key as a relational property. http://sldn.softlayer.com/reference/...peratingSystem http://sldn.softlayer.com/reference/...peratingSystem |
|
#3
|
|||
|
|||
|
Thanks for the links, I'm able to grab the info I'm after now.
Is this really the best way to do this? It really seems odd/non-intuitive to me that I can't query against some sort of result set from my order. 1) place the order for the CCI's I want 2) sleep for "some" time (probably minimum of 10 minutes?) 3) query all the CCI's running and rolling in an object mask to retrieve the Hardware object to grab the IP addresses 4) for each CCI that matches the system name I created earlier, create another object mask to roll in the Component_OperatingSystem & Component_Password Just to clarify what I'm doing: Got a process that needs to kick off occasionally and will create 5-20 CCI's to do some number crunching. Once the images are running, I'm connecting to them and feeding them the data I need processed. Thanks again, Adam |
|
#4
|
||||
|
||||
|
Quote:
The return value for placeOrder is a SoftLayer_Container_Product_Order_Receipt which when combined with an objectMask can be used to gain information about the CCIs/servers purchased. You can use an objectMask of... Code:
placedOrder->items->billingItem->provisionTransaction->[guest/hardware] Code:
->operatingSystem->passwords->password
__________________
-Phil Development Community Advocate http://sldn.softlayer.com/ https://gist.github.com/underscorephil irc://freenode.net/#softlayer |








Linear Mode
