From 2cbaf16bcdb875be7a9fb6cf248d274aa2977450 Mon Sep 17 00:00:00 2001 From: Dann Bohn Date: Wed, 25 Feb 2015 08:25:34 -0500 Subject: [PATCH] rhn_channel using depriciated methods. swapped out with their replacements --- lib/ansible/modules/packaging/os/rhn_channel.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/ansible/modules/packaging/os/rhn_channel.py b/lib/ansible/modules/packaging/os/rhn_channel.py index 05a155f7ca..42d61f36e6 100644 --- a/lib/ansible/modules/packaging/os/rhn_channel.py +++ b/lib/ansible/modules/packaging/os/rhn_channel.py @@ -90,17 +90,17 @@ def get_systemid(client, session, sysname): # ------------------------------------------------------- # -def subscribe_channels(channels, client, session, sysname, sys_id): - c = base_channels(client, session, sys_id) - c.append(channels) - return client.channel.software.setSystemChannels(session, sys_id, c) +def subscribe_channels(channelname, client, session, sysname, sys_id): + channels = base_channels(client, session, sys_id) + channels.append(channelname) + return client.system.setChildChannels(session, sys_id, channels) # ------------------------------------------------------- # -def unsubscribe_channels(channels, client, session, sysname, sys_id): - c = base_channels(client, session, sys_id) - c.remove(channels) - return client.channel.software.setSystemChannels(session, sys_id, c) +def unsubscribe_channels(channelname, client, session, sysname, sys_id): + channels = base_channels(client, session, sys_id) + channels.remove(channelname) + return client.system.setChildChannels(session, sys_id, channels) # ------------------------------------------------------- # @@ -167,3 +167,4 @@ def main(): # import module snippets from ansible.module_utils.basic import * main() +