This is KubeVirt API an add-on for Kubernetes.
This Python package is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Package version: v0.8.0-74-g27961727
- Build package: io.swagger.codegen.languages.PythonClientCodegen For more information, please visit https://github.com/kubevirt/kubevirt
Python 2.7 and 3.4+
If the python package is hosted on Github, you can install directly from Github
pip install git+https://github.com/kubevirt/client-python.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/kubevirt/client-python.git
)
Then import the package:
import kubevirt
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import kubevirt
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import kubevirt
from kubevirt.rest import ApiException
from pprint import pprint
# Configure API key authorization: BearerToken
kubevirt.configuration.api_key['authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# kubevirt.configuration.api_key_prefix['authorization'] = 'Bearer'
# create an instance of the API class
api_instance = kubevirt.DefaultApi()
try:
# Health endpoint
api_instance.check_health()
except ApiException as e:
print("Exception when calling DefaultApi->check_health: %s\n" % e)
All URIs are relative to https://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
DefaultApi | check_health | GET /apis/kubevirt.io/v1alpha2/healthz | Health endpoint |
DefaultApi | console | GET /apis/subresources.kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstances/{name}/console | Open a websocket connection to a serial console on the specified VirtualMachineInstance. |
DefaultApi | create_namespaced_virtual_machine | POST /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachines | Create a VirtualMachine object. |
DefaultApi | create_namespaced_virtual_machine_instance | POST /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstances | Create a VirtualMachineInstance object. |
DefaultApi | create_namespaced_virtual_machine_instance_preset | POST /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstancepresets | Create a VirtualMachineInstancePreset object. |
DefaultApi | create_namespaced_virtual_machine_instance_replica_set | POST /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstancereplicasets | Create a VirtualMachineInstanceReplicaSet object. |
DefaultApi | delete_collection_namespaced_virtual_machine | DELETE /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachines | Delete a collection of VirtualMachine objects. |
DefaultApi | delete_collection_namespaced_virtual_machine_instance | DELETE /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstances | Delete a collection of VirtualMachineInstance objects. |
DefaultApi | delete_collection_namespaced_virtual_machine_instance_preset | DELETE /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstancepresets | Delete a collection of VirtualMachineInstancePreset objects. |
DefaultApi | delete_collection_namespaced_virtual_machine_instance_replica_set | DELETE /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstancereplicasets | Delete a collection of VirtualMachineInstanceReplicaSet objects. |
DefaultApi | delete_namespaced_virtual_machine | DELETE /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachines/{name} | Delete a VirtualMachine object. |
DefaultApi | delete_namespaced_virtual_machine_instance | DELETE /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstances/{name} | Delete a VirtualMachineInstance object. |
DefaultApi | delete_namespaced_virtual_machine_instance_preset | DELETE /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstancepresets/{name} | Delete a VirtualMachineInstancePreset object. |
DefaultApi | delete_namespaced_virtual_machine_instance_replica_set | DELETE /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstancereplicasets/{name} | Delete a VirtualMachineInstanceReplicaSet object. |
DefaultApi | get_api_group | GET /apis | Get a KubeVirt API GroupList |
DefaultApi | get_api_group_0 | GET /apis/kubevirt.io | Get a KubeVirt API group |
DefaultApi | get_api_group_1 | GET /apis/subresources.kubevirt.io | Get a KubeVirt API Group |
DefaultApi | get_api_resources | GET /apis/kubevirt.io/v1alpha2 | Get KubeVirt API Resources |
DefaultApi | get_api_resources_0 | GET /apis/subresources.kubevirt.io/v1alpha2 | Get a KubeVirt API resources |
DefaultApi | list_namespaced_virtual_machine | GET /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachines | Get a list of VirtualMachine objects. |
DefaultApi | list_namespaced_virtual_machine_instance | GET /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstances | Get a list of VirtualMachineInstance objects. |
DefaultApi | list_namespaced_virtual_machine_instance_preset | GET /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstancepresets | Get a list of VirtualMachineInstancePreset objects. |
DefaultApi | list_namespaced_virtual_machine_instance_replica_set | GET /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstancereplicasets | Get a list of VirtualMachineInstanceReplicaSet objects. |
DefaultApi | list_virtual_machine_for_all_namespaces | GET /apis/kubevirt.io/v1alpha2/virtualmachines | Get a list of all VirtualMachine objects. |
DefaultApi | list_virtual_machine_instance_for_all_namespaces | GET /apis/kubevirt.io/v1alpha2/virtualmachineinstances | Get a list of all VirtualMachineInstance objects. |
DefaultApi | list_virtual_machine_instance_preset_for_all_namespaces | GET /apis/kubevirt.io/v1alpha2/virtualmachineinstancepresets | Get a list of all VirtualMachineInstancePreset objects. |
DefaultApi | list_virtual_machine_instance_replica_set_for_all_namespaces | GET /apis/kubevirt.io/v1alpha2/virtualmachineinstancereplicasets | Get a list of all VirtualMachineInstanceReplicaSet objects. |
DefaultApi | patch_namespaced_virtual_machine | PATCH /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachines/{name} | Patch a VirtualMachine object. |
DefaultApi | patch_namespaced_virtual_machine_instance | PATCH /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstances/{name} | Patch a VirtualMachineInstance object. |
DefaultApi | patch_namespaced_virtual_machine_instance_preset | PATCH /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstancepresets/{name} | Patch a VirtualMachineInstancePreset object. |
DefaultApi | patch_namespaced_virtual_machine_instance_replica_set | PATCH /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstancereplicasets/{name} | Patch a VirtualMachineInstanceReplicaSet object. |
DefaultApi | read_namespaced_virtual_machine | GET /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachines/{name} | Get a VirtualMachine object. |
DefaultApi | read_namespaced_virtual_machine_instance | GET /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstances/{name} | Get a VirtualMachineInstance object. |
DefaultApi | read_namespaced_virtual_machine_instance_preset | GET /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstancepresets/{name} | Get a VirtualMachineInstancePreset object. |
DefaultApi | read_namespaced_virtual_machine_instance_replica_set | GET /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstancereplicasets/{name} | Get a VirtualMachineInstanceReplicaSet object. |
DefaultApi | replace_namespaced_virtual_machine | PUT /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachines/{name} | Update a VirtualMachine object. |
DefaultApi | replace_namespaced_virtual_machine_instance | PUT /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstances/{name} | Update a VirtualMachineInstance object. |
DefaultApi | replace_namespaced_virtual_machine_instance_preset | PUT /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstancepresets/{name} | Update a VirtualMachineInstancePreset object. |
DefaultApi | replace_namespaced_virtual_machine_instance_replica_set | PUT /apis/kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstancereplicasets/{name} | Update a VirtualMachineInstanceReplicaSet object. |
DefaultApi | test | GET /apis/subresources.kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstances/{name}/test | Test endpoint verifying apiserver connectivity. |
DefaultApi | version | GET /apis/subresources.kubevirt.io/v1alpha2/version | |
DefaultApi | vnc | GET /apis/subresources.kubevirt.io/v1alpha2/namespaces/{namespace}/virtualmachineinstances/{name}/vnc | Open a websocket connection to connect to VNC on the specified VirtualMachineInstance. |
DefaultApi | watch_namespaced_virtual_machine | GET /apis/kubevirt.io/v1alpha2/watch/namespaces/{namespace}/virtualmachines | Watch a VirtualMachine object. |
DefaultApi | watch_namespaced_virtual_machine_instance | GET /apis/kubevirt.io/v1alpha2/watch/namespaces/{namespace}/virtualmachineinstances | Watch a VirtualMachineInstance object. |
DefaultApi | watch_namespaced_virtual_machine_instance_preset | GET /apis/kubevirt.io/v1alpha2/watch/namespaces/{namespace}/virtualmachineinstancepresets | Watch a VirtualMachineInstancePreset object. |
DefaultApi | watch_namespaced_virtual_machine_instance_replica_set | GET /apis/kubevirt.io/v1alpha2/watch/namespaces/{namespace}/virtualmachineinstancereplicasets | Watch a VirtualMachineInstanceReplicaSet object. |
DefaultApi | watch_virtual_machine_instance_list_for_all_namespaces | GET /apis/kubevirt.io/v1alpha2/watch/virtualmachineinstances | Watch a VirtualMachineInstanceList object. |
DefaultApi | watch_virtual_machine_instance_preset_list_for_all_namespaces | GET /apis/kubevirt.io/v1alpha2/watch/virtualmachineinstancepresets | Watch a VirtualMachineInstancePresetList object. |
DefaultApi | watch_virtual_machine_instance_replica_set_list_for_all_namespaces | GET /apis/kubevirt.io/v1alpha2/watch/virtualmachineinstancereplicasets | Watch a VirtualMachineInstanceReplicaSetList object. |
DefaultApi | watch_virtual_machine_list_for_all_namespaces | GET /apis/kubevirt.io/v1alpha2/watch/virtualmachines | Watch a VirtualMachineList object. |
- V1APIGroup
- V1APIGroupList
- V1APIResource
- V1APIResourceList
- V1Affinity
- V1CDRomTarget
- V1CPU
- V1Clock
- V1ClockOffsetUTC
- V1CloudInitNoCloudSource
- V1ConfigMapVolumeSource
- V1DataVolumeSource
- V1DeleteOptions
- V1Devices
- V1Disk
- V1DiskTarget
- V1DomainSpec
- V1EmptyDiskSource
- V1EphemeralVolumeSource
- V1FeatureAPIC
- V1FeatureHyperv
- V1FeatureSpinlocks
- V1FeatureState
- V1FeatureVendorID
- V1Features
- V1Firmware
- V1FloppyTarget
- V1GroupVersionForDiscovery
- V1HPETTimer
- V1HostDisk
- V1Hugepages
- V1HypervTimer
- V1I6300ESBWatchdog
- V1Initializer
- V1Initializers
- V1Interface
- V1KVMTimer
- V1LabelSelector
- V1LabelSelectorRequirement
- V1ListMeta
- V1LocalObjectReference
- V1LunTarget
- V1Machine
- V1Memory
- V1MultusNetwork
- V1Network
- V1NodeAffinity
- V1NodeSelector
- V1NodeSelectorRequirement
- V1NodeSelectorTerm
- V1ObjectMeta
- V1OwnerReference
- V1PITTimer
- V1PersistentVolumeClaimSpec
- V1PersistentVolumeClaimVolumeSource
- V1PodAffinity
- V1PodAffinityTerm
- V1PodAntiAffinity
- V1PodNetwork
- V1Port
- V1Preconditions
- V1PreferredSchedulingTerm
- V1RTCTimer
- V1RegistryDiskSource
- V1ResourceRequirements
- V1SecretVolumeSource
- V1ServerAddressByClientCIDR
- V1Status
- V1StatusCause
- V1StatusDetails
- V1Timer
- V1Toleration
- V1VirtualMachine
- V1VirtualMachineCondition
- V1VirtualMachineInstance
- V1VirtualMachineInstanceCondition
- V1VirtualMachineInstanceList
- V1VirtualMachineInstanceNetworkInterface
- V1VirtualMachineInstancePreset
- V1VirtualMachineInstancePresetList
- V1VirtualMachineInstancePresetSpec
- V1VirtualMachineInstanceReplicaSet
- V1VirtualMachineInstanceReplicaSetCondition
- V1VirtualMachineInstanceReplicaSetList
- V1VirtualMachineInstanceReplicaSetSpec
- V1VirtualMachineInstanceReplicaSetStatus
- V1VirtualMachineInstanceSpec
- V1VirtualMachineInstanceStatus
- V1VirtualMachineInstanceTemplateSpec
- V1VirtualMachineList
- V1VirtualMachineSpec
- V1VirtualMachineStatus
- V1Volume
- V1WatchEvent
- V1Watchdog
- V1WeightedPodAffinityTerm
- V1alpha1DataVolume
- V1alpha1DataVolumeSource
- V1alpha1DataVolumeSourceHTTP
- V1alpha1DataVolumeSourceS3
- V1alpha1DataVolumeSpec
- V1alpha1DataVolumeStatus
- Type: API key
- API key parameter name: authorization
- Location: HTTP header