Bug 525747 - API update for channel preferred checksum method
Summary: API update for channel preferred checksum method
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Network
Classification: Red Hat
Component: RHN/API
Version: RHN Stable
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
Assignee: Sebastian Skracic
QA Contact: Red Hat Network Quality Assurance
URL:
Whiteboard: US397
Depends On:
Blocks: 519193 rhn-sprint33
TreeView+ depends on / blocked
 
Reported: 2009-09-25 14:42 UTC by Sebastian Skracic
Modified: 2010-03-18 12:49 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-18 12:49:45 UTC


Attachments (Terms of Use)

Description Sebastian Skracic 2009-09-25 14:42:39 UTC
API call(s) should be updated to reflect new property of Channel
domain object: preferred checksum method.

Comment 1 Sebastian Skracic 2009-09-25 14:45:32 UTC
Initial support implemented in 6bc5bbd727d745149601afbef9873be845ce2f39.

Comment 2 Sebastian Skracic 2009-09-28 15:54:40 UTC
On DEV.

Comment 3 Sebastian Skracic 2009-10-05 14:33:17 UTC
Two changes actually:

1. There is a new variant of channel.software.create() call.  In addition to the existing one which accepts 6 parameters, there is also a variant which accepts 7 parameters, first 6 being identical to the existing one, and 7th carrying the preferred checksum method label.
 
Method: create
Description:
Creates a software channel, parent_channel_label can be an empty string

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 arch the channel corresponds to
    * string parentLabel - label of the parent of this channel, an empty string if it does not have one
    * string checksumLabel - the label of the channel preferred checksum method, can be one of (md5, sha1, sha-256, sha-384, sha-512).

Returns:

    * int - 1 if the creation operation succeeded, 0 otherwise 


2. channel.software.getDetails() returns info on preferred checksum type as well.

  Method: getDetails
Description:
Returns details of the given channel as a map

Parameters:

    * string sessionKey
    * string channelLabel - channel to query

Returns:

                + struct (map)
                      # string "channel_arch_name"
                      # string "channel_summary"
                      # string "channel_description"
                      # string "channel_gpg_key_url"
                      # string "channel_gpg_key_id"
                      # string "channel_gpg_key_fp"
                      # string "channel_end_of_life"
                      # string "parent_channel_label"
                      # string "channel_checksum_type"

Comment 4 Denise Hughes 2009-10-05 18:50:36 UTC
Sebastian,
If we are not going to allow MD5 custom channel creation via API, we need to update the documentation on the API Help page and we should add an error message to the API.  Currently the API calls looks successful (Returned: 1) but MD5 is not displayed on the new channel page (https://rhn.webdev.redhat.com/network/software/channels/manage/edit.pxt?cid=12153).

Comment 5 Denise Hughes 2009-10-06 20:04:51 UTC
Verified on webdev

Testopia ID:
https://testopia.devel.redhat.com/bugzilla/tr_show_case.cgi?case_id=12595

Comment 6 Sebastian Skracic 2009-10-29 12:28:32 UTC
New modifications submitted in 1a27dfa99b234fd80dec62ef017b4962a3a46662.

We're now expecting users to supply both channel metadata and RPM preferred checksum methods when creating custom channels.  Therefore, the variant of channel.software.create call now expects two (instead of one) more parameters: channel_checksum_type and rpm_checksum_type.

The old variant still exists for backward compatibility, and it creates a custom channel with SHA1 checksums for channel metadata and MD5 checksums for RPM identification.

Comment 7 Denise Hughes 2010-01-14 19:33:23 UTC
Fix on Dev and verified on 10/30/09.


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