1
# Copyright 2016 Microsoft Corporation
3
# Licensed under the Apache License, Version 2.0 (the "License");
4
# you may not use this file except in compliance with the License.
5
# You may obtain a copy of the License at
7
# http://www.apache.org/licenses/LICENSE-2.0
9
# Unless required by applicable law or agreed to in writing, software
10
# distributed under the License is distributed on an "AS IS" BASIS,
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
# See the License for the specific language governing permissions and
13
# limitations under the License.
15
# Requires Python 2.4+ and Openssl 1.0+
18
import azurelinuxagent.common.logger as logger
20
from azurelinuxagent.common.version import DISTRO_FULL_NAME, DISTRO_VERSION
21
from azurelinuxagent.common.rdma import RDMAHandler
22
from .suse import SUSERDMAHandler
23
from .centos import CentOSRDMAHandler
27
distro_full_name=DISTRO_FULL_NAME,
28
distro_version=DISTRO_VERSION
30
"""Return the handler object for RDMA driver handling"""
32
distro_full_name == 'SUSE Linux Enterprise Server' and
33
int(distro_version) > 11
35
return SUSERDMAHandler()
37
if distro_full_name == 'CentOS Linux' or distro_full_name == 'CentOS':
38
return CentOSRDMAHandler(distro_version)
40
logger.info("No RDMA handler exists for distro='{0}' version='{1}'", distro_full_name, distro_version)