Fixed payload
All checks were successful
buildbot/multibuild_parent Build done.
buildbot/travis_bionic Build done.

This commit is contained in:
Shailaja Kumari 2024-06-07 19:32:12 +05:30
parent f1d1387dd6
commit 0072a07754
Signed by: shailaja
GPG Key ID: 2B9455CAFBC4D75A

View File

@ -47,21 +47,32 @@ class ServerData:
def create_post_data(self): def create_post_data(self):
ram, disk = self.get_ram_and_disk() ram, disk = self.get_ram_and_disk()
cpu_count = self.get_cpu_count()
bandwidth = self.get_bandwidth()
os_id = self.get_os()
post_data = { post_data = {
'hostname': self.hostname, "server_type": 1,
'public_ip': self.public_ip, "os_id": self.get_os(),
'ram': ram, "provider_id": 10,
'disk': disk, "location_id": 15,
'cpu_count': cpu_count, "ssh_port": 22,
'bandwidth': bandwidth, "ram": ram >> 10, # convert to GB
'os_id': os_id "ram_as_mb": ram, # in MB
"disk": disk, # in GB
"disk_as_gb": disk, # in GB
"cpu": self.get_cpu_count(),
"bandwidth": self.get_bandwidth(),
"was_promo": 1,
"active": 1,
"show_public": 0,
"owned_since": "2022-01-01",
"ram_type": "GB",
"disk_type": "GB",
"currency": "USD",
"price": 4,
"payment_term": 1,
"hostname": self.hostname,
"next_due_date": "2022-02-01",
"ip1": self.public_ip,
} }
logging.info("Post data created")
logging.info(f"Post Data: {post_data}")
return post_data return post_data