问题
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 0 (Disconnect), 1000, or 2000.
Is there a different nomenclature for 10G and 20G?
回答1:
First you need to see what is
max speed
set in your server. Please execute the following rest example to see that information:https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Hardware/[hardware_id]/getNetworkComponents?objectMask=mask[id,name,hardware,speed,maxSpeed,port] Method: GET
Also you can see these hardware details (Speed
,Max speed
) on Control Portal
(i.e. https://control.softlayer.com/devices/details/1234) and values are allowed/available to set.
Now, if you need to increase the
speed
, the next step is tomodify Max Speed
. In other words, the server has to be upgraded and see whatmax values
are allowed to set.This is example to
upgrade the max speed
forVirtual Guests
: Network Speed - How to find the ID from getItemPrices to increase maxspeed in softlayerWhere method to get valid item prices to upgrade for Bare Metal is SoftLayer_Hardware::getUpgradeItemPrices
And the
complexType
to change in theHardware upgrade execution
is"complexType": "SoftLayer_Container_Product_Order_Hardware_Server_Upgrade"
.Then, you will able to change the
speed
untilmax speed
set in you server.
回答2:
The SoftLayer API does not permit any speeds higher than 2000 for bare metal systems. I have reported the bug to SoftLayer support.
来源:https://stackoverflow.com/questions/36360200/how-to-set-10g-and-20g-network-interface-speeds-on-softlayer