Skip to content

Commit a30f690

Browse files
committed
Fix: fully remove _generate_header call in get_logs
Fix Fix: using real path server instead of fake server for test Fix: create playload
1 parent 5c61b9b commit a30f690

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/aleph/sdk/client/vmclient.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ async def _generate_pubkey_signature_header(self) -> str:
6767

6868
def create_payload(self, vm_id: str, operation: str) -> Dict[str, str]:
6969
path = (
70-
f"/logs/{vm_id}"
71-
if operation == "logs"
72-
else f"/control/machine/{vm_id}/{operation}"
70+
f"/control/machine/{vm_id}/{operation}"
7371
)
7472
payload = {
7573
"time": datetime.datetime.utcnow().isoformat() + "Z",
@@ -134,8 +132,8 @@ async def get_logs(self, vm_id):
134132

135133
payload = self.create_payload(vm_id, "logs")
136134
signed_operation = self.sign_payload(payload, self.ephemeral_key)
137-
138-
ws_url, header = await self._generate_header(vm_id=vm_id, operation="logs")
135+
path = payload["path"]
136+
ws_url = f"{self.node_url}{path}"
139137

140138
async with self.session.ws_connect(ws_url) as ws:
141139
auth_message = {

0 commit comments

Comments
 (0)