8000 GitHub - gobindadas/client-python: An auto-generated python SDK to interact with KubeVirt resources · GitHub
[go: up one dir, main page]

Skip to content

gobindadas/client-python

 
 

Repository files navigation

kubevirt-py

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.3.0-136-g7e1dbe38
  • Build package: io.swagger.codegen.languages.PythonClientCodegen For more information, please visit https://github.com/kubevirt/kubevirt

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

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 

Setuptools

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

Getting Started

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
# 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)

Documentation for API Endpoints

All URIs are relative to https://localhost

Class Method HTTP request Description
DefaultApi check_health GET /apis/kubevirt.io/v1alpha1/healthz Health endpoint
DefaultApi console GET /apis/subresources.kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachines/{name}/console Open a websocket connection to a serial console on the specified VM.
DefaultApi create_namespaced_offline_virtual_machine POST /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/offlinevirtualmachines Create a OfflineVirtualMachine object.
DefaultApi create_namespaced_virtual_machine POST /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachinepresets Create a VirtualMachine object.
DefaultApi create_namespaced_virtual_machine_0 POST /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachines Create a VirtualMachine object.
DefaultApi create_namespaced_virtual_machine_replica_set POST /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachinereplicasets Create a VirtualMachineReplicaSet object.
DefaultApi delete_collection_namespaced_offline_virtual_machine DELETE /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/offlinevirtualmachines Delete a collection of OfflineVirtualMachine objects.
DefaultApi delete_collection_namespaced_virtual_machine DELETE /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachinepresets Delete a collection of VirtualMachine objects.
DefaultApi delete_collection_namespaced_virtual_machine_0 DELETE /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachines Delete a collection of VirtualMachine objects.
DefaultApi delete_collection_namespaced_virtual_machine_replica_set DELETE /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachinereplicasets Delete a collection of VirtualMachineReplicaSet objects.
DefaultApi delete_namespaced_offline_virtual_machine DELETE /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/offlinevirtualmachines/{name} Delete a OfflineVirtualMachine object.
DefaultApi delete_namespaced_virtual_machine DELETE /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachinepresets/{name} Delete a VirtualMachine object.
DefaultApi delete_namespaced_virtual_machine_0 DELETE /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachines/{name} Delete a VirtualMachine object.
DefaultApi delete_namespaced_virtual_machine_replica_set DELETE /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachinereplicasets/{name} Delete a VirtualMachineReplicaSet 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/v1alpha1 Get KubeVirt API Resources
DefaultApi get_api_resources_0 GET /apis/subresources.kubevirt.io/v1alpha1 Get a KubeVirt API resources
DefaultApi list_namespaced_offline_virtual_machine GET /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/offlinevirtualmachines Get a list of OfflineVirtualMachine objects.
DefaultApi list_namespaced_virtual_machine GET /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachinepresets Get a list of VirtualMachine objects.
DefaultApi list_namespaced_virtual_machine_0 GET /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachines Get a list of VirtualMachine objects.
DefaultApi list_namespaced_virtual_machine_replica_set GET /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachinereplicasets Get a list of VirtualMachineReplicaSet objects.
DefaultApi list_offline_virtual_machine_for_all_namespaces GET /apis/kubevirt.io/v1alpha1/offlinevirtualmachines Get a list of all OfflineVirtualMachine objects.
DefaultApi list_virtual_machine_for_all_namespaces GET /apis/kubevirt.io/v1alpha1/virtualmachinepresets Get a list of all VirtualMachine objects.
DefaultApi list_virtual_machine_for_all_namespaces_0 GET /apis/kubevirt.io/v1alpha1/virtualmachines Get a list of all VirtualMachine objects.
DefaultApi list_virtual_machine_replica_set_for_all_namespaces GET /apis/kubevirt.io/v1alpha1/virtualmachinereplicasets Get a list of all VirtualMachineReplicaSet objects.
DefaultApi patch_namespaced_offline_virtual_machine PATCH /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/offlinevirtualmachines/{name} Patch a OfflineVirtualMachine object.
DefaultApi patch_namespaced_virtual_machine PATCH /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachinepresets/{name} Patch a VirtualMachine object.
DefaultApi patch_namespaced_virtual_machine_0 PATCH /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachines/{name} Patch a VirtualMachine object.
DefaultApi patch_namespaced_virtual_machine_replica_set PATCH /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachinereplicasets/{name} Patch a VirtualMachineReplicaSet object.
DefaultApi read_namespaced_offline_virtual_machine GET /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/offlinevirtualmachines/{name} Get a OfflineVirtualMachine object.
DefaultApi read_namespaced_virtual_machine GET /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachinepresets/{name} Get a VirtualMachine object.
DefaultApi read_namespaced_virtual_machine_0 GET /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachines/{name} Get a VirtualMachine object.
DefaultApi read_namespaced_virtual_machine_replica_set GET /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachinereplicasets/{name} Get a VirtualMachineReplicaSet object.
DefaultApi replace_namespaced_offline_virtual_machine PUT /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/offlinevirtualmachines/{name} Update a OfflineVirtualMachine object.
DefaultApi replace_namespaced_virtual_machine PUT /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachinepresets/{name} Update a VirtualMachine object.
DefaultApi replace_namespaced_virtual_machine_0 PUT /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachines/{name} Update a VirtualMachine object.
DefaultApi replace_namespaced_virtual_machine_replica_set PUT /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachinereplicasets/{name} Update a VirtualMachineReplicaSet object.
DefaultApi test GET /apis/subresources.kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachines/{name}/test Test endpoint verifying apiserver connectivity.
DefaultApi vnc GET /apis/subresources.kubevirt.io/v1alpha1/namespaces/{namespace}/virtualmachines/{name}/vnc Open a websocket connection to connect to VNC on the specified VM.
DefaultApi watch_namespaced_offline_virtual_machine GET /apis/kubevirt.io/v1alpha1/watch/namespaces/{namespace}/offlinevirtualmachines Watch a OfflineVirtualMachine object.
DefaultApi watch_namespaced_virtual_machine GET /apis/kubevirt.io/v1alpha1/watch/namespaces/{namespace}/virtualmachinepresets Watch a VirtualMachine object.
DefaultApi watch_namespaced_virtual_machine_0 GET /apis/kubevirt.io/v1alpha1/watch/namespaces/{namespace}/virtualmachines Watch a VirtualMachine object.
DefaultApi watch_namespaced_virtual_machine_replica_set GET /apis/kubevirt.io/v1alpha1/watch/namespaces/{namespace}/virtualmachinereplicasets Watch a VirtualMachineReplicaSet object.
DefaultApi watch_offline_virtual_machine_list_for_all_namespaces GET /apis/kubevirt.io/v1alpha1/watch/offlinevirtualmachines Watch a OfflineVirtualMachineList object.
DefaultApi watch_virtual_machine_list_for_all_namespaces GET /apis/kubevirt.io/v1alpha1/watch/virtualmachinepresets Watch a VirtualMachineList object.
DefaultApi watch_virtual_machine_list_for_all_namespaces_0 GET /apis/kubevirt.io/v1alpha1/watch/virtualmachines Watch a VirtualMachineList object.
DefaultApi watch_virtual_machine_replica_set_list_for_all_namespaces GET /apis/kubevirt.io/v1alpha1/watch/virtualmachinereplicasets Watch a VirtualMachineReplicaSetList object.

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

kubevirt-dev@googlegroups.com

About

An auto-generated python SDK to interact with KubeVirt resources

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 99.8%
  • Shell 0.2%
0