Bug 1155995
Summary: | spacewalk-api returns a perl script instead of a boolean value | ||
---|---|---|---|
Product: | Red Hat Satellite 5 | Reporter: | Martin Korbel <mkorbel> |
Component: | API | Assignee: | Tomas Lestach <tlestach> |
Status: | CLOSED DEFERRED | QA Contact: | Red Hat Satellite QA List <satqe-list> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 570 | CC: | jhutar, tlestach |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-04-09 11:25:48 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: | 1127217, 1162131 |
Description
Martin Korbel
2014-10-23 11:12:53 UTC
*** Bug 1182925 has been marked as a duplicate of this bug. *** The same case, but with date Satellite-5.6.0-RHEL6-re20130927.0 (spacewalk-utils-2.0.2-22.el6sat) 'last_modified' => bless( do{\(my $o = '20131129T04:52:54')}, 'Frontier::RPC2::DateTime::ISO8601' ), Reproducer: spacewalk-api --server=localhost packages.findByNvrea %session% dracut %string:004% 336.el6_5.2 %string:% noarch Enter username: admin Enter your password: $result = [ { 'provider' => 'Red Hat Inc.', 'arch_label' => 'noarch', 'epoch' => '', 'version' => '004', 'last_modified' => bless( do{\(my $o = '20131129T04:52:54')}, 'Frontier::RPC2::DateTime::ISO8601' ), 'name' => 'dracut', 'path' => 'redhat/NULL/8ef/dracut/004-336.el6_5.2/noarch/8efa046b792fc482fea261d7ba594002454568a16beceeda74b24a95071f8900/dracut-004-336.el6_5.2.noarch.rpm', 'release' => '336.el6_5.2', 'id' => '13176' } ]; Investigation showed this: Data types of values returned in API structures depend on their data type declaration (Java part). See API documentation for detailed information about input/output data types. Perl doesn't support data types such as Boolean, DateTime... and there was not written automatic converter of these Frontier::RPC2 types to Perl types (numbers, strings). There are of course ways in Perl, which allow us: - to detect if the object reference ($ref) is blessed (Scalar::Util->blessed($ref)), - to check if object reference is able to call method value() (UNIVERSAL::can($ref, "value")), - to return value of the blessed object reference ($ref->value()) But to do this additionally in returned data is very inefficient due to need of iteration through the whole data structure which can be theoretically huge. Let me know if any questions please I do not see any code changes, so I'm switching the BZ back to NEW. We have re-reviewed this bug, as part of an ongoing effort to improve Satellite/Proxy feature and bug updates, review and backlog. This is a low priority bug and has no currently open customer cases. While this bug may still valid, we do not see it being implemented prior to the EOL of the Satellite 5.x product. As such, this is being CLOSED DEFERRED. Closing now to help set customer expectations as early as possible. You are welcome to re-open this bug if needed. |