~ubuntu-branches/ubuntu/raring/quantum/raring-proposed

« back to all changes in this revision

Viewing changes to quantum/agent/linux/ip_lib.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Chuck Short, Yolanda Robla, James Page, Maru Newby
  • Date: 2013-01-11 09:14:35 UTC
  • mfrom: (2.1.17)
  • Revision ID: package-import@ubuntu.com-20130111091435-vaup7dwmtmajy5oe
Tags: 2013.1~g2-0ubuntu1
[ Chuck Short ]
* New upstream version. 
* debian/patches/fix-quantum-configuration.patch: Refreshed.

[ Yolanda Robla ]
* debian/quantum-l3-agent.quantum-metadata-agent.upstart: Add
  upstart configuration for Metadata Agent.
* debian/quantum-l3-agent.install: Added quantum-ns-metadata-proxy,
  quantum-metadata-agent and metadata_agent.ini.
* debian/patches/fix-quantum-configuration.patch: Update rootwrap
  configuration in metadata_agent.ini file.
* debian/changelog: Updated package version
* d/p/fix-quantum-configuration.patch: refresh patches

[ James Page ]
* d/*.install: Install entry points from bin directory instead
  of easy-install ones generated during the package build process
  (LP: #1085038).
* d/control: Drop BD on python-dev-all; its not required.
* d/rules: Install multiple upstart configurations for quantum-l3-agent.
* d/control: Tidy package descriptions.
* d/*.postrm: Drop as debhelper will generate update-rc.d calls in
  maintainer scripts if required.
* d/quantum-common.postinst: Tweak permissions setting so that /etc/quantum
  is not owned/writable by the quantum user, ensure that /etc/quantum/rootwrap*
  is owned by root:root.
* d/*agent*.postinst: Dropped as permissions now correctly set in
  quantum-common.
* d/patches/fix-quantum-configuration.patch: Re-add dropped fixes rootwrap and
  sqlite defaults for all plugins.
* d/control: Added new BD on alembic (>= 0.4.1~), version python-mock >= 1.0b1.

[ Maru Newby ]
* debian/control: Remove unnecessary openvswitch-vswitch dependency
  from quantum-plugin-openvswitch (LP: #1076747).

Show diffs side-by-side

added added

removed removed

Lines of Context:
327
327
 
328
328
        return retval
329
329
 
 
330
    def pullup_route(self, interface_name):
 
331
        """
 
332
        Ensures that the route entry for the interface is before all
 
333
        others on the same subnet.
 
334
        """
 
335
        device_list = []
 
336
        device_route_list_lines = self._run('list', 'proto', 'kernel',
 
337
                                            'dev', interface_name).split('\n')
 
338
        for device_route_line in device_route_list_lines:
 
339
            try:
 
340
                subnet = device_route_line.split()[0]
 
341
            except:
 
342
                continue
 
343
            subnet_route_list_lines = self._run('list', 'proto', 'kernel',
 
344
                                                'match', subnet).split('\n')
 
345
            for subnet_route_line in subnet_route_list_lines:
 
346
                i = iter(subnet_route_line.split())
 
347
                while(i.next() != 'dev'):
 
348
                    pass
 
349
                device = i.next()
 
350
                try:
 
351
                    while(i.next() != 'src'):
 
352
                        pass
 
353
                    src = i.next()
 
354
                except:
 
355
                    src = ''
 
356
                if device != interface_name:
 
357
                    device_list.append((device, src))
 
358
                else:
 
359
                    break
 
360
 
 
361
            for (device, src) in device_list:
 
362
                self._as_root('del', subnet, 'dev', device)
 
363
                if (src != ''):
 
364
                    self._as_root('append', subnet, 'proto', 'kernel',
 
365
                                  'src', src, 'dev', device)
 
366
                else:
 
367
                    self._as_root('append', subnet, 'proto', 'kernel',
 
368
                                  'dev', device)
 
369
 
330
370
 
331
371
class IpNetnsCommand(IpCommandBase):
332
372
    COMMAND = 'netns'