Giter Club home page Giter Club logo

client-python's Introduction

KubeVirt

Build Status Go Report Card Licensed under Apache License version 2.0 Coverage Status CII Best Practices Visit our Slack channel FOSSA Status Quality Gate Status

KubeVirt is a virtual machine management add-on for Kubernetes. The aim is to provide a common ground for virtualization solutions on top of Kubernetes.

Introduction

Virtualization extension for Kubernetes

At its core, KubeVirt extends Kubernetes by adding additional virtualization resource types (especially the VM type) through Kubernetes's Custom Resource Definitions API. By using this mechanism, the Kubernetes API can be used to manage these VM resources alongside all other resources Kubernetes provides.

The resources themselves are not enough to launch virtual machines. For this to happen the functionality and business logic needs to be added to the cluster. The functionality is not added to Kubernetes itself, but rather added to a Kubernetes cluster by running additional controllers and agents on an existing cluster.

The necessary controllers and agents are provided by KubeVirt.

As of today KubeVirt can be used to declaratively

  • Create a predefined VM
  • Schedule a VM on a Kubernetes cluster
  • Launch a VM
  • Stop a VM
  • Delete a VM

To start using KubeVirt

Try our quickstart at kubevirt.io.

See our user documentation at kubevirt.io/docs.

Once you have the basics, you can learn more about how to run KubeVirt and its newest features by taking a look at:

To start developing KubeVirt

To set up a development environment please read our Getting Started Guide. To learn how to contribute, please read our contribution guide.

You can learn more about how KubeVirt is designed (and why it is that way), and learn more about the major components by taking a look at our developer documentation:

Useful links

The KubeVirt SIG-release repo is responsible for information regarding upcoming and previous releases.

Community

If you got enough of code and want to speak to people, then you got a couple of options:

Related resources

Submitting patches

When sending patches to the project, the submitter is required to certify that they have the legal right to submit the code. This is achieved by adding a line

Signed-off-by: Real Name <[email protected]>

to the bottom of every commit message. Existence of such a line certifies that the submitter has complied with the Developer's Certificate of Origin 1.1, (as defined in the file docs/developer-certificate-of-origin).

This line can be automatically added to a commit in the correct format, by using the '-s' option to 'git commit'.

License

KubeVirt is distributed under the Apache License, Version 2.0.

Copyright 2016

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

FOSSA Status

FOSSA Status

client-python's People

Contributors

kubevirt-bot avatar lukas-bednar avatar masayag avatar pkliczewski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

client-python's Issues

Adjust main branch to use respectful language

/kind enhancement

What happened:
Current standard of this repos main branch name master is not respectful to some contributors and/or users of KubeVirt

What you expected to happen:
Please adjust the main branch name to main.

No tag for significant api changes

Recently we bumped api version due to renaming of ovm to vm and vm' to vmi`. Please provide a way to from which commit we can use newer version.

Invalid value for `format`, must not be `None`

With the latest client downloaded few mins ago. When there is single vmi created using this manifest. When calling list_virtual_machine_instance_for_all_namespaces I get:

  File "/usr/lib/python2.7/site-packages/kubevirt/apis/default_api.py", line 2884, in list_virtual_machine_instance_for_all_namespaces
    (data) = self.list_virtual_machine_instance_for_all_namespaces_with_http_info(**kwargs)
  File "/usr/lib/python2.7/site-packages/kubevirt/apis/default_api.py", line 2978, in list_virtual_machine_instance_for_all_namespaces_with_http_info
    collection_formats=collection_formats)
  File "/usr/lib/python2.7/site-packages/kubevirt/api_client.py", line 326, in call_api
    _return_http_data_only, collection_formats, _preload_content, _request_timeout)
  File "/usr/lib/python2.7/site-packages/kubevirt/api_client.py", line 161, in __call_api
    return_data = self.deserialize(response_data, response_type)
  File "/usr/lib/python2.7/site-packages/kubevirt/api_client.py", line 239, in deserialize
    return self.__deserialize(data, response_type)
  File "/usr/lib/python2.7/site-packages/kubevirt/api_client.py", line 279, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/usr/lib/python2.7/site-packages/kubevirt/api_client.py", line 629, in __deserialize_model
    kwargs[attr] = self.__deserialize(value, attr_type)
  File "/usr/lib/python2.7/site-packages/kubevirt/api_client.py", line 257, in __deserialize
    for sub_data in data]
  File "/usr/lib/python2.7/site-packages/kubevirt/api_client.py", line 279, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/usr/lib/python2.7/site-packages/kubevirt/api_client.py", line 629, in __deserialize_model
    kwargs[attr] = self.__deserialize(value, attr_type)
  File "/usr/lib/python2.7/site-packages/kubevirt/api_client.py", line 279, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/usr/lib/python2.7/site-packages/kubevirt/api_client.py", line 629, in __deserialize_model
    kwargs[attr] = self.__deserialize(value, attr_type)
  File "/usr/lib/python2.7/site-packages/kubevirt/api_client.py", line 279, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/usr/lib/python2.7/site-packages/kubevirt/api_client.py", line 629, in __deserialize_model
    kwargs[attr] = self.__deserialize(value, attr_type)
  File "/usr/lib/python2.7/site-packages/kubevirt/api_client.py", line 279, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/usr/lib/python2.7/site-packages/kubevirt/api_client.py", line 629, in __deserialize_model
    kwargs[attr] = self.__deserialize(value, attr_type)
  File "/usr/lib/python2.7/site-packages/kubevirt/api_client.py", line 262, in __deserialize
    for k, v in iteritems(data)}
  File "/usr/lib/python2.7/site-packages/kubevirt/api_client.py", line 262, in <dictcomp>
    for k, v in iteritems(data)}
  File "/usr/lib/python2.7/site-packages/kubevirt/api_client.py", line 279, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/usr/lib/python2.7/site-packages/kubevirt/api_client.py", line 631, in __deserialize_model
    instance = klass(**kwargs)     
  File "/usr/lib/python2.7/site-packages/kubevirt/models/resource_quantity.py", line 57, in __init__
    self.format = format
  File "/usr/lib/python2.7/site-packages/kubevirt/models/resource_quantity.py", line 81, in format
    raise ValueError("Invalid value for `format`, must not be `None`")
