Created
December 10, 2012 11:28
-
-
Save raphink/4250093 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):001:0> require 'netcf' | |
=> true | |
irb(main):002:0> n = Netcf.new | |
=> #<Netcf:0x2ab58b74e058> | |
irb(main):003:0> i = n.lookup_by_name('eth0') | |
=> #<NetcfIf:0x2ab58b741df8> | |
irb(main):004:0> puts i.xml_desc | |
<?xml version="1.0"?> | |
<interface name="eth0" type="ethernet"> | |
<start mode="onboot"/> | |
<protocol family="ipv4"> | |
<ip address="10.27.21.127" prefix="24"/> | |
<route gateway="10.27.21.1"/> | |
</protocol> | |
</interface> | |
=> nil | |
irb(main):005:0> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment