Merge "Use python abc in DeletableResource class"
diff --git a/tempest/api/network/common.py b/tempest/api/network/common.py
index 97e120f..5ac8b5a 100644
--- a/tempest/api/network/common.py
+++ b/tempest/api/network/common.py
@@ -13,6 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
+import abc
+
+import six
+
class AttributeDict(dict):
@@ -27,6 +31,7 @@
return super(AttributeDict, self).__getattribute__(name)
+@six.add_metaclass(abc.ABCMeta)
class DeletableResource(AttributeDict):
"""
@@ -42,8 +47,9 @@
return '<%s id="%s" name="%s">' % (self.__class__.__name__,
self.id, self.name)
+ @abc.abstractmethod
def delete(self):
- raise NotImplemented()
+ return
def __hash__(self):
return id(self)