ValueError: Invalid value for `format`, must not be `None`

V1InterfaceBridge seems to be missing

While working on the KubeVirt Ansible modules, I found out that I cannot remove VMIs any more as it complains with the following message:

AttributeError: 'module' object has no attribute 'V1InterfaceBridge'

Message coming from:

api_client.py", line 268, in __deserialize

The thing is that the implementation for the V1InterfaceBridge seems to be missing but it's referenced by V1Interface.

Having a look to KubeVirt OpenAPI definition, the type seems to be declared but has no definition, I guess that's the actual problem.

Image upload

Hi,

I'm trying to upload an iso the API but I can't figure it out, something might be missing from python library?
Here is the CLI I am trying to reproduce:
virtctl image-upload dv cd-image --size=1Gi --image-path=cd-image.iso --uploadproxy-url=cdi-uploadproxy.cdi.svc --insecure

HTTP 403 Forbidden Error while invoking any KubeVirt client API

Getting HTTP 403 Forbidden error in response when invoking any API to access/manage any KubeVirt object (say VirtualMachineInstance) running in OpenShift CRC VM.

Below is the code snippet.

rom future import print_function
import kubevirt
from kubernetes import config
from kubevirt.rest import ApiException
from pprint import pprint

kubeconfig_file = "kube-config/remote-97-minikube/config"
config.load_kube_config(config_file=kubeconfig_file, client_configuration=kubevirt.configuration)

api_instance = kubevirt.DefaultApi()

try:
api_response = api_instance.read_namespaced_virtual_machine_instance(name="cirrosvm", namespace="default")
pprint(result)
except ApiException as e:
print("Exception when calling DefaultApi->read_namespaced_virtual_machine_instance: %s\n" % e)

Output:

Exception when calling DefaultApi->read_namespaced_virtual_machine_instance: (403)
Reason: Forbidden
HTTP response headers: HTTPHeaderDict({'Audit-Id': 'a8dc5d40-6612-4412-a7ea-1f52bd29f48c', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': '41a696e4-cc3f-4cea-bb5d-3c1fb175da91', 'X-Kubernetes-Pf-Prioritylevel-Uid': '78cb21aa-8728-4f87-bd27-6e6036cdaff9', 'Date': 'Wed, 11 Jan 2023 22:34:01 GMT', 'Content-Length': '460'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"virtualmachineinstances.kubevirt.io "{name:[a-z0-9][a-z0-9\\-]}" is forbidden: User "system:anonymous" cannot get resource "virtualmachineinstances" in API group "kubevirt.io" in the namespace "{namespace:[a-z0-9][a-z0-9\\-]}"","reason":"Forbidden","details":{"name":"{name:[a-z0-9][a-z0-9\-]*}","group":"kubevirt.io","kind":"virtualmachineinstances"},"code":403}

Root Cause:
When we invoke read_namespaced_virtual_machine_instance, it prepares all request headers and parameters but keep auth settings empty which is giving 403 error as HTTP response.

https://github.com/kubevirt/client-python/blob/master/kubevirt/apis/default_api.py

#.. Authentication setting
auth_settings = []

    return self.api_client.call_api('/apis/instancetype.kubevirt.io/v1alpha2/virtualmachineclusterinstancetypes/{name:[a-z0-9][a-z0-9\-]*}', 'GET',
                                    path_params,
                                    query_params,

..
..
..

When we prepare a separate request like below and set auth_settings=['BearerToken'], it works and give correct response back. Also noticed in kubernetes-client python API, it set this auth_settings=['BearerToken'].

https://github.com/kubernetes-client/python/blob/1ad6e80f29369651e17a6ba767ddccc99f46600b/kubernetes/client/api/apps_api.py#L63

Please check if it requires fix.

Please check if really requires

config.txt

check_health() doesn't work

When running following snippet of code

from kubernetes import config
import kubevirt

def get_client(kubeconfig="kubeconfig"):
    cl = config.kube_config._get_kube_config_loader_for_yaml_file(kubeconfig)
    cl.load_and_set(kubevirt.configuration)
    return kubevirt.DefaultApi()

a = get_client()
a.check_health()

I am getting following error

In [7]: a.check_health()
---------------------------------------------------------------------------
ApiException                              Traceback (most recent call last)
<ipython-input-7-22725c31a4b9> in <module>()
----> 1 a.check_health()

/home/lbednar/work/kubevirt-org/kubevirt-pysdk-sandbox/E/lib/python2.7/site-packages/kubevirt/apis/default_api.pyc in check_health(self, **kwargs)
     63             return self.check_health_with_http_info(**kwargs)
     64         else:
---> 65             (data) = self.check_health_with_http_info(**kwargs)
     66             return data
     67 

/home/lbednar/work/kubevirt-org/kubevirt-pysdk-sandbox/E/lib/python2.7/site-packages/kubevirt/apis/default_api.pyc in check_health_with_http_info(self, **kwargs)
    137                                         _preload_content=params.get('_preload_content', True),
    138                                         _request_timeout=params.get('_request_timeout'),
--> 139                                         collection_formats=collection_formats)
    140 
    141     def console(self, namespace, name, **kwargs):

/home/lbednar/work/kubevirt-org/kubevirt-pysdk-sandbox/E/lib/python2.7/site-packages/kubevirt/api_client.pyc in call_api(self, resource_path, method, path_params, query_params, header_params, body, post_params, files, response_type, auth_settings, callback, _return_http_data_only, collection_formats, _preload_content, _request_timeout)
    324                                    body, post_params, files,
    325                                    response_type, auth_settings, callback,
--> 326                                    _return_http_data_only, collection_formats, _preload_content, _request_timeout)
    327         else:
    328             thread = threading.Thread(target=self.__call_api,

/home/lbednar/work/kubevirt-org/kubevirt-pysdk-sandbox/E/lib/python2.7/site-packages/kubevirt/api_client.pyc in __call_api(self, resource_path, method, path_params, query_params, header_params, body, post_params, files, response_type, auth_settings, callback, _return_http_data_only, collection_formats, _preload_content, _request_timeout)
    151                                      post_params=post_params, body=body,
    152                                      _preload_content=_preload_content,
--> 153                                      _request_timeout=_request_timeout)
    154 
    155         self.last_response = response_data

/home/lbednar/work/kubevirt-org/kubevirt-pysdk-sandbox/E/lib/python2.7/site-packages/kubevirt/api_client.pyc in request(self, method, url, query_params, headers, post_params, body, _preload_content, _request_timeout)
    347                                         _preload_content=_preload_content,
    348                                         _request_timeout=_request_timeout,
--> 349                                         headers=headers)
    350         elif method == "HEAD":
    351             return self.rest_client.HEAD(url,

/home/lbednar/work/kubevirt-org/kubevirt-pysdk-sandbox/E/lib/python2.7/site-packages/kubevirt/rest.pyc in GET(self, url, headers, query_params, _preload_content, _request_timeout)
    226                             _preload_content=_preload_content,
    227                             _request_timeout=_request_timeout,
--> 228                             query_params=query_params)
    229 
    230     def HEAD(self, url, headers=None, query_params=None, _preload_content=True, _request_timeout=None):

