mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-12 13:22:28 +00:00
agent: drop unused fields from network
We don't utilize routes or inteface vectors. Let's drop them. Signed-off-by: Eric Ernst <eric_ernst@apple.com>
This commit is contained in:
parent
6edddcced9
commit
f6ae15826e
@ -5,28 +5,22 @@
|
|||||||
|
|
||||||
use anyhow::{anyhow, Result};
|
use anyhow::{anyhow, Result};
|
||||||
use nix::mount::{self, MsFlags};
|
use nix::mount::{self, MsFlags};
|
||||||
use protocols::types::{Interface, Route};
|
|
||||||
use slog::Logger;
|
use slog::Logger;
|
||||||
use std::collections::HashMap;
|
|
||||||
use std::fs;
|
use std::fs;
|
||||||
|
|
||||||
const KATA_GUEST_SANDBOX_DNS_FILE: &str = "/run/kata-containers/sandbox/resolv.conf";
|
const KATA_GUEST_SANDBOX_DNS_FILE: &str = "/run/kata-containers/sandbox/resolv.conf";
|
||||||
const GUEST_DNS_FILE: &str = "/etc/resolv.conf";
|
const GUEST_DNS_FILE: &str = "/etc/resolv.conf";
|
||||||
|
|
||||||
// Network fully describes a sandbox network with its interfaces, routes and dns
|
// Network describes a sandbox network, includings its dns
|
||||||
// related information.
|
// related information.
|
||||||
#[derive(Debug, Default)]
|
#[derive(Debug, Default)]
|
||||||
pub struct Network {
|
pub struct Network {
|
||||||
ifaces: HashMap<String, Interface>,
|
|
||||||
routes: Vec<Route>,
|
|
||||||
dns: Vec<String>,
|
dns: Vec<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Network {
|
impl Network {
|
||||||
pub fn new() -> Network {
|
pub fn new() -> Network {
|
||||||
Network {
|
Network {
|
||||||
ifaces: HashMap::new(),
|
|
||||||
routes: Vec::new(),
|
|
||||||
dns: Vec::new(),
|
dns: Vec::new(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user