vmware settings command broken in fuelclient master

Bug #1431739 reported by Sebastian Kalinowski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Sebastian Kalinowski

Bug Description

Due to recent changes in serialization in fuelclient vmware settings command is broken in master:

======================================================================
ERROR: test_default_action (fuelclient.tests.test_settings.TestVmwareSettings)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jenkins/workspace/verify-python-fuelclient/.tox/py26/lib/python2.6/site-packages/mock.py", line 1190, in patched
    return func(*args, **keywargs)
  File "/home/jenkins/workspace/verify-python-fuelclient/fuelclient/tests/test_settings.py", line 131, in test_default_action
    test_url='/api/v1/clusters/1/vmware_attributes/default')
  File "/home/jenkins/workspace/verify-python-fuelclient/fuelclient/tests/test_settings.py", line 65, in check_default_action
    self.execute_wo_auth(test_command)
  File "/home/jenkins/workspace/verify-python-fuelclient/fuelclient/tests/base.py", line 79, in execute_wo_auth
    return self.execute(command)
  File "/home/jenkins/workspace/verify-python-fuelclient/fuelclient/tests/base.py", line 73, in execute
    return main(command)
  File "/home/jenkins/workspace/verify-python-fuelclient/fuelclient/cli/error.py", line 98, in wrapper
    return func(*args, **kwargs)
  File "/home/jenkins/workspace/verify-python-fuelclient/fuelclient/cli/parser.py", line 226, in main
    parser.parse()
  File "/home/jenkins/workspace/verify-python-fuelclient/fuelclient/cli/parser.py", line 102, in parse
    actions[parsed_params.action].action_func(parsed_params)
  File "/home/jenkins/workspace/verify-python-fuelclient/fuelclient/cli/actions/base.py", line 63, in action_func
    method(params)
  File "/home/jenkins/workspace/verify-python-fuelclient/fuelclient/cli/actions/settings.py", line 115, in default
    serializer=self.serializer)
  File "/home/jenkins/workspace/verify-python-fuelclient/fuelclient/objects/environment.py", line 160, in write_vmware_settings_data
    settings_data
  File "/home/jenkins/workspace/verify-python-fuelclient/fuelclient/cli/serializers.py", line 96, in write_to_file
    file_obj.write(serialized)
AttributeError: 'str' object has no attribute 'write'

======================================================================
ERROR: test_download_action (fuelclient.tests.test_settings.TestVmwareSettings)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jenkins/workspace/verify-python-fuelclient/.tox/py26/lib/python2.6/site-packages/mock.py", line 1190, in patched
    return func(*args, **keywargs)
  File "/home/jenkins/workspace/verify-python-fuelclient/fuelclient/tests/test_settings.py", line 138, in test_download_action
    test_url='/api/v1/clusters/1/vmware_attributes')
  File "/home/jenkins/workspace/verify-python-fuelclient/fuelclient/tests/test_settings.py", line 81, in check_download_action
    self.execute_wo_auth(test_command)
  File "/home/jenkins/workspace/verify-python-fuelclient/fuelclient/tests/base.py", line 79, in execute_wo_auth
    return self.execute(command)
  File "/home/jenkins/workspace/verify-python-fuelclient/fuelclient/tests/base.py", line 73, in execute
    return main(command)
  File "/home/jenkins/workspace/verify-python-fuelclient/fuelclient/cli/error.py", line 98, in wrapper
    return func(*args, **kwargs)
  File "/home/jenkins/workspace/verify-python-fuelclient/fuelclient/cli/parser.py", line 226, in main
    parser.parse()
  File "/home/jenkins/workspace/verify-python-fuelclient/fuelclient/cli/parser.py", line 102, in parse
    actions[parsed_params.action].action_func(parsed_params)
  File "/home/jenkins/workspace/verify-python-fuelclient/fuelclient/cli/actions/base.py", line 63, in action_func
    method(params)
  File "/home/jenkins/workspace/verify-python-fuelclient/fuelclient/cli/actions/settings.py", line 130, in download
    serializer=self.serializer)
  File "/home/jenkins/workspace/verify-python-fuelclient/fuelclient/objects/environment.py", line 160, in write_vmware_settings_data
    settings_data
  File "/home/jenkins/workspace/verify-python-fuelclient/fuelclient/cli/serializers.py", line 96, in write_to_file
    file_obj.write(serialized)
AttributeError: 'str' object has no attribute 'write'

Tags: cli
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-fuelclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/164117

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-fuelclient (master)

Reviewed: https://review.openstack.org/164117
Committed: https://git.openstack.org/cgit/stackforge/python-fuelclient/commit/?id=cc64fff91fb0d78e5a02e7b93ceff224296f84fb
Submitter: Jenkins
Branch: master

commit cc64fff91fb0d78e5a02e7b93ceff224296f84fb
Author: Sebastian Kalinowski <email address hidden>
Date: Fri Mar 13 10:00:29 2015 +0100

    Fix writing to file in vmware command

    After recent changes to serializers, different command should be used
    when writing to file defined by path.

    Change-Id: I516901b51ed0925bf383704640e57e1b9e3faf39
    Closes-Bug: #1431739

Changed in fuel:
status: In Progress → Fix Committed
tags: added: on-verification
Revision history for this message
Alexander Arzhanov (aarzhanov) wrote :

Verified on iso #476

api: '1.0'
astute_sha: 5d570ae5e03909182db8e284fbe6e4468c0a4e3e
auth_required: true
build_id: 2015-05-27_22-12-45
build_number: '476'
feature_groups:
- mirantis
fuel-library_sha: ca9dc7589b9a1f7db945df0fb7c6bd21b60f0280
fuel-ostf_sha: 4cd2fef040ae9e7645a6b17a7cb44d3cd8fbe0be
fuelmain_sha: 6b5712a7197672d588801a1816f56f321cbceebd
nailgun_sha: ac8668cc06368fe22330e293c9ce8655d46846bd
openstack_version: 2014.2.2-6.1
production: docker
python-fuelclient_sha: e19f1b65792f84c4a18b5a9473f85ef3ba172fce
release: '6.1'
release_versions:
  2014.2.2-6.1:
    VERSION:
      api: '1.0'
      astute_sha: 5d570ae5e03909182db8e284fbe6e4468c0a4e3e
      build_id: 2015-05-27_22-12-45
      build_number: '476'
      feature_groups:
      - mirantis
      fuel-library_sha: ca9dc7589b9a1f7db945df0fb7c6bd21b60f0280
      fuel-ostf_sha: 4cd2fef040ae9e7645a6b17a7cb44d3cd8fbe0be
      fuelmain_sha: 6b5712a7197672d588801a1816f56f321cbceebd
      nailgun_sha: ac8668cc06368fe22330e293c9ce8655d46846bd
      openstack_version: 2014.2.2-6.1
      production: docker
      python-fuelclient_sha: e19f1b65792f84c4a18b5a9473f85ef3ba172fce
      release: '6.1'

tags: removed: on-verification
Changed in fuel:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.