/home/lbednar/work/kubevirt-org/kubevirt-pysdk-sandbox/E/lib/python2.7/site-packages/kubevirt/rest.pyc in request(self, method, url, query_params, headers, body, post_params, _preload_content, _request_timeout)
    217 
    218         if not 200 <= r.status <= 299:
--> 219             raise ApiException(http_resp=r)
    220 
    221         return r

ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Date': 'Thu, 30 Nov 2017 10:51:05 GMT', 'Content-Length': '19', 'Content-Type': 'text/plain; charset=utf-8', 'X-Content-Type-Options': 'nosniff'})
HTTP response body: 404 page not found

The problem is that this function doesn't work with CRD, so it is not served by K8S API endpoint.

APIs with lookup by namespace fail due to improper resource path replacement

For example, list_namespaced_virtual_machine_instance_preset("testns")
makes a request to:

2022-08-02 09:49:55,106 DEBUG https://api.example.com.com:6443 "GET /apis/kubevirt.io/v1/namespaces/%7Bnamespace:%5Ba-z0-9%5D%5Ba-z0-9%5C-%5D*%7D/virtualmachineinstancepresets HTTP/1.1" 200 140

when it should be making a request to

2022-08-02 09:45:34,839 DEBUG https://api.example.com:6443 "GET /apis/kubevirt.io/v1/namespaces/testns/virtualmachineinstancepresets HTTP/1.1"

The issue is the resource path replacement:

https://github.com/kubevirt/client-python/blob/master/kubevirt/api_client.py#L121

                resource_path = resource_path.replace(
                    '{%s}' % k, quote(str(v), safe=config.safe_chars_for_path_param))

https://raw.githubusercontent.com/kubevirt/client-python/master/kubevirt/apis/default_api.py
return self.api_client.call_api('/apis/kubevirt.io/v1/namespaces/{namespace:[a-z0-9][a-z0-9\-]*}/virtualmachineinstancepresets', 'GET',

{namespace} would be replaced, {namespace:[a-z0-9][a-z0-9-]*} is not.

namespaced patch method doesn't seem to work

After opening #16 , I've started to see how I could get it to work as for ansible-kubevirt-modules patching would be quite handy to write specialized modules (e.g. starting/stopping OVM or scaling up/down a VMRS).

First thing I noticed is that the methods won't take neither name nor namespace, which gives me the following error:

2018-06-12 16:29:37,850 DEBUG https://192.168.122.246:6443 "PATCH /apis/kubevirt.io/v1alpha1/namespaces/{namespace}/offlinevirtualmachines/{name} HTTP/1.1" 404 250
2018-06-12 16:29:37,851 DEBUG response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"offlinevirtualmachines.kubevirt.io \"{name}\" not found","reason":"NotFound","details":{"name":"{name}","group":"kubevirt.io","kind":"offlinevirtualmachines"},"code":404}

Tried to add metadata to the body, including name and namespace, but didn't work.

Looking at Kubernetes python client, namespaced patch methods are taking both parameters, for instance:

https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/AppsV1Api.md#patch_namespaced_replica_set

try: 
    api_response = api_instance.patch_namespaced_replica_set(name, namespace, body, pretty=pretty)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AppsV1Api->patch_namespaced_replica_set: %s\n" % e)

Find a way how to load kubeconfig transparently

When working with kubernetes-pysdk they provide function which loads kubeconfig, and configure client.

from kubernetes import config
config.load_kube_config(PATH_TO_KUBECONFIG)

Generated SDK doesn't have such function.
It can be workarounded by following snippet

from kubernetes import config
import kubevirt
cl = config.kube_config._get_kube_config_loader_for_yaml_file(PATH_TO_KUBECONFIG)
cl.load_and_set(kubevirt.configuration)

It would be handy to add such function to client.
As a side effect it brings kubernetes-pysdk as dependency.
On other hand user will probably work with both, kubernetes & kubevirt - so it is not really problem.

