Arista drivers for ML2 and L3 Service Plugin
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.7KB

  1. # Copyright (c) 2013 OpenStack Foundation
  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. """Exceptions used by Arista ML2 Mechanism Driver."""
  16. from neutron_lib import exceptions
  17. from networking_arista._i18n import _
  18. class AristaRpcError(exceptions.NeutronException):
  19. message = _('%(msg)s')
  20. class AristaConfigError(exceptions.NeutronException):
  21. message = _('%(msg)s')
  22. class AristaServicePluginRpcError(exceptions.NeutronException):
  23. message = _('%(msg)s')
  24. class AristaServicePluginConfigError(exceptions.NeutronException):
  25. message = _('%(msg)s')
  26. class AristaServicePluginInvalidCommand(exceptions.NeutronException):
  27. message = _('%(msg)s')
  28. class VlanUnavailable(exceptions.NeutronException):
  29. """An exception indicating VLAN creation failed because it's not available.
  30. A specialization of the NeutronException indicating network creation failed
  31. because a specified VLAN is unavailable on the physical network.
  32. :param vlan_id: The VLAN ID.
  33. :param physical_network: The physical network.
  34. """
  35. message = _("Unable to create the network. "
  36. "The VLAN %(vlan_id)s on physical network "
  37. "%(physical_network)s is not available.")