Python 3 library and CLI application for SporeStack
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

216 lines
4.4 KiB

  1. from typing import NamedTuple
  2. class Flavor(NamedTuple):
  3. # Unique string to identify the flavor that's sort of human readable.
  4. slug: str
  5. # Number of vCPU cores the server is given.
  6. cores: int
  7. # Memory in Megabytes
  8. memory: int
  9. # Disk in Gigabytes
  10. disk: int
  11. # USD cents per day
  12. price: int
  13. # IPv4 connectivity: "/32" or "tor". If "tor", needs to match IPv6 setting.
  14. ipv4: str
  15. # IPv6 connectivity: "/128" (may act as a /64, may not) or tor. If "tor", needs to match IPv4 setting.
  16. ipv6: str
  17. # Gigabytes of bandwidth per day
  18. bandwidth: int
  19. # This one is too small to work reliably with iPXE.
  20. # "tor-512": Flavor(
  21. # slug="tor-512",
  22. # cores=1,
  23. # memory=512,
  24. # disk=4,
  25. # price=14,
  26. # ipv4="tor",
  27. # ipv6="tor",
  28. # bandwidth=10,
  29. # ),
  30. all_sporestack_flavors = {
  31. "vps-1vcpu-1gb": Flavor(
  32. slug="vps-1vcpu-1gb",
  33. cores=1,
  34. memory=1024,
  35. disk=25,
  36. price=32,
  37. ipv4="/32",
  38. ipv6="/128",
  39. bandwidth=36,
  40. ),
  41. "vps-1vcpu-2gb": Flavor(
  42. slug="vps-1vcpu-2gb",
  43. cores=1,
  44. memory=2048,
  45. disk=50,
  46. price=64,
  47. ipv4="/32",
  48. ipv6="/128",
  49. bandwidth=73,
  50. ),
  51. "vps-3vcpu-1gb": Flavor(
  52. slug="vps-3vcpu-1gb",
  53. cores=3,
  54. memory=1024,
  55. disk=60,
  56. price=96,
  57. ipv4="/32",
  58. ipv6="/128",
  59. bandwidth=109,
  60. ),
  61. "vps-2vcpu-2gb": Flavor(
  62. slug="vps-2vcpu-2gb",
  63. cores=2,
  64. memory=2048,
  65. disk=60,
  66. price=96,
  67. ipv4="/32",
  68. ipv6="/128",
  69. bandwidth=109,
  70. ),
  71. "vps-1vcpu-3gb": Flavor(
  72. slug="vps-1vcpu-3gb",
  73. cores=1,
  74. memory=3072,
  75. disk=60,
  76. price=96,
  77. ipv4="/32",
  78. ipv6="/128",
  79. bandwidth=109,
  80. ),
  81. "vps-2vcpu-4gb": Flavor(
  82. slug="vps-2vcpu-4gb",
  83. cores=2,
  84. memory=4096,
  85. disk=80,
  86. price=128,
  87. ipv4="/32",
  88. ipv6="/128",
  89. bandwidth=146,
  90. ),
  91. "vps-4vcpu-8gb": Flavor(
  92. slug="vps-4vcpu-8gb",
  93. cores=4,
  94. memory=8192,
  95. disk=160,
  96. price=257,
  97. ipv4="/32",
  98. ipv6="/128",
  99. bandwidth=182,
  100. ),
  101. "vps-6vcpu-16gb": Flavor(
  102. slug="vps-6vcpu-16gb",
  103. cores=6,
  104. memory=16384,
  105. disk=320,
  106. price=514,
  107. ipv4="/32",
  108. ipv6="/128",
  109. bandwidth=219,
  110. ),
  111. "vps-8vcpu-32gb": Flavor(
  112. slug="vps-8vcpu-32gb",
  113. cores=8,
  114. memory=32768,
  115. disk=640,
  116. price=1028,
  117. ipv4="/32",
  118. ipv6="/128",
  119. bandwidth=256,
  120. ),
  121. "vps-12vcpu-48gb": Flavor(
  122. slug="vps-12vcpu-48gb",
  123. cores=12,
  124. memory=49152,
  125. disk=960,
  126. price=1542,
  127. ipv4="/32",
  128. ipv6="/128",
  129. bandwidth=292,
  130. ),
  131. "vps-16vcpu-64gb": Flavor(
  132. slug="vps-16vcpu-64gb",
  133. cores=16,
  134. memory=65536,
  135. disk=1280,
  136. price=2057,
  137. ipv4="/32",
  138. ipv6="/128",
  139. bandwidth=329,
  140. ),
  141. "vps-20vcpu-96gb": Flavor(
  142. slug="vps-20vcpu-96gb",
  143. cores=20,
  144. memory=98304,
  145. disk=1920,
  146. price=3085,
  147. ipv4="/32",
  148. ipv6="/128",
  149. bandwidth=365,
  150. ),
  151. "vps-24vcpu-128gb": Flavor(
  152. slug="vps-24vcpu-128gb",
  153. cores=24,
  154. memory=131072,
  155. disk=2560,
  156. price=4114,
  157. ipv4="/32",
  158. ipv6="/128",
  159. bandwidth=402,
  160. ),
  161. "vps-32vcpu-192gb": Flavor(
  162. slug="vps-32vcpu-192gb",
  163. cores=32,
  164. memory=196608,
  165. disk=3840,
  166. price=6171,
  167. ipv4="/32",
  168. ipv6="/128",
  169. bandwidth=438,
  170. ),
  171. "tor-1024": Flavor(
  172. slug="tor-1024",
  173. cores=1,
  174. memory=1024,
  175. disk=8,
  176. price=28,
  177. ipv4="tor",
  178. ipv6="tor",
  179. bandwidth=20,
  180. ),
  181. "tor-2048": Flavor(
  182. slug="tor-2048",
  183. cores=1,
  184. memory=2048,
  185. disk=16,
  186. price=56,
  187. ipv4="tor",
  188. ipv6="tor",
  189. bandwidth=40,
  190. ),
  191. "tor-3072": Flavor(
  192. slug="tor-3072",
  193. cores=1,
  194. memory=3072,
  195. disk=24,
  196. price=84,
  197. ipv4="tor",
  198. ipv6="tor",
  199. bandwidth=60,
  200. ),
  201. "tor-4096": Flavor(
  202. slug="tor-4096",
  203. cores=1,
  204. memory=4096,
  205. disk=32,
  206. price=112,
  207. ipv4="tor",
  208. ipv6="tor",
  209. bandwidth=80,
  210. ),
  211. }