From df93b2716774ec1d044e65bbbd037fdf56313bc7 Mon Sep 17 00:00:00 2001
From: Qin Zhao <chaochin@gmail.com>
Date: Fri, 6 Mar 2015 17:20:06 +0800
Subject: [PATCH] Add InvalidIpForSubnetClient exception

A new Neutron exception type, InvalidIpForSubnetClient, is added by
https://review.openstack.org/#/c/121767/ . Need to let Neutron client to
identify this new exception type.

Change-Id: Ib4f0d7af3807f96463c82d1d2a1e53b56081facc
Partial-Bug: 1369871
---
 neutronclient/common/exceptions.py     | 4 ++++
 neutronclient/tests/unit/test_cli20.py | 1 +
 2 files changed, 5 insertions(+)

diff --git a/neutronclient/common/exceptions.py b/neutronclient/common/exceptions.py
index 9728fbdd7..da5e19520 100644
--- a/neutronclient/common/exceptions.py
+++ b/neutronclient/common/exceptions.py
@@ -144,6 +144,10 @@ class InvalidIpForNetworkClient(BadRequest):
     pass
 
 
+class InvalidIpForSubnetClient(BadRequest):
+    pass
+
+
 class OverQuotaClient(Conflict):
     pass
 
diff --git a/neutronclient/tests/unit/test_cli20.py b/neutronclient/tests/unit/test_cli20.py
index 1e9fee6ef..7a04ec4a1 100644
--- a/neutronclient/tests/unit/test_cli20.py
+++ b/neutronclient/tests/unit/test_cli20.py
@@ -683,6 +683,7 @@ class CLITestV20ExceptionHandler(CLITestV20Base):
              exceptions.ExternalIpAddressExhaustedClient, 400),
             ('OverQuota', exceptions.OverQuotaClient, 409),
             ('InvalidIpForNetwork', exceptions.InvalidIpForNetworkClient, 400),
+            ('InvalidIpForSubnet', exceptions.InvalidIpForSubnetClient, 400),
         ]
 
         error_msg = 'dummy exception message'