首页 文章

SL带有RAID磁盘的Baremetal订单--->为此订单提供的位置无效

提问于
浏览
0

我尝试订购一台Baremetal机器,但我得到了这个错误

root@ubuntu:~# ruby array.rb
/usr/local/rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/xmlrpc/client.rb:414:in `call': The location provided for this order is invalid. (XMLRPC::FaultException)
from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/softlayer_api-3.0.2/lib/softlayer/Service.rb:267:in `call_softlayer_api_with_params'
from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/softlayer_api-3.0.2/lib/softlayer/Service.rb:196:in `method_missing'
from array.rb:20:in `<main>'

我也尝试使用lon02(id 358694),但我也遇到了同样的错误 .

我想自动执行以下配置的顺序:

Server:
 Dual Intel Xeon E5-2650 (8 Cores, 2.00 GHz)
 Second Processor Intel Xeon E5-2650 (8 Cores, 2.00 GHz)
RAM:
 16 GB
Operating System:
 Ubuntu Linux 14.04 LTS Trusty Tahr - Minimal Install (64 bit)
Disk Controller:
 RAID
10 Hard Drives of type:
 800 GB SSD (10 DWPD)
 Disk 0-3 Raid 6. Disk 4 HotSpare - Disk 5-8 Raid 6 Disk 9 HotSpare
Public Bandwidth:
 500 GB Bandwidth
Uplink Port Speeds:
 1 Gbps Redundant Public & Private Network Uplinks
 Private Network Port 1 Gbps Redundant Private Uplinks
 Public Network Port 1 Gbps Redundant Public Uplinks
Power Supply:
 Redundant Power Supply
Monitoring:
 Host Ping and TCP Service Monitoring
Response:
 Automated Reboot from Monitoring
VPN Management - Private Network:
 Unlimited SSL VPN Users & 1 PPTP VPN User per account
Vulnerability Assessments & Management:
 Nessus Vulnerability Assessment & Reporting
Primary IP Addresses:
 1 IP Address
Notification:
 Email and Ticket
Remote Management:
 Reboot / KVM over IP

这是我的代码片段:

require 'rubygems'
require 'softlayer_api'

$SL_API_USERNAME = "-------"
$SL_API_KEY = "------------------"

client = SoftLayer::Service.new("SoftLayer_Product_Order");
product={
"complexType"=>"SoftLayer_Container_Product_Order_Hardware_Server", 
"quantity"=>1, 
"hardware"=>[{"hostname"=>"dysa-ca-east-0-baremetal-uaa-test-ai", "domain"=>"dysa-ca-east", "primaryNetworkComponent"=>{"networkVlan"=>{"id"=>"888013"}}, "primaryBackendNetworkComponent"=>{"networkVlan"=>{"id"=>"888015"}}}], 
"location"=>"448994", 
"packageId"=>142, 
"prices"=>[{"id"=>29899}, {"id"=>29899}, {"id"=>37622}, {"id"=>34742}, {"id"=>36037}, {"id"=>35529}, {"id"=>35529}, {"id"=>35529}, {"id"=>35529}, {"id"=>35529}, {"id"=>35529}, {"id"=>35529}, {"id"=>35529}, {"id"=>35529}, {"id"=>35529}, {"id"=>33867}, {"id"=>26109}, {"id"=>25014}, {"id"=>34807}, {"id"=>34241}, {"id"=>32500}, {"id"=>34996}, {"id"=>33483}, {"id"=>35310}], "useHourlyPricing"=>false, 
"storageGroups"=>[{"arrayTypeId"=>"4", "hardDrives"=>"[0,1,2,3]", "hotSpareDrives"=>"[4]"}, {"arrayTypeId"=>"4", "hardDrives"=>"[5,6,7,8]", "hotSpareDrives"=>"[9]"}]}
client.verifyOrder(product)

你能帮帮我吗?非常感谢

3 回答

  • 0

    这是一个问题,您使用的软件包没有任何可用的数据中心,您可以通过运行此方法来验证:

    http://sldn.softlayer.com/reference/services/SoftLayer_Product_Package/getRegions

    这里使用休息的例子:

    https://api.softlayer.com/rest/v3/SoftLayer_Product_Package/142/getRegions
    
    method: GET
    

    这就是您收到错误的原因:为此订单提供的位置无效 .

    我建议你在Softlayer的Portal中打开一张票并报告问题,同时你可以试试另一个包(如果你想要的话) .

    问候

  • 0

    此请求可帮助您根据位置获取有效的商品价格:

    https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/200/getItemPrices?objectMask=mask[id,item[keyName,description],pricingLocationGroup[locations[id, name, longName]]]
    
    Method: GET
    

    Where: 这些具有locationGroupId = null的价格ID被视为"a standard price",API将在内部切换客户的价格 . 但建议首先执行verifyOrder以查看所需订单是否正常(费用可能会有所不同) . 要了解有关此内容的更多详细信息,请查看:

    http://sldn.softlayer.com/blog/cmporter/Location-based-Pricing-and-You

    这是在PHP中使用itemPrices的另一个示例 .

    https://softlayer.github.io/php/get_required_price_id/

    如果问题仍然存在,请打开SL票,因为它可能是一个错误 .

    References:

    http://sldn.softlayer.com/blog/cmporter/Location-based-Pricing-and-您http://sldn.softlayer.com/reference/services/SoftLayer_Product_Package/getItemPrices http://sldn.softlayer.com / reference / services / SoftLayer_Product_Package / getAllObjects http://sldn.softlayer.com/reference/services/SoftLayer_Product_Package

  • 0

    部分解析使用packageId = 251,但订购的裸机有10xRAID 0,每个只有1个磁盘而不是2xRAID 6 :((((以下代码有什么问题?

    require 'rubygems'
    require 'softlayer_api'
    
    $SL_API_USERNAME = "-----"
    $SL_API_KEY = "-----"
    
    client = SoftLayer::Service.new("SoftLayer_Product_Order");
    product={
    "complexType"=>"SoftLayer_Container_Product_Order_Hardware_Server",
    "quantity"=>1,
    "hardware"=>[{"hostname"=>"dys1-0-baremetal-uaa",
    "domain"=>"softlayer.com",
    "primaryNetworkComponent"=>{"networkVlan"=>{"id"=>"MY_VLAN_ID"}},
    "primaryBackendNetworkComponent"=>{"networkVlan"=>{"id"=>"MY_VLAN_ID"}}}],
    "location"=>"358694",
    "packageId"=>251,
    "prices"=>[{"id"=>50675},
        {"id"=>37622},
        {"id"=>49427},
        {"id"=>141945},
        {"id"=>50143},
        {"id"=>50143},
        {"id"=>50143},
        {"id"=>50143},
        {"id"=>50143},
        {"id"=>50143},
        {"id"=>50143},
        {"id"=>50143},
        {"id"=>50143},
        {"id"=>50143},
        {"id"=>50263},
        {"id"=>26109},
        {"id"=>25014},
        {"id"=>34807},
        {"id"=>50223},
        {"id"=>34241},
        {"id"=>32500},
        {"id"=>34996},
        {"id"=>33483},
        {"id"=>35310}],
    "useHourlyPricing"=>false,
    "storageGroups"=>[{"arrayTypeId"=>4,
    "hardDrives"=>[0,1,2,3],
    "hotSpareDrives"=>[4]},
    {"arrayTypeId"=>4,
    "hardDrives"=>[5,6,7,8],
    "hotSpareDrives"=>[9]}]
    }
    
    p client.verifyOrder(product)
    

相关问题