def get_os_pretty_name(annee, architecture, SP, R2, server_core_install):
    """
    Get parameters to determine the pretty name of the OS.
    The full list of OS are available in the ressource folder
    """
    import ressources.analyzer.server as ressources
    config_server = ressources.ConfigServer(4)
    windows_os_list = config_server.windows['os_list']

    if annee == '2003' and architecture == '32-bit':
        architecture = ['x64', 'Itanium']
    elif annee == '2012' and architecture == 'x64':
        architecture = ['32-bit', 'Itanium']
    if SP == '':
        SP = ['Service Pack 1', 'Service Pack 2']
    if R2 == '':
        R2 = ['R1', 'R2']
    if server_core_install == '':
        server_core_install = ['Server Core installation']

    filter_list = [annee, architecture, SP, R2, server_core_install]

    for os_version in windows_os_list:
        match = True
        for filt in filter_list:
            if isinstance(filt, list):
                for elem_to_avoid in filt:
                    if elem_to_avoid.lower() in os_version.lower():
                        match = False
            elif filt.lower() not in os_version.lower():
                match = False
        if match:
            return os_version
    return False
Exemple #2
0
    def __init__(self, server, config):
        threading.Thread.__init__(self)

        self.server = server
        self.config = config
        self._logger = tools.create_logger(__name__, self.config)
        self.config_server = ressources.ConfigServer(0)
Exemple #3
0
    def __init__(self, server, config, lock):
        threading.Thread.__init__(self)

        self.server = server
        self.config = config
        self.kb_patches = server.kb_patches
        self._logger = tools.create_logger(__name__, self.config)
        self._lock = lock
        self.config_server = ressources.ConfigServer(4)
    def __init__(self, server, config, lock): 
        threading.Thread.__init__(self)

        self.server = server
        self.config = config        
        self.packages = server.packages
        self.active = False
        self._logger = tools.create_logger(__name__, self.config)
        self._lock = lock
        self.config_server = ressources.ConfigServer(3)