Authentication is not working

I know that the code is generated but it seems like kubernetes and openshift are doing it in correct way.

Auth settings in configuration.py is missing. Here is working auth_setting.

It is not enough we need to update each api call with auth_settings = ['BearerToken'] in similar way as it is done in openshift in many places but here is an example.

Please make sure that generated code works properly.

Replace method for VM doesn't seem to work

Been trying to use the replace method for virtual machine resource with the following code:

#!/usr/bin/env python

from __future__ import print_function
import kubevirt
from kubevirt.rest import ApiException
from pprint import pprint

kubevirt.configuration.api_key['authorization'] = 'rq806q.hgwvxd8b9kqd8o9p'
kubevirt.configuration.verify_ssl = False
kubevirt.configuration.host = '192.168.122.119:6443'

# create an instance of the API class
api_instance = kubevirt.DefaultApi()

metadata = kubevirt.V1ObjectMeta(name='jhendrix', namespace='vms')

persistent_volume_claim = kubevirt.V1PersistentVolumeClaimVolumeSource(
    claim_name='fedoravm-pvc'
)

volume = kubevirt.V1Volume(
    name='myvolume',
    persistent_volume_claim=persistent_volume_claim
)

volumes = list()
volumes.append(volume)

disk = kubevirt.V1Disk(
    name='mydisk',
    volume_name='myvolume',
    disk=kubevirt.V1DiskTarget(bus='virtio')
)

disks = list()
disks.append(disk)
devices = kubevirt.V1Devices(disks=disks)

resources = kubevirt.V1ResourceRequirements(
    requests=dict(memory='2048M')
)

domain = kubevirt.V1DomainSpec(
    devices=devices,
    resources=resources
)

vm_spec = kubevirt.V1VirtualMachineSpec(
    domain=domain,
    volumes=volumes
)


body = kubevirt.V1VirtualMachine(
    api_version=mybody.get('api_version'),
    kind=mybody.get('kind'),
    metadata=metadata,
    spec=vm_spec
)

namespace = 'vms'
name = 'jhendrix'

