libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [libcloud] r2ronoha opened a new issue #1334: Softlayer Servers always created with Hourly Billing (regardless of ex_hourly value)
Date Mon, 05 Aug 2019 08:46:30 GMT
r2ronoha opened a new issue #1334: Softlayer Servers always created with Hourly Billing (regardless
of ex_hourly value)
URL: https://github.com/apache/libcloud/issues/1334
 
 
   ## Summary
   
   Softlayer server are always created as Hourly Billing, regardless of what value (False
/ True) is passed on the ex_hourly parameter to deploy_server or create_server
   
   ## Detailed Information
   
   In the create_node method of the Softlayer driver, the ex_hourly parameter is converted
to string ('true' / 'false') to forward it in the data to the createObject method of the Softlayer
API.
   Nonetheless, the API is expecting a boolean param, and it is setting the default value
(hourly = true), resulting in always creating hourly billed instances.
   
   - Test via libcloud to set Monthly Billing (ex_hourly = False):
   -- Formatted data:
   `{'domain': 'wandera.com', 'localDiskFlag': 'true', 'maxMemory': '4', 'blockDevices': [{'device':
'0', 'diskImage': {'capacity': 100}}], 'networkComponents': [{'maxSpeed': 100}], 'datacenter':
{'name': 'tor01'}, 'hourlyBillingFlag': 'false', 'hostname': '8ba73c347069993d.node.tor01.ca',
'startCpus': '2', 'operatingSystemReferenceCode': 'UBUNTU_18_64', 'sshKeys': [{'id': 1397799}]}`
   -- Setting: `'hourlyBillingFlag': 'false'`
   -- Result: Server created with Hourly Billing
   
   I did some manual tests directly to the SL API:
   
   - Same format as libcloud:
   -- Request:
   `curl -X POST --data '{"parameters":[[{"domain":"wandera.com","localDiskFlag":"true","maxMemory":"4","blockDevices":[{"device":"0","diskImage":{"capacity":100}}],"networkComponents":[{"maxSpeed":100}],"datacenter":{"name":"tor01"},"hourlyBillingFlag":"false","hostname":"8ba73c347069993d.node.tor01.ca","startCpus":"2","operatingSystemReferenceCode":"UBUNTU_18_64","sshKeys":[{"id":1397799}]}]]}'
-u <username>:<api_token> https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/createObjects.json`
   -- Setting: `"hourlyBillingFlag": "false"`
   -- Result: Server created with Hourly Billing
   
   - Sent as boolean:
   -- Request:
   `curl -X POST --data '{"parameters":[[{"domain":"wandera.com","localDiskFlag":"true","maxMemory":"4","blockDevices":[{"device":"0","diskImage":{"capater":{"name":"tor01"},"hourlyBillingFlag":false,"hostname":"a2345678912345678.node.tor01.ca","startCpus":"2","operatingSystemReferenceCode":"UBUNTU_18_64","sshKeys":[{"id":1397799}]}]]}'
-u <username>:<api_token> https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/createObjects.json`
   -- Setting: `"hourlyBillingFlag": false`
   -- Result: Server created with Monthly Billing

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message