ibm-cloud-infrastructure

SoftLayer API CPU usage mismatch

允我心安 提交于 2019-12-12 03:55:38
问题 I tried querying the API for CPU usage on one of our virtual servers, using the PHP client: $user = 'my_user'; $key = 'my_key'; $server = 24819101; $client = \SoftLayer\SoapClient::getClient('SoftLayer_Virtual_Guest', $server, $user, $key); $usage = $client->getCpuMetricDataByDate(date('Y-m-d H:i:s', strtotime('-2 HOUR'))); The call to the API is ok, and one of the results is like this: array( 'counter' => 2.096, 'dateTime' => '2017-01-24T14:00:00+01:00', 'type' => 'cpu0', ) I read this as

If I have Softlayer master brand account's api username and key, how can I get get all of its customers own api username and key?

扶醉桌前 提交于 2019-12-12 03:53:32
问题 So I have master brand's API username and key, so I can user the SoftLayer_Account API to get a list of accounts it owns (i.e. the customers). With the account ID of these customer accounts, I would think that I should be able to get its own users and get their API username and key, but I don't see a way. How do I get my customer account's API username and key by using SoftLayer APIs? I've tried using SoftLayer_Account::getUsers() but it always gives this master user info and not the customer

GPU-related API Errors for SoftLayer hourly Bare Metal Server creation

强颜欢笑 提交于 2019-12-12 03:44:29
问题 I am trying to create an hourly bare metal server with the python CLI: $ slcli hw create -H testhost -D blah.com -s S1270_8GB_2X1TBSATA_NORAID -o UBUNTU_16_64 -d dal01 --port-speed 100 --billing hourly -k mykey This action will incur charges on your account. Continue? [y/N]: y SoftLayerAPIError(SoftLayer_Exception_Public): Unable to add a Graphics Processing Unit price (178117) because it is not valid for the package (200). I am trying to order a simple single core server and not one with a

osFormatType Endurance Block Storage ordering Softlayer

牧云@^-^@ 提交于 2019-12-12 03:39:30
问题 I've done some searching online and can't seem to figure out why the OS format type is wrong. I Have done a query and the id and keyname is correct. enduranceOrder = { "location": 1441195, "packageId": 240, "quantity": 48, "prices": [ { "id": 45064 # endurance }, { "id": 45104 # block storage }, { "id": 178501 # 10 IOPS }, { "id": 178581 # 250 GB storage space } ], "osFormatType": { "id": 12, "keyName": "LINUX", "complexType": "SoftLayer_Network_Storage_Iscsi_OS_Type" } } is my order. I have

Projected Data for Bandwidth in Softlayer

坚强是说给别人听的谎言 提交于 2019-12-12 03:37:20
问题 I am developing a projected value for bandwidth, but I can't find a projected value for private network. This is my code getting public projected data, but it returns defferent value compared to "Control.softlayer.com". This is a summary of my questions. 1. How to get a projected data for Private Network. 2. API getting a projected value for Throughput and Usage. 3. How to set a date to get a projected value for a specific period. private void getVMProjectedData(){ Guest.Service vsiService =

How to Set EndpointIPAddress in ordering subnet using java

百般思念 提交于 2019-12-12 03:36:22
问题 How can I set EndpointVlan in verifying Subnet IP. This is my sample code to verify order. It returns Exceptions with message that Endpoint IP is required. private void verifyStaticIp() { Long packageID = 0l; // ip item only (no sub-option) Long quantity = 1l; Price price = new Price(); price.setId(12345l); // sample Property property = new Property(); // How to Set enpointVlanId in order template??? property.setName("endPointVlanId"); property.setValue("1223445"); // Create Order to verify

softlayer - getting bandwidth usage per datacenter

我与影子孤独终老i 提交于 2019-12-12 03:33:10
问题 I'm using softlayer API for python and i wish to get the bandwidth consumed by each datacenter (if not possible then for each machine) for the current billing cycle. I tried to use the call method after authenticating successfully but couldn't figure out the correct parameters within the call. Thanks. 回答1: you can use the http://sldn.softlayer.com/reference/services/SoftLayer_Metric_Tracking_Object/getBandwidthData or http://sldn.softlayer.com/reference/services/SoftLayer_Metric_Tracking

Softlayer filtering not working

让人想犯罪 __ 提交于 2019-12-12 03:29:01
问题 Why is filtering not working as defined in Softlayer API filtering documentation? Here is the REST call to the API with filtering: https://api.softlayer.com/rest/v3/SoftLayer_Account/getVirtualGuests?objectMask=mask[id,datacenter]&objectFilter={"datacenter":{"name":{"operation":"dal05"}}} And this wont work. It returns virtual hosts from any datacenter, NOT from dal05 ONLY as expected: <root> <item> <id>24291415</id> <datacenter> <id>814994</id> <longName>Amsterdam 3</longName> <name>ams03<

API used for getting Snapshot Space Size on the basis of selected Storage Size, Storage Package, location in Endurance Storage Type

六月ゝ 毕业季﹏ 提交于 2019-12-12 03:26:58
问题 I need to implement placing order for endurance storage in my Application using BPM over ICO (IBM Cloud Orchestrator). We needed following parameters for creating rest call for placing order: Package to use Storage Type Location Storage Package Storage Size Snapshot Space Size OS Type I am able to fetch data till storage size on the basis of selected storage type, location and storage package using below call: https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Product_Package/240

How get the softlayer storage credendials?

时光怂恿深爱的人放手 提交于 2019-12-12 02:59:52
问题 I'm trying to get the Username,password and host IQN of a authorized Softlayer Network Storage. I used this python script, but the shell returns [] import SoftLayer API_USERNAME = 'xxx' API_KEY = 'yyyy' storageId = zzzz client = SoftLayer.Client( username=API_USERNAME, api_key=API_KEY ) client['SoftLayer_Network_Storage'].getCredentials(id=storageId) What's wrong in my code? Regards 回答1: try this: """ Get all the authorized hosts for a iSCSI. Important manual pages: http://sldn.softlayer.com