class Construqt::Flavour::Ubuntu::Services::RouteService

Public Class Methods

new(service) click to toggle source
# File lib/construqt/flavour/ubuntu/flavour_ubuntu_services.rb, line 163
def initialize(service)
  @service = service
end

Public Instance Methods

down(ifname) click to toggle source
# File lib/construqt/flavour/ubuntu/flavour_ubuntu_services.rb, line 171
def down(ifname)
  "/sbin/ip route del #{@service.rt.dst.to_string} via #{@service.rt.via}"
end
interfaces(host, ifname, iface, writer) click to toggle source
# File lib/construqt/flavour/ubuntu/flavour_ubuntu_services.rb, line 179
def interfaces(host, ifname, iface, writer)
end
up(ifname) click to toggle source
# File lib/construqt/flavour/ubuntu/flavour_ubuntu_services.rb, line 167
def up(ifname)
  "/sbin/ip route add #{@service.rt.dst.to_string} via #{@service.rt.via}"
end
vrrp(host, ifname, iface) click to toggle source
# File lib/construqt/flavour/ubuntu/flavour_ubuntu_services.rb, line 175
def vrrp(host, ifname, iface)
  host.result.etc_network_vrrp(iface.name).add_master(up(ifname)).add_backup(down(ifname))
end