Fix pep8 warnings
Change-Id: Icd648746ea0296bbb5f89042b1c0ae8b80d3a515
This commit is contained in:
parent
b3c49ab78a
commit
1dd4aa3154
@ -43,12 +43,12 @@ class EditPlan(forms.EditPlan):
|
||||
fields['%s-flavor' % role.id] = field
|
||||
return fields
|
||||
|
||||
|
||||
def handle(self, request, data):
|
||||
result = super(EditPlan, self).handle(request, data)
|
||||
parameters = dict(
|
||||
(field.role.flavor_parameter_name, data[name])
|
||||
for (name, field) in self.fields.items() if name.endswith('-flavor')
|
||||
for (name, field) in self.fields.items()
|
||||
if name.endswith('-flavor')
|
||||
)
|
||||
try:
|
||||
self.plan = self.plan.patch(request, self.plan.uuid, parameters)
|
||||
|
@ -13,11 +13,9 @@
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
|
||||
import tuskar_ui.infrastructure.dashboard as tuskar_dashboard
|
||||
from tuskar_ui.infrastructure.overview.panel import Overview as TuskarOverview
|
||||
from tuskar_ui.infrastructure.overview import panel
|
||||
|
||||
|
||||
class Overview(horizon.Panel):
|
||||
@ -25,5 +23,5 @@ class Overview(horizon.Panel):
|
||||
slug = "overview"
|
||||
|
||||
|
||||
tuskar_dashboard.Infrastructure.unregister(TuskarOverview)
|
||||
tuskar_dashboard.Infrastructure.unregister(panel.Overview)
|
||||
tuskar_dashboard.Infrastructure.register(Overview)
|
||||
|
@ -13,8 +13,8 @@
|
||||
# under the License.
|
||||
|
||||
from django.conf import urls
|
||||
|
||||
from tuskar_ui.infrastructure.overview import urls as tuskar_urls
|
||||
|
||||
import tuskar_boxes.overview.views as views
|
||||
|
||||
|
||||
|
@ -13,9 +13,9 @@
|
||||
# under the License.
|
||||
|
||||
import django.utils.text
|
||||
|
||||
from tuskar_ui import api
|
||||
from tuskar_ui.infrastructure.overview import views
|
||||
|
||||
from tuskar_boxes.overview import forms
|
||||
|
||||
|
||||
@ -94,8 +94,8 @@ class IndexView(views.IndexView):
|
||||
nodes.append({
|
||||
'uuid': node.uuid,
|
||||
'role_name': role.name if role else '',
|
||||
'role_slug': django.utils.text.slugify(role.name)
|
||||
if role else '',
|
||||
'role_slug': (
|
||||
django.utils.text.slugify(role.name) if role else ''),
|
||||
'state': node.state,
|
||||
'state_slug': django.utils.text.slugify(
|
||||
unicode(node.state)),
|
||||
|
@ -14,9 +14,8 @@
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
import horizon
|
||||
|
||||
from tuskar_ui.infrastructure import dashboard
|
||||
from tuskar_ui.infrastructure.nodes.panel import Nodes as TuskarNodes
|
||||
from tuskar_ui.infrastructure.nodes import panel
|
||||
|
||||
|
||||
class Nodes(horizon.Panel):
|
||||
@ -24,5 +23,5 @@ class Nodes(horizon.Panel):
|
||||
slug = "nodes"
|
||||
|
||||
|
||||
dashboard.Infrastructure.unregister(TuskarNodes)
|
||||
dashboard.Infrastructure.unregister(panel.Nodes)
|
||||
dashboard.Infrastructure.register(Nodes)
|
||||
|
@ -11,16 +11,21 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import requests
|
||||
import urllib
|
||||
import collections
|
||||
|
||||
from collections import namedtuple
|
||||
from horizon import tabs
|
||||
import requests
|
||||
from tuskar_ui.infrastructure.nodes import tabs as nodes_tabs
|
||||
from .tables import ErrataTable
|
||||
|
||||
from tuskar_sat_ui.nodes import tables
|
||||
|
||||
|
||||
ErrataItem = namedtuple('ErrataItem', ['title', 'type', 'id', 'issued'])
|
||||
ErrataItem = collections.namedtuple('ErrataItem', [
|
||||
'title',
|
||||
'type',
|
||||
'id',
|
||||
'issued',
|
||||
])
|
||||
|
||||
|
||||
class DetailOverviewTab(nodes_tabs.DetailOverviewTab):
|
||||
@ -67,7 +72,7 @@ class DetailOverviewTab(nodes_tabs.DetailOverviewTab):
|
||||
else:
|
||||
data = [ErrataItem(x['title'], x['type'], x['id'], x['issued'])
|
||||
for x in errata]
|
||||
result['errata'] = ErrataTable(request, data=data)
|
||||
result['errata'] = tables.ErrataTable(request, data=data)
|
||||
return result
|
||||
|
||||
|
||||
|
@ -13,8 +13,8 @@
|
||||
# under the License.
|
||||
|
||||
from django.conf import urls
|
||||
|
||||
from tuskar_ui.infrastructure.nodes import views
|
||||
|
||||
from tuskar_sat_ui.nodes import views as sat_views
|
||||
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
# under the License.
|
||||
|
||||
from tuskar_ui.infrastructure.nodes import views
|
||||
|
||||
from tuskar_sat_ui.nodes import tabs
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user