用于订购Virtu的Softlayer API

2024-09-26 17:56:30 发布

您现在位置:Python中文网/ 问答频道 /正文

我想订购一个虚拟服务器在软层使用他们的API。我想订购一个装有VCenter的Windows设备。当我直接从Softlayer客户门户订购VS时,我将VCenter视为一个系统附加组件。我不知道如何使用Softlayer API在订单参数中传递VCenter的参数。我使用的是Softlayer PythonAPI。有人知道怎么做吗?我的订单模板看起来像:

order = {
'complexType': 'SoftLayer_Container_Product_Order_Virtual_Guest', 
'quantity': 1,
'virtualGuests': [
      {
        'hostname': 'test', 
        'domain': 'example.com',
      }
],
'location': 'sanjose',
'packageId': 46, 
'useHourlyPricing': True,
'prices': [
           {'id': 1640},  # 1 x 2.0 GHz Core
           {'id': 1644},  # 1 GB RAM
           {'id':  905},  # Reboot / Remote Console
           {'id':  272},  # 10 Mbps Public & Private Networks
           {'id':  613},  # 1000 GB Bandwidth
           {'id':   21},  # 1 IP Address
           {'id': 2202},  # 25 GB (SAN)
           {'id': 1684},  # CentOS 5 - Minimal Install (32 bit)
           {'id':   55},  # Host Ping Monitoring
           {'id':   57},  # Email and Ticket Notifications
           {'id':   58},  # Automated Notification Response
           {'id':  420},  # Unlimited SSL VPN Users & 1 PPTP VPN User per account
           {'id':  418}
]
}                                    client['Product_Order'].verifyOrder(order);

Tags: 订单服务器apiid参数客户windowsorder

热门问题