Bug 587096
Summary: | API should have a method telling whether it's a spacewalk or satellite | ||
---|---|---|---|
Product: | [Community] Spacewalk | Reporter: | Sandro Mathys <sandro> |
Component: | API | Assignee: | Miroslav Suchý <msuchy> |
Status: | CLOSED WONTFIX | QA Contact: | Red Hat Satellite QA List <satqe-list> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 0.8 | CC: | msuchy |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-01-20 07:14:31 UTC | Type: | --- |
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: | 653453 |
Description
Sandro Mathys
2010-04-28 21:21:36 UTC
Re-assigning to Justin as agreed upon on IRC. Mass-aligning under space12, so that we don't lose track of this bugzilla. This however does not mean that we plan (will be able to) address this bug in Spacewalk 1.2. Mass-moving to space13. Why you would like to distinguish it? a) there is no real reason for it, IMO. Can you give me some use case? b) you can call getVersion (or what is the name). value < 3 means Spacewalk. > 4 means Satellite. a) Because it might just be necessary to know. Do I handle a limited amount of entitlements or a virtually unlimited? Do I need to call listRedHatChannels? You know there's more differences. Basically I have different API scripts that I apply to both our satellites and our spacewalks. They are all set up as identically as possible but there are differences. Issuing one API call to know what kind of system the script is dealing with is much better than e.g. to look what listRedHatChannels returns. b) okay, I figure that's a good enough idea. But only if spacewalk keeps its version < 3 forever ;) --- So I agree there's ways to do this without having a special API call but would it really hurt that much to implement it? > So I agree there's ways to do this without having a special API call but would
it really hurt that much to implement it?
It is dangerous way (from programmers POV). You should not check version of product, or name of product. And that is valid generally for all products, not just Satellite/Spacewalk.
What you should check is version of API or capabilities.
E.g. I have Spacewalks with RedHat Channels, so it returns me same values on both Spacewalk and Satellite.
If you want to behave differentaly on system where you have virtually unlimited entitlements (e.g. Spacewalk) you should use API call satellite.listEntitlements.
I will close this bug for now. But we can continue in discussion here, or on mailing list (to let know others as well).
And if you send patch you will persuade me much easier :)
|