Skip to content

Commit 3480aed

Browse files
authored
Feature: Port forwarding (#376)
* temp: used sdk branch need to be repalce * Refactor: refactor show instances for better code maintenance and using new sdk logic * Feat: aleph instance port_forwarding ... with unit test * feat: new help string for Port Forwarder * Refactor: simplify network parts of instances to use sdk logic * Fix: instance commands to use new logic from sdk * Fix :instances unit test * fix: only get_crns_list should not be call in case it's gpu * feat: better mocks for crns list * fix: ports import have change * fix: unit test * fix: test_port_forwarder.py * fix: linting issue * fix: linting issue * fix: remove useless mocked parts and fix instance creations for gpu * fix: unit test and improve a bit coverage * feature: new test for display feat * fix: mypy issue type error in test * test: sanitize url / gpu search in list / fetch crn info * fix: using mock_crn_list instead of new mock * fix: lint format issue * fix: utils was renamed to instance * Fix: fetch_crn_info * Fix: unit test with latest sdk change
1 parent c444fd7 commit 3480aed

File tree

12 files changed

+2569
-507
lines changed

12 files changed

+2569
-507
lines changed

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@ dependencies = [
3131
"aiodns==3.2",
3232
"aiohttp==3.11.13",
3333
"aleph-message>=1.0.1",
34-
"aleph-sdk-python @ git+https://github.com/aleph-im/aleph-sdk-python@andres-feature-implement_unichain_network",
35-
"base58==2.1.1", # Needed now as default with _load_account changement
34+
"aleph-sdk-python>=2.0.5",
35+
"base58==2.1.1", # Needed now as default with _load_account changement
3636
"click<8.2",
37-
"py-sr25519-bindings==0.2", # Needed for DOT signatures
37+
"py-sr25519-bindings==0.2", # Needed for DOT signatures
3838
"pydantic>=2",
3939
"pygments==2.19.1",
40-
"pynacl==1.5", # Needed now as default with _load_account changement
40+
"pynacl==1.5", # Needed now as default with _load_account changement
4141
"python-magic==0.4.27",
4242
"rich==13.9.*",
4343
"setuptools>=65.5",
44-
"substrate-interface==1.7.11", # Needed for DOT signatures
44+
"substrate-interface==1.7.11", # Needed for DOT signatures
4545
"textual==0.73",
4646
"typer==0.15.2",
4747
]

src/aleph_client/commands/help_strings.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,10 @@
7272
"The aggregate key `security` is protected. Use `aleph aggregate [allow|revoke]` to manage it."
7373
)
7474
INVALID_KEY_FORMAT = "Invalid key format: {}"
75+
76+
# Port Forwarder help strings
77+
PORT_FORWARDER_ITEM_HASH = "Item hash of the instance, program or IPFS website"
78+
PORT_FORWARDER_PORT = "Port number to forward (1-65535)"
79+
PORT_FORWARDER_PROTOCOL = "Protocol to forward (tcp, udp, or both)"
80+
PORT_FORWARDER_TCP = "Enable TCP forwarding for this port"
81+
PORT_FORWARDER_UDP = "Enable UDP forwarding for this port"

src/aleph_client/commands/instance/__init__.py

Lines changed: 79 additions & 248 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)