Struct ceph::CephClient
[−]
[src]
pub struct CephClient { /* fields omitted */ }
A CephClient is a struct that handles communicating with Ceph in a nicer, Rustier way
let client = CephClient::new("admin", "/etc/ceph/ceph.conf")?; let tree = client.osd_tree()?;
Methods
impl CephClient
[src]
fn new<T1: AsRef<str>, T2: AsRef<str>>(
user_id: T1,
config_file: T2
) -> Result<CephClient, RadosError>
[src]
user_id: T1,
config_file: T2
) -> Result<CephClient, RadosError>
fn simulate(self) -> Self
[src]
fn osd_out(&self, osd_id: u64) -> Result<(), RadosError>
[src]
fn osd_crush_remove(&self, osd_id: u64) -> Result<(), RadosError>
[src]
fn osd_pool_get(
&self,
pool: &str,
choice: &PoolOption
) -> Result<String, RadosError>
[src]
&self,
pool: &str,
choice: &PoolOption
) -> Result<String, RadosError>
Query a ceph pool.
fn osd_pool_set(
&self,
pool: &str,
key: &str,
value: &str
) -> Result<(), RadosError>
[src]
&self,
pool: &str,
key: &str,
value: &str
) -> Result<(), RadosError>
Set a pool value
fn osd_set(&self, key: OsdOption, force: bool) -> Result<(), RadosError>
[src]
Can be used to set options on an OSD
let client = CephClient::new("admin", "/etc/ceph/ceph.conf")?; client.osd_set(OsdOption::NoDown, false)?;
fn osd_unset(&self, key: OsdOption) -> Result<(), RadosError>
[src]
Can be used to unset options on an OSD
let client = CephClient::new("admin", "/etc/ceph/ceph.conf")?; client.osd_unset(OsdOption::NoDown)?;
fn osd_tree(&self) -> Result<CrushTree, RadosError>
[src]
fn status(&self) -> Result<String, RadosError>
[src]
Get cluster status
fn mon_dump(&self) -> Result<MonDump, RadosError>
[src]
List all the monitors in the cluster and their current rank
fn mon_quorum(&self) -> Result<String, RadosError>
[src]
Get the mon quorum
fn version(&self) -> Result<CephVersion, RadosError>
[src]
Show mon daemon version
fn osd_pool_quota_get(&self, pool: &str) -> Result<u64, RadosError>
[src]
fn auth_del(&self, osd_id: u64) -> Result<(), RadosError>
[src]
fn osd_rm(&self, osd_id: u64) -> Result<(), RadosError>
[src]
fn osd_create(&self, id: Option<u64>) -> Result<u64, RadosError>
[src]
fn mgr_auth_add(&self, mgr_id: &str) -> Result<(), RadosError>
[src]
fn osd_auth_add(&self, osd_id: u64) -> Result<(), RadosError>
[src]
fn auth_get_key(
&self,
client_type: &str,
id: &str
) -> Result<String, RadosError>
[src]
&self,
client_type: &str,
id: &str
) -> Result<String, RadosError>
Get a ceph-x key. The id parameter can be either a number or a string depending on the type of client so I went with string.
fn osd_crush_add(
&self,
osd_id: u64,
weight: f64,
host: &str
) -> Result<(), RadosError>
[src]
&self,
osd_id: u64,
weight: f64,
host: &str
) -> Result<(), RadosError>
add or update crushmap position and weight for an osd
fn mgr_dump(&self) -> Result<MgrDump, RadosError>
[src]
fn mgr_fail(&self, mgr_id: &str) -> Result<(), RadosError>
[src]
fn mgr_list_modules(&self) -> Result<Vec<String>, RadosError>
[src]
fn mgr_list_services(&self) -> Result<Vec<String>, RadosError>
[src]
fn mgr_enable_module(&self, module: &str, force: bool) -> Result<(), RadosError>
[src]
fn mgr_disable_module(&self, module: &str) -> Result<(), RadosError>
[src]
fn mgr_metadata(&self) -> Result<MgrMetadata, RadosError>
[src]
fn mgr_count_metadata(
&self,
property: &str
) -> Result<HashMap<String, u64>, RadosError>
[src]
&self,
property: &str
) -> Result<HashMap<String, u64>, RadosError>