View | Details | Raw Unified | Return to bug 34216
Collapse All | Expand All

(-)a/ucs-test-ucsschool/90_ucsschool/91_samba4_gpc_two_way_replication (-1 / +1 lines)
Lines 138-144 class TestGPCReplicationTwoWays(TestSamba4): Link Here
138
		replication from.
138
		replication from.
139
		"""
139
		"""
140
		print("\nCurrent server role is DC-Master, trying to find a DC-Slave in the domain for the test")
140
		print("\nCurrent server role is DC-Master, trying to find a DC-Slave in the domain for the test")
141
		udm_stdout = self.get_udm_list_dc_slaves_with_samba4()
141
		udm_stdout = self.get_udm_list_dc_slaves_with_samba4(with_ucsschool=True)
142
142
143
		if "serverRole: slave" not in udm_stdout.strip():
143
		if "serverRole: slave" not in udm_stdout.strip():
144
			print(
144
			print(
(-)a/ucs-test-ucsschool/90_ucsschool/essential/test_samba4.py (-4 / +5 lines)
Lines 118-124 class TestSamba4(object): Link Here
118
			utils.fail("An error occured while running a sed command '%s':\n'%s'" % (" ".join(cmd), stderr))
118
			utils.fail("An error occured while running a sed command '%s':\n'%s'" % (" ".join(cmd), stderr))
119
		return stdout
119
		return stdout
120
120
121
	def get_udm_list_dcs(self, dc_type, with_samba4=True):
121
	def get_udm_list_dcs(self, dc_type, with_samba4=True, with_ucsschool=False):
122
		"""
122
		"""
123
		Runs the "udm computers/'dc_type' list" and returns the output.
123
		Runs the "udm computers/'dc_type' list" and returns the output.
124
		If 'with_samba4' is 'True' returns only those running Samba 4.
124
		If 'with_samba4' is 'True' returns only those running Samba 4.
Lines 131-148 class TestSamba4(object): Link Here
131
		cmd = ("udm", "computers/" + dc_type, "list")
131
		cmd = ("udm", "computers/" + dc_type, "list")
132
		if with_samba4:
132
		if with_samba4:
133
			cmd += ("--filter", "service=Samba 4")
133
			cmd += ("--filter", "service=Samba 4")
134
		if with_ucsschool:
135
			cmd += ("--filter", "service=UCS@school")
134
136
135
		stdout, stderr = self.create_and_run_process(cmd)
137
		stdout, stderr = self.create_and_run_process(cmd)
136
		if stderr:
138
		if stderr:
137
			utils.fail("An error occured while running a '%s' command to find all '%s' in the domain:\n'%s'" % (" ".join(cmd), dc_type, stderr))
139
			utils.fail("An error occured while running a '%s' command to find all '%s' in the domain:\n'%s'" % (" ".join(cmd), dc_type, stderr))
138
		return stdout
140
		return stdout
139
141
140
	def get_udm_list_dc_slaves_with_samba4(self):
142
	def get_udm_list_dc_slaves_with_samba4(self, with_ucsschool=False):
141
		"""
143
		"""
142
		Returns the output of "udm computers/domaincontroller_slave list
144
		Returns the output of "udm computers/domaincontroller_slave list
143
		--filter service=Samba 4" command.
145
		--filter service=Samba 4" command.
144
		"""
146
		"""
145
		return self.get_udm_list_dcs("domaincontroller_slave")
147
		return self.get_udm_list_dcs("domaincontroller_slave", with_ucsschool=with_ucsschool)
146
148
147
	def select_school_ou(self, schoolname_only=False):
149
	def select_school_ou(self, schoolname_only=False):
148
		"""
150
		"""
149
- 

Return to bug 34216