Debian Codegraph @

neutron_lib/exceptions/dhcpagentscheduler.py

raw
1 # Copyright (c) 2013 OpenStack Foundation.
2 # All rights reserved.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License"); you may
5 # not use this file except in compliance with the License. You may obtain
6 # a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 # License for the specific language governing permissions and limitations
14 # under the License.
15
16 from neutron_lib._i18n import _
17 from neutron_lib import exceptions
18 from neutron_lib.exceptions import agent as agent_exc
19
20
21 class InvalidDHCPAgent(agent_exc.AgentNotFound):
22 message = _("Agent %(id)s is not a valid DHCP Agent or has been disabled.")
23
24
25 class NetworkHostedByDHCPAgent(exceptions.Conflict):
26 message = _("The network %(network_id)s has been already hosted"
27 " by the DHCP Agent %(agent_id)s.")
28
29
30 class NetworkNotHostedByDhcpAgent(exceptions.Conflict):
31 message = _("The network %(network_id)s is not hosted"
32 " by the DHCP Agent %(agent_id)s.")