request-vm-on-golem 0.1.44__py3-none-any.whl → 0.1.45__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: request-vm-on-golem
3
- Version: 0.1.44
3
+ Version: 0.1.45
4
4
  Summary: VM on Golem Requestor CLI - Create and manage virtual machines on the Golem Network
5
5
  Keywords: golem,vm,cloud,decentralized,cli
6
6
  Author: Phillip Jensen
@@ -13,14 +13,14 @@ requestor/run.py,sha256=GqOG6n34szt8Sp3SEqjRV6huWm737yCN6YnBqoiwI-U,1785
13
13
  requestor/security/faucet.py,sha256=35d8mD3fM0YqRIhUXuIKandOL8vbw2T2IFQWVsan9Lw,2056
14
14
  requestor/services/__init__.py,sha256=1qSn_6RMn0KB0A7LCnY2IW6_tC3HBQsdfkFeV-h94eM,172
15
15
  requestor/services/database_service.py,sha256=GlSrzzzd7PSYQJNup00sxkB-B2PMr1__04K8k5QSWvs,2996
16
- requestor/services/provider_service.py,sha256=SH76qxnbIm4EgCwQ0SHiwCidN19aTQMCxGUj1e0yGRQ,14712
16
+ requestor/services/provider_service.py,sha256=eb4t6tkcw9VzJev2sfawT1KvVc5TxQnb1pgYgoQZcM4,15000
17
17
  requestor/services/ssh_service.py,sha256=tcOCtk2SlB9Uuv-P2ghR22e7BJ9kigQh5b4zSGdPFns,4280
18
18
  requestor/services/vm_service.py,sha256=eQ2pPMpYlfPVbVFrkFElsRO5swPq-2XZEfuvxagyHDk,7941
19
19
  requestor/ssh/__init__.py,sha256=hNgSqJ5s1_AwwxVRyFjUqh_LTBpI4Hmzq0F-f_wXN9g,119
20
20
  requestor/ssh/manager.py,sha256=3jQtbbK7CVC2yD1zCO88jGXh2fBcuv3CzWEqDLuaQVk,9758
21
21
  requestor/utils/logging.py,sha256=oFNpO8pJboYM8Wp7g3HOU4HFyBTKypVdY15lUiz1a4I,3721
22
22
  requestor/utils/spinner.py,sha256=PUHJdTD9jpUHur__01_qxXy87WFfNmjQbD_sLG-KlGo,2459
23
- request_vm_on_golem-0.1.44.dist-info/METADATA,sha256=oNqjV3CuQMnhZA1SRGPBf9M8J_-J8WsVBaSOdJnrxKE,13912
24
- request_vm_on_golem-0.1.44.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
25
- request_vm_on_golem-0.1.44.dist-info/entry_points.txt,sha256=Z-skRNpJ8aZcIl_En9mEm1ygkp9FKy0bzQoL3zO52-0,44
26
- request_vm_on_golem-0.1.44.dist-info/RECORD,,
23
+ request_vm_on_golem-0.1.45.dist-info/METADATA,sha256=Ln_GhY2wyZ0feb3EgI0x12zbnc1Zm0u6lyaNFRTF8LI,13912
24
+ request_vm_on_golem-0.1.45.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
25
+ request_vm_on_golem-0.1.45.dist-info/entry_points.txt,sha256=Z-skRNpJ8aZcIl_En9mEm1ygkp9FKy0bzQoL3zO52-0,44
26
+ request_vm_on_golem-0.1.45.dist-info/RECORD,,
@@ -92,6 +92,14 @@ class ProviderService:
92
92
  ) -> List[Dict]:
93
93
  """Find providers using Golem Base."""
94
94
  try:
95
+ def _to_float(val):
96
+ if val is None:
97
+ return None
98
+ try:
99
+ return float(val)
100
+ except Exception:
101
+ return None
102
+
95
103
  query = 'golem_type="provider"'
96
104
  # Filter by advertised network to avoid cross-network results
97
105
  if config.network:
@@ -128,12 +136,12 @@ class ProviderService:
128
136
  'storage': int(annotations.get('golem_storage', 0)),
129
137
  },
130
138
  'pricing': {
131
- 'usd_per_core_month': annotations.get('golem_price_usd_core_month'),
132
- 'usd_per_gb_ram_month': annotations.get('golem_price_usd_ram_gb_month'),
133
- 'usd_per_gb_storage_month': annotations.get('golem_price_usd_storage_gb_month'),
134
- 'glm_per_core_month': annotations.get('golem_price_glm_core_month'),
135
- 'glm_per_gb_ram_month': annotations.get('golem_price_glm_ram_gb_month'),
136
- 'glm_per_gb_storage_month': annotations.get('golem_price_glm_storage_gb_month'),
139
+ 'usd_per_core_month': _to_float(annotations.get('golem_price_usd_core_month')),
140
+ 'usd_per_gb_ram_month': _to_float(annotations.get('golem_price_usd_ram_gb_month')),
141
+ 'usd_per_gb_storage_month': _to_float(annotations.get('golem_price_usd_storage_gb_month')),
142
+ 'glm_per_core_month': _to_float(annotations.get('golem_price_glm_core_month')),
143
+ 'glm_per_gb_ram_month': _to_float(annotations.get('golem_price_glm_ram_gb_month')),
144
+ 'glm_per_gb_storage_month': _to_float(annotations.get('golem_price_glm_storage_gb_month')),
137
145
  },
138
146
  'created_at_block': metadata.expires_at_block - (config.advertisement_interval * 2)
139
147
  }