= GlusterCLI - Python bindings for GlusterFS Commands
== Gluster CLI instance.
Example:
[source,python]
----
from glustercli2 import GlusterCLI
# With default Options
gcli = GlusterCLI()
# With custom gluster executable path
gcli = GlusterCLI(exec_path="/usr/local/sbin/gluster")
# Set Current Host to replace `localhost` in Peers list output
gcli = GlusterCLI(current_host="server1.kadalu")
# Set Glusterd socket Path
gcli = GlusterCLI(
exec_path="/usr/local/sbin/gluster",
current_host="server1.kadalu",
socket_path="/usr/local/var/run/glusterd.sock"
)
----
== Peer Add/Probe
Add a Peer to Cluster.
Example:
[source,python]
----
from glustercli2 import GlusterCLI
gcli = GlusterCLI()
gcli.add_peer("server2.kadalu")
----
== Volume Create
Create a Volume.
Example:
[source,python]
----
from glustercli2 import GlusterCLI, VolumeCreateOptions
gcli = GlusterCLI()
opts = VolumeCreateOptions()
opts.replica_count = 3
opts.force = True
bricks = [
"server1.kadalu:/bricks/gvol1/brick1/brick",
"server2.kadalu:/bricks/gvol1/brick2/brick",
"server3.kadalu:/bricks/gvol1/brick3/brick"
]
gcli.create_volume("gvol1", bricks, opts)
----
== Peers List
List Peers available.
Example:
[source,python]
----
from glustercli2 import GlusterCLI
gcli = GlusterCLI()
gcli.list_peers()
----
== Volumes List and Status
List Volumes available.
Example:
[source,python]
----
from glustercli2 import GlusterCLI
gcli = GlusterCLI()
gcli.list_volumes()
gcli.list_volumes(status=True)
----
== Get Peer instance.
Example:
[source,python]
----
from glustercli2 import GlusterCLI
gcli = GlusterCLI()
gcli.peer("server2.kadalu")
----
== Docker exec
Set Remote plugin as docker and set the container name
Example:
[source,python]
----
from glustercli2 import GlusterCLI
gcli = GlusterCLI()
gcli.set_container_name("server1.kadalu")
----
== Execute over SSH
Set Remote plugin as ssh and set the SSH parameters
Example:
[source,python]
----
from glustercli2 import GlusterCLI
gcli = GlusterCLI()
gcli.set_ssh_params(
"remote1.kadalu",
port=22,
user="root",
key="/root/.ssh/id_rsa",
use_sudo=False
)
----
== GlusterFS Version
Return the GlusterFS version
[source,python]
----
from glustercli2 import GlusterCLI
gcli = GlusterCLI()
print(gcli.version())
----
== Get Volume instance.
Example:
[source,python]
----
from glustercli2 import GlusterCLI
gcli = GlusterCLI()
gcli.volume("gvol1")
----
== Volume Delete
Delete the Volume.
Example:
[source,python]
----
from glustercli2 import GlusterCLI
gcli = GlusterCLI()
gcli.volume("gvol1").delete()
----
== Volume Info and Status
Get Volume info or Status.
Example:
[source,python]
----
from glustercli2 import GlusterCLI
gcli = GlusterCLI()
gcli.volume("gvol1").info()
gcli.volume("gvol1").info(status=True)
----
== Reset Volume Option
Reset Volume Option.
Example:
[source,python]
----
from glustercli2 import GlusterCLI
gcli = GlusterCLI()
gcli.volume("gvol1").option_reset(["changelog.changelog"])
----
== Set Volume Option
Set Volume Option.
Example:
[source,python]
----
from glustercli2 import GlusterCLI
gcli = GlusterCLI()
gcli.volume("gvol1").option_set({
"changelog.changelog": "on"
})
----
== Volume Start
Start the Volume.
Example:
[source,python]
----
from glustercli2 import GlusterCLI
gcli = GlusterCLI()
gcli.volume("gvol1").start()
# or using force option
gcli.volume("gvol1").start(force=True)
----
== Volume Stop
Stop the Volume.
Example:
[source,python]
----
from glustercli2 import GlusterCLI
gcli = GlusterCLI()
gcli.volume("gvol1").stop()
# or using force option
gcli.volume("gvol1").stop(force=True)
----
== Peer Delete/Detach
Delete or Detach a Peer from Cluster.
Example:
[source,python]
----
from glustercli2 import GlusterCLI
gcli = GlusterCLI()
gcli.peer("server2.kadalu").delete()
----
Metadata
Release files for glustercli2 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| glustercli2-0.3.0.tar.gz | 9.4 kB | Without provenance | Details for glustercli2-0.3.0.tar.gz |
Release files / glustercli2-0.3.0.tar.gz
| Download URL | glustercli2-0.3.0.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
270197be6473db189282d3c9cbf78f377396605d3133aacacd67ac309bad9a50
|
|
BLAKE2b-256 checksum How to use checksums |
76c1dbc6bee87f509c49e5a2bb9a5df38082f570f3b24024a9b6e6150775edd4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
|
Security for glustercli2 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.