[#3] Added generate proto script create container method

Signed-off-by: Ilyas Niyazov <i.niyazov@yadro.com>
This commit is contained in:
Ilyas Niyazov 2025-03-13 14:26:01 +03:00
parent f8465e5b99
commit fba6eaaa9c
34 changed files with 547 additions and 108 deletions

View file

@ -1,8 +1,22 @@
import grpc
from frostfs_sdk.client.models.ecdsa import ECDSA
from frostfs_sdk.cryptography.key_extension import KeyExtension
from frostfs_sdk.client.models.ecdsa_model import ECDSA
from frostfs_sdk.models.dto.version import Version
from frostfs_sdk.models.dto.owner_id import OwnerId
from frostfs_sdk.client.services.session import SessionCache
class ClientEnvironment:
def __init__(self, ecdsa: ECDSA, channel: grpc.Channel):
def __init__(self, ecdsa: ECDSA, channel: grpc.Channel, address: str, version: Version, session_cache: SessionCache):
self.ecdsa = ecdsa
self.channel = channel
self.version = version
# self.owner_id = OwnerId(KeyExtension.get_owner_id_by_wif(ecdsa.wif))
self.owner_id = "11"
self.session_cache = session_cache
self.address = address
def get_session_key(self):
if not self._session_key:
self._session_key = SessionCache.form_cache_key(self.address, KeyExtension.get_hex_string(self.ecdsa.public_key))
return self._session_key