# Update a VirtualMachine object.
try:
    api_response = api_instance.replace_namespaced_virtual_machine(body, namespace, name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->replace_namespaced_virtual_machine: %s\n" % e)

I have also tried to build the body with a more simple dict():

mybody = dict()
mybody['api_version'] = 'kubevirt.io/v1alpha'
mybody['kind'] = 'VirtualMachine'
mybody['metadata'] = dict()
mybody['metadata']['name'] = 'jhendrix'                                                                                                                
mybody['metadata']['namespace'] = 'vms'
mybody['spec'] = dict()
mybody['spec']['domain'] = dict()
mybody['spec']['domain']['resources'] = dict()
mybody['spec']['domain']['resources']['requests'] = dict()
mybody['spec']['domain']['resources']['requests']['memory'] = '2048M'
mybody['spec']['domain']['devices'] = dict()
mybody['spec']['domain']['devices']['disks'] = list()
mybody['spec']['domain']['devices']['disks'].append(dict(volumeName='myvolume', name='mydisk', disk=dict(bus='virtio')))
mybody['spec']['volumes'] = list()
mybody['spec']['volumes'].append(dict(volumeName='myvolume', name='myvolume', persistentVolumeClaim=dict(claimName='fedoravm-pvc')))

But no matter how I tried I always get the same response and the resource doesn't change at all:

{
  "api_version": "None",
 "kind": "None",
 "metadata": "None",
 "spec": "None",
 "status": "None"
}

The resource definition is:

apiVersion: v1
items:
- apiVersion: kubevirt.io/v1alpha1
  kind: VirtualMachine
  metadata:
    annotations:
      presets.virtualmachines.kubevirt.io/presets-applied: kubevirt.io/v1alpha1
    clusterName: ""
    creationTimestamp: 2018-05-25T14:46:23Z
    finalizers:
    - foregroundDeleteVirtualMachine
    generation: 1
    labels:
      kubevirt.io/nodeName: kumaster.local.lab
    name: jhendrix
    namespace: vms
    resourceVersion: "103222"
    selfLink: /apis/kubevirt.io/v1alpha1/namespaces/vms/virtualmachines/jhendrix
    uid: 64e5e851-602a-11e8-bfde-525400a51ec7
  spec:
    domain:
      devices:
        disks:
        - disk:
            bus: virtio
          name: mydisk
          volumeName: myvolume
        - disk:
            bus: virtio
          name: cloudinitdisk
          volumeName: cloudinitvolume
      machine:
        type: ""
      resources:
        requests:
          memory: 1024M
    volumes:
    - name: myvolume
      persistentVolumeClaim:
        claimName: fedoravm-pvc
    - cloudInitNoCloud:
        userDataBase64: ICNjbG91ZC1jb25maWcKICAgICAgICAgICBob3N0bmFtZTogamhlbmRyaXgKICAgICAgICAgICB1c2VyczoKICAgICAgICAgICAgIC0gbmFtZToga3ViZXZpcnQKICAgICAgICAgICAgICAgZ2Vjb3M6IEt1YmVWaXJ0IFByb2plY3QKICAgICAgICAgICAgICAgc3VkbzogQUxMPShBTEwpIE5PUEFTU1dEOkFMTAogICAgICAgICAgICAgICBzc2hfYXV0aG9yaXplZF9rZXlzOgogICAgICAgICAgICAgICAgICAgLSBzc2gtcnNhIEFBQUFCM056YUMxeWMyRUFBQUFEQVFBQkFBQUJBUUMrS01wMUY0U3JLaXR2Z0lMZjhRMkdRYmNPc2xJZzRzZnFVT2YrbTgzMnp3b1MyWjJuZG1wci8zRitOdExxNTZjVGFFeks5SVBCSWtOTEpmc1BxUnNUb0xCWVpEK2w0UzVGZnVaMnh3Q3hHQkgrVFZYQXBPK1NpRDZjODRybWpPeDQ3NjY1aVF2TUhLTCtuLzVnVnZTZFlEdWVnTktuajRyUnIvZUhuRzJ5QzRUVlpsM29ISTdUUE9VSlQra0tqU1dQMVVlc1dUWm1tY2szOUlhRlNtb3JnMzFYN2c5aEpId3E5SkVEUWlsY2JuSXlxRFpLaUg2SnU0R2pPVThtcWhhekJGQjRxdS9RRERiMjVwRHBQZDJwUUdCaWxHdm03Z3dKQ1ZueURrOVlaUVU3Z1lFNzM0S0xEZjV0Q0tNbUVRU2p3RngyVGo5bWZadmVDSUprYWozVCBrdWJldmlydAogICAgICAg                                                     
      name: cloudinitvolume
  status:
    interfaces:
    - ipAddress: 10.244.0.36
    nodeName: kumaster.local.lab
    phase: Running
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""

Am I missing anything?

Missing V1Patch document

While looking for information about patching objects, I've noticed V1Patch.md seems to be missing from the docs directory.

The document is linked on the DefaultApi.md.

kubevirt-py package version does not conform to PEP 440

Current kubevirt-py package version is v1.1.0-rc.0-283-g59b933853. It is non-conformant to PEP 440. It throws invalid version error while doing pip install kubevirt-py package.

#15 4.769 Defaulting to user installation because normal site-packages is not writeable
#15 4.835 Collecting git+https://github.com/kubevirt/client-python.git (from -r requirements.txt (line 7))
#15 4.837 Cloning https://github.com/kubevirt/client-python.git to /tmp/pip-req-build-tqun88di
#15 4.843 Running command git clone --filter=blob:none --quiet https://github.com/kubevirt/client-python.git /tmp/pip-req-build-tqun88di
#15 10.04 Resolved https://github.com/kubevirt/client-python.git to commit 7739604
#15 10.05 Installing build dependencies: started
#15 13.48 Installing build dependencies: finished with status 'done'
#15 13.48 Getting requirements to build wheel: started
#15 13.67 Getting requirements to build wheel: finished with status 'error'
#15 13.68 error: subprocess-exited-with-error
#15 13.68
#15 13.68 × Getting requirements to build wheel did not run successfully.
#15 13.68 │ exit code: 1
#15 13.68 ╰─> [27 lines of output]
#15 13.68 Traceback (most recent call last):
#15 13.68 File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
#15 13.68 main()
#15 13.68 File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
#15 13.68 json_out['return_val'] = hook(**hook_input['kwargs'])
#15 13.68 File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
#15 13.68 return hook(config_settings)
#15 13.68 File "/tmp/pip-build-env-_umdstd6/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
#15 13.68 return self._get_build_requires(config_settings, requirements=['wheel'])
#15 13.68 File "/tmp/pip-build-env-_umdstd6/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
#15 13.68 self.run_setup()
#15 13.68 File "/tmp/pip-build-env-_umdstd6/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 480, in run_setup
#15 13.68 super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
#15 13.68 File "/tmp/pip-build-env-_umdstd6/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 311, in run_setup
#15 13.68 exec(code, locals())
#15 13.68 File "", line 28, in
#15 13.68 File "/tmp/pip-build-env-_umdstd6/overlay/lib/python3.8/site-packages/setuptools/init.py", line 103, in setup
#15 13.68 return distutils.core.setup(**attrs)
#15 13.68 File "/tmp/pip-build-env-_umdstd6/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 147, in setup
#15 13.68 _setup_distribution = dist = klass(attrs)
#15 13.68 File "/tmp/pip-build-env-_umdstd6/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 314, in init
#15 13.68 self.metadata.version = self._normalize_version(self.metadata.version)
#15 13.68 File "/tmp/pip-build-env-_umdstd6/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 350, in _normalize_version
#15 13.68 normalized = str(Version(version))
#15 13.68 File "/tmp/pip-build-env-_umdstd6/overlay/lib/python3.8/site-packages/setuptools/_vendor/packaging/version.py", line 198, in init
#15 13.68 raise InvalidVersion(f"Invalid version: '{version}'")
#15 13.68 setuptools.extern.packaging.version.InvalidVersion: Invalid version: 'v1.1.0-rc.0-283-g59b933853'
#15 13.68 [end of output]
#15 13.68
#15 13.68 note: This error originates from a subprocess, and is likely not a problem with pip.
#15 13.69 error: subprocess-exited-with-error
#15 13.69
#15 13.69 × Getting requirements to build wheel did not run successfully.
#15 13.69 │ exit code: 1
#15 13.69 ╰─> See above for output.
#15 13.69
#15 13.69 note: This error originates from a subprocess, and is likely not a problem with pip.

Error connecting to the KubeVIrt API using the client-python library

I am not sure if this is the right place to post this question but I am not able to retrieve anything by the python code. The main issue seems that it is not able to connect to the kubevirt api.

I was trying to list/get some kubevirt resources using some python code. But following error appears (posting only the error part):
021-05-17 19:08:38,589 WARNING Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7ff2c745af10>: Failed to establish a new connection: [Errno 111] Connection refused')': /apis/kubevirt.io/v1/kubevirt

ConnectionRefusedError: [Errno 111] Connection refused

urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7ff2c745ab50>: Failed to establish a new connection: [Errno 111] Connection refused

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='localhost', port=443): Max retries exceeded with url: /apis/kubevirt.io/v1/kubevirt (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7ff2c745ab50>: Failed to establish a new connection: [Errno 111] Connection refused'))

Please help me here. I am sorry if I am posting this at the wrong place.

Missing license

The Kubevirt Python client repository is missing a LICENSE file.

Path params replace broken

I'm trying to create a VirtualMachineInstance and I receive the following error:

2020-05-26 14:59:37,683 DEBUG https://10.43.0.1:443 "POST /apis/kubevirt.io/v1alpha3/namespaces/%7Bnamespace:%5Ba-z0-9%5D%5Ba-z0-9%5C-%5D*%7D/virtualmachineinstances HTTP/1.1" 404 246
2020-05-26 14:59:37,683 DEBUG response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"namespaces \"{namespace:[a-z0-9][a-z0-9\\\\-]*}\" not found","reason":"NotFound","details":{"name":"{namespace:[a-z0-9][a-z0-9\\-]*}","kind":"namespaces"},"code":404}

