Class: Xen::Bridges
- Inherits:
-
Object
- Object
- Xen::Bridges
- Defined in:
- lib/xen/host.rb
Overview
Network Bridge Script looks like this.
#!/bin/sh /etc/xen/scripts/network-bridge $1 netdev=eth0 bridge=xenbr0 vifnum=0 antispoof=no /etc/xen/scripts/network-bridge $1 netdev=eth1 bridge=xenbr1 vifnum=1 antispoof=no
Constant Summary collapse
- NETWORK_BRIDGE_WRAPPER =
'/etc/xen/scripts/network-bridge-wrapper'
Class Method Summary collapse
Class Method Details
.find ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/xen/host.rb', line 39 def self.find f = File.readlines(NETWORK_BRIDGE_WRAPPER).collect { |line| if (m = line.match /netdev=(.*) bridge=(.*) vifnum=(.*) antispoof=(.*)/) Xen::Bridge.new :netdev => m[1], :bridge => m[2], :vifnum => m[3], :antispoof => m[4] end }.compact end |
.save ⇒ Object
47 48 |
# File 'lib/xen/host.rb', line 47 def self.save end |