ceph-async 4.0.5

Forked from official ceph-rust. Async pr from jcsp was merged. A rust-lang specific interface to Ceph librados and Admin Sockets. You can create a Ceph development environment with the Chef automation tools: https://github.com/bloomberg/chef-bcs or with ceph-ansible. Chef-bcs uses the ceph-chef cookbook created and manage at github.com/ceph/ceph-chef. It will build out a full Ceph environment which you can then use for development etc. See README.md for details.
Documentation
extern crate ceph;
extern crate serde;
extern crate serde_json;

use ceph::cmd::{ClusterHealth, CrushTree, MonStatus};
use std::fs::File;
use std::io::Read;

#[test]
fn test_ceph_health_jewel() {
    let json = {
        let mut buff = String::new();
        let mut f = File::open("tests/ceph_health-jewel").unwrap();
        f.read_to_string(&mut buff).unwrap();
        buff
    };
    let status: ClusterHealth = serde_json::from_str(&json).unwrap();
    println!("cluster_health: {:#?}", status);
}

#[test]
fn test_mon_status_hammer() {
    let json = {
        let mut buff = String::new();
        let mut f = File::open("tests/mon_status-hammer").unwrap();
        f.read_to_string(&mut buff).unwrap();
        buff
    };
    let status: MonStatus = serde_json::from_str(&json).unwrap();
    println!("mon_status: {:#?}", status);
}

#[test]
fn test_mon_status_jewel() {
    let json = {
        let mut buff = String::new();
        let mut f = File::open("tests/mon_status-jewel").unwrap();
        f.read_to_string(&mut buff).unwrap();
        buff
    };
    let status: MonStatus = serde_json::from_str(&json).unwrap();
    println!("mon_status: {:#?}", status);
}

#[test]
fn test_mon_status_nautilus() {
    let json = {
        let mut buff = String::new();
        let mut f = File::open("tests/mon_status-nautilus").unwrap();
        f.read_to_string(&mut buff).unwrap();
        buff
    };
    let status: MonStatus = serde_json::from_str(&json).unwrap();
    println!("mon_status: {:#?}", status);
}

#[test]
fn test_osd_tree_hammer() {
    let json = {
        let mut buff = String::new();
        let mut f = File::open("tests/osd_tree-hammer").unwrap();
        f.read_to_string(&mut buff).unwrap();
        buff
    };
    let tree: CrushTree = serde_json::from_str(&json).unwrap();
    println!("osd_tree: {:#?}", tree);
}

#[test]
fn test_osd_tree_jewel() {
    let json = {
        let mut buff = String::new();
        let mut f = File::open("tests/osd_tree-jewel").unwrap();
        f.read_to_string(&mut buff).unwrap();
        buff
    };
    let tree: CrushTree = serde_json::from_str(&json).unwrap();
    println!("osd_tree: {:#?}", tree);
}