request-vm-on-golem 0.1.0__tar.gz → 0.1.7__tar.gz

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
-
@@ -197,8 +197,9 @@ export GOLEM_REQUESTOR_BASE_DIR="/path/to/golem/dir"
197
197
  export GOLEM_REQUESTOR_SSH_KEY_DIR="/path/to/keys"
198
198
  export GOLEM_REQUESTOR_DB_PATH="/path/to/database.db"
199
199
 
200
- # Environment Mode
201
- export GOLEM_REQUESTOR_ENVIRONMENT="production" # or "development"
200
+ # Environment Mode (defaults to "production")
201
+ export GOLEM_REQUESTOR_ENVIRONMENT="development" # Optional: Switch to development mode
202
+ export GOLEM_REQUESTOR_FORCE_LOCALHOST="true" # Optional: Force localhost in development mode
202
203
  ```
203
204
 
204
205
  2. Directory Structure:
@@ -258,4 +259,3 @@ Solution: The VM may have been manually removed. Use 'golem vm list' to see avai
258
259
  3. Make your changes
259
260
  4. Run the tests
260
261
  5. Submit a pull request
261
-
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "request-vm-on-golem"
3
- version = "0.1.0"
3
+ version = "0.1.7"
4
4
  description = "VM on Golem Requestor CLI - Create and manage virtual machines on the Golem Network"
5
5
  authors = ["Phillip Jensen <phillip+vm-on-golem@golemgrid.com>"]
6
6
  readme = "README.md"
@@ -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()