def validate_platform(self):
"""Validates the platform and distribution to make sure it is supported.
Raises:
NotImplementedError: Unsupported System/OS.
"""
system = platform.system()
if system != 'Linux':
self.log.error('Unsupported System/OS: {0}'.format(system))
raise NotImplementedError
self.dist = platform.dist()[0]
if self.dist == 'Ubuntu':
self.log.debug('Distribution: Ubuntu')
elif self.dist == 'centos':
self.log.debug('Distribution: centos')
else:
self.log.error('Unsupported Distribution: {0}'.format(self.dist))
raise NotImplementedError
评论列表
文章目录