← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1374919] Re: instance.security_groups must be a list

 

** Changed in: horizon
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1374919

Title:
  instance.security_groups must be a list

Status in OpenStack Dashboard (Horizon):
  Fix Released

Bug description:
  In Django 1.7, these 2 issues show:

  ======================================================================
  ERROR: test_instance_details_volume_sorting (openstack_dashboard.dashboards.project.instances.tests.InstanceTests)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/openstack_dashboard/dashboards/project/instances/tests.py", line 704, in test_instance_details_volume_sorting
      security_groups_return=security_group)
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/openstack_dashboard/test/helpers.py", line 80, in instance_stub_out
      return fn(self, *args, **kwargs)
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/openstack_dashboard/dashboards/project/instances/tests.py", line 684, in _get_instance_details
      return self.client.get(url)
    File "/usr/lib/python2.7/dist-packages/django/test/client.py", line 467, in get
      **extra)
    File "/usr/lib/python2.7/dist-packages/django/test/client.py", line 285, in get
      return self.generic('GET', path, secure=secure, **r)
    File "/usr/lib/python2.7/dist-packages/django/test/client.py", line 355, in generic
      return self.request(**r)
    File "/usr/lib/python2.7/dist-packages/django/test/client.py", line 437, in request
      six.reraise(*exc_info)
    File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response
      response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/horizon/decorators.py", line 36, in dec
      return view_func(request, *args, **kwargs)
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/horizon/decorators.py", line 52, in dec
      return view_func(request, *args, **kwargs)
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/horizon/decorators.py", line 36, in dec
      return view_func(request, *args, **kwargs)
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/horizon/decorators.py", line 84, in dec
      return view_func(request, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 69, in view
      return self.dispatch(request, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 87, in dispatch
      return handler(request, *args, **kwargs)
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/horizon/tabs/views.py", line 72, in get
      return self.handle_tabbed_response(context["tab_group"], context)
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/horizon/tabs/views.py", line 68, in handle_tabbed_response
      return self.render_to_response(context)
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/horizon/tabs/views.py", line 81, in render_to_response
      response.render()
    File "/usr/lib/python2.7/dist-packages/django/template/response.py", line 103, in render
      self.content = self.rendered_content
    File "/usr/lib/python2.7/dist-packages/django/template/response.py", line 80, in rendered_content
      content = template.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 148, in render
      return self._render(context)
    File "/usr/lib/python2.7/dist-packages/django/test/utils.py", line 88, in instrumented_test_render
      return self.nodelist.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
      bit = self.render_node(node, context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 858, in render_node
      return node.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py", line 126, in render
      return compiled_parent._render(context)
    File "/usr/lib/python2.7/dist-packages/django/test/utils.py", line 88, in instrumented_test_render
      return self.nodelist.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
      bit = self.render_node(node, context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 858, in render_node
      return node.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py", line 65, in render
      result = block.nodelist.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
      bit = self.render_node(node, context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 858, in render_node
      return node.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py", line 65, in render
      result = block.nodelist.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
      bit = self.render_node(node, context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 858, in render_node
      return node.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 898, in render
      output = self.filter_expression.resolve(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 596, in resolve
      obj = self.var.resolve(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 734, in resolve
      value = self._resolve_lookup(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 788, in _resolve_lookup
      current = current()
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/horizon/tabs/base.py", line 170, in render
      return render_to_string(self.template_name, {"tab_group": self})
    File "/usr/lib/python2.7/dist-packages/django/template/loader.py", line 172, in render_to_string
      return t.render(Context(dictionary))
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 148, in render
      return self._render(context)
    File "/usr/lib/python2.7/dist-packages/django/test/utils.py", line 88, in instrumented_test_render
      return self.nodelist.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
      bit = self.render_node(node, context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 858, in render_node
      return node.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/defaulttags.py", line 527, in render
      return self.nodelist.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
      bit = self.render_node(node, context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 858, in render_node
      return node.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/defaulttags.py", line 312, in render
      return nodelist.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
      bit = self.render_node(node, context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 858, in render_node
      return node.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/defaulttags.py", line 208, in render
      nodelist.append(node.render(context))
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 898, in render
      output = self.filter_expression.resolve(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 596, in resolve
      obj = self.var.resolve(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 734, in resolve
      value = self._resolve_lookup(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 788, in _resolve_lookup
      current = current()
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/horizon/tabs/base.py", line 317, in render
      return render_to_string(self.get_template_name(self.request), context)
    File "/usr/lib/python2.7/dist-packages/django/template/loader.py", line 172, in render_to_string
      return t.render(Context(dictionary))
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 148, in render
      return self._render(context)
    File "/usr/lib/python2.7/dist-packages/django/test/utils.py", line 88, in instrumented_test_render
      return self.nodelist.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
      bit = self.render_node(node, context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 858, in render_node
      return node.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/defaulttags.py", line 161, in render
      values = list(values)
  TypeError: 'SecurityGroup' object is not iterable

  ======================================================================
  ERROR: test_instance_details_volumes (openstack_dashboard.dashboards.project.instances.tests.InstanceTests)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/openstack_dashboard/dashboards/project/instances/tests.py", line 692, in test_instance_details_volumes
      security_groups_return=security_group)
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/openstack_dashboard/test/helpers.py", line 80, in instance_stub_out
      return fn(self, *args, **kwargs)
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/openstack_dashboard/dashboards/project/instances/tests.py", line 684, in _get_instance_details
      return self.client.get(url)
    File "/usr/lib/python2.7/dist-packages/django/test/client.py", line 467, in get
      **extra)
    File "/usr/lib/python2.7/dist-packages/django/test/client.py", line 285, in get
      return self.generic('GET', path, secure=secure, **r)
    File "/usr/lib/python2.7/dist-packages/django/test/client.py", line 355, in generic
      return self.request(**r)
    File "/usr/lib/python2.7/dist-packages/django/test/client.py", line 437, in request
      six.reraise(*exc_info)
    File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response
      response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/horizon/decorators.py", line 36, in dec
      return view_func(request, *args, **kwargs)
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/horizon/decorators.py", line 52, in dec
      return view_func(request, *args, **kwargs)
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/horizon/decorators.py", line 36, in dec
      return view_func(request, *args, **kwargs)
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/horizon/decorators.py", line 84, in dec
      return view_func(request, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 69, in view
      return self.dispatch(request, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 87, in dispatch
      return handler(request, *args, **kwargs)
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/horizon/tabs/views.py", line 72, in get
      return self.handle_tabbed_response(context["tab_group"], context)
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/horizon/tabs/views.py", line 68, in handle_tabbed_response
      return self.render_to_response(context)
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/horizon/tabs/views.py", line 81, in render_to_response
      response.render()
    File "/usr/lib/python2.7/dist-packages/django/template/response.py", line 103, in render
      self.content = self.rendered_content
    File "/usr/lib/python2.7/dist-packages/django/template/response.py", line 80, in rendered_content
      content = template.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 148, in render
      return self._render(context)
    File "/usr/lib/python2.7/dist-packages/django/test/utils.py", line 88, in instrumented_test_render
      return self.nodelist.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
      bit = self.render_node(node, context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 858, in render_node
      return node.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py", line 126, in render
      return compiled_parent._render(context)
    File "/usr/lib/python2.7/dist-packages/django/test/utils.py", line 88, in instrumented_test_render
      return self.nodelist.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
      bit = self.render_node(node, context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 858, in render_node
      return node.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py", line 65, in render
      result = block.nodelist.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
      bit = self.render_node(node, context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 858, in render_node
      return node.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py", line 65, in render
      result = block.nodelist.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
      bit = self.render_node(node, context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 858, in render_node
      return node.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 898, in render
      output = self.filter_expression.resolve(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 596, in resolve
      obj = self.var.resolve(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 734, in resolve
      value = self._resolve_lookup(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 788, in _resolve_lookup
      current = current()
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/horizon/tabs/base.py", line 170, in render
      return render_to_string(self.template_name, {"tab_group": self})
    File "/usr/lib/python2.7/dist-packages/django/template/loader.py", line 172, in render_to_string
      return t.render(Context(dictionary))
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 148, in render
      return self._render(context)
    File "/usr/lib/python2.7/dist-packages/django/test/utils.py", line 88, in instrumented_test_render
      return self.nodelist.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
      bit = self.render_node(node, context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 858, in render_node
      return node.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/defaulttags.py", line 527, in render
      return self.nodelist.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
      bit = self.render_node(node, context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 858, in render_node
      return node.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/defaulttags.py", line 312, in render
      return nodelist.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
      bit = self.render_node(node, context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 858, in render_node
      return node.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/defaulttags.py", line 208, in render
      nodelist.append(node.render(context))
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 898, in render
      output = self.filter_expression.resolve(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 596, in resolve
      obj = self.var.resolve(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 734, in resolve
      value = self._resolve_lookup(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 788, in _resolve_lookup
      current = current()
    File "/home/zigo/sources/openstack/juno/horizon/build-area/horizon-2014.2~b3/horizon/tabs/base.py", line 317, in render
      return render_to_string(self.get_template_name(self.request), context)
    File "/usr/lib/python2.7/dist-packages/django/template/loader.py", line 172, in render_to_string
      return t.render(Context(dictionary))
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 148, in render
      return self._render(context)
    File "/usr/lib/python2.7/dist-packages/django/test/utils.py", line 88, in instrumented_test_render
      return self.nodelist.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
      bit = self.render_node(node, context)
    File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 858, in render_node
      return node.render(context)
    File "/usr/lib/python2.7/dist-packages/django/template/defaulttags.py", line 161, in render
      values = list(values)
  TypeError: 'SecurityGroup' object is not iterable

  In openstack_dashboard/dashboards/project/instances/tests.py, we
  should have security_group = self.security_groups.list() and not
  security_group = self.security_groups.first().

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1374919/+subscriptions


References