This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
dot_xen /
| name | age | message | |
|---|---|---|---|
| |
LICENSE | Sat Jun 28 12:50:39 -0700 2008 | |
| |
README | Wed Oct 22 00:00:47 -0700 2008 | |
| |
Rakefile | Tue Oct 21 23:56:25 -0700 2008 | |
| |
TODO | Sat Jun 28 13:38:36 -0700 2008 | |
| |
dot_xen.gemspec | Tue Oct 14 17:37:39 -0700 2008 | |
| |
lib/ | Tue Oct 14 17:35:01 -0700 2008 | |
| |
script/ | Sat Jun 28 12:30:46 -0700 2008 | |
| |
spec/ | Tue Oct 14 17:35:01 -0700 2008 |
dot_xen
=======
A gem that provides reading and writing of xen files
Usage
=====
mpro% irb
>> require 'lib/dot_xen'
=> true
>> puts XenConfigFile::Parser.new.simple_parse(File.read("spec/fixtures/ey00-s00348.xen")).to_s
# -*- mode: python; -*-
kernel = "/boot/vmlinuz-2.6.18-xenU"
memory = 712
maxmem = 4096
name = "ey00-s00348"
vif = [ "bridge=xenbr0" ]
root = "/dev/sda1 ro"
vcpus = 1
cpu_cap = 100
disk = [
"phy:/dev/ey00-data4/root-s00348,sda1,w",
"phy:/dev/ey00-data4/swap-s00348,sda2,w",
"phy:/dev/ey00-data4/gfs-00218,sdb1,w!",
]
=> nil
There's two parts to this
The .simple_parse traverses the tree and builds the representation using the models in lib/xen/ast.rb. It'll return nil
if the document is invalid.











