diff --git a/neutron/tests/api/base.py b/neutron/tests/api/base.py index 2bc83306eef..c7137f7a4b2 100644 --- a/neutron/tests/api/base.py +++ b/neutron/tests/api/base.py @@ -96,8 +96,6 @@ class BaseNetworkTest(test.BaseTestCase): cls.service_profiles = [] cls.flavors = [] cls.metering_label_rules = [] - cls.fw_rules = [] - cls.fw_policies = [] cls.qos_rules = [] cls.qos_policies = [] cls.ethertype = "IPv" + str(cls._ip_version) @@ -109,14 +107,6 @@ class BaseNetworkTest(test.BaseTestCase): @classmethod def resource_cleanup(cls): if CONF.service_available.neutron: - # Clean up firewall policies - for fw_policy in cls.fw_policies: - cls._try_delete_resource(cls.client.delete_firewall_policy, - fw_policy['id']) - # Clean up firewall rules - for fw_rule in cls.fw_rules: - cls._try_delete_resource(cls.client.delete_firewall_rule, - fw_rule['id']) # Clean up QoS rules for qos_rule in cls.qos_rules: cls._try_delete_resource(cls.admin_client.delete_qos_rule, @@ -321,26 +311,6 @@ class BaseNetworkTest(test.BaseTestCase): router_id, subnet_id) return interface - @classmethod - def create_firewall_rule(cls, action, protocol): - """Wrapper utility that returns a test firewall rule.""" - body = cls.client.create_firewall_rule( - name=data_utils.rand_name("fw-rule"), - action=action, - protocol=protocol) - fw_rule = body['firewall_rule'] - cls.fw_rules.append(fw_rule) - return fw_rule - - @classmethod - def create_firewall_policy(cls): - """Wrapper utility that returns a test firewall policy.""" - body = cls.client.create_firewall_policy( - name=data_utils.rand_name("fw-policy")) - fw_policy = body['firewall_policy'] - cls.fw_policies.append(fw_policy) - return fw_policy - @classmethod def create_qos_policy(cls, name, description, shared, tenant_id=None): """Wrapper utility that returns a test QoS policy.""" diff --git a/neutron/tests/tempest/services/network/json/network_client.py b/neutron/tests/tempest/services/network/json/network_client.py index 3cadcbb471c..6fcbc6d1692 100644 --- a/neutron/tests/tempest/services/network/json/network_client.py +++ b/neutron/tests/tempest/services/network/json/network_client.py @@ -43,8 +43,7 @@ class NetworkClientJSON(service_client.ServiceClient): # The following list represents resource names that do not require # changing underscore to a hyphen - hyphen_exceptions = [ - "firewall_rules", "firewall_policies", "service_profiles"] + hyphen_exceptions = ["service_profiles"] # the following map is used to construct proper URI # for the given neutron resource service_resource_prefix_map = { @@ -56,9 +55,6 @@ class NetworkClientJSON(service_client.ServiceClient): 'ports': '', 'metering_labels': 'metering', 'metering_label_rules': 'metering', - 'firewall_rules': 'fw', - 'firewall_policies': 'fw', - 'firewalls': 'fw', 'policies': 'qos', 'bandwidth_limit_rules': 'qos', 'rule_types': 'qos', @@ -84,7 +80,6 @@ class NetworkClientJSON(service_client.ServiceClient): 'security_groups': 'security_groups', 'security_group_rules': 'security_group_rules', 'quotas': 'quotas', - 'firewall_policy': 'firewall_policies', 'qos_policy': 'policies', 'rbac_policy': 'rbac_policies', } @@ -624,33 +619,6 @@ class NetworkClientJSON(service_client.ServiceClient): body = json.loads(body) return service_client.ResponseBody(resp, body) - def insert_firewall_rule_in_policy(self, firewall_policy_id, - firewall_rule_id, insert_after="", - insert_before=""): - uri = '%s/fw/firewall_policies/%s/insert_rule' % (self.uri_prefix, - firewall_policy_id) - body = { - "firewall_rule_id": firewall_rule_id, - "insert_after": insert_after, - "insert_before": insert_before - } - body = json.dumps(body) - resp, body = self.put(uri, body) - self.expected_success(200, resp.status) - body = json.loads(body) - return service_client.ResponseBody(resp, body) - - def remove_firewall_rule_from_policy(self, firewall_policy_id, - firewall_rule_id): - uri = '%s/fw/firewall_policies/%s/remove_rule' % (self.uri_prefix, - firewall_policy_id) - update_body = {"firewall_rule_id": firewall_rule_id} - update_body = json.dumps(update_body) - resp, body = self.put(uri, update_body) - self.expected_success(200, resp.status) - body = json.loads(body) - return service_client.ResponseBody(resp, body) - def list_qos_policies(self, **filters): if filters: uri = '%s/qos/policies?%s' % (self.uri_prefix,