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()))
Development
Please read dev.md to publish on pypi.org
Metadata
Release files for libopenstorage-openstorage 0.101.39
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.101.39.tar.gz | 25.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| libopenstorage_openstorage-0.101.39-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.3 MB
Release files / libopenstorage_openstorage-0.101.39.tar.gz
| Download URL | libopenstorage_openstorage-0.101.39.tar.gz |
|---|---|
| Size | 25.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
70cab674ab7f6db69d4dc6e0ae7103b58c0a8dbdce24f9c31f748c5ae03f8636
|
|
BLAKE2b-256 checksum How to use checksums |
012c4a8893ec5fea84236de671fb8e28f5446e3966c484e618aa2d13efb4ccb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / libopenstorage_openstorage-0.101.39-py3-none-any.whl
| Download URL | libopenstorage_openstorage-0.101.39-py3-none-any.whl |
|---|---|
| Size | 10.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
92c09b0585e7963235cbee1331af05a295de93a2cabaa92f286c2abc0e9fe881
|
|
BLAKE2b-256 checksum How to use checksums |
f92b4d405195629a36c098f458268ec19f6caee9135d253954dc421c2f4bb987
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|