~ubuntu-cloud-archive/ubuntu/precise/nova/trunk

« back to all changes in this revision

Viewing changes to plugins/xenserver/networking/etc/xensource/scripts/ovs_configure_base_flows.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Chuck Short, Adam Gandelman
  • Date: 2012-06-22 12:39:57 UTC
  • mfrom: (1.1.57)
  • Revision ID: package-import@ubuntu.com-20120622123957-hbzwg84nt9rqwg8r
Tags: 2012.2~f2~20120621.14517-0ubuntu1
[ Chuck Short ]
* New upstream version.

[ Adam Gandelman ]
* debian/rules: Temporarily disable test suite while blocking
  tests are investigated. 
* debian/patches/kombu_tests_timeout.patch: Dropped.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
def main(command, phys_dev_name):
31
31
    ovs_ofctl = lambda *rule: novalib.execute('/usr/bin/ovs-ofctl', *rule)
32
32
 
33
 
    bridge_name = \
34
 
        novalib.execute_get_output('/usr/bin/ovs-vsctl',
35
 
                                    'iface-to-br', phys_dev_name)
 
33
    bridge_name = novalib.execute_get_output('/usr/bin/ovs-vsctl',
 
34
                                             'iface-to-br', phys_dev_name)
36
35
 
37
36
    # always clear all flows first
38
37
    ovs_ofctl('del-flows', bridge_name)
50
49
 
51
50
        # Allow traffic from dom0 if there is a management interface
52
51
        # present (its IP address is on the bridge itself)
53
 
        bridge_addr = \
54
 
            novalib.execute_get_output('/sbin/ip', '-o', '-f', 'inet', 'addr',
55
 
                                                    'show', bridge_name)
 
52
        bridge_addr = novalib.execute_get_output('/sbin/ip', '-o', '-f',
 
53
                                                 'inet', 'addr', 'show',
 
54
                                                 bridge_name)
56
55
        if bridge_addr != '':
57
56
            ovs_ofctl('add-flow', bridge_name,
58
57
                      "priority=2,in_port=LOCAL,actions=normal")