Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
*: add some documentation for each module
Browse files Browse the repository at this point in the history
Dockerfile: install dependency, openssl-devel

Signed-off-by: Allen Bai <abai@redhat.com>
  • Loading branch information
Allen Bai committed Oct 22, 2019
1 parent e650f00 commit 5267871
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM registry.access.redhat.com/ubi8/ubi
WORKDIR /fedora-coreos-pinger

COPY . .
RUN yum install -y gcc
RUN yum install -y gcc openssl-devel
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y -q
RUN echo "export PATH=\"$HOME/.cargo/bin:$PATH\"" > ~/.bashrc \
&& source ~/.bashrc \
Expand Down
3 changes: 2 additions & 1 deletion src/agent/full/hardware/lsblk.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! Struct for `lsblk --fs --json`
//! Module for running `lsblk --fs --json`, and storing the
//! output in the struct LsblkJSON
use failure::{bail, format_err, Fallible, ResultExt};
use serde::{Deserialize, Serialize};

Expand Down
3 changes: 2 additions & 1 deletion src/agent/full/hardware/lscpu.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! Struct for `lscpu --json`
//! Module for running `lscpu --json`, and storing the output
//! in the struct LscpuJSON
use failure::{bail, format_err, Fallible, ResultExt};
use serde::{Deserialize, Serialize};

Expand Down
3 changes: 2 additions & 1 deletion src/agent/full/hardware/lsmem.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! Struct for `lsmem --json`
//! Module for running `lsmem --json`, and storing the output
//! in the struct LsmemJSON
use failure::{bail, format_err, Fallible, ResultExt};
use serde::de::{self, Unexpected};
use serde::{Deserialize, Deserializer, Serialize};
Expand Down
2 changes: 1 addition & 1 deletion src/agent/full/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Module to collect data under `Full` level
//! Module to collect data under `full` level

mod container_runtime;
mod hardware;
Expand Down
3 changes: 2 additions & 1 deletion src/agent/full/network.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! Module to obtain network information from `nmcli device show`
//! Module to obtain network information from `nmcli device show`,
//! parse the output, and store the output in a HashMap
use failure::{bail, format_err, Fallible, ResultExt};
use std::collections::HashMap;

Expand Down
1 change: 1 addition & 0 deletions src/agent/minimal/instance_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use std::io::Read;
use std::{fs, io};

/// Read instance type from cloud metadata file created by Afterburn
/// reference: https://github.com/coreos/afterburn/pull/278
pub(crate) fn read_instance_type<T>(cmdline_path: T, platform_id: &str) -> Fallible<String>
where
T: AsRef<str>,
Expand Down
2 changes: 2 additions & 0 deletions src/agent/minimal/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Module to collect data under `minimal` level

mod instance_type;
#[cfg(test)]
mod mock_tests;
Expand Down
1 change: 1 addition & 0 deletions src/agent/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! Agent module for level `minimal` and `full`

pub mod full;
pub mod minimal;

Expand Down

0 comments on commit 5267871

Please sign in to comment.