ibm-cloud-infrastructure

Softlayer api: exception The location provided for this order is invalid

寵の児 提交于 2019-12-25 10:49:30
问题 background Use sl_product_order.placeOrder api to order a vsi. Order params: {'prices': [{'id': 1644}, {'id': 1640}, {'id': 2202}, {'id': 272}, {'id': 45466}, {'id': 905}, {'id': 21}, {'id': 57}, {'id': 55}, {'id': 58}, {'id': 420}, {'id': 418}, {'id': 17129}, {'id': 1800}], 'location': '224092', 'packageId': 835, 'complexType': 'SoftLayer_Container_Product_Order_Virtual_Guest', 'useHourlyPricing': True, 'virtualGuests': [{'domain': 'xxx.com', 'hostname': 'xxx-rkgw77q5'}], 'quantity': 1}

Softlayer api: exception The location provided for this order is invalid

大城市里の小女人 提交于 2019-12-25 10:49:02
问题 background Use sl_product_order.placeOrder api to order a vsi. Order params: {'prices': [{'id': 1644}, {'id': 1640}, {'id': 2202}, {'id': 272}, {'id': 45466}, {'id': 905}, {'id': 21}, {'id': 57}, {'id': 55}, {'id': 58}, {'id': 420}, {'id': 418}, {'id': 17129}, {'id': 1800}], 'location': '224092', 'packageId': 835, 'complexType': 'SoftLayer_Container_Product_Order_Virtual_Guest', 'useHourlyPricing': True, 'virtualGuests': [{'domain': 'xxx.com', 'hostname': 'xxx-rkgw77q5'}], 'quantity': 1}

How can I filter the list of VLANs to just get ones valid for virtual guest orders?

别等时光非礼了梦想. 提交于 2019-12-25 09:42:45
问题 I would like to filter the list of VLANs on an account so that I only list the VLANs which can be used to order a Virtual Guest. I am using Softlayer_Account_Service.getNetworkVlans(). What do I need to filter by? It is just filtering for networkVlans.type.keyName = STANDARD? I’m trying to avoid being able to hit this error when I select a VLAN from my list: SoftLayer_Exception_Public: The frontend VLAN #xxxxxxx is not a standard VLAN. (HTTP 500) Thanks. 回答1: In order to get available vlans

SoftLayer Object Storage API: Creation of 250GB/500GB Block Storage failure. 20GB or 1000GB are OK

為{幸葍}努か 提交于 2019-12-25 08:59:50
问题 I am deploying CloudFoundry and internally calling SoftLayer API to create 250GB iSCSI disk but causes error as below. In similar method, 500GB disk creation caused error, but 20GB or 1000GB creation were success. Is it SoftLayer API issue or my environment changed some price list? {"method":"create_disk","arguments":[250000,{},"29211213"],"context":{"director_uuid":"c789ac25-4e92-419c-4b9e-a95d0927a8ec"}} ******************** [json] 2017/03/08 22:36:43 DEBUG - Deserialized request **********

Softlayer getAllBillingItems stopped working?

大城市里の小女人 提交于 2019-12-25 08:33:44
问题 The following python script worked like a charm last month: Script: import SoftLayer client = SoftLayer.Client(username='someUser', api_key='someKey') LastInvoice = client['Account'].getAllBillingItems() print LastInvoice Today's result: C:\Python27\python.exe C:/Users/username/Documents/Python/Softlayer/Softlayer5.py Traceback (most recent call last): File "C:/Users/username/Documents/Python/Softlayer/Softlayer5.py", line 8, in <module> LastInvoice = client['Account'].getAllBillingItems()

SoftLayer API OpenIdConnect Reset Password

自闭症网瘾萝莉.ら 提交于 2019-12-25 08:27:37
问题 Hello: Using the SoftLayer API REST, I have a method that works fine when initiating a password reset. (email is sent to end user) However, when I encounter a newer user setup that uses the new OpenIdConnect, I receive an error: {u'code': u'SoftLayer_Exception_Public', u'error': u'This user is authenticated by OpenIdConnect and must use the OpenIdConnect provider to change their password.'} So, I added a check on the return status and any error so that when the message OpenIdConnect is

Setting Tags in JSON Order Softlayer API Python

左心房为你撑大大i 提交于 2019-12-25 08:23:16
问题 I noticed there's a setTags() method in the api but is there a way to add it to the json order during the ordering process? I can't find any information on it in the documentation. 回答1: yes it is possible to se the tags at order time take a look at this example: https://softlayer.github.io/python/create_vsi_options/ I hope it helps Regards 来源: https://stackoverflow.com/questions/42147245/setting-tags-in-json-order-softlayer-api-python

Get subnet capacity with Softlayer APIs

烂漫一生 提交于 2019-12-25 08:17:18
问题 We would like to find out how many VMs are already in a subnet, and what the leftover capacity is. What Softlayer APIs shall we use to achieve this? 回答1: Try the following rest request: https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Network_Subnet/$SubnetID/getIpAddresses?objectMask=mask[ id, isBroadcast, isGateway, isNetwork, isReserved, subnetId, hardware, virtualGuest, guestNetworkComponentBinding, ipAddress, note, publicNetworkGateway,privateNetworkGateway, virtualLicenseCount,

Get list of storage volumes authorized to particular host in SoftLayer

倾然丶 夕夏残阳落幕 提交于 2019-12-25 07:58:57
问题 I'm using /etc/hosts to determine all IP's from my running cluseter. I can get the VM id's with for node_ip in ip_list: node_ip = ''.join(node_ip) id_mask = "mask[id]" vm_instance = SL.instance(sl_config).vm.list_instances(mask=id_mask,private_ip=node_ip) print vm_instance Now, I'd like to use VM id's in order to get a list of the storage volumes attached to them. I am looking at using Virtual_Guest, but haven't had luck with vm_guest = SL.instance(sl_config).vm_guest.findByIpAddress(id=node

Softlayer service call to “getSnapshotPercentage” is failing

时光毁灭记忆、已成空白 提交于 2019-12-25 07:24:15
问题 I wrote the following logic to get the Snapshot Percentage, and am getting the below error. NOTE, I have tried this with both the Network_Storage , and Network_Storage_Iscsi and am seeing the same response for both cases. Is there a workaround or is this a bug? def get_snapshot_space(sl_config, iscsi_identifier): """ get the total number of Snapshot Space remaining""" snapshot_percentage = SL.instance(sl_config).net.getSnapshotPercentage(id=iscsi_identifier); print "Snapshot Space Used: \% %s