Bug 1395889

Summary: RFE: extend spacecmd softwarechannel_setorgacces for protected sharing level
Product: Red Hat Satellite 5 Reporter: Jan Hutař <jhutar>
Component: ServerAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED CURRENTRELEASE QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 580CC: bernhard.lichtinger, galtukho, jdobes, lhellebr, pstudeni, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1277994 Environment:
Last Closed: 2017-06-21 12:07:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1277994    
Bug Blocks: 1397178    

Description Jan Hutař 2016-11-16 21:19:03 UTC
We have tested (or attempted to test) bug like this when Spacewalk 2.6 was to be released. This is a clone of that bug to get it re-tested on Satellite 5.8.0. In some cases bug can be completely irrelevant (in such cases I suggest to close the bug as NOTABUG), in some cases it might be wise to take the bug as a note that something changed in a given area and we might want to sanity-test that area (and mark the bug as VERIFIED with "SanityOnly" keyword) and in some cases bug might be totally relevant to Satellite.



+++ This bug was initially created as a clone of Bug #1277994 +++

Description of problem:
Having shared channels between multiple organisations there is no convient way to set the sharing level to protected for a subset of channels with spacecmd.

I extended the spacecmd code and created a pull request:
https://github.com/spacewalkproject/spacewalk/pull/311

Additional info:
Tested it against my spacewalk-2.3 server on CentOS-6 with spacecmd from master.
Also added two commands to set/get orgaccess for a whole channel tree at once.

What do you think about it?

--- Additional comment from Jan Dobes on 2016-03-24 13:25:29 EDT ---

spacewalk master commit:

95dd6678b33ebf81bb44ad6b6d5533e642f4b8b6

Comment 1 Lukáš Hellebrandt 2017-05-23 14:28:03 UTC
Verified with spacecmd-2.5.0-13.

The calls now correctly set/display the protected status and channel sharing among trusted orgs.

Example:

spacecmd {SSM:0}> softwarechannel_setorgaccesstree channel-a -p testorg
INFO: Making org sharing protected for channel : channel-a 
INFO: Enabling testorg access for channel : channel-a 
INFO: Disabling testorg2 access for channel : channel-a 
INFO: Making org sharing protected for channel : subchannel1 
INFO: Enabling testorg access for channel : subchannel1 
INFO: Disabling testorg2 access for channel : subchannel1
spacecmd {SSM:0}> softwarechannel_getorgaccesstree 
astgsdg : private
channel-a : protected
	testorg : True
	testorg2 : False
subchannel1 : protected
	testorg : True
	testorg2 : False