【问题标题】:how to create softlayer citrix load balancer from SL-API如何从 SL-API 创建 softlayer citrix 负载均衡器
【发布时间】:2016-06-10 16:03:52
【问题描述】:

我正在尝试创建一个 Citrix 负载均衡器,我的代码是:

#
LocationForNetscaler = 168642
Netscaler=44958
staticIPAddress=27569
package = 192
ProdcutOrderService = client['SoftLayer_Product_Order']
orderContainers ={
                    "quantity": 1,
                    "location": LocationForNetscaler ,
                    "packageId": package,
                    "prices": [
                        {"id": Netscaler,
                         "complexType":"SoftLayer_Product_Item_Price"
                         },
                        {
                         "id":staticIPAddress,
                         "complexType":"SoftLayer_Product_Item_Price"
                         }

                    ]

                }
orderData = {
               'orderContainers' : [orderContainers ]
            }

receipt = ProdcutOrderService.verifyOrder(orderData)
print "Order Verification"
pprint(receipt)
#

但我收到以下错误: 回溯(最近一次通话最后): 文件“/home/abcd/Downloads/25-05-2016/28-05-2016-test.py”,第 84 行,在 收据 = ProdcutOrderService.verifyOrder(orderData) call_handler 中的文件“/usr/local/lib/python2.7/dist-packages/SoftLayer/API.py”,第 373 行 返回自我(姓名,*args,**kwargs) 调用中的文件“/usr/local/lib/python2.7/dist-packages/SoftLayer/API.py”,第 341 行 return self.client.call(self.name, name, *args, **kwargs) 文件“/usr/local/lib/python2.7/dist-packages/SoftLayer/API.py”,第 237 行,调用中 返回self.transport(请求) 调用中的文件“/usr/local/lib/python2.7/dist-packages/SoftLayer/transports.py”,第 187 行 raise _ex(ex.faultCode, ex.faultString) SoftLayer.exceptions.SoftLayerAPIError: SoftLayerAPIError(SoftLayer_Exception_Order_Item_Invalid): Invalid price Citrix NetScaler VPX 10.5 10Mbps Standard (44958) provided on the order container.

#

请指导 谢谢

【问题讨论】:

    标签: ibm-cloud-infrastructure


    【解决方案1】:

    显然,SoftLayer_Product_Order::placeOrder 方法无法识别您要发送的容器类型,请尝试添加 complexType 属性,请尝试以下操作:

    LocationForNetscaler = 168642
    Netscaler=44958
    staticIPAddress=27569
    package = 192
    productService = client['SoftLayer_Product_Order']
    orderContainers ={
                        "complexType": "SoftLayer_Container_Product_Order_Network_Application_Delivery_Controller",
                        "quantity": 1,
                        "location": LocationForNetscaler,
                        "packageId": package,
                        "prices": [
                            {
                             "complexType": "SoftLayer_Product_Item_Price", 
                             "id": Netscaler
                             },
                            {
                             "complexType": "SoftLayer_Product_Item_Price", 
                             "id": staticIPAddress
                             }
    
                        ]
    
                    }
    
    
    receipt = productService.verifyOrder(orderContainers)
    print(receipt)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-12-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-12
      • 2016-03-31
      • 1970-01-01
      相关资源
      最近更新 更多