ibm-cloud-infrastructure

How to reload system with flex image using softlayer REST API

醉酒当歌 提交于 2019-12-12 00:05:30
问题 I'm trying to reload a bare metal system with the following flex image but it isn't persisting. Is there something I'm doing wrong is the REST call? String content = "{\"parameters\":[\"FORCE\",{\"sshKeyIds\":["+sshKeys+"]},{\"imageTemplateId\":803303}]}"; Response response = RestAssured.given().contentType(ContentType.JSON).body(content).post("https://"+username+":"+apikey+"@api.softlayer.com/rest/v3/SoftLayer_Hardware_Server/"+softlayer_id+"/reloadOperatingSystem.json"); 回答1: Please try the

How to reload OS using a specific flex image from slcli

回眸只為那壹抹淺笑 提交于 2019-12-11 23:35:06
问题 How to reload system with flex image using softlayer REST API specifies how to do a reload using REST. How do I do it from the "slcli" command? Using "slcli server reload --help" doesn't show any option to specify the imageTemplateId. It only enables sshKeys and install scripts. Using the "slcli call-api..." I don't understand if it's possible to pass parameters. It really doesn't look like it. 回答1: The slcli is not able to do that, I recomend you to use python scrips to call the API. see

SoftLayer API Nessus Scan Status / Report via PHP

╄→尐↘猪︶ㄣ 提交于 2019-12-11 19:46:09
问题 To generate/initiate a new vulnerability scan at SoftLayer, this works (for every server in an account): require_once('SoapClient.class.php'); $apiUsername = "omitted"; $apiKey = "omitted"; $client = SoftLayer_SoapClient::getClient('SoftLayer_Account', null, $apiUsername, $apiKey); $accountInfo = $client->getObject(); $hardware = $client->getHardware(); foreach ($hardware as $server){ $scanclient = SoftLayer_SoapClient::getClient('SoftLayer_Network_Security_Scanner_Request', '', $apiUsername,

Softlayer API for closing a session in golang?

老子叫甜甜 提交于 2019-12-11 19:15:49
问题 I am using the softlayer go client https://github.com/softlayer/softlayer-go I am not able to close the softlayer session. How do I do that? I have created the softlayer session using the Session.New() API. Reference:- https://github.com/softlayer/softlayer-go/blob/master/session/session.go 回答1: The https://github.com/softlayer/softlayer-go/blob/master/session/session.go basically configures the go-client by storing the username, apiKey, endpoint, timeout, etc., in variables, which are used

How to cancel snapshot space only?

断了今生、忘了曾经 提交于 2019-12-11 18:08:11
问题 For the cancel operation, we are canceling a billing item of purchased product. But for the cancellation of snapshot space, (not for whole storage) it returns error when we try it with same way. How can I cancel billing item for snapshot space? 回答1: Try the following Rest request: https://$user:$apiKey@api.softlayer.com/rest/v3.1/SoftLayer_Billing_Item_Cancellation_Request/createObject.json Method: Post { "parameters":[ { "complexType":"SoftLayer_Billing_Item_Cancellation_Request", "accountId

IBM Cloud infrastructure cli error - setUserMetadata is not implemented

こ雲淡風輕ζ 提交于 2019-12-11 17:48:19
问题 I am following the IBM Cloud infrastructure (ibmcloud sl) cli documentation at https://console.bluemix.net/docs/cli/reference/softlayer/index.html#sl_vs_create to create a new virtual server. I am using the latest version 0.7.0. I want to read userdata from file, so I tried options -F and --userfile. Both options give me the same error "SoftLayer_Virtual_Guest_Strategy_Behavior_Standard::setUserMetadata is not implemented. (HTTP 500)". Below is the full input and output: ~$ ibmcloud sl vs

Softlayer API verify order fail

泄露秘密 提交于 2019-12-11 16:27:29
问题 I am trying to order a virtual server in Softlayer using the Softlayer Python client. My order json looks like this: order = { 'complexType': 'SoftLayer_Container_Product_Order_Virtual_Guest', 'quantity': 1, 'virtualGuests': [ { 'hostname': 'test', 'domain': 'example.com', 'primaryBackendNetworkComponent': { 'networkVlan': { 'id': 752950 } } } ], 'location': 142775, 'packageId': 46, 'useHourlyPricing': True, 'prices': [ {'id': 112863}, # 2 x 2.0 GHz Core {'id': 153861}, # 1 GB RAM {'id':

Softlayer API send SSD disk information?

牧云@^-^@ 提交于 2019-12-11 15:28:00
问题 How can I send the information of a SSD disk during the create_intance() order? I see that in the disk information you should send the size of the disk/disks, but I want to send the information that the disk/disks should be SSD and not HDD, that is the default option in the setup. So I manage to find this: local disk(0) 25,100 local disk(2) 25,100,150,200,300 It seems that the only flag that tells me the difference between disks is this 0 and 2, but how can I send this in here: new_vsi = {

Removing subscription to “Planned Maintenance” email notifications

混江龙づ霸主 提交于 2019-12-11 15:12:54
问题 Using the REST API, How do I turn off the setting for email notification of "Planned Maintenance"? I have hundreds of user profiles I need to turn this setting off on. Thanks for any help here! 回答1: To “turn off” the Subscriptions - Planned Maintenance, you have to do user by user, the same that the customer portal because in rest api you cannot do for all users, but you can try to ¨turn off¨ all the users subscriptions using programing language doing your own code. Here there is a example

getting error while creating dedicated vsi from softlayer slcli

你。 提交于 2019-12-11 14:53:42
问题 I was trying to get the details of dedicated servers by using slcli(version 5.4.4) and getting following error "SoftLayerAPIError(SoftLayer_Exception_Order_Item_Invalid): Invalid price 64 GB (Dedicated Host) (200375) provided on the order container. Please select a dedicated instance RAM price to order a dedicated instance." command which I tried slcli order place --verify --billing hourly CLOUD_SERVER DALLAS13 \ RAM_64_UNIT_DEDICATED \ REBOOT_REMOTE_CONSOLE \ 1_GBPS_PRIVATE_NETWORK_UPLINKS