ibm-cloud-infrastructure

How to set 10G and 20G network interface speeds on SoftLayer

别说谁变了你拦得住时间么 提交于 2019-12-25 06:59:58
问题 I am using SoftLayer_Hardware_Server.setPublicNetworkInterfaceSpeed() to change the public interface speed of bare metal servers. I am unable to set any speed higher than 2000 (1G bonded). Trying to set speed to 10000 results in an exception: SoftLayerAPIError(SoftLayer_Exception_Public): Speed cannot be null and must be 0 (Disconnect), 10, 100, or 1000. Setting the speed to 20000 results in a different exception: SoftLayerAPIError(SoftLayer_Exception_Public): Speed cannot be null and must be

Internal Server Error when get the tags of the virtual guest

萝らか妹 提交于 2019-12-25 06:43:54
问题 The API is returning Internal Server Error when I try to get the tags of the virtual guests of a customer account. Code example using the SoftLayer API library: api = SoftLayer.Client(username=customer_id, api_key=customer_apikey) api['Account'].getVirtualGuests(mask='fullyQualifiedDomainName,tagReferences.tag.name') The exception is: File "scripts/getting_tags.py", line 16, in <module> for item in func(mask='fullyQualifiedDomainName,tagReferences.tag.name'): File "/home/mfilipe/workspace

REST: use SoftLayer_Hardware::createObject instead of SoftLayer_Product_Order::placeOrder

这一生的挚爱 提交于 2019-12-25 05:19:16
问题 I want to order two bare metal servers I did it via REST api: SoftLayer_Product_Order/placeOrder with the following payload. "useHourlyPricing": true, "quantity": 2, "location": 448994, "packageId": 200, "presetId": 95, "prices": [ { "id": 36365 }, { "id": 52795 }, { "id": 1800 }, { "id": 21 }, { "id": 906 }, { "id": 420 }, { "id": 418 } ] However, the servers created with separate vLANs. How to make the order of multiple servers share the same vLANs? 回答1: Unfortunately, i t's not possible to

How can we implement the exclusion function with using API

痴心易碎 提交于 2019-12-25 05:04:58
问题 As we see, in SoftLayer's customer portal the exclusion of the specific configuration is automatically detected. For example, we cannot select VSI's 25 GB First Disk with Windows OS before verifying the order. I know we have verifyOrder method for Product_Order service but it require us to provide all the configuration at least. Do we have any other way to detect the invalid configuration? 回答1: The form is updated according the conflicts between items, to get that information you should use

How to get SoftLayer virtual guest by tags, what's the mask for tags?

隐身守侯 提交于 2019-12-25 04:48:09
问题 I can get virtual guests by masks like "id", "hostname", "primaryIpAddress" etc. However, I need to get virtual guests with specific tags. What's the mask to use to retrieve tagged virtual guests? 回答1: you need to use Objectfilter: https://sldn.softlayer.com/article/object-filters see this example using RESTFul request URL : https://$USERNAME:$APIKEY@api.softlayer.com/rest/v3/SoftLayer_Account/getVirtualGuests?objectFilter={"virtualGuests":{"tagReferences":{"tag":{"name":{"operation":"in",

Transport Connect Reset

孤街醉人 提交于 2019-12-25 04:04:05
问题 I'm getting this error Traceback (most recent call last): File "/Users/ryanpa/Documents/Softlayer Scripts/getVlans.py", line 8, in <module> all_vlans = client['Account'].getNetworkVlans(mask='type, id, vlanNumber,name, primaryRouter.hostname, primaryRouter.datacenter, networkSpace') File "/Library/Python/2.7/site-packages/SoftLayer/API.py", line 392, in call_handler return self(name, *args, **kwargs) File "/Library/Python/2.7/site-packages/SoftLayer/API.py", line 360, in call return self

Softlayer Object Storage Python API Search

谁说胖子不能爱 提交于 2019-12-25 01:19:10
问题 I followed softlayer-object-storage-python in order to return a list of my objects matching a specific criteria. This code seems to just return everything in my container no matter what I put into the search sl_storage = object_storage.get_client( username = environment['slos_username'], password = environment['api_key'], auth_url = environment['auth_url'] ) # get container sl_container = sl_storage[environment['object_container']] # get list, the search function doesn't actually work...

static ip address allocation for public virtual server

本小妞迷上赌 提交于 2019-12-24 20:14:50
问题 Image image = new Image(); image.setCapacity(50L); Guest guest = new Guest(); guest.setHostname("hostname1"); guest.setDomain("softlayer.com"); guest.setStartCpus(1l); guest.setMaxMemory(1024l); guest.setDatacenter(new Location()); guest.getDatacenter().setName("che01"); guest.setLocalDiskFlag(false); guest.setHourlyBillingFlag(true); guest.setOperatingSystemReferenceCode("UBUNTU_LATEST"); Component privateComponent = new Component(); Component publicComponent = new Component(); Vlan

How to add object mask to call GetNetworkVlans using golang

主宰稳场 提交于 2019-12-24 20:00:32
问题 func getPrivateVlan(env string) (string, error) { // 1. Create a session sess := session.New(user, pass) // 2. Get a service accountService := services.GetAccountService(sess) // 3. Invoke a method: vlans, err := accountService.GetNetworkVlans() vlan := vlans[0] log.Println(*vlan.Name) //works log.Println(*vlan.PrimaryRouter) //Doesn't work } The object returned is an array of vlans of type SoftLayer_Network_Vlan, https://sldn.softlayer.com/reference/datatypes/softlayer_network_vlan. I am

How to tag a block storage using softlayer api

為{幸葍}努か 提交于 2019-12-24 06:04:14
问题 I can't find any method about tag a block storage in following link: https://sldn.softlayer.com/reference/services/SoftLayer_Network_Storage_Iscsi Also I checked the command of tag: https://sldn.softlayer.com/reference/services/SoftLayer_Tag This command seems like what I want, but I still met some problems: For the parameter tagTypes, the supported types I get are: {'keyName': 'HARDWARE', 'description': 'Hardware'}, {'keyName': 'GUEST', 'description': 'CCI'}, {'keyName': 'ACCOUNT_DOCUMENT',