Commit 52a876f9 authored by Devaev Maxim's avatar Devaev Maxim

Refactoring

parent 63d117f2
...@@ -58,7 +58,7 @@ class Service(service.Service) : ...@@ -58,7 +58,7 @@ class Service(service.Service) :
return "example" return "example"
@classmethod @classmethod
def optionsList(self) : def options(self) :
return [ return [
(self.serviceName(), "hello_string", "Hello, World!", str) (self.serviceName(), "hello_string", "Hello, World!", str)
] ]
......
...@@ -178,7 +178,7 @@ class Service(service.Service) : ...@@ -178,7 +178,7 @@ class Service(service.Service) :
return SERVICE_NAME return SERVICE_NAME
@classmethod @classmethod
def optionsList(self) : def options(self) :
return [ return [
(SERVICE_NAME, "initd_dir_path", "/etc/init.d", str), (SERVICE_NAME, "initd_dir_path", "/etc/init.d", str),
(SERVICE_NAME, "chkconfig_prog_path", "/sbin/chkconfig", str) (SERVICE_NAME, "chkconfig_prog_path", "/sbin/chkconfig", str)
......
...@@ -69,7 +69,7 @@ class Server(object) : ...@@ -69,7 +69,7 @@ class Server(object) :
def loadServicesConfigs(self) : def loadServicesConfigs(self) :
for service_name in self._services_dict.keys() : for service_name in self._services_dict.keys() :
service_options_list = list(self._services_dict[service_name]["service_class"].optionsList()) service_options_list = list(self._services_dict[service_name]["service_class"].options())
service_options_list.append((service_name, "enabled", "no", validators.validBool)) service_options_list.append((service_name, "enabled", "no", validators.validBool))
for service_options_list_item in service_options_list : for service_options_list_item in service_options_list :
......
...@@ -41,7 +41,7 @@ class ServiceRequisitesInterface(object) : ...@@ -41,7 +41,7 @@ class ServiceRequisitesInterface(object) :
pass pass
@classmethod @classmethod
def optionsList(self) : def options(self) :
return [] return []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment