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

« back to all changes in this revision

Viewing changes to quantum/db/l3_rpc_agent_api.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:
 
1
# Copyright (c) 2012 OpenStack, LLC.
 
2
#
 
3
# Licensed under the Apache License, Version 2.0 (the "License");
 
4
# you may not use this file except in compliance with the License.
 
5
# You may obtain a copy of the License at
 
6
#
 
7
#    http://www.apache.org/licenses/LICENSE-2.0
 
8
#
 
9
# Unless required by applicable law or agreed to in writing, software
 
10
# distributed under the License is distributed on an "AS IS" BASIS,
 
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 
12
# implied.
 
13
# See the License for the specific language governing permissions and
 
14
# limitations under the License.
 
15
 
 
16
from quantum.common import topics
 
17
from quantum.openstack.common import jsonutils
 
18
from quantum.openstack.common import log as logging
 
19
from quantum.openstack.common.rpc import proxy
 
20
 
 
21
 
 
22
LOG = logging.getLogger(__name__)
 
23
 
 
24
 
 
25
class L3AgentNotifyAPI(proxy.RpcProxy):
 
26
    """API for plugin to notify L3 agent."""
 
27
    BASE_RPC_API_VERSION = '1.0'
 
28
 
 
29
    def __init__(self, topic=topics.L3_AGENT):
 
30
        super(L3AgentNotifyAPI, self).__init__(
 
31
            topic=topic, default_version=self.BASE_RPC_API_VERSION)
 
32
 
 
33
    def router_deleted(self, context, router_id):
 
34
        LOG.debug(_('Nofity agent the router %s is deleted'), router_id)
 
35
        self.cast(context,
 
36
                  self.make_msg('router_deleted',
 
37
                                router_id=router_id),
 
38
                  topic=self.topic)
 
39
 
 
40
    def routers_updated(self, context, routers):
 
41
        if routers:
 
42
            LOG.debug(_('Nofity agent routers were updated:\n %s'),
 
43
                      jsonutils.dumps(routers, indent=5))
 
44
            self.cast(context,
 
45
                      self.make_msg('routers_updated',
 
46
                                    routers=routers),
 
47
                      topic=self.topic)
 
48
 
 
49
 
 
50
L3AgentNofity = L3AgentNotifyAPI()