Merge ~bbaude/cloud-init:rh_sub_rm_first into cloud-init:master

Proposed by Brent Baude
Status: Merged
Merged at revision: edd94ebff613fd99768d9287b12d72a9409ae6bc
Proposed branch: ~bbaude/cloud-init:rh_sub_rm_first
Merge into: cloud-init:master
Diff against target: 34 lines (+5/-4)
2 files modified
cloudinit/config/cc_rh_subscription.py (+3/-2)
tests/unittests/test_rh_subscription.py (+2/-2)
Reviewer Review Type Date Requested Status
cloud-init Commiters Pending
Review via email: mp+309478@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/cloudinit/config/cc_rh_subscription.py b/cloudinit/config/cc_rh_subscription.py
2index d858f65..bd6b5f8 100644
3--- a/cloudinit/config/cc_rh_subscription.py
4+++ b/cloudinit/config/cc_rh_subscription.py
5@@ -421,11 +421,12 @@ class SubscriptionManager(object):
6 "because it is not enabled".format(fail))
7
8 cmd = ['repos']
9- if len(enable_list) > 0:
10- cmd.extend(enable_list)
11 if len(disable_list) > 0:
12 cmd.extend(disable_list)
13
14+ if len(enable_list) > 0:
15+ cmd.extend(enable_list)
16+
17 try:
18 self._sub_man_cli(cmd)
19 except util.ProcessExecutionError as e:
20diff --git a/tests/unittests/test_rh_subscription.py b/tests/unittests/test_rh_subscription.py
21index 891dbe7..7962387 100644
22--- a/tests/unittests/test_rh_subscription.py
23+++ b/tests/unittests/test_rh_subscription.py
24@@ -83,8 +83,8 @@ class GoodTests(TestCase):
25 '''
26 call_lists = []
27 call_lists.append(['attach', '--pool=pool1', '--pool=pool3'])
28- call_lists.append(['repos', '--enable=repo2', '--enable=repo3',
29- '--disable=repo5'])
30+ call_lists.append(['repos', '--disable=repo5', '--enable=repo2',
31+ '--enable=repo3'])
32 call_lists.append(['attach', '--auto', '--servicelevel=self-support'])
33 self.SM.log_success = mock.MagicMock()
34 reg = "The system has been registered with ID:" \

Subscribers

People subscribed via source and target branches