summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkihiro Motoki <motoki@da.jp.nec.com>2015-06-23 21:09:11 +0900
committerSean Dague <sean@dague.net>2015-08-31 16:04:33 +0000
commitfea681e20fd0fbb3d24079475cca650f30720486 (patch)
tree50b5bd9d4b131e66ce79e8aaa5335e3741421561
parentd098904f9bc5599a69a51e4b962c7cbf7f9f6102 (diff)
downloadhorizon-fea681e20fd0fbb3d24079475cca650f30720486.tar.gz
Remove 'shared' from Neutron Firewall table
Neutron FWaaS firewall object does not support 'shared' attribute at now and 'shared' attribute is not included in API response. This commmit removes 'shared' attribute for firewall object. For more detail of the background, please see the bug report. Note that 'shared' attributes for firewall rule and policy are supported. This commit only affect the firewall object. (Pulled from gate, failing unit tests) Change-Id: I5787529395e0005ce1efee48beb6f0f688c1c736 Closes-Bug: #1465440 (cherry picked from commit 991d8ac86c12fa45e1275851711d6feb2d9891a2)
-rw-r--r--openstack_dashboard/dashboards/project/firewalls/tests.py2
-rw-r--r--openstack_dashboard/dashboards/project/firewalls/workflows.py8
-rw-r--r--openstack_dashboard/test/api_tests/fwaas_tests.py1
-rw-r--r--openstack_dashboard/test/test_data/neutron_data.py2
4 files changed, 1 insertions, 12 deletions
diff --git a/openstack_dashboard/dashboards/project/firewalls/tests.py b/openstack_dashboard/dashboards/project/firewalls/tests.py
index 538e545cd..71e2e5ffc 100644
--- a/openstack_dashboard/dashboards/project/firewalls/tests.py
+++ b/openstack_dashboard/dashboards/project/firewalls/tests.py
@@ -350,7 +350,6 @@ class FirewallTests(test.TestCase):
form_data = {'name': firewall.name,
'description': firewall.description,
'firewall_policy_id': firewall.firewall_policy_id,
- 'shared': firewall.shared,
'admin_state_up': firewall.admin_state_up
}
if router_extension:
@@ -403,7 +402,6 @@ class FirewallTests(test.TestCase):
form_data = {'name': firewall.name,
'description': firewall.description,
'firewall_policy_id': None,
- 'shared': firewall.shared,
'admin_state_up': firewall.admin_state_up
}
api.neutron.is_extension_supported(
diff --git a/openstack_dashboard/dashboards/project/firewalls/workflows.py b/openstack_dashboard/dashboards/project/firewalls/workflows.py
index 5af9d84be..0055cc861 100644
--- a/openstack_dashboard/dashboards/project/firewalls/workflows.py
+++ b/openstack_dashboard/dashboards/project/firewalls/workflows.py
@@ -278,9 +278,6 @@ class AddFirewallAction(workflows.Action):
label=_("Description"),
required=False)
firewall_policy_id = forms.ChoiceField(label=_("Policy"))
- shared = forms.BooleanField(label=_("Shared"),
- initial=False,
- required=False)
admin_state_up = forms.ChoiceField(choices=[(True, _('UP')),
(False, _('DOWN'))],
label=_("Admin State"))
@@ -302,9 +299,6 @@ class AddFirewallAction(workflows.Action):
for p in policies:
firewall_policy_id_choices.append((p.id, p.name_or_id))
self.fields['firewall_policy_id'].choices = firewall_policy_id_choices
- # only admin can set 'shared' attribute to True
- if not request.user.is_superuser:
- self.fields['shared'].widget.attrs['disabled'] = 'disabled'
class Meta(object):
name = _("AddFirewall")
@@ -317,7 +311,7 @@ class AddFirewallAction(workflows.Action):
class AddFirewallStep(workflows.Step):
action_class = AddFirewallAction
contributes = ("name", "firewall_policy_id", "description",
- "shared", "admin_state_up")
+ "admin_state_up")
def contribute(self, data, context):
context = super(AddFirewallStep, self).contribute(data, context)
diff --git a/openstack_dashboard/test/api_tests/fwaas_tests.py b/openstack_dashboard/test/api_tests/fwaas_tests.py
index 8855bd4ab..7969dddd5 100644
--- a/openstack_dashboard/test/api_tests/fwaas_tests.py
+++ b/openstack_dashboard/test/api_tests/fwaas_tests.py
@@ -325,7 +325,6 @@ class FwaasApiTests(test.APITestCase):
form_data = {'name': firewall.name,
'description': firewall.description,
'firewall_policy_id': firewall.firewall_policy_id,
- 'shared': firewall.shared,
'admin_state_up': firewall.admin_state_up
}
diff --git a/openstack_dashboard/test/test_data/neutron_data.py b/openstack_dashboard/test/test_data/neutron_data.py
index 0bc646e60..2db8934f8 100644
--- a/openstack_dashboard/test/test_data/neutron_data.py
+++ b/openstack_dashboard/test/test_data/neutron_data.py
@@ -970,7 +970,6 @@ def data(TEST):
'router_ids': [TEST.routers.first().id],
'description': 'firewall description',
'status': 'PENDING_CREATE',
- 'shared': True,
'admin_state_up': True}
TEST.api_firewalls.add(fw1_dict)
@@ -987,7 +986,6 @@ def data(TEST):
'name': '',
'description': '',
'status': 'PENDING_CREATE',
- 'shared': True,
'admin_state_up': True}
TEST.api_firewalls.add(fw1_dict)