~ubuntu-branches/ubuntu/saucy/neutron/saucy

« back to all changes in this revision

Viewing changes to neutron/plugins/ml2/drivers/cisco/exceptions.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Chuck Short, Adam Gandelman, James Page
  • Date: 2013-09-09 13:12:57 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130909131257-ne8foyhf9f9s94km
Tags: 1:2013.2~b3-0ubuntu1
[ Chuck Short ]
* New upstream release.
* debian/patches/fix-quantum-configuration.patch: Refreshed.
* debian/patches/neutron-conf.patch: Dropped.
* debian/patches/ignore-quantum-binaries.patch: Dropped
* debian/control: Add python-babel as a build depends.
* debian/neutron-common.install: Add neutron-usage-audit binary.
* debian/rules: Pass the tests even if it fails, temporary measure 
  until we figure out why the tests fail.

[ Adam Gandelman ]
* debian/rules: Limit testr concurrency to 1 CPU.
* debian/patches: Refresh.

[ James Page ]
* d/*.upstart: Added respawn stanza (LP: #1170393), tidied
  descriptions and rationalized stop on stanzas to be consistent.
* d/neutron-dhcp-agent.install: Drop neutron-dhcp-agent-dnsmasq-lease-
  update inline with upstream.
* d/rules: Ignore deprecated quantum binaries when checking for
  missing files.
* d/control: Update/add versioned depends for upgrades:
  - python-anyjson >= 0.3.3
  - python-stevedore >= 0.9
  - python-oslo.config >= 1:1.2.0
  - python-keystoneclient >= 1:0.2.0
* d/*: Wrap and sort.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
"""Exceptions used by Cisco ML2 mechanism drivers."""
 
17
 
 
18
from neutron.common import exceptions
 
19
 
 
20
 
 
21
class CredentialNotFound(exceptions.NeutronException):
 
22
    """Credential with this ID cannot be found."""
 
23
    message = _("Credential %(credential_id)s could not be found.")
 
24
 
 
25
 
 
26
class CredentialNameNotFound(exceptions.NeutronException):
 
27
    """Credential Name could not be found."""
 
28
    message = _("Credential %(credential_name)s could not be found.")
 
29
 
 
30
 
 
31
class CredentialAlreadyExists(exceptions.NeutronException):
 
32
    """Credential ID already exists."""
 
33
    message = _("Credential %(credential_id)s already exists "
 
34
                "for tenant %(tenant_id)s.")
 
35
 
 
36
 
 
37
class NexusComputeHostNotConfigured(exceptions.NeutronException):
 
38
    """Connection to compute host is not configured."""
 
39
    message = _("Connection to %(host)s is not configured.")
 
40
 
 
41
 
 
42
class NexusConnectFailed(exceptions.NeutronException):
 
43
    """Failed to connect to Nexus switch."""
 
44
    message = _("Unable to connect to Nexus %(nexus_host)s. Reason: %(exc)s.")
 
45
 
 
46
 
 
47
class NexusConfigFailed(exceptions.NeutronException):
 
48
    """Failed to configure Nexus switch."""
 
49
    message = _("Failed to configure Nexus: %(config)s. Reason: %(exc)s.")
 
50
 
 
51
 
 
52
class NexusPortBindingNotFound(exceptions.NeutronException):
 
53
    """NexusPort Binding is not present."""
 
54
    message = _("Nexus Port Binding (%(filters)s) is not present")
 
55
 
 
56
    def __init__(self, **kwargs):
 
57
        filters = ','.join('%s=%s' % i for i in kwargs.items())
 
58
        super(NexusPortBindingNotFound, self).__init__(filters=filters)
 
59
 
 
60
 
 
61
class NoNexusSviSwitch(exceptions.NeutronException):
 
62
    """No usable nexus switch found."""
 
63
    message = _("No usable Nexus switch found to create SVI interface.")
 
64
 
 
65
 
 
66
class SubnetNotSpecified(exceptions.NeutronException):
 
67
    """Subnet id not specified."""
 
68
    message = _("No subnet_id specified for router gateway.")
 
69
 
 
70
 
 
71
class SubnetInterfacePresent(exceptions.NeutronException):
 
72
    """Subnet SVI interface already exists."""
 
73
    message = _("Subnet %(subnet_id)s has an interface on %(router_id)s.")
 
74
 
 
75
 
 
76
class PortIdForNexusSvi(exceptions.NeutronException):
 
77
        """Port Id specified for Nexus SVI."""
 
78
        message = _('Nexus hardware router gateway only uses Subnet Ids.')