def clients_dir(sample_path=None): # pylint: disable=E0602 """Getting suggestion for clients_dir.""" suggestion = __class__.get_value_from_sample(_helper.current_method(), sample_path) if suggestion is None: suggestion = _helper.sanitize_path( os.path.expanduser('~')) + 'openvpn-clients' return suggestion
def hostname(sample_path=None): # pylint: disable=E0602 """Returns suggestion for hostname.""" suggestion = __class__.get_value_from_sample(_helper.current_method(), sample_path) if suggestion is None: suggestion = _helper.fetch_hostname_by_system() if suggestion is None: suggestion = _helper.fetch_hostname_by_reverse_dns() return suggestion
def sovpn_share_salt(sample_path=None): # pylint: disable=E0602 """Getting suggestion for sovpn_share_salt.""" suggestion = __class__.get_value_from_sample(_helper.current_method(), sample_path) if suggestion is None: chars = string.ascii_letters + string.digits length = random.randint(10, 16) suggestion = ''.join(random.choice(chars) for _ in range(length)) return suggestion
def mgmt_used(sample_path=None): # pylint: disable=E0602 """Getting suggestion for mgmt_used.""" suggestion = __class__.get_value_from_sample(_helper.current_method(), sample_path) if suggestion is True: suggestion = 'Y' elif suggestion is False: suggestion = 'N' return suggestion
def port(sample_path=None): # pylint: disable=E0602 """Getting suggestion for port.""" suggestion = __class__.get_value_from_sample(_helper.current_method(), sample_path) return suggestion
def sovpn_share_address(sample_path=None): # pylint: disable=E0602 """Getting suggestion for sovpn_share_address.""" suggestion = __class__.get_value_from_sample(_helper.current_method(), sample_path) return suggestion