Nova: Remove non-existing methods from fake class
The following three methods don't exist in manila.compute.nova.API
while these are present in manila.network.neutron.api.API .
- security_group_create
- security_group_list
- security_group_rule_create
This change removes these interfaces from the fake class to detect
usage of non-existing api in unit tests properly.
@@ -55,14 +55,6 @@ class FakeImage(object):
setattr(self, key, value)
-class FakeSecurityGroup(object):
- def __init__(self, **kwargs):
- self.id = kwargs.pop('id', 'fake_security_group_id')
- self.name = kwargs.pop('name', 'fake_security_group_name')
- for key, value in kwargs.items():
- setattr(self, key, value)
-
-
class API(object):
"""Fake Compute API."""
def instance_volume_attach(self, ctx, server_id, volume_id, mount_path):
@@ -104,14 +96,5 @@ class API(object):
def image_get(self, *args, **kwargs):
pass
- def security_group_create(self, *args, **kwargs):
- pass
-
- def security_group_list(self, *args, **kwargs):
- pass
-
def add_security_group_to_server(self, *args, **kwargs):
pass
-
- def security_group_rule_create(self, *args, **kwargs):
- pass
