Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1072073 - [RFE] Unify architecture identification values for and APIs
Summary: [RFE] Unify architecture identification values for an...
Alias: None
Product: Spacewalk
Classification: Community
Component: API
Version: 2.1
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Stephen Herr
QA Contact: Red Hat Satellite QA List
Depends On:
Blocks: spacewalk-rfe space22
TreeView+ depends on / blocked
Reported: 2014-03-03 20:41 UTC by Stephen Herr
Modified: 2014-08-08 14:48 UTC (History)
5 users (show)

Fixed In Version: spacewalk-java-2.2.8-1
Doc Type: Enhancement
Doc Text:
Clone Of: 735525
Last Closed: 2014-07-17 08:41:28 UTC

Attachments (Terms of Use)

Description Stephen Herr 2014-03-03 20:41:55 UTC
+++ This bug was initially created as a clone of Bug #735525 +++

--- Additional comment from Ashish Humbe on 2014-02-20 05:28:29 EST ---

Hello Tomas and Cliff,

Actually title is not very clear, here issue is that:

The API return the arch_name without 'channel-' string but while creating channel using API it need the channel architecture starting with 'channel-' . 

So customer think that the return values of the API and the values passed to the API for similar functionality should be equivalent.  


--- Additional comment from Ashish Humbe on 2014-02-20 06:29:40 EST ---

# spacewalk-api --server=<server> "%session%"  clone-rhel-test 

$result = {
            'end_of_life' => '',
            'summary' => 'clone-rhel-test',
            'id' => '129',
            'arch_name' => 'x86_64',
            'name' => 'clone-rhel-test',
            'label' => 'clone-rhel-test',

As per API documentation parameters for API :

Method: create
Creates a software channel


    string sessionKey
    string label - label of the new channel
    string name - name of the new channel
    string summary - summary of the channel
    string archLabel - the label of the architecture the channel corresponds to
        channel-ia32 - For 32 bit channel architecture
        channel-ia64 - For 64 bit channel architecture
        channel-sparc - For Sparc channel architecture
        channel-alpha - For Alpha channel architecture
        channel-s390 - For s390 channel architecture
        channel-s390x - For s390x channel architecture
        channel-iSeries - For i-Series channel architecture
        channel-pSeries - For p-Series channel architecture
        channel-x86_64 - For x86_64 channel architecture

while using these API calls in one script need manual changes to architecture parameter. 


--- Additional comment from Tomas Lestach on 2014-02-20 07:37:42 EST ---

Ah, I see. Thanks for the notice, Ashish. expects architecture label as parameter and returns architecture name among the channel properties.

I agree, this isn't very consistent, however it's quite common to use 'label' (that's typically unique in Spacewalk) as lookup field and then to use 'name' (as more human readable/friendly field) when presenting the information within the getDetails API.

# select label, name from rhnChannelArch;
           label           |     name      
 channel-ia32              | IA-32
 channel-ia64              | IA-64
 channel-sparc             | Sparc
 channel-alpha             | Alpha
 channel-s390              | s390
 channel-s390x             | s390x
 channel-iSeries           | iSeries
 channel-pSeries           | pSeries
 channel-x86_64            | x86_64
 channel-ppc               | PPC
 channel-sparc-sun-solaris | Sparc Solaris
 channel-i386-sun-solaris  | i386 Solaris
 channel-arm               | ARM soft. FP
 channel-armhfp            | ARM hard. FP
(14 rows)

The good thing is the architecture name is unique in rhnChannelArch table as well.

This change would however break a lot of existing customer scripts.

--- Additional comment from Stephen Herr on 2014-03-03 15:14:28 EST ---

My proposed solution:
The method in addition to returning 'arch_name' => 'x86_64' (for example) should also return 'arch_label' => 'channel-x86_64'.

Since it's a purely additive change it would not break any existing scripts, and it would give users the string they need to directly plug into

Comment 1 Stephen Herr 2014-03-03 20:51:14 UTC

Comment 2 Tomas Lestach 2014-03-04 06:43:32 UTC
> The method in addition to returning 'arch_name'
> => 'x86_64' (for example) should also return 'arch_label' =>
> 'channel-x86_64'.

Right. Thank you.

Comment 3 Milan Zázrivec 2014-07-17 08:41:28 UTC
Spacewalk 2.2 has been released:

Note You need to log in before you can comment on or make changes to this bug.