~ubuntu-branches/ubuntu/vivid/neutron/vivid-updates

« back to all changes in this revision

Viewing changes to neutron/plugins/vmware/common/exceptions.py

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2015-03-30 11:17:19 UTC
  • mfrom: (1.1.21)
  • Revision ID: package-import@ubuntu.com-20150330111719-h0gx7233p4jkkgfh
Tags: 1:2015.1~b3-0ubuntu1
* New upstream milestone release:
  - d/control: Align version requirements with upstream.
  - d/control: Add new dependency on oslo-log.
  - d/p/*: Rebase.
  - d/control,d/neutron-plugin-hyperv*: Dropped, decomposed into
    separate project upstream.
  - d/control,d/neutron-plugin-openflow*: Dropped, decomposed into
    separate project upstream.
  - d/neutron-common.install: Add neutron-rootwrap-daemon and 
    neutron-keepalived-state-change binaries.
  - d/rules: Ignore neutron-hyperv-agent when installing; only for Windows.
  - d/neutron-plugin-cisco.install: Drop neutron-cisco-cfg-agent as
    decomposed into separate project upstream.
  - d/neutron-plugin-vmware.install: Drop neutron-check-nsx-config and
    neutron-nsx-manage as decomposed into separate project upstream.
  - d/control: Add dependency on python-neutron-fwaas to neutron-l3-agent.
* d/pydist-overrides: Add overrides for oslo packages.
* d/control: Fixup type in package description (LP: #1263539).
* d/p/fixup-driver-test-execution.patch: Cherry pick fix from upstream VCS
  to support unit test exection in out-of-tree vendor drivers.
* d/neutron-common.postinst: Allow general access to /etc/neutron but limit
  access to root/neutron to /etc/neutron/neutron.conf to support execution
  of unit tests in decomposed vendor drivers.
* d/control: Add dependency on python-neutron-fwaas to neutron-l3-agent
  package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2012 VMware, Inc
2
 
#
3
 
# All Rights Reserved.
4
 
#
5
 
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
6
 
#    not use this file except in compliance with the License. You may obtain
7
 
#    a copy of the License at
8
 
#
9
 
#         http://www.apache.org/licenses/LICENSE-2.0
10
 
#
11
 
#    Unless required by applicable law or agreed to in writing, software
12
 
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
 
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
 
#    License for the specific language governing permissions and limitations
15
 
#    under the License.
16
 
 
17
 
from neutron.common import exceptions as n_exc
18
 
 
19
 
 
20
 
class NsxPluginException(n_exc.NeutronException):
21
 
    message = _("An unexpected error occurred in the NSX Plugin: %(err_msg)s")
22
 
 
23
 
 
24
 
class InvalidVersion(NsxPluginException):
25
 
    message = _("Unable to fulfill request with version %(version)s.")
26
 
 
27
 
 
28
 
class InvalidConnection(NsxPluginException):
29
 
    message = _("Invalid NSX connection parameters: %(conn_params)s")
30
 
 
31
 
 
32
 
class InvalidClusterConfiguration(NsxPluginException):
33
 
    message = _("Invalid cluster values: %(invalid_attrs)s. Please ensure "
34
 
                "that these values are specified in the [DEFAULT] "
35
 
                "section of the NSX plugin ini file.")
36
 
 
37
 
 
38
 
class InvalidNovaZone(NsxPluginException):
39
 
    message = _("Unable to find cluster config entry "
40
 
                "for nova zone: %(nova_zone)s")
41
 
 
42
 
 
43
 
class NoMorePortsException(NsxPluginException):
44
 
    message = _("Unable to create port on network %(network)s. "
45
 
                "Maximum number of ports reached")
46
 
 
47
 
 
48
 
class NatRuleMismatch(NsxPluginException):
49
 
    message = _("While retrieving NAT rules, %(actual_rules)s were found "
50
 
                "whereas rules in the (%(min_rules)s,%(max_rules)s) interval "
51
 
                "were expected")
52
 
 
53
 
 
54
 
class InvalidAttachmentType(NsxPluginException):
55
 
    message = _("Invalid NSX attachment type '%(attachment_type)s'")
56
 
 
57
 
 
58
 
class MaintenanceInProgress(NsxPluginException):
59
 
    message = _("The networking backend is currently in maintenance mode and "
60
 
                "therefore unable to accept requests which modify its state. "
61
 
                "Please try later.")
62
 
 
63
 
 
64
 
class L2GatewayAlreadyInUse(n_exc.Conflict):
65
 
    message = _("Gateway Service %(gateway)s is already in use")
66
 
 
67
 
 
68
 
class InvalidSecurityCertificate(NsxPluginException):
69
 
    message = _("An invalid security certificate was specified for the "
70
 
                "gateway device. Certificates must be enclosed between "
71
 
                "'-----BEGIN CERTIFICATE-----' and "
72
 
                "'-----END CERTIFICATE-----'")
73
 
 
74
 
 
75
 
class ServiceOverQuota(n_exc.Conflict):
76
 
    message = _("Quota exceeded for Vcns resource: %(overs)s: %(err_msg)s")
77
 
 
78
 
 
79
 
class ServiceClusterUnavailable(NsxPluginException):
80
 
    message = _("Service cluster: '%(cluster_id)s' is unavailable. Please, "
81
 
                "check NSX setup and/or configuration")
82
 
 
83
 
 
84
 
class PortConfigurationError(NsxPluginException):
85
 
    message = _("An error occurred while connecting LSN %(lsn_id)s "
86
 
                "and network %(net_id)s via port %(port_id)s")
87
 
 
88
 
    def __init__(self, **kwargs):
89
 
        super(PortConfigurationError, self).__init__(**kwargs)
90
 
        self.port_id = kwargs.get('port_id')
91
 
 
92
 
 
93
 
class LsnNotFound(n_exc.NotFound):
94
 
    message = _('Unable to find LSN for %(entity)s %(entity_id)s')
95
 
 
96
 
 
97
 
class LsnPortNotFound(n_exc.NotFound):
98
 
    message = (_('Unable to find port for LSN %(lsn_id)s '
99
 
                 'and %(entity)s %(entity_id)s'))
100
 
 
101
 
 
102
 
class LsnMigrationConflict(n_exc.Conflict):
103
 
    message = _("Unable to migrate network '%(net_id)s' to LSN: %(reason)s")
104
 
 
105
 
 
106
 
class LsnConfigurationConflict(NsxPluginException):
107
 
    message = _("Configuration conflict on Logical Service Node %(lsn_id)s")