私は解決方法が必要ですソフトレイヤーで静的IPを持つ仮想マシン、多くのサイトで検索しますまだ回答は得られません静的IPはソフトレイヤーでサポートされていますSOFTLAYERの静的IPを注文する方法が何であるかを知っているし、またどのようにあなたが正しいを取得する必要があります任意の仕様に仮想ゲストを注文するために仮想マシンとあなたの答えのための残りのapiを使用してソフトレイヤーでスタティックIPを起動する仮想マシン
高度なおかげで...
私は解決方法が必要ですソフトレイヤーで静的IPを持つ仮想マシン、多くのサイトで検索しますまだ回答は得られません静的IPはソフトレイヤーでサポートされていますSOFTLAYERの静的IPを注文する方法が何であるかを知っているし、またどのようにあなたが正しいを取得する必要があります任意の仕様に仮想ゲストを注文するために仮想マシンとあなたの答えのための残りのapiを使用してソフトレイヤーでスタティックIPを起動する仮想マシン
高度なおかげで...
を妨害します商品価格IDは、次のリクエストを実行することができます。
https://$username:[email protected]/rest/v3/SoftLayer_Product_Package/46/getItemPrices.json
Method: GET
静的IPv4とVSIを注文する例ここでは、あなたはあなたが欲しいの特性で発注する/確認するためにそれらを使用することができます商品の価格idを取得したら:
https://$username:[email protected]/rest/v3/SoftLayer_Product_Order/verifyOrder.json
Method: POST
Body:
{
"parameters": [
{
"complexType": "SoftLayer_Container_Product_Order_Virtual_Guest",
"quantity": 1,
"virtualGuests": [
{"hostname": "test-template", "domain": "example.com"}
],
"location": 168642,
"packageId": 46,
"prices": [
{"id": 1640},
{"id": 1644},
{"id": 905},
{"id": 272},
{"id":50231},
{"id": 21},
{"id": 2202},
{"id":13945},
{"id": 55},
{"id": 57},
{"id": 58},
{"id": 420},
{"id": 418},
{"id": 22}
]
}
]
}
また、あなたがこのパイソンを使用することができます文書および静的IPv4のREST要求で使用される各商品の価格のIDを記述しているスクリプト: 注:スクリプトは、SLのPythonクライアントを使用https://github.com/softlayer/softlayer-python
"""
Order Virtual Guest with Static IPv4.
Important manual pages:
https://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest
http://sldn.softlayer.com/reference/services/SoftLayer_Product_Order/placeOrder
http://sldn.softlayer.com/reference/services/SoftLayer_Product_Order/verifyOrder
License: http://sldn.softlayer.com/article/License
Author: SoftLayer Technologies, Inc. <[email protected]>
"""
import SoftLayer
from pprint import pprint as pp
USERNAME = 'set me
API_KEY = 'set me
client = SoftLayer.Client(username=USERNAME, api_key=API_KEY)
order = {
'complexType': 'SoftLayer_Container_Product_Order_Virtual_Guest',
'quantity': 1,
'virtualGuests': [
{'hostname': 'test-template', 'domain': 'example.com'}
],
'location': 168642, # San Jose 1
'packageId': 46, # CCI Package
'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':50231}, # 1000 GB Bandwidth
{'id': 21}, # 1 IP Address
{'id': 2202}, # 25 GB (SAN)
{'id':13945}, # CentOS 6.x - Minimal Install (64 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}, # Nessus Vulnerability Assessment & Reporting
{'id': 22} # 4 Public IP Addresses
]
}
try:
# Replace verifyOrder for placeOrder
result = client['SoftLayer_Product_Order'].verifyOrder(order)
pp(result)
except SoftLayer.SoftLayerAPIError as e:
pp('Unable to verify/place order faultCode=%s, faultString=%s'
% (e.faultCode, e.faultString))
ここ静的IPv6でVSIを注文する例:
https:// $username:[email protected]/rest/v3/SoftLayer_Product_Order/verifyOrder.json
Method: POST
Body:
{
"parameters": [
{
"complexType": "SoftLayer_Container_Product_Order_Virtual_Guest",
"quantity": 1,
"virtualGuests": [
{"hostname": "test-template", "domain": "example.com"}
],
"location": 168642,
"packageId": 46,
"prices": [
{"id": 1640},
{"id": 1644},
{"id": 905},
{"id": 272},
{"id":50231},
{"id": 21},
{"id": 2202},
{"id":13945},
{"id": 55},
{"id": 57},
{"id": 58},
{"id": 420},
{"id": 418},
{"id": 17129},
{"id": 1481}
]
}
]
}
また、あなたが文書化され、静的IPv6用のREST要求で使用される各アイテムの価格のIDを記述しているこのPythonスクリプトを使用できます。 注:スクリプトはhttps://github.com/softlayer/softlayer-python
"""
Order Virtual Guest with Static IPv6.
Important manual pages:
https://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest
http://sldn.softlayer.com/reference/services/SoftLayer_Product_Order/placeOrder
http://sldn.softlayer.com/reference/services/SoftLayer_Product_Order/verifyOrder
License: http://sldn.softlayer.com/article/License
Author: SoftLayer Technologies, Inc. <[email protected]>
"""
import SoftLayer
from pprint import pprint as pp
USERNAME = 'set me
API_KEY = 'set me
client = SoftLayer.Client(username=USERNAME, api_key=API_KEY)
order = {
'complexType': 'SoftLayer_Container_Product_Order_Virtual_Guest',
'quantity': 1,
'virtualGuests': [
{'hostname': 'test-template', 'domain': 'example.com'}
],
'location': 168642, # San Jose 1
'packageId': 46, # CCI Package
'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':50231}, # 1000 GB Bandwidth
{'id': 21}, # 1 IP Address
{'id': 2202}, # 25 GB (SAN)
{'id':13945}, # CentOS 6.x - Minimal Install (64 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}, # Nessus Vulnerability Assessment & Reporting
{'id':17129}, # 1_IPV6_ADDRESS
{'id': 1481} # 64_BLOCK_STATIC_PUBLIC_IPV6_ADDRESSES ]
}
try:
# Replace verifyOrder for placeOrder
result = client['SoftLayer_Product_Order'].verifyOrder(order)
pp(result)
except SoftLayer.SoftLayerAPIError as e:
pp('Unable to verify/place order faultCode=%s, faultString=%s'
% (e.faultCode, e.faultString))
SLのPythonクライアントを使用していますが