Debian Codegraph @

neutron_lib/exceptions/taas.py

raw
1 # Copyright 2011 VMware, Inc
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
17 from neutron_lib._i18n import _
18 from neutron_lib import exceptions as qexception
19
20
21 class TapServiceNotFound(qexception.NotFound):
22 message = _("Tap Service %(tap_id)s does not exist")
23
24
25 class TapFlowNotFound(qexception.NotFound):
26 message = _("Tap Flow %(flow_id)s does not exist")
27
28
29 class InvalidDestinationPort(qexception.NotFound):
30 message = _("Destination Port %(port)s does not exist")
31
32
33 class InvalidSourcePort(qexception.NotFound):
34 message = _("Source Port %(port)s does not exist")
35
36
37 class PortDoesNotBelongToTenant(qexception.NotAuthorized):
38 message = _("The specified port does not belong to the tenant")
39
40
41 class TapServiceNotBelongToTenant(qexception.NotAuthorized):
42 message = _("Specified Tap Service does not belong to the tenant")
43
44
45 class TapServiceLimitReached(qexception.OverQuota):
46 message = _("Reached the maximum quota for Tap Services")
47
48
49 class TapMirrorNotFound(qexception.NotFound):
50 message = _("Tap Mirror %(mirror_id)s does not exist")
51
52
53 class TapMirrorTunnelConflict(qexception.Conflict):
54 message = _("Tap Mirror with tunnel_id %(tunnel_id)s already exists")