request-vm-on-golem 0.1.0__py3-none-any.whl → 0.1.7__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,8 +1,7 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: request-vm-on-golem
3
- Version: 0.1.0
3
+ Version: 0.1.7
4
4
  Summary: VM on Golem Requestor CLI - Create and manage virtual machines on the Golem Network
5
- Home-page: https://github.com/cryptobench/vm-on-golem
6
5
  Keywords: golem,vm,cloud,decentralized,cli
7
6
  Author: Phillip Jensen
8
7
  Author-email: phillip+vm-on-golem@golemgrid.com
@@ -29,6 +28,7 @@ Requires-Dist: cryptography (>=3.4.7,<4.0.0)
29
28
  Requires-Dist: pydantic (>=1.8.2,<2.0.0)
30
29
  Requires-Dist: python-dotenv (>=1.0.0,<2.0.0)
31
30
  Requires-Dist: tabulate (>=0.9.0,<0.10.0)
31
+ Project-URL: Homepage, https://github.com/cryptobench/vm-on-golem
32
32
  Project-URL: Repository, https://github.com/cryptobench/vm-on-golem
33
33
  Description-Content-Type: text/markdown
34
34
 
@@ -231,8 +231,9 @@ export GOLEM_REQUESTOR_BASE_DIR="/path/to/golem/dir"
231
231
  export GOLEM_REQUESTOR_SSH_KEY_DIR="/path/to/keys"
232
232
  export GOLEM_REQUESTOR_DB_PATH="/path/to/database.db"
233
233
 
234
- # Environment Mode
235
- export GOLEM_REQUESTOR_ENVIRONMENT="production" # or "development"
234
+ # Environment Mode (defaults to "production")
235
+ export GOLEM_REQUESTOR_ENVIRONMENT="development" # Optional: Switch to development mode
236
+ export GOLEM_REQUESTOR_FORCE_LOCALHOST="true" # Optional: Force localhost in development mode
236
237
  ```
237
238
 
238
239
  2. Directory Structure:
@@ -293,4 +294,3 @@ Solution: The VM may have been manually removed. Use 'golem vm list' to see avai
293
294
  4. Run the tests
294
295
  5. Submit a pull request
295
296
 
296
-
@@ -1,7 +1,7 @@
1
1
  requestor/__init__.py,sha256=OqSUAh1uZBMx7GW0MoSMg967PVdmT8XdPJx3QYjwkak,116
2
2
  requestor/cli/__init__.py,sha256=e3E4oEGxmGj-STPtFkQwg_qIWhR0JAiAQdw3G1hXciU,37
3
3
  requestor/cli/commands.py,sha256=RCdAAoyFbzfAxd2_EXXCymSEP7VQMGu7VjnsYWd-tB8,24223
4
- requestor/config.py,sha256=CWULCWpzpGwSSgn7L2IMUNywHK7Bng_b84kmObVLFLc,2191
4
+ requestor/config.py,sha256=FnAsxdGJiE8UCSyfDFhuO0KDH8DbMCrvsRO5r8RkiCo,2141
5
5
  requestor/db/__init__.py,sha256=Gm5DfWls6uvCZZ3HGGnyRHswbUQdeA5OGN8yPwH0hc8,88
6
6
  requestor/db/sqlite.py,sha256=kqutQMs3srcZHa5kI1cbHvOYr66cCfQCb2xuioNAbLc,4638
7
7
  requestor/errors.py,sha256=wVpHBuYgQx5pTe_SamugfK-k768noikY1RxvPOjQGko,665
@@ -12,7 +12,7 @@ requestor/ssh/__init__.py,sha256=hNgSqJ5s1_AwwxVRyFjUqh_LTBpI4Hmzq0F-f_wXN9g,119
12
12
  requestor/ssh/manager.py,sha256=h-93AXFJqzGo2lNTG2u-q4ivU9cCFeNDhYN55skPLBo,6566
13
13
  requestor/utils/logging.py,sha256=oFNpO8pJboYM8Wp7g3HOU4HFyBTKypVdY15lUiz1a4I,3721
14
14
  requestor/utils/spinner.py,sha256=PUHJdTD9jpUHur__01_qxXy87WFfNmjQbD_sLG-KlGo,2459
15
- request_vm_on_golem-0.1.0.dist-info/METADATA,sha256=Kz8UZmfYOlHkDDQ_aaJFBuVQqvPHa1QyEXU7epzvU_k,8898
16
- request_vm_on_golem-0.1.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
17
- request_vm_on_golem-0.1.0.dist-info/entry_points.txt,sha256=Z-skRNpJ8aZcIl_En9mEm1ygkp9FKy0bzQoL3zO52-0,44
18
- request_vm_on_golem-0.1.0.dist-info/RECORD,,
15
+ request_vm_on_golem-0.1.7.dist-info/METADATA,sha256=ROj0U4dNkEsUE5LDAM_-eN4Lp8b4lLXi3IN9sgpyYZw,9054
16
+ request_vm_on_golem-0.1.7.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
17
+ request_vm_on_golem-0.1.7.dist-info/entry_points.txt,sha256=Z-skRNpJ8aZcIl_En9mEm1ygkp9FKy0bzQoL3zO52-0,44
18
+ request_vm_on_golem-0.1.7.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.1
2
+ Generator: poetry-core 2.1.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
requestor/config.py CHANGED
@@ -10,10 +10,16 @@ class RequestorConfig(BaseSettings):
10
10
 
11
11
  # Environment
12
12
  environment: str = Field(
13
- default="development",
13
+ default="production",
14
14
  description="Environment mode: 'development' or 'production'"
15
15
  )
16
16
 
17
+ # Development Settings
18
+ force_localhost: bool = Field(
19
+ default=False,
20
+ description="Force localhost for provider URLs in development mode"
21
+ )
22
+
17
23
  # Discovery Service
18
24
  discovery_url: str = Field(
19
25
  default="http://localhost:7465",
@@ -52,16 +58,13 @@ class RequestorConfig(BaseSettings):
52
58
  """Get provider API URL.
53
59
 
54
60
  Args:
55
- ip_address: The IP address of the provider. In development mode, this is ignored
56
- and localhost is always used.
61
+ ip_address: The IP address of the provider.
57
62
 
58
63
  Returns:
59
64
  The complete provider URL with protocol and port.
60
65
  """
61
- # In development mode, always use localhost regardless of the ip_address parameter
62
- if self.environment == "development":
66
+ if self.environment == "development" and self.force_localhost:
63
67
  return "http://localhost:7466"
64
- # In production mode, use the actual provider IP address
65
68
  return f"http://{ip_address}:7466"
66
69
 
67
70
  config = RequestorConfig()