|
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 |
- |
|
|