Bug 1236008 - Cannot use HTTP PUT to associate location with media
Summary: Cannot use HTTP PUT to associate location with media
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.1.0
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On: 1230865
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-26 10:51 UTC by Andrii Balakhtar
Modified: 2017-03-30 18:34 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1230865
Environment:
Last Closed: 2017-03-30 18:34:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Andrii Balakhtar 2015-06-26 10:51:55 UTC
+++ This bug was initially created as a clone of Bug #1230865 +++

Description of problem:
Location can be associated with zero or more media. Unfortunately, it is impossible to update an location's associations with media using an HTTP PUT request to the API.

Version-Release number of selected component (if applicable):
Tested against Satellite 6.1.0 GA 8.

How reproducible:
100%

Steps to Reproduce:
1. Create an location.
2. Create a media.
3. Issue an HTTP PUT request that updates the organization and associates it with the media.

Actual results:

    >>> from nailgun import entities
    >>> loc = entities.Location().create(create_missing=True)
    >>> loc.media = [entities.Media().create(create_missing=True)]
    >>> loc.update_payload(['media'])
    {u'location': {'media_ids': [48]}}  # This is the JSON payload
    >>> response = loc.update_raw(['media'])
    >>> response.status_code
    500
    >>> response.json()
    {u'error': {u'message': u'unknown attribute: media_ids'}}

Expected results:
The location is successfully updated.

Additional info:
n/a

Comment 1 Andrii Balakhtar 2015-06-26 10:55:29 UTC
s/organization/location in step #3

Comment 4 Bryan Kearney 2016-08-04 20:13:52 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 5 Bryan Kearney 2017-03-30 18:34:28 UTC
Thank you for your bug report. Given our other priorities, I do not see us addressing this in the next few releases. I am therefore closing this out. If you feel that this is a mistake, please feel free to re-open with additional information. Thank you for your interest in Red Hat Satellite.


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