[−][src]Struct ceph::CephClient
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]
pub 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>
pub fn simulate(self) -> Self[src]
pub fn osd_out(&self, osd_id: u64) -> Result<(), RadosError>[src]
pub fn osd_crush_remove(&self, osd_id: u64) -> Result<(), RadosError>[src]
pub 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.
pub 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
pub 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)?;
pub 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)?;
pub fn osd_tree(&self) -> Result<CrushTree, RadosError>[src]
pub fn status(&self) -> Result<String, RadosError>[src]
Get cluster status
pub fn mon_dump(&self) -> Result<MonDump, RadosError>[src]
List all the monitors in the cluster and their current rank
pub fn mon_quorum(&self) -> Result<String, RadosError>[src]
Get the mon quorum
pub fn version(&self) -> Result<CephVersion, RadosError>[src]
Show mon daemon version
pub fn osd_pool_quota_get(&self, pool: &str) -> Result<u64, RadosError>[src]
pub fn auth_del(&self, osd_id: u64) -> Result<(), RadosError>[src]
pub fn osd_rm(&self, osd_id: u64) -> Result<(), RadosError>[src]
pub fn osd_create(&self, id: Option<u64>) -> Result<u64, RadosError>[src]
pub fn mgr_auth_add(&self, mgr_id: &str) -> Result<(), RadosError>[src]
pub fn osd_auth_add(&self, osd_id: u64) -> Result<(), RadosError>[src]
pub 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.
pub 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
pub fn mgr_dump(&self) -> Result<MgrDump, RadosError>[src]
pub fn mgr_fail(&self, mgr_id: &str) -> Result<(), RadosError>[src]
pub fn mgr_list_modules(&self) -> Result<Vec<String>, RadosError>[src]
pub fn mgr_list_services(&self) -> Result<Vec<String>, RadosError>[src]
pub fn mgr_enable_module(
&self,
module: &str,
force: bool
) -> Result<(), RadosError>[src]
&self,
module: &str,
force: bool
) -> Result<(), RadosError>
pub fn mgr_disable_module(&self, module: &str) -> Result<(), RadosError>[src]
pub fn mgr_metadata(&self) -> Result<MgrMetadata, RadosError>[src]
pub fn mgr_count_metadata(
&self,
property: &str
) -> Result<HashMap<String, u64>, RadosError>[src]
&self,
property: &str
) -> Result<HashMap<String, u64>, RadosError>
pub fn mgr_versions(&self) -> Result<HashMap<String, u64>, RadosError>[src]
pub fn run_command(&self, command: MonCommand) -> Result<String, RadosError>[src]
Auto Trait Implementations
impl !Send for CephClient
impl Sync for CephClient
impl Unpin for CephClient
impl UnwindSafe for CephClient
impl RefUnwindSafe for CephClient
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,