Python gRPC Client Library for OpenStorage SDK
For more information please see https://libopenstorage.github.io
Example
import grpc
from openstorage import api_pb2
from openstorage import api_pb2_grpc
from openstorage import connector
c = connector.Connector(endpoint='localhost:9100')
channel = c.connect()
try:
# Cluster connection
clusters = api_pb2_grpc.OpenStorageClusterStub(channel)
ic_resp = clusters.InspectCurrent(api_pb2.SdkClusterInspectCurrentRequest())
print('Conntected to {0} with status {1}'.format(ic_resp.cluster.id, api_pb2.Status.Name(ic_resp.cluster.status)))
# Create a volume
volumes = api_pb2_grpc.OpenStorageVolumeStub(channel)
v_resp = volumes.Create(api_pb2.SdkVolumeCreateRequest(
name="myvol",
spec=api_pb2.VolumeSpec(
size=10*1024*1024*1024,
ha_level=3,
)
))
print('Volume id is {0}'.format(v_resp.volume_id))
except grpc.RpcError as e:
print('Failed: code={0} msg={1}'.format(e.code(), e.details()))
Release files for libopenstorage-openstorage 0.42.22
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| libopenstorage-openstorage-0.42.22.tar.gz | 69.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| libopenstorage_openstorage-0.42.22-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.1 MB
Release files / libopenstorage-openstorage-0.42.22.tar.gz
| Download URL | libopenstorage-openstorage-0.42.22.tar.gz |
|---|---|
| Size | 69.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
10afdbbf5adce1efe8b00cbc19497255ed7f298889379a8e47b15f8d0a843e2a
|
|
BLAKE2b-256 checksum How to use checksums |
502501b6c5a9233f1ba103368a7f3eca3e0edc451f3abc59043e5cd1e3d911a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.5
|
Release files / libopenstorage_openstorage-0.42.22-py3-none-any.whl
| Download URL | libopenstorage_openstorage-0.42.22-py3-none-any.whl |
|---|---|
| Size | 19.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
12edcb87291a6312f0377ef47cb9d78021d9b4f2672ffaee664fb09a98963bd5
|
|
BLAKE2b-256 checksum How to use checksums |
14bee23cdde29a76da96239baaf583c3ddbdb9e9d60f0f7da64ab0d51d9d16b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.5
|