The call URL is not updated with a namespace.
According to this api_client.py line 122 the replace fails. If I update that line to '{%s:[a-z0-9][a-z0-9\\-]*}' % k, quote(str(v), safe=config.safe_chars_for_path_param)) the call works:

2020-05-26 15:01:31,731 DEBUG https://10.43.0.1:443 "POST /apis/kubevirt.io/v1alpha3/namespaces/nspt1/virtualmachineinstances HTTP/1.1" 201 1109
2020-05-26 15:01:31,732 DEBUG response body: {"apiVersion":"kubevirt.io/v1alpha3","kind":"VirtualMachineInstance","metadata":"trimmed output, too big"}

Missing connection validation

When using the same kubeconfig I noticed different behaviour for kuberenetes and kubevirt clients. I see when I use CoreV1Api I see that post connect verification fails with:

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='localhost', port=443): Max retries exceeded with url: /api/v1/nodes (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fb17905a790>: Failed to establish a new connection: [Errno 111] Connection refused',))

Whereas when using kubevirt's DefaultApi it is fine. I would expect that verification fails as well.

Optional Parameters for VirtualMachineSnapshot are actually Required

According to the docs here , the parameters api_version, and kind are optional. However when I try the following example code from this example and add the following spec={"source": {"api_group": "kubevirt.io", "kind": "VirtualMachine", "name": "<name of virtual machine that definitely exists>"}} to the V1alpha1VirtualMachineSnapshot() instantiation, I get the following error when I try create_namespaced_virtual_machine_snapshot(instantiated_virtual_machine_snapshot, namespace):

HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"VirtualMachineSnapshot in version \"v1alpha1\" cannot be handled as a VirtualMachineSnapshot: unmarshalerDecoder: Object 'Kind' is missing in '{\"spec\": {\"source\": {\"kind\": \"VirtualMachine\", \"api_group\": \"kubevirt.io\", \"name\": \"<name of virtual machine that definitely exists>\"}}}', error found in #10 byte of .........","reason":"BadRequest","code":400} 

To remedy this, add kind="VirtualMachineSnapshot" to the V1alpha1VirtualMachineSnapshot() instantiation.
Oh but what's this? I get the following error when I try create_namespaced_virtual_machine_snapshot(instantiated_virtual_machine_snapshot, namespace):

HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Internal error occurred: Object 'apiVersion' is missing in 'object has no apiVersion field'","reason":"InternalError","details":{"causes":[{"message":"Object 'apiVersion' is missing in 'object has no apiVersion field'"}]},"code":500}

To remedy this, I add api_version="snapshot.kubevirt.io/v1alpha1" to the V1alpha1VirtualMachineSnapshot() instantiation.
Oh but what's this? I get the following error when I try create_namespaced_virtual_machine_snapshot(instantiated_virtual_machine_snapshot, namespace):

HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"VirtualMachineSnapshot.snapshot.kubevirt.io \"\" is invalid: metadata.name: Required value: name or generateName is required","reason":"Invalid","details":{"group":"snapshot.kubevirt.io","kind":"VirtualMachineSnapshot","causes":[{"reason":"FieldValueRequired","message":"Required value: name or generateName is required","field":"metadata.name"}]},"code":422}

Wow okay, so I add metadata={"name":"<name of my virtual machine snapshot>"} to the V1alpha1VirtualMachineSnapshot() instantiation and it works. Yay 🎉

Therefore, the documentation is very misleading/incorrect and needs to be addressed.

Rename this repository

I think this repository can be renamed, I used -generated suffix to avoid conflict with other my repository.
Now once it is under kubevirt organization, we can drop that suffix, or rename it to something else.

Error connecting to KubeVirt

I follow example code, but still could not connect to kubevirt. it's working fine when using kubectl

Error log

