sporestack-python/src/sporestack/models.py

42 lines
719 B
Python
Raw Normal View History

2022-02-10 21:47:57 +00:00
"""
SporeStack API supplemental models
"""
from typing import Optional
from pydantic import BaseModel
class NetworkInterface(BaseModel):
ipv4: str
ipv6: str
class Payment(BaseModel):
txid: Optional[str]
uri: Optional[str]
usd: str
paid: bool
2022-06-14 02:40:11 +00:00
class Flavor(BaseModel):
# Unique string to identify the flavor that's sort of human readable.
slug: str
# Number of vCPU cores the server is given.
cores: int
# Memory in Megabytes
memory: int
# Disk in Gigabytes
disk: int
# USD cents per day
price: int
# IPv4 connectivity: "/32"
ipv4: str
# IPv6 connectivity: "/128"
ipv6: str
# Gigabytes of bandwidth per day
bandwidth: int