Ah so I have learned that Foreman does not automatically import this.
This is a tiny detail, I am deleting the two lines here not creating the
ticket.

So rebased, please have a look on the exceptions now. Should be much
better.

Generally, I consider catching Exception class as a bad practice, but in
this case it's fine. We can report everything with one message here, not
big deal here.

LZ

On Fri, Jan 03, 2014 at 12:22:22AM -0800, Dominic Cleal wrote:
> > +      @network = options[:virsh_network]
> > +      raise "DNS virsh provider needs 'virsh_network' option" unless @network
> > +      super(options)
> > +    end
> > +
> > +    # we support only one subnet
> > +    def loadSubnets
> > +      super
> > +      doc = REXML::Document.new xml = dump_xml
> > +      doc.elements.each("network/ip") do |e|
> > +        next if e.attributes["family"] == "ipv6"
> > +        netmask = e.attributes["netmask"]
> > +        gateway = e.attributes["address"]
> > +        network = IPAddr.new(gateway).mask(netmask).to_s
> > +        subnet = Proxy::DHCP::Subnet.new(self, network, netmask)
> > +        # TODO - where should I store subnet info? this is not working...
> 
> Ah right, maybe log a ticket for Foreman then so it can receive additional fields.
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/theforeman/smart-proxy/pull/116/files#r8630617

-- 
Later,

 Lukas "lzap" Zapletal
 irc: lzap #theforeman