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 bugzilla.redhat.com.
Bug 1072073 - [RFE] Unify architecture identification values for channel.software.create and channel.software.getDetails APIs
Summary: [RFE] Unify architecture identification values for channel.software.create an...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: API
Version: 2.1
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Stephen Herr
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
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
Environment:
Last Closed: 2014-07-17 08:41:28 UTC
Embargoed:


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 channel.software.getDetails API return the arch_name without 'channel-' string but while creating channel using channel.software.create 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.  

Thanks,
Ashish

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


# spacewalk-api --server=<server> channel.software.getDetails "%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 channel.software.create API :

Method: create
Description:
Creates a software channel

Parameters:

    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. 

Thanks,
Ashish

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

Ah, I see. Thanks for the notice, Ashish.

channel.software.create expects architecture label as parameter and
channel.software.getDetails 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 channel.software.getDetails 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 channel.software.create.

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

Comment 2 Tomas Lestach 2014-03-04 06:43:32 UTC
> The channel.software.getDetails 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:

    https://fedorahosted.org/spacewalk/wiki/ReleaseNotes22


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