summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmando Migliaccio <armamig@gmail.com>2016-03-03 23:08:35 -0800
committerArmando Migliaccio <armamig@gmail.com>2016-07-15 18:09:02 -0700
commit2d4899e9056d616b7bdfd92a4789fd3181c1ff50 (patch)
tree9b24ddeeda750cfe45b270219f296d9112a0214c
parent97bb4b079552e1bff90f6fc1dc0ebe5c6df80f5f (diff)
downloadneutron-2d4899e9056d616b7bdfd92a4789fd3181c1ff50.tar.gz
Continue the fwaas decoupling and cleanup
Remove some stale code. FWaaS has its own tempest plugin now. Closes-Bug: #1506760 (cherry picked from commit 4a7c60830104047a9750618e840b4b824866b0f2) Conflicts: neutron/tests/api/base.py neutron/tests/tempest/services/network/json/network_client.py Change-Id: Ifd49d6b2b68fe31f27ae3eb26e272167683075c6
-rw-r--r--neutron/tests/api/base.py30
-rw-r--r--neutron/tests/tempest/services/network/json/network_client.py34
2 files changed, 1 insertions, 63 deletions
diff --git a/neutron/tests/api/base.py b/neutron/tests/api/base.py
index 0f31a9a2a8..9b2ad9c92c 100644
--- a/neutron/tests/api/base.py
+++ b/neutron/tests/api/base.py
@@ -85,8 +85,6 @@ class BaseNetworkTest(neutron.tests.tempest.test.BaseTestCase):
cls.service_profiles = []
cls.flavors = []
cls.metering_label_rules = []
- cls.fw_rules = []
- cls.fw_policies = []
cls.ipsecpolicies = []
cls.qos_rules = []
cls.qos_policies = []
@@ -101,14 +99,6 @@ class BaseNetworkTest(neutron.tests.tempest.test.BaseTestCase):
for ipsecpolicy in cls.ipsecpolicies:
cls._try_delete_resource(cls.client.delete_ipsecpolicy,
ipsecpolicy['id'])
- # 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 ike policies
for ikepolicy in cls.ikepolicies:
cls._try_delete_resource(cls.client.delete_ikepolicy,
@@ -422,26 +412,6 @@ class BaseNetworkTest(neutron.tests.tempest.test.BaseTestCase):
return ikepolicy
@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."""
body = cls.admin_client.create_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 25400ca2a8..1b70ac68cf 100644
--- a/neutron/tests/tempest/services/network/json/network_client.py
+++ b/neutron/tests/tempest/services/network/json/network_client.py
@@ -46,8 +46,7 @@ class NetworkClientJSON(service_client.ServiceClient):
# The following list represents resource names that do not require
# changing underscore to a hyphen
- hyphen_exceptions = ["health_monitors", "firewall_rules",
- "firewall_policies", "service_profiles"]
+ hyphen_exceptions = ["health_monitors", "service_profiles"]
# the following map is used to construct proper URI
# for the given neutron resource
service_resource_prefix_map = {
@@ -65,9 +64,6 @@ class NetworkClientJSON(service_client.ServiceClient):
'ipsec-site-connections': 'vpn',
'metering_labels': 'metering',
'metering_label_rules': 'metering',
- 'firewall_rules': 'fw',
- 'firewall_policies': 'fw',
- 'firewalls': 'fw',
'policies': 'qos',
'bandwidth_limit_rules': 'qos',
'rule_types': 'qos',
@@ -96,7 +92,6 @@ class NetworkClientJSON(service_client.ServiceClient):
'ikepolicy': 'ikepolicies',
'ipsec_site_connection': 'ipsec-site-connections',
'quotas': 'quotas',
- 'firewall_policy': 'firewall_policies',
'qos_policy': 'policies',
'rbac_policy': 'rbac_policies',
}
@@ -602,33 +597,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,