diff --git a/horizon/test/test_dashboards/dogs/puppies/tables.py b/horizon/test/test_dashboards/dogs/puppies/tables.py index d090bfec62..933fc9a232 100644 --- a/horizon/test/test_dashboards/dogs/puppies/tables.py +++ b/horizon/test/test_dashboards/dogs/puppies/tables.py @@ -18,7 +18,7 @@ from horizon import tables class EagerPuppiesTable(tables.DataTable): name = tables.Column('name') - class Meta: + class Meta(object): name = 'eager_puppies' verbose_name = 'Eager Puppies' @@ -49,7 +49,7 @@ class SellPuppy(tables.DeleteAction): class LazyPuppiesTable(tables.DataTable): name = tables.Column('name') - class Meta: + class Meta(object): name = 'lazy_puppies' verbose_name = 'Lazy Puppies' table_actions = (SellPuppy,) diff --git a/horizon/test/tests/tables.py b/horizon/test/tests/tables.py index f3e3e684b2..fb82d8891f 100644 --- a/horizon/test/tests/tables.py +++ b/horizon/test/tests/tables.py @@ -237,7 +237,7 @@ class MyTable(tables.DataTable): optional = tables.Column('optional', empty_value='N/A') excluded = tables.Column('excluded') - class Meta: + class Meta(object): name = "my_table" verbose_name = "My Table" status_columns = ["status"] @@ -251,7 +251,7 @@ class MyTable(tables.DataTable): class MyServerFilterTable(MyTable): - class Meta: + class Meta(object): name = "my_table" verbose_name = "My Table" status_columns = ["status"] @@ -264,7 +264,7 @@ class MyServerFilterTable(MyTable): class MyTableSelectable(MyTable): - class Meta: + class Meta(object): name = "my_table" columns = ('id', 'name', 'value', 'status') row_class = MyRowSelectable @@ -280,7 +280,7 @@ class MyTableNotAllowedInlineEdit(MyTable): form_field_attributes={'class': 'test'}, update_action=MyUpdateActionNotAllowed) - class Meta: + class Meta(object): name = "my_table" columns = ('id', 'name', 'value', 'optional', 'status') row_class = MyRow @@ -302,7 +302,7 @@ class MyTableWrapList(MyTable): class NoActionsTable(tables.DataTable): id = tables.Column('id') - class Meta: + class Meta(object): name = "no_actions_table" verbose_name = "No Actions Table" table_actions = () @@ -312,7 +312,7 @@ class NoActionsTable(tables.DataTable): class DisabledActionsTable(tables.DataTable): id = tables.Column('id') - class Meta: + class Meta(object): name = "disabled_actions_table" verbose_name = "Disabled Actions Table" table_actions = (MyDisabledAction,) @@ -381,7 +381,7 @@ class DataTableTests(test.TestCase): def test_table_force_no_multiselect(self): class TempTable(MyTable): - class Meta: + class Meta(object): columns = ('id',) table_actions = (MyFilterAction, MyAction,) row_actions = (MyAction, MyLinkAction,) @@ -393,7 +393,7 @@ class DataTableTests(test.TestCase): def test_table_force_no_actions_column(self): class TempTable(MyTable): - class Meta: + class Meta(object): columns = ('id',) table_actions = (MyFilterAction, MyAction,) row_actions = (MyAction, MyLinkAction,) @@ -409,7 +409,7 @@ class DataTableTests(test.TestCase): verbose_name="Verbose Name", sortable=True) - class Meta: + class Meta(object): name = "my_table" columns = ('id', 'name', 'value', 'optional', 'status') @@ -421,7 +421,7 @@ class DataTableTests(test.TestCase): def test_table_natural_no_actions_column(self): class TempTable(MyTable): - class Meta: + class Meta(object): columns = ('id',) table_actions = (MyFilterAction, MyAction,) self.table = TempTable(self.request, TEST_DATA) @@ -431,7 +431,7 @@ class DataTableTests(test.TestCase): def test_table_natural_no_multiselect(self): class TempTable(MyTable): - class Meta: + class Meta(object): columns = ('id',) row_actions = (MyAction, MyLinkAction,) self.table = TempTable(self.request, TEST_DATA) @@ -443,7 +443,7 @@ class DataTableTests(test.TestCase): class TempTable(MyTable): extra = tables.Column('extra') - class Meta: + class Meta(object): name = "temp_table" table_actions = (MyFilterAction, MyAction,) row_actions = (MyAction, MyLinkAction,) @@ -754,7 +754,7 @@ class DataTableTests(test.TestCase): form_field_attributes={'class': 'test'}, update_action=MyUpdateAction) - class Meta: + class Meta(object): name = "my_table" columns = ('id', 'name', 'value', 'optional', 'status') @@ -791,7 +791,7 @@ class DataTableTests(test.TestCase): form_field_attributes={'class': 'test'}, update_action=MyUpdateAction) - class Meta: + class Meta(object): name = "my_table" columns = ('id', 'name', 'value', 'optional', 'status') @@ -1322,7 +1322,7 @@ class APIFilterTableView(SingleTableView): class TableWithPermissions(tables.DataTable): id = tables.Column('id') - class Meta: + class Meta(object): name = "table_with_permissions" permissions = ('horizon.test',) @@ -1462,7 +1462,7 @@ class FormsetTableTests(test.TestCase): name = tables.Column('name') value = tables.Column('value') - class Meta: + class Meta(object): name = 'table' table = Table(self.request) diff --git a/horizon/test/tests/workflows.py b/horizon/test/tests/workflows.py index 38490f2802..a89d872d8c 100644 --- a/horizon/test/tests/workflows.py +++ b/horizon/test/tests/workflows.py @@ -40,7 +40,7 @@ class TestActionOne(workflows.Action): project_id = forms.ChoiceField(label="Project") user_id = forms.ChoiceField(label="User") - class Meta: + class Meta(object): name = "Test Action One" slug = "test_action_one" @@ -57,7 +57,7 @@ class TestActionOne(workflows.Action): class TestActionTwo(workflows.Action): instance_id = forms.CharField(label="Instance") - class Meta: + class Meta(object): name = "Test Action Two" slug = "test_action_two" @@ -65,7 +65,7 @@ class TestActionTwo(workflows.Action): class TestActionThree(workflows.Action): extra = forms.CharField(widget=forms.widgets.Textarea) - class Meta: + class Meta(object): name = "Test Action Three" slug = "test_action_three" @@ -73,7 +73,7 @@ class TestActionThree(workflows.Action): class AdminAction(workflows.Action): admin_id = forms.CharField(label="Admin") - class Meta: + class Meta(object): name = "Admin Action" slug = "admin_action" permissions = ("horizon.test",) diff --git a/openstack_dashboard/dashboards/admin/aggregates/tables.py b/openstack_dashboard/dashboards/admin/aggregates/tables.py index 142e9ecdd4..dfbbc53098 100644 --- a/openstack_dashboard/dashboards/admin/aggregates/tables.py +++ b/openstack_dashboard/dashboards/admin/aggregates/tables.py @@ -137,7 +137,7 @@ class HostAggregatesTable(tables.DataTable): wrap_list=True, filters=(safe_unordered_list,)) - class Meta: + class Meta(object): name = "host_aggregates" hidden_title = False verbose_name = _("Host Aggregates") @@ -165,7 +165,7 @@ class AvailabilityZonesTable(tables.DataTable): def get_object_id(self, zone): return zone.zoneName - class Meta: + class Meta(object): name = "availability_zones" hidden_title = False verbose_name = _("Availability Zones") diff --git a/openstack_dashboard/dashboards/admin/aggregates/workflows.py b/openstack_dashboard/dashboards/admin/aggregates/workflows.py index 97e6b0615d..22ddb8c4ad 100644 --- a/openstack_dashboard/dashboards/admin/aggregates/workflows.py +++ b/openstack_dashboard/dashboards/admin/aggregates/workflows.py @@ -27,7 +27,7 @@ class SetAggregateInfoAction(workflows.Action): availability_zone = forms.CharField(label=_("Availability Zone"), max_length=255) - class Meta: + class Meta(object): name = _("Host Aggregate Information") help_text = _("Host aggregates divide an availability zone into " "logical units by grouping together hosts. Create a " @@ -90,7 +90,7 @@ class AddHostsToAggregateAction(workflows.MembershipAction): self.fields[field_name].choices = \ [(host_name, host_name) for host_name in host_names] - class Meta: + class Meta(object): name = _("Manage Hosts within Aggregate") slug = "add_host_to_aggregate" @@ -130,7 +130,7 @@ class ManageAggregateHostsAction(workflows.MembershipAction): self.fields[field_name].initial = current_aggregate_hosts - class Meta: + class Meta(object): name = _("Manage Hosts within Aggregate") diff --git a/openstack_dashboard/dashboards/admin/defaults/tables.py b/openstack_dashboard/dashboards/admin/defaults/tables.py index 67fb03a2e9..004ac52789 100644 --- a/openstack_dashboard/dashboards/admin/defaults/tables.py +++ b/openstack_dashboard/dashboards/admin/defaults/tables.py @@ -70,7 +70,7 @@ class QuotasTable(tables.DataTable): def get_object_id(self, obj): return obj.name - class Meta: + class Meta(object): name = "quotas" verbose_name = _("Quotas") table_actions = (QuotaFilterAction, UpdateDefaultQuotas) diff --git a/openstack_dashboard/dashboards/admin/defaults/workflows.py b/openstack_dashboard/dashboards/admin/defaults/workflows.py index c3bf85f869..3011b3ba19 100644 --- a/openstack_dashboard/dashboards/admin/defaults/workflows.py +++ b/openstack_dashboard/dashboards/admin/defaults/workflows.py @@ -63,7 +63,7 @@ class UpdateDefaultQuotasAction(workflows.Action): self.fields[field].required = False self.fields[field].widget = forms.HiddenInput() - class Meta: + class Meta(object): name = _("Default Quotas") slug = 'update_default_quotas' help_text = _("From here you can update the default quotas " diff --git a/openstack_dashboard/dashboards/admin/flavors/tables.py b/openstack_dashboard/dashboards/admin/flavors/tables.py index 4967340b71..4b11e8599a 100644 --- a/openstack_dashboard/dashboards/admin/flavors/tables.py +++ b/openstack_dashboard/dashboards/admin/flavors/tables.py @@ -145,7 +145,7 @@ class FlavorsTable(tables.DataTable): empty_value=False, filters=(filters.yesno, filters.capfirst)) - class Meta: + class Meta(object): name = "flavors" verbose_name = _("Flavors") table_actions = (FlavorFilterAction, CreateFlavor, DeleteFlavor) diff --git a/openstack_dashboard/dashboards/admin/flavors/workflows.py b/openstack_dashboard/dashboards/admin/flavors/workflows.py index 68cb98b39a..73e17cbeb7 100644 --- a/openstack_dashboard/dashboards/admin/flavors/workflows.py +++ b/openstack_dashboard/dashboards/admin/flavors/workflows.py @@ -54,7 +54,7 @@ class CreateFlavorInfoAction(workflows.Action): swap_mb = forms.IntegerField(label=_("Swap Disk (MB)"), min_value=0) - class Meta: + class Meta(object): name = _("Flavor Information") help_text = _("Flavors define the sizes for RAM, disk, number of " "cores, and other resources and can be selected when " @@ -147,7 +147,7 @@ class UpdateFlavorAccessAction(workflows.MembershipAction): self.fields[field_name].initial = flavor_access - class Meta: + class Meta(object): name = _("Flavor Access") slug = "update_flavor_access" @@ -222,7 +222,7 @@ class CreateFlavor(workflows.Workflow): class UpdateFlavorInfoAction(CreateFlavorInfoAction): flavor_id = forms.CharField(widget=forms.widgets.HiddenInput) - class Meta: + class Meta(object): name = _("Flavor Information") slug = 'update_info' help_text = _("Edit the flavor details. Flavors define the sizes for " diff --git a/openstack_dashboard/dashboards/admin/hypervisors/compute/tables.py b/openstack_dashboard/dashboards/admin/hypervisors/compute/tables.py index 2128995f07..248d936d35 100644 --- a/openstack_dashboard/dashboards/admin/hypervisors/compute/tables.py +++ b/openstack_dashboard/dashboards/admin/hypervisors/compute/tables.py @@ -106,7 +106,7 @@ class ComputeHostTable(tables.DataTable): def get_object_display(self, obj): return obj.host - class Meta: + class Meta(object): name = "compute_host" verbose_name = _("Compute Host") table_actions = (ComputeHostFilterAction,) diff --git a/openstack_dashboard/dashboards/admin/hypervisors/tables.py b/openstack_dashboard/dashboards/admin/hypervisors/tables.py index 307f41a333..77e45ab717 100644 --- a/openstack_dashboard/dashboards/admin/hypervisors/tables.py +++ b/openstack_dashboard/dashboards/admin/hypervisors/tables.py @@ -59,7 +59,7 @@ class AdminHypervisorsTable(tables.DataTable): def get_object_id(self, hypervisor): return hypervisor.hypervisor_hostname - class Meta: + class Meta(object): name = "hypervisors" verbose_name = _("Hypervisors") @@ -75,6 +75,6 @@ class AdminHypervisorInstancesTable(tables.DataTable): def get_object_id(self, server): return server['uuid'] - class Meta: + class Meta(object): name = "hypervisor_instances" verbose_name = _("Hypervisor Instances") diff --git a/openstack_dashboard/dashboards/admin/images/tables.py b/openstack_dashboard/dashboards/admin/images/tables.py index bec5219a36..4878bb4301 100644 --- a/openstack_dashboard/dashboards/admin/images/tables.py +++ b/openstack_dashboard/dashboards/admin/images/tables.py @@ -70,7 +70,7 @@ class AdminImagesTable(project_tables.ImagesTable): link="horizon:admin:images:detail", verbose_name=_("Image Name")) - class Meta: + class Meta(object): name = "images" row_class = UpdateRow status_columns = ["status"] diff --git a/openstack_dashboard/dashboards/admin/info/tables.py b/openstack_dashboard/dashboards/admin/info/tables.py index 1f16d8e4b1..844bf39dab 100644 --- a/openstack_dashboard/dashboards/admin/info/tables.py +++ b/openstack_dashboard/dashboards/admin/info/tables.py @@ -64,7 +64,7 @@ class ServicesTable(tables.DataTable): status=True, display_choices=SERVICE_STATUS_DISPLAY_CHOICES) - class Meta: + class Meta(object): name = "services" verbose_name = _("Services") table_actions = (ServiceFilterAction,) @@ -102,7 +102,7 @@ class NovaServicesTable(tables.DataTable): def get_object_id(self, obj): return "%s-%s-%s" % (obj.binary, obj.host, obj.zone) - class Meta: + class Meta(object): name = "nova_services" verbose_name = _("Compute Services") table_actions = (SubServiceFilterAction,) @@ -127,7 +127,7 @@ class CinderServicesTable(tables.DataTable): def get_object_id(self, obj): return "%s-%s-%s" % (obj.binary, obj.host, obj.zone) - class Meta: + class Meta(object): name = "cinder_services" verbose_name = _("Block Storage Services") table_actions = (SubServiceFilterAction,) @@ -176,7 +176,7 @@ class NetworkAgentsTable(tables.DataTable): def get_object_id(self, obj): return "%s-%s" % (obj.binary, obj.host) - class Meta: + class Meta(object): name = "network_agents" verbose_name = _("Network Agents") table_actions = (NetworkAgentsFilterAction,) diff --git a/openstack_dashboard/dashboards/admin/instances/tables.py b/openstack_dashboard/dashboards/admin/instances/tables.py index 1b85b65ea8..947090f0d4 100644 --- a/openstack_dashboard/dashboards/admin/instances/tables.py +++ b/openstack_dashboard/dashboards/admin/instances/tables.py @@ -159,7 +159,7 @@ class AdminInstancesTable(tables.DataTable): filters.timesince_sortable), attrs={'data-type': 'timesince'}) - class Meta: + class Meta(object): name = "instances" verbose_name = _("Instances") status_columns = ["status", "task"] diff --git a/openstack_dashboard/dashboards/admin/metadata_defs/panel.py b/openstack_dashboard/dashboards/admin/metadata_defs/panel.py index 04705925c2..b9dc7e5746 100644 --- a/openstack_dashboard/dashboards/admin/metadata_defs/panel.py +++ b/openstack_dashboard/dashboards/admin/metadata_defs/panel.py @@ -28,4 +28,4 @@ class MetadataDefinitions(horizon.Panel): if glance.VERSIONS.active >= 2: - dashboard.Admin.register(MetadataDefinitions) \ No newline at end of file + dashboard.Admin.register(MetadataDefinitions) diff --git a/openstack_dashboard/dashboards/admin/metadata_defs/tables.py b/openstack_dashboard/dashboards/admin/metadata_defs/tables.py index e1bc254a46..eb5aac2cc2 100644 --- a/openstack_dashboard/dashboards/admin/metadata_defs/tables.py +++ b/openstack_dashboard/dashboards/admin/metadata_defs/tables.py @@ -160,7 +160,7 @@ class AdminNamespacesTable(tables.DataTable): return datum.display_name return None - class Meta: + class Meta(object): name = "namespaces" verbose_name = _("Namespaces") row_class = UpdateRow diff --git a/openstack_dashboard/dashboards/admin/metering/tables.py b/openstack_dashboard/dashboards/admin/metering/tables.py index 14d497419c..7c4869294c 100644 --- a/openstack_dashboard/dashboards/admin/metering/tables.py +++ b/openstack_dashboard/dashboards/admin/metering/tables.py @@ -51,7 +51,7 @@ class ReportTable(tables.DataTable): def get_object_id(self, obj): return "%s-%s-%s" % (obj['project'], obj['service'], obj['meter']) - class Meta: + class Meta(object): name = 'report_table' verbose_name = _("Daily Usage Report") table_actions = (ModifyUsageReportParameters, CreateCSVUsageReport) @@ -86,5 +86,5 @@ class UsageTable(tables.DataTable): def __unicode__(self): return self.title - class Meta: + class Meta(object): name = 'daily' diff --git a/openstack_dashboard/dashboards/admin/networks/agents/tables.py b/openstack_dashboard/dashboards/admin/networks/agents/tables.py index b30902e198..9b9c5c31a0 100644 --- a/openstack_dashboard/dashboards/admin/networks/agents/tables.py +++ b/openstack_dashboard/dashboards/admin/networks/agents/tables.py @@ -96,7 +96,7 @@ class DHCPAgentsTable(tables.DataTable): filters=(utils_filters.parse_isotime, filters.timesince)) - class Meta: + class Meta(object): name = "agents" verbose_name = _("DHCP Agents") table_actions = (AddDHCPAgent, DeleteDHCPAgent) diff --git a/openstack_dashboard/dashboards/admin/networks/ports/tables.py b/openstack_dashboard/dashboards/admin/networks/ports/tables.py index 5e3b80b683..968bd30092 100644 --- a/openstack_dashboard/dashboards/admin/networks/ports/tables.py +++ b/openstack_dashboard/dashboards/admin/networks/ports/tables.py @@ -104,7 +104,7 @@ class PortsTable(tables.DataTable): mac_state = tables.Column("mac_state", empty_value=api.neutron.OFF_STATE, verbose_name=_("Mac Learning State")) - class Meta: + class Meta(object): name = "ports" verbose_name = _("Ports") table_actions = (CreatePort, DeletePort) diff --git a/openstack_dashboard/dashboards/admin/networks/subnets/tables.py b/openstack_dashboard/dashboards/admin/networks/subnets/tables.py index 6a84c65faa..d0f91486fe 100644 --- a/openstack_dashboard/dashboards/admin/networks/subnets/tables.py +++ b/openstack_dashboard/dashboards/admin/networks/subnets/tables.py @@ -111,7 +111,7 @@ class SubnetsTable(tables.DataTable): exceptions.handle(self.request, msg, redirect=self.failure_url) return network - class Meta: + class Meta(object): name = "subnets" verbose_name = _("Subnets") table_actions = (CreateSubnet, DeleteSubnet) diff --git a/openstack_dashboard/dashboards/admin/networks/tables.py b/openstack_dashboard/dashboards/admin/networks/tables.py index f36dcbb4e6..9807f124dd 100644 --- a/openstack_dashboard/dashboards/admin/networks/tables.py +++ b/openstack_dashboard/dashboards/admin/networks/tables.py @@ -104,7 +104,7 @@ class NetworksTable(tables.DataTable): verbose_name=_("Admin State"), display_choices=DISPLAY_CHOICES) - class Meta: + class Meta(object): name = "networks" verbose_name = _("Networks") table_actions = (CreateNetwork, DeleteNetwork, diff --git a/openstack_dashboard/dashboards/admin/routers/extensions/routerrules/tables.py b/openstack_dashboard/dashboards/admin/routers/extensions/routerrules/tables.py index 9d3a13ec07..32e2109e51 100644 --- a/openstack_dashboard/dashboards/admin/routers/extensions/routerrules/tables.py +++ b/openstack_dashboard/dashboards/admin/routers/extensions/routerrules/tables.py @@ -24,6 +24,6 @@ class RouterRulesTable(tables.DataTable): action = tables.Column("action", verbose_name=_("Action")) nexthops = tables.Column("nexthops", verbose_name=_("Next Hops")) - class Meta: + class Meta(object): name = "routerrules" verbose_name = _("Router Rules") diff --git a/openstack_dashboard/dashboards/admin/routers/ports/tables.py b/openstack_dashboard/dashboards/admin/routers/ports/tables.py index 5d32339462..c17f36ff2b 100644 --- a/openstack_dashboard/dashboards/admin/routers/ports/tables.py +++ b/openstack_dashboard/dashboards/admin/routers/ports/tables.py @@ -44,6 +44,6 @@ class PortsTable(tables.DataTable): def get_object_display(self, port): return port.id - class Meta: + class Meta(object): name = "interfaces" verbose_name = _("Interfaces") diff --git a/openstack_dashboard/dashboards/admin/routers/tables.py b/openstack_dashboard/dashboards/admin/routers/tables.py index 331385e753..3e7ca95d8e 100644 --- a/openstack_dashboard/dashboards/admin/routers/tables.py +++ b/openstack_dashboard/dashboards/admin/routers/tables.py @@ -41,7 +41,7 @@ class RoutersTable(r_tables.RoutersTable): verbose_name=_("Name"), link="horizon:admin:routers:detail") - class Meta: + class Meta(object): name = "Routers" verbose_name = _("Routers") status_columns = ["status"] diff --git a/openstack_dashboard/dashboards/admin/volumes/snapshots/tables.py b/openstack_dashboard/dashboards/admin/volumes/snapshots/tables.py index 11943167c3..44b90942e1 100644 --- a/openstack_dashboard/dashboards/admin/volumes/snapshots/tables.py +++ b/openstack_dashboard/dashboards/admin/volumes/snapshots/tables.py @@ -64,7 +64,7 @@ class VolumeSnapshotsTable(volumes_tables.VolumesTableBase): host = tables.Column("host_name", verbose_name=_("Host")) tenant = tables.Column("tenant_name", verbose_name=_("Project")) - class Meta: + class Meta(object): name = "volume_snapshots" verbose_name = _("Volume Snapshots") table_actions = (snapshots_tables.VolumeSnapshotsFilterAction, diff --git a/openstack_dashboard/dashboards/admin/volumes/volume_types/extras/tables.py b/openstack_dashboard/dashboards/admin/volumes/volume_types/extras/tables.py index d99378051c..18303d17db 100644 --- a/openstack_dashboard/dashboards/admin/volumes/volume_types/extras/tables.py +++ b/openstack_dashboard/dashboards/admin/volumes/volume_types/extras/tables.py @@ -69,7 +69,7 @@ class ExtraSpecsTable(tables.DataTable): key = tables.Column('key', verbose_name=_('Key')) value = tables.Column('value', verbose_name=_('Value')) - class Meta: + class Meta(object): name = "extras" verbose_name = _("Extra Specs") table_actions = (ExtraSpecCreate, ExtraSpecDelete) diff --git a/openstack_dashboard/dashboards/admin/volumes/volume_types/qos_specs/forms.py b/openstack_dashboard/dashboards/admin/volumes/volume_types/qos_specs/forms.py index fb2f3fe237..b2e5a7c662 100644 --- a/openstack_dashboard/dashboards/admin/volumes/volume_types/qos_specs/forms.py +++ b/openstack_dashboard/dashboards/admin/volumes/volume_types/qos_specs/forms.py @@ -67,4 +67,4 @@ class EditKeyValuePair(forms.SelfHandlingForm): except Exception: exceptions.handle(request, _("Unable to edit spec.")) - return False \ No newline at end of file + return False diff --git a/openstack_dashboard/dashboards/admin/volumes/volume_types/qos_specs/tables.py b/openstack_dashboard/dashboards/admin/volumes/volume_types/qos_specs/tables.py index f200e3dad6..b1472c4b9f 100644 --- a/openstack_dashboard/dashboards/admin/volumes/volume_types/qos_specs/tables.py +++ b/openstack_dashboard/dashboards/admin/volumes/volume_types/qos_specs/tables.py @@ -58,7 +58,7 @@ class SpecsTable(tables.DataTable): key = tables.Column('key', verbose_name=_('Key')) value = tables.Column('value', verbose_name=_('Value')) - class Meta: + class Meta(object): name = "specs" verbose_name = _("Key-Value Pairs") table_actions = (SpecCreateKeyValuePair, SpecDeleteKeyValuePair) diff --git a/openstack_dashboard/dashboards/admin/volumes/volume_types/tables.py b/openstack_dashboard/dashboards/admin/volumes/volume_types/tables.py index 16db74e64a..eca43a5bdb 100644 --- a/openstack_dashboard/dashboards/admin/volumes/volume_types/tables.py +++ b/openstack_dashboard/dashboards/admin/volumes/volume_types/tables.py @@ -157,7 +157,7 @@ class VolumeTypesTable(tables.DataTable): def get_object_id(self, vol_type): return str(vol_type.id) - class Meta: + class Meta(object): name = "volume_types" hidden_title = False verbose_name = _("Volume Types") @@ -239,7 +239,7 @@ class QosSpecsTable(tables.DataTable): def get_object_id(self, qos_specs): return qos_specs.id - class Meta: + class Meta(object): name = "qos_specs" hidden_title = False verbose_name = _("QoS Specs") diff --git a/openstack_dashboard/dashboards/admin/volumes/volumes/tables.py b/openstack_dashboard/dashboards/admin/volumes/volumes/tables.py index 6e4d3f4bd7..0efac391c0 100644 --- a/openstack_dashboard/dashboards/admin/volumes/volumes/tables.py +++ b/openstack_dashboard/dashboards/admin/volumes/volumes/tables.py @@ -81,7 +81,7 @@ class VolumesTable(volumes_tables.VolumesTable): host = tables.Column("os-vol-host-attr:host", verbose_name=_("Host")) tenant = tables.Column("tenant_name", verbose_name=_("Project")) - class Meta: + class Meta(object): name = "volumes" verbose_name = _("Volumes") status_columns = ["status"] diff --git a/openstack_dashboard/dashboards/identity/domains/tables.py b/openstack_dashboard/dashboards/identity/domains/tables.py index 258f8ec1f4..f91d1dc9d7 100644 --- a/openstack_dashboard/dashboards/identity/domains/tables.py +++ b/openstack_dashboard/dashboards/identity/domains/tables.py @@ -201,7 +201,7 @@ class DomainsTable(tables.DataTable): id = tables.Column('id', verbose_name=_('Domain ID')) enabled = tables.Column('enabled', verbose_name=_('Enabled'), status=True) - class Meta: + class Meta(object): name = "domains" verbose_name = _("Domains") row_actions = (SetDomainContext, UpdateUsersLink, UpdateGroupsLink, diff --git a/openstack_dashboard/dashboards/identity/domains/workflows.py b/openstack_dashboard/dashboards/identity/domains/workflows.py index e389f20f45..97b417384a 100644 --- a/openstack_dashboard/dashboards/identity/domains/workflows.py +++ b/openstack_dashboard/dashboards/identity/domains/workflows.py @@ -40,7 +40,7 @@ class CreateDomainInfoAction(workflows.Action): required=False, initial=True) - class Meta: + class Meta(object): name = _("Domain Information") slug = "create_domain" help_text = _("Domains provide separation between users and " @@ -123,7 +123,7 @@ class UpdateDomainUsersAction(workflows.MembershipAction): field_name = self.get_member_field_name(role_id) self.fields[field_name].initial.append(user_id) - class Meta: + class Meta(object): name = _("Domain Members") slug = constants.DOMAIN_USER_MEMBER_SLUG @@ -220,7 +220,7 @@ class UpdateDomainGroupsAction(workflows.MembershipAction): field_name = self.get_member_field_name(role.id) self.fields[field_name].initial.append(group.id) - class Meta: + class Meta(object): name = _("Domain Groups") slug = constants.DOMAIN_GROUP_MEMBER_SLUG @@ -277,7 +277,7 @@ class CreateDomain(workflows.Workflow): class UpdateDomainInfoAction(CreateDomainInfoAction): - class Meta: + class Meta(object): name = _("Domain Information") slug = 'update_domain' help_text = _("Domains provide separation between users and " diff --git a/openstack_dashboard/dashboards/identity/groups/tables.py b/openstack_dashboard/dashboards/identity/groups/tables.py index 7a17459938..184a521125 100644 --- a/openstack_dashboard/dashboards/identity/groups/tables.py +++ b/openstack_dashboard/dashboards/identity/groups/tables.py @@ -117,7 +117,7 @@ class GroupsTable(tables.DataTable): verbose_name=_('Description')) id = tables.Column('id', verbose_name=_('Group ID')) - class Meta: + class Meta(object): name = "groups" verbose_name = _("Groups") row_actions = (ManageUsersLink, EditGroupLink, DeleteGroupsAction) @@ -199,7 +199,7 @@ class UsersTable(tables.DataTable): class GroupMembersTable(UsersTable): - class Meta: + class Meta(object): name = "group_members" verbose_name = _("Group Members") table_actions = (UserFilterAction, AddMembersLink, RemoveMembers) @@ -249,7 +249,7 @@ class AddMembers(tables.BatchAction): class GroupNonMembersTable(UsersTable): - class Meta: + class Meta(object): name = "group_non_members" verbose_name = _("Non-Members") table_actions = (UserFilterAction, AddMembers) diff --git a/openstack_dashboard/dashboards/identity/projects/tables.py b/openstack_dashboard/dashboards/identity/projects/tables.py index 9fe3135d78..9439cedcf8 100644 --- a/openstack_dashboard/dashboards/identity/projects/tables.py +++ b/openstack_dashboard/dashboards/identity/projects/tables.py @@ -241,7 +241,7 @@ class TenantsTable(tables.DataTable): required=False), update_action=UpdateCell) - class Meta: + class Meta(object): name = "tenants" verbose_name = _("Projects") row_class = UpdateRow diff --git a/openstack_dashboard/dashboards/identity/projects/workflows.py b/openstack_dashboard/dashboards/identity/projects/workflows.py index cca2c82652..345168b9a9 100644 --- a/openstack_dashboard/dashboards/identity/projects/workflows.py +++ b/openstack_dashboard/dashboards/identity/projects/workflows.py @@ -108,14 +108,14 @@ class UpdateProjectQuotaAction(ProjectQuotaAction): raise forms.ValidationError(msg) return cleaned_data - class Meta: + class Meta(object): name = _("Quota") slug = 'update_quotas' help_text = _("Set maximum quotas for the project.") class CreateProjectQuotaAction(ProjectQuotaAction): - class Meta: + class Meta(object): name = _("Quota") slug = 'create_quotas' help_text = _("Set maximum quotas for the project.") @@ -161,7 +161,7 @@ class CreateProjectInfoAction(workflows.Action): self.fields["domain_id"].widget = readonlyInput self.fields["domain_name"].widget = readonlyInput - class Meta: + class Meta(object): name = _("Project Information") help_text = _("Create a project to organize users.") @@ -247,7 +247,7 @@ class UpdateProjectMembersAction(workflows.MembershipAction): field_name = self.get_member_field_name(role_id) self.fields[field_name].initial.append(user_id) - class Meta: + class Meta(object): name = _("Project Members") slug = PROJECT_USER_MEMBER_SLUG @@ -345,7 +345,7 @@ class UpdateProjectGroupsAction(workflows.MembershipAction): field_name = self.get_member_field_name(role_id) self.fields[field_name].initial.append(group_id) - class Meta: + class Meta(object): name = _("Project Groups") slug = PROJECT_GROUP_MEMBER_SLUG @@ -542,7 +542,7 @@ class UpdateProjectInfoAction(CreateProjectInfoAction): cleaned_data['enabled'] = True return cleaned_data - class Meta: + class Meta(object): name = _("Project Information") slug = 'update_info' help_text = _("Edit the project details.") diff --git a/openstack_dashboard/dashboards/identity/roles/tables.py b/openstack_dashboard/dashboards/identity/roles/tables.py index d9a27fa66b..97a2fec32b 100644 --- a/openstack_dashboard/dashboards/identity/roles/tables.py +++ b/openstack_dashboard/dashboards/identity/roles/tables.py @@ -81,7 +81,7 @@ class RolesTable(tables.DataTable): name = tables.Column('name', verbose_name=_('Role Name')) id = tables.Column('id', verbose_name=_('Role ID')) - class Meta: + class Meta(object): name = "roles" verbose_name = _("Roles") row_actions = (EditRoleLink, DeleteRolesAction) diff --git a/openstack_dashboard/dashboards/identity/users/tables.py b/openstack_dashboard/dashboards/identity/users/tables.py index 0be0b3421f..9f00b60a99 100644 --- a/openstack_dashboard/dashboards/identity/users/tables.py +++ b/openstack_dashboard/dashboards/identity/users/tables.py @@ -225,7 +225,7 @@ class UsersTable(tables.DataTable): status_choices=STATUS_CHOICES, empty_value="False") - class Meta: + class Meta(object): name = "users" verbose_name = _("Users") row_actions = (EditUserLink, ToggleEnabled, DeleteUsersAction) diff --git a/openstack_dashboard/dashboards/project/access_and_security/api_access/tables.py b/openstack_dashboard/dashboards/project/access_and_security/api_access/tables.py index 307a834605..1eaa1b0b3a 100644 --- a/openstack_dashboard/dashboards/project/access_and_security/api_access/tables.py +++ b/openstack_dashboard/dashboards/project/access_and_security/api_access/tables.py @@ -63,7 +63,7 @@ class EndpointsTable(tables.DataTable): api_endpoint = tables.Column('public_url', verbose_name=_("Service Endpoint")) - class Meta: + class Meta(object): name = "endpoints" verbose_name = _("API Endpoints") multi_select = False diff --git a/openstack_dashboard/dashboards/project/access_and_security/floating_ips/tables.py b/openstack_dashboard/dashboards/project/access_and_security/floating_ips/tables.py index 5a6bc726e3..c1d56d0d80 100644 --- a/openstack_dashboard/dashboards/project/access_and_security/floating_ips/tables.py +++ b/openstack_dashboard/dashboards/project/access_and_security/floating_ips/tables.py @@ -215,7 +215,7 @@ class FloatingIPsTable(tables.DataTable): def get_object_display(self, datum): return datum.ip - class Meta: + class Meta(object): name = "floating_ips" verbose_name = _("Floating IPs") table_actions = (AllocateIP, ReleaseIPs) diff --git a/openstack_dashboard/dashboards/project/access_and_security/floating_ips/workflows.py b/openstack_dashboard/dashboards/project/access_and_security/floating_ips/workflows.py index e8b528d24f..8e105dd9d5 100644 --- a/openstack_dashboard/dashboards/project/access_and_security/floating_ips/workflows.py +++ b/openstack_dashboard/dashboards/project/access_and_security/floating_ips/workflows.py @@ -36,7 +36,7 @@ class AssociateIPAction(workflows.Action): add_item_link=ALLOCATE_URL) instance_id = forms.ChoiceField(label=_("Instance")) - class Meta: + class Meta(object): name = _("IP Address") help_text = _("Select the IP address you wish to associate with " "the selected instance or port.") diff --git a/openstack_dashboard/dashboards/project/access_and_security/keypairs/tables.py b/openstack_dashboard/dashboards/project/access_and_security/keypairs/tables.py index 4d17914a2e..682df249af 100644 --- a/openstack_dashboard/dashboards/project/access_and_security/keypairs/tables.py +++ b/openstack_dashboard/dashboards/project/access_and_security/keypairs/tables.py @@ -88,7 +88,7 @@ class KeypairsTable(tables.DataTable): def get_object_id(self, keypair): return keypair.name - class Meta: + class Meta(object): name = "keypairs" verbose_name = _("Key Pairs") table_actions = (CreateKeyPair, ImportKeyPair, DeleteKeyPairs,) diff --git a/openstack_dashboard/dashboards/project/access_and_security/security_groups/tables.py b/openstack_dashboard/dashboards/project/access_and_security/security_groups/tables.py index f3af030af8..2b5784e516 100644 --- a/openstack_dashboard/dashboards/project/access_and_security/security_groups/tables.py +++ b/openstack_dashboard/dashboards/project/access_and_security/security_groups/tables.py @@ -135,7 +135,7 @@ class SecurityGroupsTable(tables.DataTable): def sanitize_id(self, obj_id): return filters.get_int_or_uuid(obj_id) - class Meta: + class Meta(object): name = "security_groups" verbose_name = _("Security Groups") table_actions = (CreateGroup, DeleteGroup) @@ -263,7 +263,7 @@ class RulesTable(tables.DataTable): def get_object_display(self, rule): return unicode(rule) - class Meta: + class Meta(object): name = "rules" verbose_name = _("Security Group Rules") table_actions = (CreateRule, DeleteRule) diff --git a/openstack_dashboard/dashboards/project/containers/tables.py b/openstack_dashboard/dashboards/project/containers/tables.py index b5b24e0a96..5a050a411a 100644 --- a/openstack_dashboard/dashboards/project/containers/tables.py +++ b/openstack_dashboard/dashboards/project/containers/tables.py @@ -271,7 +271,7 @@ class ContainersTable(tables.DataTable): status_choices=METADATA_LOADED_CHOICES, hidden=True) - class Meta: + class Meta(object): name = "containers" verbose_name = _("Containers") row_class = ContainerAjaxUpdateRow @@ -445,7 +445,7 @@ class ObjectsTable(tables.DataTable): size = tables.Column(get_size, verbose_name=_('Size')) - class Meta: + class Meta(object): name = "objects" verbose_name = _("Objects") table_actions = (ObjectFilterAction, CreatePseudoFolder, UploadObject, diff --git a/openstack_dashboard/dashboards/project/data_processing/cluster_templates/tables.py b/openstack_dashboard/dashboards/project/data_processing/cluster_templates/tables.py index d94ac1e457..5126deaa67 100644 --- a/openstack_dashboard/dashboards/project/data_processing/cluster_templates/tables.py +++ b/openstack_dashboard/dashboards/project/data_processing/cluster_templates/tables.py @@ -119,7 +119,7 @@ class ClusterTemplatesTable(tables.DataTable): description = tables.Column("description", verbose_name=_("Description")) - class Meta: + class Meta(object): name = "cluster_templates" verbose_name = _("Cluster Templates") table_actions = (UploadFile, diff --git a/openstack_dashboard/dashboards/project/data_processing/cluster_templates/workflows/create.py b/openstack_dashboard/dashboards/project/data_processing/cluster_templates/workflows/create.py index 8425fdfdef..6aac2ef18e 100644 --- a/openstack_dashboard/dashboards/project/data_processing/cluster_templates/workflows/create.py +++ b/openstack_dashboard/dashboards/project/data_processing/cluster_templates/workflows/create.py @@ -65,7 +65,7 @@ class SelectPluginAction(workflows.Action): ) self.fields[field_name] = choice_field - class Meta: + class Meta(object): name = _("Select plugin and hadoop version for cluster template") help_text_template = ("project/data_processing.cluster_templates/" "_create_general_help.html") @@ -134,7 +134,7 @@ class GeneralConfigAction(workflows.Action): self._errors = dict() return cleaned_data - class Meta: + class Meta(object): name = _("Details") help_text_template = ("project/data_processing.cluster_templates/" "_configure_general_help.html") @@ -202,7 +202,7 @@ class ConfigureNodegroupsAction(workflows.Action): self._errors = dict() return cleaned_data - class Meta: + class Meta(object): name = _("Node Groups") diff --git a/openstack_dashboard/dashboards/project/data_processing/clusters/tables.py b/openstack_dashboard/dashboards/project/data_processing/clusters/tables.py index 2fc1cd4030..2b682cb3b5 100644 --- a/openstack_dashboard/dashboards/project/data_processing/clusters/tables.py +++ b/openstack_dashboard/dashboards/project/data_processing/clusters/tables.py @@ -112,7 +112,7 @@ class ClustersTable(tables.DataTable): instances_count = tables.Column(get_instances_count, verbose_name=_("Instances Count")) - class Meta: + class Meta(object): name = "clusters" verbose_name = _("Clusters") row_class = UpdateRow diff --git a/openstack_dashboard/dashboards/project/data_processing/clusters/tabs.py b/openstack_dashboard/dashboards/project/data_processing/clusters/tabs.py index a112ae7cd6..fa97419b55 100644 --- a/openstack_dashboard/dashboards/project/data_processing/clusters/tabs.py +++ b/openstack_dashboard/dashboards/project/data_processing/clusters/tabs.py @@ -142,7 +142,7 @@ class InstancesTable(tables.DataTable): management_ip = tables.Column("management_ip", verbose_name=_("Management IP")) - class Meta: + class Meta(object): name = "cluster_instances" # Just ignoring the name. verbose_name = _(" ") diff --git a/openstack_dashboard/dashboards/project/data_processing/clusters/tests.py b/openstack_dashboard/dashboards/project/data_processing/clusters/tests.py index 65ebe7d36e..7eef43f2b0 100644 --- a/openstack_dashboard/dashboards/project/data_processing/clusters/tests.py +++ b/openstack_dashboard/dashboards/project/data_processing/clusters/tests.py @@ -63,4 +63,4 @@ class DataProcessingClusterTests(test.TestCase): self.assertNoFormErrors(res) self.assertRedirectsNoFollow(res, INDEX_URL) - self.assertMessageCount(success=1) \ No newline at end of file + self.assertMessageCount(success=1) diff --git a/openstack_dashboard/dashboards/project/data_processing/clusters/workflows/create.py b/openstack_dashboard/dashboards/project/data_processing/clusters/workflows/create.py index 5af44ebed4..9aadbc6a78 100644 --- a/openstack_dashboard/dashboards/project/data_processing/clusters/workflows/create.py +++ b/openstack_dashboard/dashboards/project/data_processing/clusters/workflows/create.py @@ -39,7 +39,7 @@ KEYPAIR_IMPORT_URL = "horizon:project:access_and_security:keypairs:import" class SelectPluginAction(t_flows.SelectPluginAction): - class Meta: + class Meta(object): name = _("Select plugin and hadoop version for cluster") help_text_template = ( "project/data_processing.clusters/_create_general_help.html") @@ -179,7 +179,7 @@ class GeneralConfigAction(workflows.Action): self._errors = dict() return cleaned_data - class Meta: + class Meta(object): name = _("Configure Cluster") help_text_template = \ ("project/data_processing.clusters/_configure_general_help.html") diff --git a/openstack_dashboard/dashboards/project/data_processing/data_image_registry/tables.py b/openstack_dashboard/dashboards/project/data_processing/data_image_registry/tables.py index 5c8edba508..00746159b3 100644 --- a/openstack_dashboard/dashboards/project/data_processing/data_image_registry/tables.py +++ b/openstack_dashboard/dashboards/project/data_processing/data_image_registry/tables.py @@ -76,7 +76,7 @@ class ImageRegistryTable(tables.DataTable): tags = tables.Column(tags_to_string, verbose_name=_("Tags")) - class Meta: + class Meta(object): name = "image_registry" verbose_name = _("Image Registry") table_actions = (RegisterImage, UnregisterImages,) diff --git a/openstack_dashboard/dashboards/project/data_processing/data_plugins/tables.py b/openstack_dashboard/dashboards/project/data_processing/data_plugins/tables.py index 21df26ad7e..15e011608e 100644 --- a/openstack_dashboard/dashboards/project/data_processing/data_plugins/tables.py +++ b/openstack_dashboard/dashboards/project/data_processing/data_plugins/tables.py @@ -35,6 +35,6 @@ class PluginsTable(tables.DataTable): description = tables.Column("description", verbose_name=_("Description")) - class Meta: + class Meta(object): name = "plugins" verbose_name = _("Plugins") diff --git a/openstack_dashboard/dashboards/project/data_processing/data_sources/tables.py b/openstack_dashboard/dashboards/project/data_processing/data_sources/tables.py index 01b05d80f9..eef34e8c59 100644 --- a/openstack_dashboard/dashboards/project/data_processing/data_sources/tables.py +++ b/openstack_dashboard/dashboards/project/data_processing/data_sources/tables.py @@ -62,7 +62,7 @@ class DataSourcesTable(tables.DataTable): description = tables.Column("description", verbose_name=_("Description")) - class Meta: + class Meta(object): name = "data_sources" verbose_name = _("Data Sources") table_actions = (CreateDataSource, diff --git a/openstack_dashboard/dashboards/project/data_processing/data_sources/workflows/create.py b/openstack_dashboard/dashboards/project/data_processing/data_sources/workflows/create.py index 91f72ebf0f..839e95b452 100644 --- a/openstack_dashboard/dashboards/project/data_processing/data_sources/workflows/create.py +++ b/openstack_dashboard/dashboards/project/data_processing/data_sources/workflows/create.py @@ -50,7 +50,7 @@ class GeneralConfigAction(workflows.Action): def __init__(self, request, *args, **kwargs): super(GeneralConfigAction, self).__init__(request, *args, **kwargs) - class Meta: + class Meta(object): name = _("Create Data Source") help_text_template = ("project/data_processing.data_sources/" "_create_data_source_help.html") diff --git a/openstack_dashboard/dashboards/project/data_processing/job_binaries/forms.py b/openstack_dashboard/dashboards/project/data_processing/job_binaries/forms.py index 9f96e5a61e..48f4b3b6e3 100644 --- a/openstack_dashboard/dashboards/project/data_processing/job_binaries/forms.py +++ b/openstack_dashboard/dashboards/project/data_processing/job_binaries/forms.py @@ -194,7 +194,7 @@ class JobBinaryCreateForm(forms.SelfHandlingForm): text += defaultfilters.linebreaks(force_text(self.help_text)) return defaultfilters.safe(text) - class Meta: + class Meta(object): name = _("Create Job Binary") help_text_template = ("project/data_processing.job_binaries/" "_create_job_binary_help.html") diff --git a/openstack_dashboard/dashboards/project/data_processing/job_binaries/tables.py b/openstack_dashboard/dashboards/project/data_processing/job_binaries/tables.py index fd6fd2a235..9107ad68a6 100644 --- a/openstack_dashboard/dashboards/project/data_processing/job_binaries/tables.py +++ b/openstack_dashboard/dashboards/project/data_processing/job_binaries/tables.py @@ -83,7 +83,7 @@ class JobBinariesTable(tables.DataTable): description = tables.Column("description", verbose_name=_("Description")) - class Meta: + class Meta(object): name = "job_binaries" verbose_name = _("Job Binaries") table_actions = (CreateJobBinary, diff --git a/openstack_dashboard/dashboards/project/data_processing/job_executions/tables.py b/openstack_dashboard/dashboards/project/data_processing/job_executions/tables.py index 7ced61391a..9dd243456a 100644 --- a/openstack_dashboard/dashboards/project/data_processing/job_executions/tables.py +++ b/openstack_dashboard/dashboards/project/data_processing/job_executions/tables.py @@ -160,7 +160,7 @@ class JobExecutionsTable(tables.DataTable): def get_object_display(self, datum): return datum.id - class Meta: + class Meta(object): name = "job_executions" row_class = UpdateRow status_columns = ["status"] diff --git a/openstack_dashboard/dashboards/project/data_processing/jobs/tables.py b/openstack_dashboard/dashboards/project/data_processing/jobs/tables.py index 4e603d3624..7f2d94e5a7 100644 --- a/openstack_dashboard/dashboards/project/data_processing/jobs/tables.py +++ b/openstack_dashboard/dashboards/project/data_processing/jobs/tables.py @@ -100,7 +100,7 @@ class JobsTable(tables.DataTable): description = tables.Column("description", verbose_name=_("Description")) - class Meta: + class Meta(object): name = "jobs" verbose_name = _("Jobs") table_actions = (CreateJob, diff --git a/openstack_dashboard/dashboards/project/data_processing/jobs/workflows/create.py b/openstack_dashboard/dashboards/project/data_processing/jobs/workflows/create.py index 3874a64996..fcd479c0ea 100644 --- a/openstack_dashboard/dashboards/project/data_processing/jobs/workflows/create.py +++ b/openstack_dashboard/dashboards/project/data_processing/jobs/workflows/create.py @@ -43,7 +43,7 @@ class AdditionalLibsAction(workflows.Action): return choices - class Meta: + class Meta(object): name = _("Libs") help_text_template = ( "project/data_processing.jobs/_create_job_libs_help.html") @@ -102,7 +102,7 @@ class GeneralConfigAction(workflows.Action): return cleaned_data - class Meta: + class Meta(object): name = _("Create Job") help_text_template = ( "project/data_processing.jobs/_create_job_help.html") diff --git a/openstack_dashboard/dashboards/project/data_processing/jobs/workflows/launch.py b/openstack_dashboard/dashboards/project/data_processing/jobs/workflows/launch.py index 2cf0026574..70c2350e16 100644 --- a/openstack_dashboard/dashboards/project/data_processing/jobs/workflows/launch.py +++ b/openstack_dashboard/dashboards/project/data_processing/jobs/workflows/launch.py @@ -93,7 +93,7 @@ class JobExecutionGeneralConfigAction(workflows.Action): return choices - class Meta: + class Meta(object): name = _("Job") help_text_template = ( "project/data_processing.jobs/_launch_job_help.html") @@ -118,7 +118,7 @@ class JobExecutionExistingGeneralConfigAction(JobExecutionGeneralConfigAction): return choices - class Meta: + class Meta(object): name = _("Job") help_text_template = ( "project/data_processing.jobs/_launch_job_help.html") @@ -226,7 +226,7 @@ class JobConfigAction(workflows.Action): del configs[rmkey] return (configs, edp_configs) - class Meta: + class Meta(object): name = _("Configure") help_text_template = ( "project/data_processing.jobs/_launch_job_configure_help.html") @@ -308,7 +308,7 @@ class NewClusterConfigAction(c_flow.GeneralConfigAction): label=_("Persist cluster after job exit"), required=False) - class Meta: + class Meta(object): name = _("Configure Cluster") help_text_template = ( "project/data_processing.clusters/_configure_general_help.html") @@ -390,7 +390,7 @@ class SelectHadoopPluginAction(t_flows.SelectPluginAction): self.fields["job_args"].initial = ( json.dumps(job_configs["args"])) - class Meta: + class Meta(object): name = _("Select plugin and hadoop version for cluster") help_text_template = ("project/data_processing.clusters/" "_create_general_help.html") diff --git a/openstack_dashboard/dashboards/project/data_processing/nodegroup_templates/tables.py b/openstack_dashboard/dashboards/project/data_processing/nodegroup_templates/tables.py index 49c89c4c41..d799c57230 100644 --- a/openstack_dashboard/dashboards/project/data_processing/nodegroup_templates/tables.py +++ b/openstack_dashboard/dashboards/project/data_processing/nodegroup_templates/tables.py @@ -84,7 +84,7 @@ class NodegroupTemplatesTable(tables.DataTable): wrap_list=True, filters=(filters.unordered_list,)) - class Meta: + class Meta(object): name = "nodegroup_templates" verbose_name = _("Node Group Templates") table_actions = (CreateNodegroupTemplate, diff --git a/openstack_dashboard/dashboards/project/data_processing/nodegroup_templates/workflows/create.py b/openstack_dashboard/dashboards/project/data_processing/nodegroup_templates/workflows/create.py index 7d2966e3a6..220939ad42 100644 --- a/openstack_dashboard/dashboards/project/data_processing/nodegroup_templates/workflows/create.py +++ b/openstack_dashboard/dashboards/project/data_processing/nodegroup_templates/workflows/create.py @@ -145,7 +145,7 @@ class GeneralConfigAction(workflows.Action): extra["hadoop_version"] = hadoop_version return super(GeneralConfigAction, self).get_help_text(extra) - class Meta: + class Meta(object): name = _("Configure Node Group Template") help_text_template = ( "project/data_processing.nodegroup_templates" @@ -178,7 +178,7 @@ class SecurityConfigAction(workflows.Action): choices=security_group_list, required=False) - class Meta: + class Meta(object): name = _("Security") help_text = _("Control access to instances of the node group.") @@ -315,7 +315,7 @@ class SelectPluginAction(workflows.Action, sahara = saharaclient.client(request) self._generate_plugin_version_fields(sahara) - class Meta: + class Meta(object): name = _("Select plugin and hadoop version") help_text_template = ("project/data_processing.nodegroup_templates" "/_create_general_help.html") diff --git a/openstack_dashboard/dashboards/project/database_backups/tables.py b/openstack_dashboard/dashboards/project/database_backups/tables.py index d42943e543..4aafc93da0 100644 --- a/openstack_dashboard/dashboards/project/database_backups/tables.py +++ b/openstack_dashboard/dashboards/project/database_backups/tables.py @@ -162,7 +162,7 @@ class BackupsTable(tables.DataTable): status=True, status_choices=STATUS_CHOICES) - class Meta: + class Meta(object): name = "backups" verbose_name = _("Backups") status_columns = ["status"] diff --git a/openstack_dashboard/dashboards/project/database_backups/workflows/create_backup.py b/openstack_dashboard/dashboards/project/database_backups/workflows/create_backup.py index df38fe854f..522bf55540 100644 --- a/openstack_dashboard/dashboards/project/database_backups/workflows/create_backup.py +++ b/openstack_dashboard/dashboards/project/database_backups/workflows/create_backup.py @@ -39,7 +39,7 @@ class BackupDetailsAction(workflows.Action): required=False, help_text=_("Optional parent backup")) - class Meta: + class Meta(object): name = _("Details") help_text_template = \ "project/database_backups/_backup_details_help.html" diff --git a/openstack_dashboard/dashboards/project/databases/tables.py b/openstack_dashboard/dashboards/project/databases/tables.py index 0797fa0c52..19a551c657 100644 --- a/openstack_dashboard/dashboards/project/databases/tables.py +++ b/openstack_dashboard/dashboards/project/databases/tables.py @@ -279,7 +279,7 @@ class InstancesTable(tables.DataTable): status=True, status_choices=STATUS_CHOICES) - class Meta: + class Meta(object): name = "databases" verbose_name = _("Instances") status_columns = ["status"] @@ -297,7 +297,7 @@ class UsersTable(tables.DataTable): host = tables.Column("host", verbose_name=_("Allowed Host")) databases = tables.Column(get_databases, verbose_name=_("Databases")) - class Meta: + class Meta(object): name = "users" verbose_name = _("Users") table_actions = [DeleteUser] @@ -310,7 +310,7 @@ class UsersTable(tables.DataTable): class DatabaseTable(tables.DataTable): name = tables.Column("name", verbose_name=_("Database Name")) - class Meta: + class Meta(object): name = "databases" verbose_name = _("Databases") table_actions = [DeleteDatabase] @@ -344,7 +344,7 @@ class InstanceBackupsTable(tables.DataTable): status=True, status_choices=backup_tables.STATUS_CHOICES) - class Meta: + class Meta(object): name = "backups" verbose_name = _("Backups") status_columns = ["status"] diff --git a/openstack_dashboard/dashboards/project/databases/workflows/create_instance.py b/openstack_dashboard/dashboards/project/databases/workflows/create_instance.py index 40e5ae11c5..3cbe85f057 100644 --- a/openstack_dashboard/dashboards/project/databases/workflows/create_instance.py +++ b/openstack_dashboard/dashboards/project/databases/workflows/create_instance.py @@ -43,7 +43,7 @@ class SetInstanceDetailsAction(workflows.Action): help_text=_( "Type and version of datastore.")) - class Meta: + class Meta(object): name = _("Details") help_text_template = "project/databases/_launch_details_help.html" @@ -143,7 +143,7 @@ class SetNetworkAction(workflows.Action): if len(network_list) == 1: self.fields['network'].initial = [network_list[0][0]] - class Meta: + class Meta(object): name = _("Networking") permissions = ('openstack.services.network',) help_text = _("Select networks for your instance.") @@ -200,7 +200,7 @@ class AddDatabasesAction(workflows.Action): help_text=_("Host or IP that the user is allowed " "to connect through.")) - class Meta: + class Meta(object): name = _("Initialize Databases") permissions = TROVE_ADD_PERMS help_text_template = "project/databases/_launch_initialize_help.html" @@ -228,7 +228,7 @@ class RestoreAction(workflows.Action): required=False, help_text=_('Select a backup to restore')) - class Meta: + class Meta(object): name = _("Restore From Backup") permissions = ('openstack.services.object-store',) help_text_template = "project/databases/_launch_restore_help.html" diff --git a/openstack_dashboard/dashboards/project/firewalls/tables.py b/openstack_dashboard/dashboards/project/firewalls/tables.py index a9214bcbe1..835b6cd583 100644 --- a/openstack_dashboard/dashboards/project/firewalls/tables.py +++ b/openstack_dashboard/dashboards/project/firewalls/tables.py @@ -218,7 +218,7 @@ class RulesTable(tables.DataTable): link=get_policy_link, verbose_name=_("In Policy")) - class Meta: + class Meta(object): name = "rulestable" verbose_name = _("Rules") table_actions = (AddRuleLink, DeleteRuleLink) @@ -234,7 +234,7 @@ class PoliciesTable(tables.DataTable): audited = tables.Column("audited", verbose_name=_("Audited")) - class Meta: + class Meta(object): name = "policiestable" verbose_name = _("Policies") table_actions = (AddPolicyLink, DeletePolicyLink) @@ -252,7 +252,7 @@ class FirewallsTable(tables.DataTable): status = tables.Column("status", verbose_name=_("Status")) - class Meta: + class Meta(object): name = "firewallstable" verbose_name = _("Firewalls") table_actions = (AddFirewallLink, DeleteFirewallLink) diff --git a/openstack_dashboard/dashboards/project/firewalls/workflows.py b/openstack_dashboard/dashboards/project/firewalls/workflows.py index c3aeb8e868..c000547d75 100644 --- a/openstack_dashboard/dashboards/project/firewalls/workflows.py +++ b/openstack_dashboard/dashboards/project/firewalls/workflows.py @@ -69,7 +69,7 @@ class AddRuleAction(workflows.Action): def __init__(self, request, *args, **kwargs): super(AddRuleAction, self).__init__(request, *args, **kwargs) - class Meta: + class Meta(object): name = _("AddRule") permissions = ('openstack.services.network',) help_text = _("Create a firewall rule.\n\n" @@ -133,7 +133,7 @@ class SelectRulesAction(workflows.Action): widget=forms.CheckboxSelectMultiple(), help_text=_("Create a policy with selected rules.")) - class Meta: + class Meta(object): name = _("Rules") permissions = ('openstack.services.network',) help_text = _("Select rules for your policy.") @@ -184,7 +184,7 @@ class AddPolicyAction(workflows.Action): def __init__(self, request, *args, **kwargs): super(AddPolicyAction, self).__init__(request, *args, **kwargs) - class Meta: + class Meta(object): name = _("AddPolicy") permissions = ('openstack.services.network',) help_text = _("Create a firewall policy with an ordered list " @@ -261,7 +261,7 @@ class AddFirewallAction(workflows.Action): if not request.user.is_superuser: self.fields['shared'].widget.attrs['disabled'] = 'disabled' - class Meta: + class Meta(object): name = _("AddFirewall") permissions = ('openstack.services.network',) help_text = _("Create a firewall based on a policy.\n\n" diff --git a/openstack_dashboard/dashboards/project/images/images/tables.py b/openstack_dashboard/dashboards/project/images/images/tables.py index bff810ba9c..9af2ed06b3 100644 --- a/openstack_dashboard/dashboards/project/images/images/tables.py +++ b/openstack_dashboard/dashboards/project/images/images/tables.py @@ -262,7 +262,7 @@ class ImagesTable(tables.DataTable): attrs=({"data-type": "size"}), verbose_name=_("Size")) - class Meta: + class Meta(object): name = "images" row_class = UpdateRow status_columns = ["status"] diff --git a/openstack_dashboard/dashboards/project/instances/audit_tables.py b/openstack_dashboard/dashboards/project/instances/audit_tables.py index b026550cf6..383b8d1eb3 100644 --- a/openstack_dashboard/dashboards/project/instances/audit_tables.py +++ b/openstack_dashboard/dashboards/project/instances/audit_tables.py @@ -28,7 +28,7 @@ class AuditTable(tables.DataTable): user_id = tables.Column('user_id', verbose_name=_('User ID')) message = tables.Column('message', verbose_name=_('Message')) - class Meta: + class Meta(object): name = 'audit' verbose_name = _('Instance Action List') diff --git a/openstack_dashboard/dashboards/project/instances/tables.py b/openstack_dashboard/dashboards/project/instances/tables.py index 15527face0..a9bcba1bb8 100644 --- a/openstack_dashboard/dashboards/project/instances/tables.py +++ b/openstack_dashboard/dashboards/project/instances/tables.py @@ -1016,7 +1016,7 @@ class InstancesTable(tables.DataTable): filters.timesince_sortable), attrs={'data-type': 'timesince'}) - class Meta: + class Meta(object): name = "instances" verbose_name = _("Instances") status_columns = ["status", "task"] diff --git a/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py b/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py index 6dfebb685b..0e6326a08c 100644 --- a/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py +++ b/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py @@ -63,7 +63,7 @@ class SelectProjectUserAction(workflows.Action): users = [(request.user.id, request.user.username)] self.fields['user_id'].choices = users - class Meta: + class Meta(object): name = _("Project & User") # Unusable permission so this is always hidden. However, we # keep this step in the workflow for validation/verification purposes. @@ -132,7 +132,7 @@ class SetInstanceDetailsAction(workflows.Action): help_text=_("Delete volume on " "instance terminate")) - class Meta: + class Meta(object): name = _("Details") help_text_template = ("project/instances/" "_launch_details_help.html") @@ -549,7 +549,7 @@ class SetAccessControlsAction(workflows.Action): help_text=_("Launch instance in these " "security groups.")) - class Meta: + class Meta(object): name = _("Access & Security") help_text = _("Control access to your instance via key pairs, " "security groups, and other mechanisms.") @@ -613,7 +613,7 @@ class SetAccessControls(workflows.Step): class CustomizeAction(workflows.Action): - class Meta: + class Meta(object): name = _("Post-Creation") help_text_template = ("project/instances/" "_launch_customize_help.html") @@ -723,7 +723,7 @@ class SetNetworkAction(workflows.Action): self.fields['profile'].choices = ( self.get_policy_profile_choices(request)) - class Meta: + class Meta(object): name = _("Networking") permissions = ('openstack.services.network',) help_text = _("Select networks for your instance.") @@ -815,7 +815,7 @@ class SetAdvancedAction(workflows.Action): exceptions.handle(request, _('Unable to retrieve extensions ' 'information.')) - class Meta: + class Meta(object): name = _("Advanced Options") help_text_template = ("project/instances/" "_launch_advanced_help.html") diff --git a/openstack_dashboard/dashboards/project/instances/workflows/resize_instance.py b/openstack_dashboard/dashboards/project/instances/workflows/resize_instance.py index 126c80458b..0e5ad97789 100644 --- a/openstack_dashboard/dashboards/project/instances/workflows/resize_instance.py +++ b/openstack_dashboard/dashboards/project/instances/workflows/resize_instance.py @@ -38,7 +38,7 @@ class SetFlavorChoiceAction(workflows.Action): flavor = forms.ChoiceField(label=_("New Flavor"), help_text=_("Choose the flavor to launch.")) - class Meta: + class Meta(object): name = _("Flavor Choice") slug = 'flavor_choice' help_text_template = ("project/instances/" diff --git a/openstack_dashboard/dashboards/project/instances/workflows/update_instance.py b/openstack_dashboard/dashboards/project/instances/workflows/update_instance.py index 5c02640917..8f4b03c8c2 100644 --- a/openstack_dashboard/dashboards/project/instances/workflows/update_instance.py +++ b/openstack_dashboard/dashboards/project/instances/workflows/update_instance.py @@ -76,7 +76,7 @@ class UpdateInstanceSecurityGroupsAction(workflows.MembershipAction): return False return True - class Meta: + class Meta(object): name = _("Security Groups") slug = INSTANCE_SEC_GROUP_SLUG @@ -115,7 +115,7 @@ class UpdateInstanceInfoAction(workflows.Action): return False return True - class Meta: + class Meta(object): name = _("Information") slug = 'instance_info' help_text = _("Edit the instance details.") diff --git a/openstack_dashboard/dashboards/project/loadbalancers/tables.py b/openstack_dashboard/dashboards/project/loadbalancers/tables.py index e42602103a..f738658d91 100644 --- a/openstack_dashboard/dashboards/project/loadbalancers/tables.py +++ b/openstack_dashboard/dashboards/project/loadbalancers/tables.py @@ -278,7 +278,7 @@ class PoolsTable(tables.DataTable): vip_name = tables.Column('vip_name', verbose_name=_("VIP"), link=get_vip_link) - class Meta: + class Meta(object): name = "poolstable" verbose_name = _("Pools") table_actions = (AddPoolLink, DeletePoolLink) @@ -310,7 +310,7 @@ class MembersTable(tables.DataTable): verbose_name=_("Pool"), link=get_pool_link) status = tables.Column('status', verbose_name=_("Status")) - class Meta: + class Meta(object): name = "memberstable" verbose_name = _("Members") table_actions = (AddMemberLink, DeleteMemberLink) @@ -336,7 +336,7 @@ class MonitorsTable(tables.DataTable): max_retries = tables.Column("max_retries", verbose_name=_("Max Retries")) details = tables.Column(get_monitor_details, verbose_name=_("Details")) - class Meta: + class Meta(object): name = "monitorstable" verbose_name = _("Monitors") table_actions = (AddMonitorLink, DeleteMonitorLink) diff --git a/openstack_dashboard/dashboards/project/loadbalancers/workflows.py b/openstack_dashboard/dashboards/project/loadbalancers/workflows.py index 2fd8139107..ac9dee9538 100644 --- a/openstack_dashboard/dashboards/project/loadbalancers/workflows.py +++ b/openstack_dashboard/dashboards/project/loadbalancers/workflows.py @@ -106,7 +106,7 @@ class AddPoolAction(workflows.Action): self.fields['provider'].widget.attrs['readonly'] = True self.fields['provider'].choices = provider_choices - class Meta: + class Meta(object): name = _("Add New Pool") permissions = ('openstack.services.network',) help_text = _("Create Pool for current project.\n\n" @@ -229,7 +229,7 @@ class AddVipAction(workflows.Action): self._errors['cookie_name'] = self.error_class([msg]) return cleaned_data - class Meta: + class Meta(object): name = _("Specify VIP") permissions = ('openstack.services.network',) help_text = _("Create a VIP for this pool. " @@ -397,7 +397,7 @@ class AddMemberAction(workflows.Action): self._errors['address'] = self.error_class([msg]) return cleaned_data - class Meta: + class Meta(object): name = _("Add New Member") permissions = ('openstack.services.network',) help_text = _("Add member(s) to the selected pool.\n\n" @@ -574,7 +574,7 @@ class AddMonitorAction(workflows.Action): self._errors['expected_codes'] = self.error_class([msg]) return cleaned_data - class Meta: + class Meta(object): name = _("Add New Monitor") permissions = ('openstack.services.network',) help_text = _("Create a monitor template.\n\n" @@ -644,7 +644,7 @@ class AddPMAssociationAction(workflows.Action): return monitor_id_choices - class Meta: + class Meta(object): name = _("Association Details") permissions = ('openstack.services.network',) help_text = _("Associate a health monitor with target pool.") @@ -706,7 +706,7 @@ class DeletePMAssociationAction(workflows.Action): return monitor_id_choices - class Meta: + class Meta(object): name = _("Association Details") permissions = ('openstack.services.network',) help_text = _("Disassociate a health monitor from target pool. ") diff --git a/openstack_dashboard/dashboards/project/network_topology/instances/tables.py b/openstack_dashboard/dashboards/project/network_topology/instances/tables.py index a643d67d66..6d26acd2de 100644 --- a/openstack_dashboard/dashboards/project/network_topology/instances/tables.py +++ b/openstack_dashboard/dashboards/project/network_topology/instances/tables.py @@ -18,7 +18,7 @@ from openstack_dashboard.dashboards.project.instances import tables class InstancesTable(tables.InstancesTable): - class Meta: + class Meta(object): name = "instances" verbose_name = _("Instances") row_actions = ( diff --git a/openstack_dashboard/dashboards/project/network_topology/ports/tables.py b/openstack_dashboard/dashboards/project/network_topology/ports/tables.py index 75741c458d..aeba30d708 100644 --- a/openstack_dashboard/dashboards/project/network_topology/ports/tables.py +++ b/openstack_dashboard/dashboards/project/network_topology/ports/tables.py @@ -23,7 +23,7 @@ class RemoveInterface(tables.RemoveInterface): class PortsTable(tables.PortsTable): - class Meta: + class Meta(object): name = "interfaces" verbose_name = _("Interfaces") row_actions = (RemoveInterface, ) diff --git a/openstack_dashboard/dashboards/project/network_topology/routers/tables.py b/openstack_dashboard/dashboards/project/network_topology/routers/tables.py index 0e8646e9ba..60b433fddb 100644 --- a/openstack_dashboard/dashboards/project/network_topology/routers/tables.py +++ b/openstack_dashboard/dashboards/project/network_topology/routers/tables.py @@ -22,7 +22,7 @@ class DeleteRouter(tables.DeleteRouter): class RoutersTable(tables.RoutersTable): - class Meta: + class Meta(object): name = "Routers" verbose_name = _("Routers") status_columns = ["status"] diff --git a/openstack_dashboard/dashboards/project/networks/ports/tables.py b/openstack_dashboard/dashboards/project/networks/ports/tables.py index 30548af0ae..9c0d227b80 100644 --- a/openstack_dashboard/dashboards/project/networks/ports/tables.py +++ b/openstack_dashboard/dashboards/project/networks/ports/tables.py @@ -80,7 +80,7 @@ class PortsTable(tables.DataTable): def get_object_display(self, port): return port.id - class Meta: + class Meta(object): name = "ports" verbose_name = _("Ports") row_actions = (UpdatePort,) diff --git a/openstack_dashboard/dashboards/project/networks/subnets/tables.py b/openstack_dashboard/dashboards/project/networks/subnets/tables.py index a76d247be2..6aa9d366d3 100644 --- a/openstack_dashboard/dashboards/project/networks/subnets/tables.py +++ b/openstack_dashboard/dashboards/project/networks/subnets/tables.py @@ -145,7 +145,7 @@ class SubnetsTable(tables.DataTable): exceptions.handle(self.request, msg, redirect=self.failure_url) return network - class Meta: + class Meta(object): name = "subnets" verbose_name = _("Subnets") table_actions = (CreateSubnet, DeleteSubnet) diff --git a/openstack_dashboard/dashboards/project/networks/subnets/workflows.py b/openstack_dashboard/dashboards/project/networks/subnets/workflows.py index a14ae0b5d1..1f09460ec2 100644 --- a/openstack_dashboard/dashboards/project/networks/subnets/workflows.py +++ b/openstack_dashboard/dashboards/project/networks/subnets/workflows.py @@ -34,7 +34,7 @@ class CreateSubnetInfoAction(network_workflows.CreateSubnetInfoAction): widget=forms.HiddenInput()) msg = _('Specify "Network Address"') - class Meta: + class Meta(object): name = _("Subnet") help_text = _('Create a subnet associated with the network. ' 'Advanced configuration is available by clicking on the ' @@ -112,7 +112,7 @@ class UpdateSubnetInfoAction(CreateSubnetInfoAction): no_gateway = forms.BooleanField(label=_("Disable Gateway"), initial=False, required=False) - class Meta: + class Meta(object): name = _("Subnet") help_text = _('Update a subnet associated with the network. ' 'Advanced configuration are available at ' @@ -144,7 +144,7 @@ class UpdateSubnetDetailAction(network_workflows.CreateSubnetDetailAction): self.fields['ipv6_modes'].widget = forms.HiddenInput() self.fields['ipv6_modes'].required = False - class Meta: + class Meta(object): name = _("Subnet Details") help_text = _('Specify additional attributes for the subnet.') diff --git a/openstack_dashboard/dashboards/project/networks/tables.py b/openstack_dashboard/dashboards/project/networks/tables.py index 65f83d15ec..14cdbe9eac 100644 --- a/openstack_dashboard/dashboards/project/networks/tables.py +++ b/openstack_dashboard/dashboards/project/networks/tables.py @@ -171,7 +171,7 @@ class NetworksTable(tables.DataTable): verbose_name=_("Admin State"), display_choices=DISPLAY_CHOICES) - class Meta: + class Meta(object): name = "networks" verbose_name = _("Networks") table_actions = (CreateNetwork, DeleteNetwork, diff --git a/openstack_dashboard/dashboards/project/networks/tests.py b/openstack_dashboard/dashboards/project/networks/tests.py index cfa5e029da..a9d507aa8f 100644 --- a/openstack_dashboard/dashboards/project/networks/tests.py +++ b/openstack_dashboard/dashboards/project/networks/tests.py @@ -1894,7 +1894,7 @@ class NetworkViewTests(test.TestCase): subnets = res.context['subnets_table'].data self.assertItemsEqual(subnets, self.subnets.list()) - class FakeTable(): + class FakeTable(object): kwargs = {'network_id': network_id} create_link = subnets_tables.CreateSubnet() create_link.table = FakeTable() diff --git a/openstack_dashboard/dashboards/project/networks/workflows.py b/openstack_dashboard/dashboards/project/networks/workflows.py index b4ce7aff8f..ba3f4c78f6 100644 --- a/openstack_dashboard/dashboards/project/networks/workflows.py +++ b/openstack_dashboard/dashboards/project/networks/workflows.py @@ -74,7 +74,7 @@ class CreateNetworkInfoAction(workflows.Action): # TODO(absubram): Add ability to view network profile information # in the network detail if a profile is used. - class Meta: + class Meta(object): name = _("Network") help_text = _("Create a new network. " "In addition a subnet associated with the network " @@ -154,7 +154,7 @@ class CreateSubnetInfoAction(workflows.Action): msg = _('Specify "Network Address" or ' 'clear "Create Subnet" checkbox.') - class Meta: + class Meta(object): name = _("Subnet") help_text = _('Create a subnet associated with the new network, ' 'in which case "Network Address" must be specified. ' @@ -251,7 +251,7 @@ class CreateSubnetDetailAction(workflows.Action): "and one entry per line."), required=False) - class Meta: + class Meta(object): name = _("Subnet Details") help_text = _('Specify additional attributes for the subnet.') diff --git a/openstack_dashboard/dashboards/project/routers/extensions/routerrules/tables.py b/openstack_dashboard/dashboards/project/routers/extensions/routerrules/tables.py index 8d89de23de..1ee6fb8b08 100644 --- a/openstack_dashboard/dashboards/project/routers/extensions/routerrules/tables.py +++ b/openstack_dashboard/dashboards/project/routers/extensions/routerrules/tables.py @@ -76,7 +76,7 @@ class RouterRulesTable(tables.DataTable): def get_object_display(self, rule): return "(%(action)s) %(source)s -> %(destination)s" % rule - class Meta: + class Meta(object): name = "routerrules" verbose_name = _("Router Rules") table_actions = (AddRouterRule, RemoveRouterRule) diff --git a/openstack_dashboard/dashboards/project/routers/ports/tables.py b/openstack_dashboard/dashboards/project/routers/ports/tables.py index 30e230b687..16462e190a 100644 --- a/openstack_dashboard/dashboards/project/routers/ports/tables.py +++ b/openstack_dashboard/dashboards/project/routers/ports/tables.py @@ -112,7 +112,7 @@ class PortsTable(tables.DataTable): def get_object_display(self, port): return port.id - class Meta: + class Meta(object): name = "interfaces" verbose_name = _("Interfaces") table_actions = (AddInterface, RemoveInterface) diff --git a/openstack_dashboard/dashboards/project/routers/tables.py b/openstack_dashboard/dashboards/project/routers/tables.py index 040f01683c..703565cb5c 100644 --- a/openstack_dashboard/dashboards/project/routers/tables.py +++ b/openstack_dashboard/dashboards/project/routers/tables.py @@ -223,7 +223,7 @@ class RoutersTable(tables.DataTable): def get_object_display(self, obj): return obj.name - class Meta: + class Meta(object): name = "Routers" verbose_name = _("Routers") status_columns = ["status"] diff --git a/openstack_dashboard/dashboards/project/routers/tests.py b/openstack_dashboard/dashboards/project/routers/tests.py index 0309e9420e..27e0ddeea9 100644 --- a/openstack_dashboard/dashboards/project/routers/tests.py +++ b/openstack_dashboard/dashboards/project/routers/tests.py @@ -27,7 +27,7 @@ from openstack_dashboard.test import helpers as test from openstack_dashboard.usage import quotas -class RouterMixin: +class RouterMixin(object): @test.create_stubs({ api.neutron: ('router_get', 'port_list', 'network_get'), diff --git a/openstack_dashboard/dashboards/project/stacks/forms.py b/openstack_dashboard/dashboards/project/stacks/forms.py index 581c403e9d..d6da26e564 100644 --- a/openstack_dashboard/dashboards/project/stacks/forms.py +++ b/openstack_dashboard/dashboards/project/stacks/forms.py @@ -48,7 +48,7 @@ def create_upload_form_attributes(prefix, input_type, name): class TemplateForm(forms.SelfHandlingForm): - class Meta: + class Meta(object): name = _('Select Template') help_text = _('Select a template to launch a stack.') @@ -223,7 +223,7 @@ class TemplateForm(forms.SelfHandlingForm): class ChangeTemplateForm(TemplateForm): - class Meta: + class Meta(object): name = _('Edit Template') help_text = _('Select a new template to re-launch a stack.') stack_id = forms.CharField( @@ -238,7 +238,7 @@ class CreateStackForm(forms.SelfHandlingForm): param_prefix = '__param_' - class Meta: + class Meta(object): name = _('Create Stack') template_data = forms.CharField( @@ -372,7 +372,7 @@ class CreateStackForm(forms.SelfHandlingForm): class EditStackForm(CreateStackForm): - class Meta: + class Meta(object): name = _('Update Stack Parameters') stack_id = forms.CharField( diff --git a/openstack_dashboard/dashboards/project/stacks/resource_types/tables.py b/openstack_dashboard/dashboards/project/stacks/resource_types/tables.py index fdde0d4a27..79762cba10 100644 --- a/openstack_dashboard/dashboards/project/stacks/resource_types/tables.py +++ b/openstack_dashboard/dashboards/project/stacks/resource_types/tables.py @@ -40,6 +40,6 @@ class ResourceTypesTable(tables.DataTable): def get_object_id(self, resource): return resource.resource_type - class Meta: + class Meta(object): name = "resource_types" verbose_name = _("Resource Types") diff --git a/openstack_dashboard/dashboards/project/stacks/tables.py b/openstack_dashboard/dashboards/project/stacks/tables.py index ac6c5b6f68..1722826729 100644 --- a/openstack_dashboard/dashboards/project/stacks/tables.py +++ b/openstack_dashboard/dashboards/project/stacks/tables.py @@ -198,7 +198,7 @@ class StacksTable(tables.DataTable): def get_object_display(self, stack): return stack.stack_name - class Meta: + class Meta(object): name = "stacks" verbose_name = _("Stacks") pagination_param = 'stack_marker' @@ -240,7 +240,7 @@ class EventsTable(tables.DataTable): statusreason = tables.Column("resource_status_reason", verbose_name=_("Status Reason"),) - class Meta: + class Meta(object): name = "events" verbose_name = _("Stack Events") @@ -298,7 +298,7 @@ class ResourcesTable(tables.DataTable): def get_object_id(self, datum): return datum.resource_name - class Meta: + class Meta(object): name = "resources" verbose_name = _("Stack Resources") status_columns = ["status", ] diff --git a/openstack_dashboard/dashboards/project/volumes/backups/tables.py b/openstack_dashboard/dashboards/project/volumes/backups/tables.py index faac685a5e..6b98a8d40a 100644 --- a/openstack_dashboard/dashboards/project/volumes/backups/tables.py +++ b/openstack_dashboard/dashboards/project/volumes/backups/tables.py @@ -132,7 +132,7 @@ class BackupsTable(tables.DataTable): link="horizon:project" ":volumes:volumes:detail") - class Meta: + class Meta(object): name = "volume_backups" verbose_name = _("Volume Backups") status_columns = ("status",) diff --git a/openstack_dashboard/dashboards/project/volumes/snapshots/tables.py b/openstack_dashboard/dashboards/project/volumes/snapshots/tables.py index 3dd4c35426..f9caeef7f8 100644 --- a/openstack_dashboard/dashboards/project/volumes/snapshots/tables.py +++ b/openstack_dashboard/dashboards/project/volumes/snapshots/tables.py @@ -151,7 +151,7 @@ class VolumeSnapshotsTable(volume_tables.VolumesTableBase): verbose_name=_("Volume Name"), link="horizon:project:volumes:volumes:detail") - class Meta: + class Meta(object): name = "volume_snapshots" verbose_name = _("Volume Snapshots") table_actions = (VolumeSnapshotsFilterAction, DeleteVolumeSnapshot,) diff --git a/openstack_dashboard/dashboards/project/volumes/volumes/tables.py b/openstack_dashboard/dashboards/project/volumes/volumes/tables.py index 3e60c182b2..7efc3f0202 100644 --- a/openstack_dashboard/dashboards/project/volumes/volumes/tables.py +++ b/openstack_dashboard/dashboards/project/volumes/volumes/tables.py @@ -423,7 +423,7 @@ class VolumesTable(VolumesTableBase): link="horizon:project:volumes:" "volumes:encryption_detail") - class Meta: + class Meta(object): name = "volumes" verbose_name = _("Volumes") status_columns = ["status"] @@ -498,7 +498,7 @@ class AttachmentsTable(tables.DataTable): return obj raise ValueError('No match found for the id "%s".' % obj_id) - class Meta: + class Meta(object): name = "attachments" verbose_name = _("Attachments") table_actions = (DetachVolume,) diff --git a/openstack_dashboard/dashboards/project/vpn/tables.py b/openstack_dashboard/dashboards/project/vpn/tables.py index 61fbfd1679..d63df1b08e 100644 --- a/openstack_dashboard/dashboards/project/vpn/tables.py +++ b/openstack_dashboard/dashboards/project/vpn/tables.py @@ -241,7 +241,7 @@ class IPSecSiteConnectionsTable(tables.DataTable): status=True, status_choices=STATUS_CHOICES) - class Meta: + class Meta(object): name = "ipsecsiteconnectionstable" verbose_name = _("IPSec Site Connections") table_actions = (AddIPSecSiteConnectionLink, @@ -268,7 +268,7 @@ class VPNServicesTable(tables.DataTable): status=True, status_choices=STATUS_CHOICES) - class Meta: + class Meta(object): name = "vpnservicestable" verbose_name = _("VPN Services") table_actions = (AddVPNServiceLink, DeleteVPNServiceLink) @@ -286,7 +286,7 @@ class IKEPoliciesTable(tables.DataTable): verbose_name=_('Encryption algorithm')) pfs = tables.Column("pfs", verbose_name=_('PFS')) - class Meta: + class Meta(object): name = "ikepoliciestable" verbose_name = _("IKE Policies") table_actions = (AddIKEPolicyLink, DeleteIKEPolicyLink) @@ -304,7 +304,7 @@ class IPSecPoliciesTable(tables.DataTable): verbose_name=_('Encryption algorithm')) pfs = tables.Column("pfs", verbose_name=_('PFS')) - class Meta: + class Meta(object): name = "ipsecpoliciestable" verbose_name = _("IPSec Policies") table_actions = (AddIPSecPolicyLink, DeleteIPSecPolicyLink,) diff --git a/openstack_dashboard/dashboards/project/vpn/workflows.py b/openstack_dashboard/dashboards/project/vpn/workflows.py index 08f18e244a..4c2dce0aba 100644 --- a/openstack_dashboard/dashboards/project/vpn/workflows.py +++ b/openstack_dashboard/dashboards/project/vpn/workflows.py @@ -65,7 +65,7 @@ class AddVPNServiceAction(workflows.Action): self.fields['router_id'].choices = router_id_choices return router_id_choices - class Meta: + class Meta(object): name = _("Add New VPN Service") permissions = ('openstack.services.network',) help_text = _("Create VPN Service for current project.\n\n" @@ -160,7 +160,7 @@ class AddIKEPolicyAction(workflows.Action): # Currently this field has only one choice, so mark it as readonly. self.fields['phase1_negotiation_mode'].widget.attrs['readonly'] = True - class Meta: + class Meta(object): name = _("Add New IKE Policy") permissions = ('openstack.services.network',) help_text = _("Create IKE Policy for current project.\n\n" @@ -257,7 +257,7 @@ class AddIPSecPolicyAction(workflows.Action): ("ah-esp", "ah-esp")] self.fields['transform_protocol'].choices = transform_protocol_choices - class Meta: + class Meta(object): name = _("Add New IPSec Policy") permissions = ('openstack.services.network',) help_text = _("Create IPSec Policy for current project.\n\n" @@ -379,7 +379,7 @@ class AddIPSecSiteConnectionAction(workflows.Action): self.fields['vpnservice_id'].choices = vpnservice_id_choices return vpnservice_id_choices - class Meta: + class Meta(object): name = _("Add New IPSec Site Connection") permissions = ('openstack.services.network',) help_text = _("Create IPSec Site Connection for current project.\n\n" @@ -436,7 +436,7 @@ class AddIPSecSiteConnectionOptionalAction(workflows.Action): self.fields['dpd_action'].choices = dpd_action_choices return dpd_action_choices - class Meta: + class Meta(object): name = _("Optional Parameters") permissions = ('openstack.services.network',) help_text = _("Fields in this tab are optional. " diff --git a/openstack_dashboard/dashboards/router/nexus1000v/tables.py b/openstack_dashboard/dashboards/router/nexus1000v/tables.py index a6c6912a99..f6c5323019 100644 --- a/openstack_dashboard/dashboards/router/nexus1000v/tables.py +++ b/openstack_dashboard/dashboards/router/nexus1000v/tables.py @@ -82,7 +82,7 @@ class NetworkProfile(tables.DataTable): physical_network = tables.Column("physical_network", verbose_name=_("Physical Network Name")) - class Meta: + class Meta(object): name = "network_profile" verbose_name = _("Network Profile") table_actions = (CreateNetworkProfile, DeleteNetworkProfile,) @@ -94,6 +94,6 @@ class PolicyProfile(tables.DataTable): name = tables.Column("name", verbose_name=_("Policy Profile"), ) project = tables.Column("project_name", verbose_name=_("Project")) - class Meta: + class Meta(object): name = "policy_profile" verbose_name = _("Policy Profile") diff --git a/openstack_dashboard/test/integration_tests/tests/test_flavors.py b/openstack_dashboard/test/integration_tests/tests/test_flavors.py index 07525faed9..219ce5809d 100644 --- a/openstack_dashboard/test/integration_tests/tests/test_flavors.py +++ b/openstack_dashboard/test/integration_tests/tests/test_flavors.py @@ -34,4 +34,4 @@ class TestFlavors(helpers.AdminTestCase): self.assertTrue(flavors_page.is_flavor_present(self.FLAVOR_NAME)) flavors_page.delete_flavor(self.FLAVOR_NAME) - self.assertFalse(flavors_page.is_flavor_present(self.FLAVOR_NAME)) \ No newline at end of file + self.assertFalse(flavors_page.is_flavor_present(self.FLAVOR_NAME)) diff --git a/openstack_dashboard/usage/tables.py b/openstack_dashboard/usage/tables.py index 298911a038..545fa8b414 100644 --- a/openstack_dashboard/usage/tables.py +++ b/openstack_dashboard/usage/tables.py @@ -57,7 +57,7 @@ class GlobalUsageTable(BaseUsageTable): def get_object_id(self, datum): return datum.tenant_id - class Meta: + class Meta(object): name = "global_usage" hidden_title = False verbose_name = _("Usage") @@ -87,7 +87,7 @@ class ProjectUsageTable(BaseUsageTable): def get_object_id(self, datum): return datum.get('instance_id', id(datum)) - class Meta: + class Meta(object): name = "project_usage" hidden_title = False verbose_name = _("Usage") diff --git a/test-requirements.txt b/test-requirements.txt index 3c04e84c97..5376f59775 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,7 +7,7 @@ # be installed in a specific order. # # Hacking should appear first in case something else depends on pep8 -hacking>=0.9.2,<0.10 +hacking>=0.10.0,<0.11 # coverage>=3.6 django-nose diff --git a/tox.ini b/tox.ini index d185a62784..9781ffe06e 100644 --- a/tox.ini +++ b/tox.ini @@ -58,11 +58,8 @@ downloadcache = ~/cache/pip [flake8] exclude = .venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*,.ropeproject -# H307 like imports should be grouped together # H405 multi line docstring summary not separated with an empty line -# H803 git commit title should not end with period (disabled on purpose, see bug #1236621) -# H904 Wrap long lines in parentheses instead of a backslash -ignore = H307,H405,H803,H904 +ignore = H405 max-complexity = 19 [hacking]