Actions
Bug #3876
closedAPI find_resource by name finds by ID instead when first character of name is a digit
Description
Noticed that every now and than the Info subcommand for Model returns incorrect results:
DEBUG base:188: LANG=en_US hammer -u admin -p changeme model create --info --hardware-model --name='2ez0obdv' --vendor-class='vafqv7gd'
DEBUG base:191: Hardware model created
DEBUG base:188: LANG=en_US hammer -u admin -p changeme --output csv model info --name='2ez0obdv'
DEBUG base:191: Id,Name,Vendor class,HW model,Info,Created at,Updated at
2,nz1e,"","",--hardware-model,2013/12/13 16:21:53,2013/12/13 16:21:53
F
======================================================================
FAIL: test_create_model_2 (tests.cli.test_model.TestModel)
Create model with specific vendor class
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/omaciel/hacking/robottelo/tests/cli/test_model.py", line 26, in test_create_model_2
self.assertEqual(result['vendor-class'], model.stdout['Vendor class'])
AssertionError: 'vafqv7gd' != '""'
----------------------------------------------------------------------
Ran 2 tests in 3.636s
FAILED (failures=1)
Noticed that the model name is 2ez0obdv but Info returns a model whose name is nz1e.
Packages:- rubygem-hammer_cli_foreman-0.0.12-1.el6.noarch
- rubygem-hammer_cli-0.0.12-1.el6.noarch
Actions