#!/usr/bin/env ruby # -*- coding: utf-8 -*- $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'dcmgr/rubygems' require 'dcmgr' require 'isono' include Isono::Runner::RpcServer manifest = DEFAULT_MANIFEST.dup manifest.instance_eval do node_name 'hva' node_instance_id "#{Isono::Util.default_gw_ipaddr}" config do |c| c.vm_data_dir = '/var/lib/vm' c.edge_networking = 'netfilter' c.enable_ebtables = true c.enable_iptables = true c.hv_ifindex = 2 # ex. /sys/class/net/eth0/ifindex => 2 c.bridge_novlan = 'br0' c.verbose_netfilter = false c.packet_drop_log = false c.debug_iptables = false end load_config File.expand_path('config/hva.conf', app_root) load_module Isono::NodeModules::NodeHeartbeat load_module Dcmgr::NodeModules::InstanceMonitor case config.edge_networking when 'openflow' load_module Dcmgr::NodeModules::ServiceOpenFlow when 'off' # Don't load openflow nor netfilter when 'netfilter', 'legacy_netfilter' load_module Dcmgr::NodeModules::ServiceNetfilter else raise "Configuration error: '#{config.edge_networking}' is not a valid option for edge_networking. Valid options are 'openflow', 'netfilter', 'legacy_netfilter' and 'off'" end end start(manifest) do endpoint "hva-handle.#{@node.node_id}", Dcmgr::Rpc::HvaHandler end