|
|
@ -15,6 +15,7 @@
|
|
|
|
# limitations under the License.
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
|
|
|
|
import re
|
|
|
|
import re
|
|
|
|
|
|
|
|
import os
|
|
|
|
import cl_utils
|
|
|
|
import cl_utils
|
|
|
|
import cl_base
|
|
|
|
import cl_base
|
|
|
|
|
|
|
|
|
|
|
@ -105,3 +106,19 @@ class fillVars(object, cl_base.glob_attr):
|
|
|
|
elif netmask=='255.255.0.0':
|
|
|
|
elif netmask=='255.255.0.0':
|
|
|
|
networks+=ip[0]+"."+ip[1]+".0.0"+net[netmask]
|
|
|
|
networks+=ip[0]+"."+ip[1]+".0.0"+net[netmask]
|
|
|
|
return networks
|
|
|
|
return networks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_os_locale_locale(self):
|
|
|
|
|
|
|
|
"""локаль (прим: ru_RU.UTF-8)"""
|
|
|
|
|
|
|
|
return os.environ['LANG']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_os_locale_lang(self):
|
|
|
|
|
|
|
|
"""язык (прим: ru_RU)"""
|
|
|
|
|
|
|
|
locale = self.Get("os_locale_locale")
|
|
|
|
|
|
|
|
if locale:
|
|
|
|
|
|
|
|
return locale.split(".")[0]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_os_locale_language(self):
|
|
|
|
|
|
|
|
"""язык (прим: ru)"""
|
|
|
|
|
|
|
|
lang = self.Get("os_locale_lang")
|
|
|
|
|
|
|
|
if lang:
|
|
|
|
|
|
|
|
return lang.split("_")[0]
|