hypha: begin working on network support

This commit is contained in:
Alex Zenla
2024-02-01 13:56:03 +00:00
parent dc5adcb413
commit e73cfa92c8
3 changed files with 72 additions and 1 deletions

View File

@ -15,7 +15,7 @@ use std::str::FromStr;
use std::{fs, io, thread};
use termion::raw::IntoRawMode;
use uuid::Uuid;
use xenclient::{DomainConfig, DomainDisk, XenClient};
use xenclient::{DomainConfig, DomainDisk, DomainNetworkInterface, XenClient};
use xenstore::client::{XsdClient, XsdInterface};
pub struct Controller {
@ -121,6 +121,12 @@ impl Controller {
writable: false,
},
],
vifs: vec![DomainNetworkInterface {
mac: "00:16:3E:46:0C:1B",
mtu: 1500,
bridge: "xenbr0",
script: "/etc/xen/scripts/vif-bridge",
}],
filesystems: vec![],
extra_keys: vec![
("hypha/uuid".to_string(), uuid.to_string()),