mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
lxd_project: refactored os.path.expanduser() to module utils (#5549)
* lxd_project: refactored os.path.expanduser() to module utils * add changelog fragment
This commit is contained in:
parent
6c7e9116e1
commit
9874462abb
8 changed files with 17 additions and 10 deletions
|
@ -8,8 +8,10 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
import os
|
||||
import socket
|
||||
import ssl
|
||||
import json
|
||||
|
||||
from ansible.module_utils.urls import generic_urlparse
|
||||
from ansible.module_utils.six.moves.urllib.parse import urlparse
|
||||
|
@ -20,8 +22,6 @@ from ansible.module_utils.common.text.converters import to_text
|
|||
HTTPConnection = http_client.HTTPConnection
|
||||
HTTPSConnection = http_client.HTTPSConnection
|
||||
|
||||
import json
|
||||
|
||||
|
||||
class UnixHTTPConnection(HTTPConnection):
|
||||
def __init__(self, path):
|
||||
|
@ -124,3 +124,11 @@ class LXDClient(object):
|
|||
if err is None:
|
||||
err = resp_json.get('error', None)
|
||||
return err
|
||||
|
||||
|
||||
def default_key_file():
|
||||
return os.path.expanduser('~/.config/lxc/client.key')
|
||||
|
||||
|
||||
def default_cert_file():
|
||||
return os.path.expanduser('~/.config/lxc/client.crt')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue