Continue the fwaas decoupling and cleanup
Remove some stale code. FWaaS has its own tempest plugin now. Closes-Bug: #1506760 Change-Id: Ifd49d6b2b68fe31f27ae3eb26e272167683075c6
This commit is contained in:
parent
b8226e2e2d
commit
a81542f5bc
|
@ -43,8 +43,7 @@ class NetworkClientJSON(service_client.ServiceClient):
|
||||||
|
|
||||||
# The following list represents resource names that do not require
|
# The following list represents resource names that do not require
|
||||||
# changing underscore to a hyphen
|
# changing underscore to a hyphen
|
||||||
hyphen_exceptions = [
|
hyphen_exceptions = ["service_profiles"]
|
||||||
"firewall_rules", "firewall_policies", "service_profiles"]
|
|
||||||
# the following map is used to construct proper URI
|
# the following map is used to construct proper URI
|
||||||
# for the given neutron resource
|
# for the given neutron resource
|
||||||
service_resource_prefix_map = {
|
service_resource_prefix_map = {
|
||||||
|
@ -56,9 +55,6 @@ class NetworkClientJSON(service_client.ServiceClient):
|
||||||
'ports': '',
|
'ports': '',
|
||||||
'metering_labels': 'metering',
|
'metering_labels': 'metering',
|
||||||
'metering_label_rules': 'metering',
|
'metering_label_rules': 'metering',
|
||||||
'firewall_rules': 'fw',
|
|
||||||
'firewall_policies': 'fw',
|
|
||||||
'firewalls': 'fw',
|
|
||||||
'policies': 'qos',
|
'policies': 'qos',
|
||||||
'bandwidth_limit_rules': 'qos',
|
'bandwidth_limit_rules': 'qos',
|
||||||
'rule_types': 'qos',
|
'rule_types': 'qos',
|
||||||
|
@ -84,7 +80,6 @@ class NetworkClientJSON(service_client.ServiceClient):
|
||||||
'security_groups': 'security_groups',
|
'security_groups': 'security_groups',
|
||||||
'security_group_rules': 'security_group_rules',
|
'security_group_rules': 'security_group_rules',
|
||||||
'quotas': 'quotas',
|
'quotas': 'quotas',
|
||||||
'firewall_policy': 'firewall_policies',
|
|
||||||
'qos_policy': 'policies',
|
'qos_policy': 'policies',
|
||||||
'rbac_policy': 'rbac_policies',
|
'rbac_policy': 'rbac_policies',
|
||||||
}
|
}
|
||||||
|
@ -624,33 +619,6 @@ class NetworkClientJSON(service_client.ServiceClient):
|
||||||
body = json.loads(body)
|
body = json.loads(body)
|
||||||
return service_client.ResponseBody(resp, 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):
|
def list_qos_policies(self, **filters):
|
||||||
if filters:
|
if filters:
|
||||||
uri = '%s/qos/policies?%s' % (self.uri_prefix,
|
uri = '%s/qos/policies?%s' % (self.uri_prefix,
|
||||||
|
|
Loading…
Reference in New Issue