mirror of
https://github.com/kubevirt/kubevirt.core.git
synced 2026-05-13 21:12:11 +00:00
inventory: Provide dummy classes to satisfy Ansible sanity
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
This commit is contained in:
@@ -166,17 +166,18 @@ from typing import (
|
|||||||
Tuple,
|
Tuple,
|
||||||
Union,
|
Union,
|
||||||
)
|
)
|
||||||
import traceback
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from kubernetes.dynamic.resource import ResourceField
|
from kubernetes.dynamic.resource import ResourceField
|
||||||
from kubernetes.dynamic.exceptions import DynamicApiError
|
from kubernetes.dynamic.exceptions import DynamicApiError
|
||||||
except ImportError:
|
except ImportError:
|
||||||
HAS_K8S = False
|
|
||||||
K8S_IMPORT_ERROR = traceback.format_exc()
|
class ResourceField:
|
||||||
else:
|
pass
|
||||||
HAS_K8S = True
|
|
||||||
K8S_IMPORT_ERROR = None
|
class DynamicApiError(Exception):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable
|
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user