summaryrefslogtreecommitdiffstats
path: root/install/tools
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2016-12-09 11:05:03 +0100
committerMartin Basti <mbasti@redhat.com>2016-12-12 14:19:42 +0100
commit15351ab6e7c188fb492e6815026d1d75c4d4d29b (patch)
treefcf14c666a2e547eed4ab1d5d17c3bb1c5816a19 /install/tools
parentca4e6c1fdfac9b545b26f885dc4865f22ca36ae6 (diff)
downloadfreeipa-15351ab6e7c188fb492e6815026d1d75c4d4d29b.tar.gz
freeipa-15351ab6e7c188fb492e6815026d1d75c4d4d29b.tar.xz
freeipa-15351ab6e7c188fb492e6815026d1d75c4d4d29b.zip
ipactl: pass api as argument to services
Commit 6409abf1 removes hard dependency of ipalib in ipalatform to avoid cyclic dependenies, this commit updates ipactl accordingly Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Diffstat (limited to 'install/tools')
-rwxr-xr-xinstall/tools/ipactl14
1 files changed, 7 insertions, 7 deletions
diff --git a/install/tools/ipactl b/install/tools/ipactl
index db8ff6249..c34f1cbfc 100755
--- a/install/tools/ipactl
+++ b/install/tools/ipactl
@@ -244,7 +244,7 @@ def get_config_from_file():
def stop_services(svc_list):
for svc in svc_list:
- svc_off = services.service(svc)
+ svc_off = services.service(svc, api=api)
try:
svc_off.stop(capture_output=False)
except Exception:
@@ -303,7 +303,7 @@ def ipa_start(options):
svc_list = deduplicate(svc_list)
for svc in svc_list:
- svchandle = services.service(svc)
+ svchandle = services.service(svc, api=api)
try:
print("Starting %s Service" % svc)
svchandle.start(capture_output=get_capture_output(svc, options.debug))
@@ -343,7 +343,7 @@ def ipa_stop(options):
svc_list = deduplicate(svc_list)
for svc in reversed(svc_list):
- svchandle = services.service(svc)
+ svchandle = services.service(svc, api=api)
try:
print("Stopping %s Service" % svc)
svchandle.stop(capture_output=False)
@@ -421,7 +421,7 @@ def ipa_restart(options):
# we need to definitely stop some services
old_svc_list = deduplicate(old_svc_list)
for svc in reversed(old_svc_list):
- svchandle = services.service(svc)
+ svchandle = services.service(svc, api=api)
try:
print("Stopping %s Service" % svc)
svchandle.stop(capture_output=False)
@@ -446,7 +446,7 @@ def ipa_restart(options):
# there are services to restart
svc_list = deduplicate(svc_list)
for svc in svc_list:
- svchandle = services.service(svc)
+ svchandle = services.service(svc, api=api)
try:
print("Restarting %s Service" % svc)
svchandle.restart(capture_output=get_capture_output(svc, options.debug))
@@ -469,7 +469,7 @@ def ipa_restart(options):
# we still need to start some services
new_svc_list = deduplicate(new_svc_list)
for svc in new_svc_list:
- svchandle = services.service(svc)
+ svchandle = services.service(svc, api=api)
try:
print("Starting %s Service" % svc)
svchandle.start(capture_output=get_capture_output(svc, options.debug))
@@ -521,7 +521,7 @@ def ipa_status(options):
svc_list = deduplicate(svc_list)
for svc in svc_list:
- svchandle = services.service(svc)
+ svchandle = services.service(svc, api=api)
try:
if svchandle.is_running():
print("%s Service: RUNNING" % svc)