Re: [Freeipa-devel] [PATCH] 0028 Remove unneeded internal methods. Move code to public, methods.

2014-11-13 Thread Petr Vobornik

On 11.11.2014 09:19, Petr Viktorin wrote:

On 11/10/2014 08:21 AM, Jan Cholasta wrote:

Hi, ACK.



Pushed to master: 82c3c2b242c3f2b8113c2021cf4d17cab54c2a86


Pushed to ipa-4-1: 814479a5678741f106283b61666e4bd093852fa7

(required for David's patch #29)
--
Petr Vobornik

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] 0028 Remove unneeded internal methods. Move code to public, methods.

2014-11-11 Thread Petr Viktorin

On 11/10/2014 08:21 AM, Jan Cholasta wrote:

Hi, ACK.



Pushed to master: 82c3c2b242c3f2b8113c2021cf4d17cab54c2a86

--
PetrĀ³

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] 0028 Remove unneeded internal methods. Move code to public, methods.

2014-11-09 Thread Jan Cholasta

Hi, ACK.

--
Jan Cholasta

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


[Freeipa-devel] [PATCH] 0028 Remove unneeded internal methods. Move code to public, methods.

2014-11-07 Thread David Kupka


--
David Kupka
From 0269a920231a992b67da713d40e29a28fdd32430 Mon Sep 17 00:00:00 2001
From: David Kupka dku...@redhat.com
Date: Thu, 6 Nov 2014 17:57:26 -0500
Subject: [PATCH] Remove unneeded internal methods. Move code to public
 methods.

---
 ipaplatform/base/services.py | 36 +---
 1 file changed, 13 insertions(+), 23 deletions(-)

diff --git a/ipaplatform/base/services.py b/ipaplatform/base/services.py
index 961c368e6b4d81d337cf0a8601075f052352ecbf..01d95b39cc7b845bdc612d40b3eea29d6de2961a 100644
--- a/ipaplatform/base/services.py
+++ b/ipaplatform/base/services.py
@@ -436,7 +436,11 @@ class SystemdService(PlatformService):
 except:
 pass
 else:
-self.__disable(instance_name)
+try:
+ipautil.run([paths.SYSTEMCTL, disable,
+ self.service_instance(instance_name)])
+except ipautil.CalledProcessError:
+pass
 
 def mask(self, instance_name=):
 if instance_name != :
@@ -444,40 +448,26 @@ class SystemdService(PlatformService):
 # remove instance file or link before masking
 if os.path.islink(srv_tgt):
 os.unlink(srv_tgt)
-
-self.__mask(instance_name)
-
-def unmask(self, instance_name=):
-self.__unmask(instance_name)
-
-def __enable(self, instance_name=):
-try:
-ipautil.run([paths.SYSTEMCTL, enable,
- self.service_instance(instance_name)])
-except ipautil.CalledProcessError:
-pass
-
-def __disable(self, instance_name=):
-try:
-ipautil.run([paths.SYSTEMCTL, disable,
- self.service_instance(instance_name)])
-except ipautil.CalledProcessError:
-pass
-
-def __mask(self, instance_name=):
 try:
 ipautil.run([paths.SYSTEMCTL, mask,
  self.service_instance(instance_name)])
 except ipautil.CalledProcessError:
 pass
 
-def __unmask(self, instance_name=):
+def unmask(self, instance_name=):
 try:
 ipautil.run([paths.SYSTEMCTL, unmask,
  self.service_instance(instance_name)])
 except ipautil.CalledProcessError:
 pass
 
+def __enable(self, instance_name=):
+try:
+ipautil.run([paths.SYSTEMCTL, enable,
+ self.service_instance(instance_name)])
+except ipautil.CalledProcessError:
+pass
+
 def install(self):
 self.enable()
 
-- 
2.1.0

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel