Bug 978495 - When creating / removing org-trusts through the api they are always bi-directional
When creating / removing org-trusts through the api they are always bi-direct...
Product: Spacewalk
Classification: Community
Component: API (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Stephen Herr
Red Hat Satellite QA List
Depends On:
Blocks: space27
  Show dependency treegraph
Reported: 2013-06-26 13:40 EDT by Stephen Herr
Modified: 2017-09-28 14:06 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-06-26 14:24:18 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Comment 1 Stephen Herr 2013-06-26 13:42:41 EDT
Description of problem:
It is currently possible to create / delete an org trust through the org.trusts.addTrust() and org.trusts.removeTrust() api methods. However, when you do it always creates / deletes a bi-directional trust, which is not always intended nor what the webui does. 

For example, if you tell the webui that org1 should trust org2, it creates that one trust. Org2 does not trust org1 if it did not before. However if you do that same operation through api, then both org1 would trust org2 and org2 would trust org1. That is not correct, and not what the API documentation says should happen.

How reproducible:

Steps to Reproduce:
1. Create two orgs, let's assume that their id's are 59 and 60

2. Run this python script:
from xmlrpclib import Server
s = Server('http://<server fqdn>/rpc/api')
token = s.auth.login('<sat-admin username>', '<password>')
org1 = 59
org2 = 60
s.org.trusts.addTrust(token, org1, org2)
#s.org.trusts.removeTrust(token, org1, org2)

3. Notice that two trusts have been added, one from org1 to org2 and another from org2 to org1

4. Run the script again, but move the comment from the remove line to the add line.

5. Notice that both trusts have been removed, not just the one we wanted removed.

Actual results:
Created / deleted trusts are always bi-directional.

Expected results:
Created / deleted trusts should be uni-directional in the direction you specified.
Comment 2 Stephen Herr 2013-06-26 14:24:18 EDT
This bug report is false. Trusts are always bi-directional. I'm not sure that makes any sense, but that's how they've always been and exactly 0 users have complained. Closing.
Comment 3 Tomas Lestach 2013-06-26 14:27:25 EDT
Yes, I also mean the trust has always been bi-directional.
Comment 4 Eric Herget 2017-09-28 14:06:47 EDT
This BZ closed some time during 2.5, 2.6 or 2.7.  Adding to 2.7 tracking bug.

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