kubevirt.rest.ApiException: (403)
Reason: Forbidden
HTTP response headers: HTTPHeaderDict({'Audit-Id': '1d0c7150-c823-4aa5-a864-4258d0f96c38', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': 'eec4da63-596f-493e-baa1-73cd12dfd211', 'X-Kubernetes-Pf-Prioritylevel-Uid': '336d1222-b538-4c5a-a13c-3218760d2b87', 'Date': 'Mon, 18 Apr 2022 05:28:35 GMT', 'Content-Length': '366'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"[virtualmachines.kubevirt.io](http://virtualmachines.kubevirt.io/) is forbidden: User \"system:anonymous\" cannot list resource \"virtualmachines\" in API group \"[kubevirt.io](http://kubevirt.io/)\" in the namespace \"{namespace:[a-z0-9][a-z0-9\\\\-]*}\"","reason":"Forbidden","details":{"group":"[kubevirt.io](http://kubevirt.io/)","kind":"virtualmachines"},"code":403}

i did check the code & found that the authorization header is missing.

Request Headers

{'Accept': 'application/json', 'User-Agent': 'Swagger-Codegen/v0.52.0-rc.0-72-g0db065c1b/python'}

the issue is on defaultAPI, auth_settings is set as empty list [], while on api_client when auth_settings is empty it'l skip the process of set up the auth header.

How to configure the client?

My cluster has a virtual machine, which I want to list with the client,But something went error

python code:

import examplelib

api = examplelib.get_client('admin')

print(api.list_namespaced_virtual_machine(namespace='default'))

get_client:

def get_client(kubeconfig):
    """
    This function loads kubeconfig and return kubevirt.DefaultApi() object.

    Args:
        kubeconfig (str): Path to kubeconfig

    Returns:
        kubevirt.DefaultApi: Instance of KubeVirt client
    """
    if kubeconfig is None:
        kubeconfig = os.environ.get("KUBECONFIG")
        if kubeconfig is None:
            kubeconfig = os.path.expanduser("~/.kube/config")
    cl = config.kube_config._get_kube_config_loader_for_yaml_file(kubeconfig)
    cl.load_and_set(kubevirt.configuration)

    return kubevirt.DefaultApi()

virtual machine:
屏幕截图 2024-03-21 184524

error:

Traceback (most recent call last):
  File "C:\Users\Administrator\PycharmProjects\thesis\virt.py", line 5, in <module>
    print(api.list_namespaced_virtual_machine(namespace='default'))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages\kubevirt_py-v0.7.0_244_gae563651-py3.11.egg\kubevirt\apis\default_api.py", line 2224, in list_namespaced_virtual_machine
  File "C:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages\kubevirt_py-v0.7.0_244_gae563651-py3.11.egg\kubevirt\apis\default_api.py", line 2313, in list_namespaced_virtual_machine_with_http_info
  File "C:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages\kubevirt_py-v0.7.0_244_gae563651-py3.11.egg\kubevirt\api_client.py", line 322, in call_api
  File "C:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages\kubevirt_py-v0.7.0_244_gae563651-py3.11.egg\kubevirt\api_client.py", line 148, in __call_api
  File "C:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages\kubevirt_py-v0.7.0_244_gae563651-py3.11.egg\kubevirt\api_client.py", line 345, in request
  File "C:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages\kubevirt_py-v0.7.0_244_gae563651-py3.11.egg\kubevirt\rest.py", line 224, in GET
  File "C:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages\kubevirt_py-v0.7.0_244_gae563651-py3.11.egg\kubevirt\rest.py", line 219, in request
kubevirt.rest.ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Audit-Id': 'be811dee-e309-41a9-b032-5f637f09bfc7', 'Cache-Control': 'no-cache, private', 'Content-Type': 'text/plain; charset=utf-8', 'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': '9cca4322-af5c-4f9f-af79-6f9970e576b7', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'efd23a03-ad9b-4ca1-b147-15a90f8a983f', 'Date': 'Thu, 21 Mar 2024 10:19:19 GMT', 'Content-Length': '19'})
HTTP response body: 404 page not found

get_api_group() doesn't work

When running following snippet of code

from kubernetes import config
import kubevirt

def get_client(kubeconfig="kubeconfig"):
    cl = config.kube_config._get_kube_config_loader_for_yaml_file(kubeconfig)
    cl.load_and_set(kubevirt.configuration)
    return kubevirt.DefaultApi()

a = get_client()
a..get_api_group()

I am getting following error

In [8]: a.get_api_group()
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-8-c822db971437> in <module>()
----> 1 a.get_api_group()

/home/lbednar/work/kubevirt-org/kubevirt-pysdk-sandbox/E/lib/python2.7/site-packages/kubevirt/apis/default_api.pyc in get_api_group(self, **kwargs)
   1279             return self.get_api_group_with_http_info(**kwargs)
   1280         else:
-> 1281             (data) = self.get_api_group_with_http_info(**kwargs)
   1282             return data
   1283 

/home/lbednar/work/kubevirt-org/kubevirt-pysdk-sandbox/E/lib/python2.7/site-packages/kubevirt/apis/default_api.pyc in get_api_group_with_http_info(self, **kwargs)
   1349                                         _preload_content=params.get('_preload_content', True),
   1350                                         _request_timeout=params.get('_request_timeout'),
-> 1351                                         collection_formats=collection_formats)
   1352 
   1353     def get_api_resources(self, **kwargs):

/home/lbednar/work/kubevirt-org/kubevirt-pysdk-sandbox/E/lib/python2.7/site-packages/kubevirt/api_client.pyc in call_api(self, resource_path, method, path_params, query_params, header_params, body, post_params, files, response_type, auth_settings, callback, _return_http_data_only, collection_formats, _preload_content, _request_timeout)
    324                                    body, post_params, files,
    325                                    response_type, auth_settings, callback,
--> 326                                    _return_http_data_only, collection_formats, _preload_content, _request_timeout)
    327         else:
    328             thread = threading.Thread(target=self.__call_api,

/home/lbednar/work/kubevirt-org/kubevirt-pysdk-sandbox/E/lib/python2.7/site-packages/kubevirt/api_client.pyc in __call_api(self, resource_path, method, path_params, query_params, header_params, body, post_params, files, response_type, auth_settings, callback, _return_http_data_only, collection_formats, _preload_content, _request_timeout)
    159             # deserialize response data
    160             if response_type:
--> 161                 return_data = self.deserialize(response_data, response_type)
    162             else:
    163                 return_data = None

/home/lbednar/work/kubevirt-org/kubevirt-pysdk-sandbox/E/lib/python2.7/site-packages/kubevirt/api_client.pyc in deserialize(self, response, response_type)
    237             data = response.data
    238 
--> 239         return self.__deserialize(data, response_type)
    240 
    241     def __deserialize(self, data, klass):

/home/lbednar/work/kubevirt-org/kubevirt-pysdk-sandbox/E/lib/python2.7/site-packages/kubevirt/api_client.pyc in __deserialize(self, data, klass)
    277             return self.__deserialize_datatime(data)
    278         else:
--> 279             return self.__deserialize_model(data, klass)
    280 
    281     def call_api(self, resource_path, method,

/home/lbednar/work/kubevirt-org/kubevirt-pysdk-sandbox/E/lib/python2.7/site-packages/kubevirt/api_client.pyc in __deserialize_model(self, data, klass)
    629                 kwargs[attr] = self.__deserialize(value, attr_type)
    630 
--> 631         instance = klass(**kwargs)
    632 
    633         return instance

/home/lbednar/work/kubevirt-org/kubevirt-pysdk-sandbox/E/lib/python2.7/site-packages/kubevirt/models/v1_api_group.pyc in __init__(self, api_version, kind, name, preferred_version, server_address_by_client_cid_rs, versions)
     68         if preferred_version is not None:
     69           self.preferred_version = preferred_version
---> 70         self.server_address_by_client_cid_rs = server_address_by_client_cid_rs
     71         self.versions = versions
     72 

/home/lbednar/work/kubevirt-org/kubevirt-pysdk-sandbox/E/lib/python2.7/site-packages/kubevirt/models/v1_api_group.pyc in server_address_by_client_cid_rs(self, server_address_by_client_cid_rs)
    186         """
    187         if server_address_by_client_cid_rs is None:
--> 188             raise ValueError("Invalid value for `server_address_by_client_cid_rs`, must not be `None`")
    189 
    190         self._server_address_by_client_cid_rs = server_address_by_client_cid_rs

ValueError: Invalid value for `server_address_by_client_cid_rs`, must not be `None`

Repository is being updated on every commit which is made into KubeVirt

Because the VERSION variable affects 6 files in this repository, we need to make sure that it gets updated only when something was changed in API.

Example of empty commit (without any API change) 94e8994

It is because of these following files:

  • kubevirt/api_client.py
    • line 76 self.user_agent = 'Swagger-Codegen/v0.2.0-380-ga8fad1a9/python'
  • kubevirt/configuration.py
    • line 223 "SDK Package Version: v0.2.0-380-ga8fad1a9"

Patch method for VM fails

Hi,

I've been trying to make the method patch_namespaced_virtual_machine but seems it's not setting the proper headers, more precisely Content-Type.

The following error is returned from the API:

"(500)\nReason: Internal Server Error\nHTTP response headers: HTTPHeaderDict({'Date': 'Fri, 06 Jul 2018 09:05:52 GMT', 'Content-Length': '160', 'Content-Type': 'application/json', 'Cache-Control': '$
o-store'})\nHTTP response body: {\"kind\":\"Status\",\"apiVersion\":\"v1\",\"metadata\":{},\"status\":\"Failure\",\"message\":\"json: cannot unmarshal object into Go value of type jsonpatch.Patch\",\"code\":500}$n\n"

I've been looking to Kubernetes python client and it's setting headers for JSONPatch.

Doing some testing myself, I've added the following snippet:

if re.search('json', headers['Content-Type'], re.IGNORECASE):
    if headers['Content-Type'] == 'application/json-patch+json':
        if not isinstance(body, list):
            headers['Content-Type'] = 'application/merge-patch+json'

After this block and it worked.

As the error comes from the RESTClient, I think it's likely patch will fail for the other KubeVirt resources as well.

No auth headers

Hi,

I'm trying to use the API but with a service account and not kubeconfig:

from os import environ
import kubevirt


with open('/run/secrets/kubernetes.io/serviceaccount/token', 'r') as file:
    token = file.read()

kubevirt.configuration.api_key['authorization'] = token
kubevirt.configuration.api_key_prefix['authorization'] = 'Bearer'
kubevirt.configuration.ssl_ca_cert = '/run/secrets/kubernetes.io/serviceaccount/ca.crt'
kubevirt.configuration.host = f'https://{environ["KUBERNETES_SERVICE_HOST"]}'
kubevirt.configuration.debug = True
kubevirt_api = kubevirt.DefaultApi()

kubevirt_api.check_health()

It failed with:

send: b'GET /apis/subresources.kubevirt.io/v1alpha3/healthz HTTP/1.1\r\nHost: 10.43.0.1\r\nAccept-Encoding: identity\r\nAccept: application/json\r\nContent-Type: application/json\r\nUser-Agent: Swagger-Codegen/v0.29.0-78-g5de00f25/python\r\n\r\n'
reply: 'HTTP/1.1 401 Unauthorized\r\n'

I manually inserted auth token in rest.py at line 129: headers['Authorization'] = f'Bearer {token}'
Now the API calls are working fine:

send: b'GET /apis/subresources.kubevirt.io/v1alpha3/healthz HTTP/1.1\r\nHost: 10.43.0.1\r\nAccept-Encoding: identity\r\nAccept: application/json\r\nContent-Type: application/json\r\nUser-Agent: Swagger-Codegen/v0.29.0-78-g5de00f25/python\r\nAuthorization: Bearer TOKEN\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
2020-05-26 12:55:40,797 DEBUG https://10.43.0.1:443 "GET /apis/subresources.kubevirt.io/v1alpha3/healthz HTTP/1.1" 200 334
2020-05-26 12:55:40,797 DEBUG response body: {
 "apiserver": {
  "connectivity": "ok",
  "version": {
   "buildDate": "2020-04-16T11:35:47Z",
   "compiler": "gc",
   "gitCommit": "e0fccafd69541e3750d460ba0f9743b90336f24f",
   "gitTreeState": "clean",
   "gitVersion": "v1.17.5",
   "goVersion": "go1.13.9",
   "major": "1",
   "minor": "17",
   "platform": "linux/amd64"
  }
 }
}

Is this how the configuration auth details should be set?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.