Move to hacking 0.10

Release notes:
http://git.openstack.org/cgit/openstack-dev/hacking/tag/?id=0.10.0

Per the release notes, H307, H803 and H904 has been removed.

Fix code issues with H238 and W292.

Change-Id: I747ebb64db5825bc70f1ae19c1c1f5ca2089c06d
This commit is contained in:
lin-hua-cheng 2015-02-04 18:56:23 -08:00
parent 59c57a16f0
commit 0cde6aa055
101 changed files with 196 additions and 199 deletions

View File

@ -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,)

View File

@ -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)

View File

@ -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",)

View File

@ -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")

View File

@ -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")

View File

@ -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)

View File

@ -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 "

View File

@ -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)

View File

@ -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 "

View File

@ -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,)

View File

@ -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")

View File

@ -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"]

View File

@ -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,)

View File

@ -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"]

View File

@ -28,4 +28,4 @@ class MetadataDefinitions(horizon.Panel):
if glance.VERSIONS.active >= 2:
dashboard.Admin.register(MetadataDefinitions)
dashboard.Admin.register(MetadataDefinitions)

View File

@ -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

View File

@ -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'

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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,

View File

@ -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")

View File

@ -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")

View File

@ -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"]

View File

@ -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,

View File

@ -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)

View File

@ -67,4 +67,4 @@ class EditKeyValuePair(forms.SelfHandlingForm):
except Exception:
exceptions.handle(request,
_("Unable to edit spec."))
return False
return False

View File

@ -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)

View File

@ -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")

View File

@ -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"]

View File

@ -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,

View File

@ -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 "

View File

@ -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)

View File

@ -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

View File

@ -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.")

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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.")

View File

@ -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,)

View File

@ -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)

View File

@ -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,

View File

@ -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,

View File

@ -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")

View File

@ -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

View File

@ -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 = _(" ")

View File

@ -63,4 +63,4 @@ class DataProcessingClusterTests(test.TestCase):
self.assertNoFormErrors(res)
self.assertRedirectsNoFollow(res, INDEX_URL)
self.assertMessageCount(success=1)
self.assertMessageCount(success=1)

View File

@ -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")

View File

@ -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,)

View File

@ -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")

View File

@ -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,

View File

@ -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")

View File

@ -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")

View File

@ -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,

View File

@ -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"]

View File

@ -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,

View File

@ -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")

View File

@ -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")

View File

@ -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,

View File

@ -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")

View File

@ -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"]

View File

@ -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"

View File

@ -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"]

View File

@ -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"

View File

@ -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)

View File

@ -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"

View File

@ -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"]

View File

@ -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')

View File

@ -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"]

View File

@ -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")

View File

@ -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/"

View File

@ -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.")

View File

@ -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)

View File

@ -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. ")

View File

@ -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 = (

View File

@ -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, )

View File

@ -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"]

View File

@ -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,)

View File

@ -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)

View File

@ -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.')

View File

@ -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,

View File

@ -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()

View File

@ -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.')

View File

@ -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)

View File

@ -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)

View File

@ -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"]

View File

@ -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'),

View File

@ -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(

View File

@ -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")

View File

@ -199,7 +199,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'
@ -241,7 +241,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")
@ -299,7 +299,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", ]

View File

@ -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",)

View File

@ -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,)

View File

@ -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,)

View File

@ -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,)

View File

@ -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. "

View File

@ -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")

View File

@ -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))
self.assertFalse(flavors_page.is_flavor_present(self.FLAVOR_NAME))

View File

@ -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")

View File

@ -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

Some files were not shown because too many files have changed in this diff Show More