Both satellite and spacewalk should have an api call that can be called to find out whether it's a spacewalk or a satellite as one might want to have his script behave differently for those cases.
Right now it's possible to figure out with what kind of system one's dealing by calling listRedHatChannels or listSoftwareEntitlements but there should be a dedicated method for this in the api namespace. One reason for this is that a session key shouldn't be necessary to get this intelligence.
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 :)