Essayez le script suivant:
import SoftLayer
import json
from pprint import pprint as pp
productOrder = {
"quantity": 1,
"location": 1441195,
"packageId": 251,
#"sshKeyIds": 248873,
"hardware": [
{
"hostname": "db2oncloud-tshirt-plan-customer-#-letter-datacenter",
"primaryNetworkComponent": {
"networkVlan": {
"id": 1351859
}
},
"domain": "bluemix.net",
"primaryBackendNetworkComponent": {
"networkVlan": {
"id": 1351879
}
}
}
],
"prices": [
{
"id": 50691,
"description": "Dual Intel Xeon E5-2620 v3 (12 Cores, 2.40 GHz)"
},
{
"id": 49437,
"description": "128 GB RAM"
},
{
"id": 49081,
"description": "Red Hat Enterprise Linux 7.x (64 bit) (per-processor licensing)"
},
{
"id": 35686,
"description": "10 Gbps Redundant Public & Private Network Uplinks"
},
{
"id": 34241,
"description": "Host Ping and TCP Service Monitoring"
},
{
"id": 34996,
"description": "Automated Reboot from Monitoring"
},
{
"id": 50359,
"description": "500 GB Bandwidth"
},
{
"id": 33483,
"description": "Unlimited SSL VPN Users & 1 PPTP VPN User per account"
},
{
"id": 141833, # Disk0
"description": "1.2 TB SSD (10 DWPD)"
},
{
"id": 141833, # Disk1
"description": "1.2 TB SSD (10 DWPD)"
},
{
"id": 141833, # Disk2
"description": "1.2 TB SSD (10 DWPD)"
},
{
"id": 141833, # Disk3
"description": "1.2 TB SSD (10 DWPD)"
},
{
"id": 141833, # Disk4
"description": "1.2 TB SSD (10 DWPD)"
},
{
"id": 141833, # Disk5
"description": "1.2 TB SSD (10 DWPD)"
},
{
"id": 50143, # Disk6
"description": "800 GB SSD (10 DWPD)"
},
{
"id": 50143, # Disk7
"description": "800 GB SSD (10 DWPD)"
},
{
"id": 141965,
"description": "DISK_CONTROLLER_RAID_10"
},
{
"id": 32500,
"description": "Email and Ticket"
},
{
"id": 35310,
"description": "Nessus Vulnerability Assessment & Reporting"
},
{
"id": 34807,
"description": "1 IP Address"
},
{
"id": 25014,
"description": "Reboot/KVM over IP"
}
],
"sshKeys": [
{
"sshKeyIds":[248873]
}
],
"storageGroups": [
{
"arraySize": 100,
"arrayTypeId": 5, # Raid 10
"hardDrives": [
0,
1,
2,
3,
4,
5
],
"partitionTemplateId": 1, # Linux Basic
"partitions": [
{
"isGrow": True,
"name": "/ssd_disk1",
"size": 3501
}
]
},
{
"arraySize": 800,
"arrayTypeId": 2, # Raid 1
"hardDrives": [
6,
7
],
"partitions": [
{
"isGrow": True,
"name": "/ssd_disk2",
"side": 800
}
]
}
]
}
#client = Client(username=USERNAME, api_key=API_KEY)
client = SoftLayer.Client(username=&apikey)
order = client['Product_Order'].verifyOrder(productOrder)
pp(order)
Merci, j'ai essayé cela avant et je l'ai eu dans le reçu: '" sshKeys ": [{'sshKeyIds': []}],' Dans la section sshKeys, cela ne montre rien, c'est pourquoi j'étais concerné – Patrick
Je sais que mes clés/identifiants ssh sont corrects en vérifiant depuis la fonction getSshKeys – Patrick
J'ai réussi à définir et voir les clés ssh dans le reçu, pourriez-vous fournir le code complet que vous avez essayé? si vous continuez d'avoir ce problème –