summaryrefslogtreecommitdiffstats
path: root/src/rep.rs
diff options
context:
space:
mode:
authorAlexander Kirillov <saratovsource@gmail.com>2017-04-03 22:52:18 +0400
committerAlexander Kirillov <saratovsource@gmail.com>2017-04-03 22:52:18 +0400
commitad1153421117b7c92785623b43c44bedda15f369 (patch)
tree857611c0984c1491254b64c2cb0dbfeee82d4772 /src/rep.rs
parent6653b0c4bb79dfa6b11aa786dcc6a2f7ed767452 (diff)
Add support for docker networks
commit 55008eea85dace74acc625914e11d87d15a46b1e Author: Alexander Kirillov <saratovsource@gmail.com> Date: Mon Apr 3 22:47:34 2017 +0400 Some DRY commit c9173593eb9827b30071cb6e42d439ec3d4c3bb1 Author: Alexander Kirillov <saratovsource@gmail.com> Date: Mon Apr 3 22:42:35 2017 +0400 Connect container to network commit 8d68406ef4c69c98e43b7b28923a78e1e9672955 Author: Alexander Kirillov <saratovsource@gmail.com> Date: Mon Apr 3 22:09:58 2017 +0400 Create docker network commit 868e2076988c0b16f6d5a200cf12e77f5bffaeab Author: Alexander Kirillov <saratovsource@gmail.com> Date: Mon Apr 3 18:49:12 2017 +0400 Delete network commit 58a08e77e5984847589eeb35bc097c8949752619 Author: Alexander Kirillov <saratovsource@gmail.com> Date: Mon Apr 3 18:42:28 2017 +0400 Add inspect docker network commit 9fa4143013aa43aaf73645b19565d6e606489952 Author: Alexander Kirillov <saratovsource@gmail.com> Date: Mon Apr 3 18:03:02 2017 +0400 Add list networks
Diffstat (limited to 'src/rep.rs')
-rw-r--r--src/rep.rs40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/rep.rs b/src/rep.rs
index 5bf92ff..1d2c392 100644
--- a/src/rep.rs
+++ b/src/rep.rs
@@ -204,6 +204,46 @@ pub struct Network {
}
#[derive(Debug, RustcEncodable, RustcDecodable)]
+#[allow(non_snake_case)]
+pub struct IPAM {
+ pub Driver: String,
+ pub Config: Vec<HashMap<String, String>>,
+ pub Options: Option<HashMap<String, String>>,
+}
+
+#[derive(Debug, RustcEncodable, RustcDecodable)]
+#[allow(non_snake_case)]
+pub struct NetworkDetails {
+ pub Name: String,
+ pub Id: String,
+ pub Scope: String,
+ pub Driver: String,
+ pub EnableIPv6: bool,
+ pub IPAM: IPAM,
+ pub Internal: bool,
+ pub Attachable: bool,
+ pub Containers: HashMap<String, NetworkContainerDetails>,
+ pub Options: Option<HashMap<String, String>>,
+ pub Labels: Option<HashMap<String, String>>,
+}
+
+#[derive(Debug, RustcEncodable, RustcDecodable)]
+#[allow(non_snake_case)]
+pub struct NetworkContainerDetails {
+ pub EndpointID: String,
+ pub MacAddress: String,
+ pub IPv4Address: String,
+ pub IPv6Address: String,
+}
+
+#[derive(Debug, RustcEncodable, RustcDecodable)]
+#[allow(non_snake_case)]
+pub struct NetworkCreateInfo {
+ pub Id: String,
+ pub Warning: String,
+}
+
+#[derive(Debug, RustcEncodable, RustcDecodable)]
pub struct MemoryStats {
pub max_usage: u64,
pub usage: u64,