mirror of
https://github.com/kubevirt/kubevirt.core.git
synced 2026-03-27 03:13:10 +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,
|
||||
Union,
|
||||
)
|
||||
import traceback
|
||||
|
||||
try:
|
||||
from kubernetes.dynamic.resource import ResourceField
|
||||
from kubernetes.dynamic.exceptions import DynamicApiError
|
||||
except ImportError:
|
||||
HAS_K8S = False
|
||||
K8S_IMPORT_ERROR = traceback.format_exc()
|
||||
else:
|
||||
HAS_K8S = True
|
||||
K8S_IMPORT_ERROR = None
|
||||
|
||||
class ResourceField:
|
||||
pass
|
||||
|
||||
class DynamicApiError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable
|
||||
|
||||
|
||||
Reference in New Issue
Block a user