Bug 1536484

Summary: Command spacecmd supports utf8 name of systems
Product: Red Hat Satellite 5 Reporter: Pavel Studeník <pstudeni>
Component: ServerAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED WONTFIX QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 580CC: rdrazny, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-01 13:13:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1450940, 1582457    

Description Pavel Studeník 2018-01-19 13:57:56 UTC
Description of problem:
I registered some systems to satellite and I used utf8 chars for their name. When I used command spacecmd I received errors due to encoding.

Version-Release number of selected component (if applicable):
spacecmd-2.5.0-18.el6sat.noarch

How reproducible:
always

Steps to Reproduce:
1. register system to satellite and used utf8 chars for its name for example test_ščřžýá

2. some scenarios:
a) spacecmd system_search name:test
ERROR: 'ascii' codec can't encode characters in position 5-11: ordinal not in range(128)

b) spacecmd system_details search:id:100001
ERROR: 'ascii' codec can't encode characters in position 6-9: ordinal not in range(128)

c) spacecmd system_delete search:name:test
ERROR: 'ascii' codec can't encode characters in position 5-9: ordinal not in range(128)

Actual results:
Error in encode - doesn't work

Expected results:
spacecmd support utf8 name of systems

Additional info:
In code is used call "str(*)"... replace it by construction "%s" % (*,)

Comment 1 Pavel Studeník 2018-01-19 13:58:54 UTC
>> spacecmd system_details search:id:100001
ERROR: 'ascii' codec can't encode characters in position 6-9: ordinal not in range(128)

Spacewalk 643b121d92f5d64776e88eb43ac22a67d553943a

Comment 2 Pavel Studeník 2018-01-19 14:44:44 UTC
I created pull request https://github.com/spacewalkproject/spacewalk/pull/618/

Comment 3 Tomáš Kašpárek 2018-02-28 08:52:41 UTC
spacewalk.git(master): 2ec2d415d9d309a614ed31ecb6ae1cf6f542b879