Revision 08024d57 src/vnm_mad/test/OpenNebulaNetwork_spec.rb

View differences:

src/vnm_mad/test/OpenNebulaNetwork_spec.rb
112 112
    it "force VLAN_ID for Open vSwitch vlans in kvm" do
113 113
        $capture_commands = {
114 114
            /virsh.*dumpxml/ => OUTPUT[:virsh_dumpxml_vlan_id],
115
            /brctl show/     => OUTPUT[:brctl_show]
115
            /brctl show/     => OUTPUT[:brctl_show],
116
            /ovs-vsctl/      => nil
116 117
        }
117 118
        onevlan = OpenvSwitchVLAN.new(OUTPUT[:onevm_show_vlan_id_kvm],"kvm")
118 119
        onevlan.activate
......
153 154
    it "tag tun/tap devices with vlans in kvm" do
154 155
        $capture_commands = {
155 156
            /virsh.*dumpxml/ => OUTPUT[:virsh_dumpxml_phydev],
156
            /brctl show/     => OUTPUT[:brctl_show]
157
            /brctl show/     => OUTPUT[:brctl_show],
158
	    /brctl add/    => nil,
159
	    /vconfig/        => nil,
160
	    /ip link/        => nil
157 161
        }
158 162
        hm = OpenNebulaHM.new(OUTPUT[:onevm_show_phydev_kvm],"kvm")
159 163
        hm.activate
......
161 165
        hm_activate_rules = ["sudo /usr/sbin/brctl addbr onebr6",
162 166
                             "sudo /sbin/ip link show eth0.8",
163 167
                             "sudo /sbin/vconfig add eth0 8",
164
                             "sudo /sbin/ip set eth0.8 up",
168
                             "sudo /sbin/ip link set eth0.8 up",
165 169
                             "sudo /usr/sbin/brctl addif onebr6 eth0.8"]
166 170
        $collector[:system].should == hm_activate_rules
167 171
    end
......
169 173
    it "force VLAN_ID for vlans in kvm" do
170 174
        $capture_commands = {
171 175
            /virsh.*dumpxml/ => OUTPUT[:virsh_dumpxml_vlan_id],
172
            /brctl show/     => OUTPUT[:brctl_show]
176
            /brctl show/     => OUTPUT[:brctl_show],
177
	    /brctl add/    => nil,
178
	    /vconfig/        => nil,
179
	    /ip link/        => nil
173 180
        }
174 181
        hm = OpenNebulaHM.new(OUTPUT[:onevm_show_vlan_id_kvm],"kvm")
175 182
        hm.activate
......
177 184
        hm_vlan_id = ["sudo /usr/sbin/brctl addbr onebr10",
178 185
                      "sudo /sbin/ip link show eth0.50",
179 186
                      "sudo /sbin/vconfig add eth0 50",
180
                      "sudo /sbin/ip set eth0.50 up",
187
                      "sudo /sbin/ip link set eth0.50 up",
181 188
                      "sudo /usr/sbin/brctl addif onebr10 eth0.50",
182 189
                      "sudo /usr/sbin/brctl addbr specialbr",
183 190
                      "sudo /sbin/ip link show eth0.51",
184 191
                      "sudo /sbin/vconfig add eth0 51",
185
                      "sudo /sbin/ip set eth0.51 up",
192
                      "sudo /sbin/ip link set eth0.51 up",
186 193
                      "sudo /usr/sbin/brctl addif specialbr eth0.51"]
187 194

  
188 195
        $collector[:system].should == hm_vlan_id

Also available in: Unified diff