StarlingX System Configuration Management
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
config/sysinv/cgts-client/cgts-client/cgtsclient/v1/kube_config_kubelet_shell.py

29 lines
740 B

#
# Copyright (c) 2022 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# All Rights Reserved.
#
from cgtsclient import exc
def do_kube_config_kubelet(cc, args):
"""Apply the kubelet config."""
try:
response = cc.kube_config_kubelet.apply()
except exc.HTTPNotFound:
raise exc.CommandError('Failed to apply kubelet config. No response.')
except Exception as e:
raise exc.CommandError('Failed to apply kubelet config: %s' % (e))
else:
success = response.get('success')
error = response.get('error')
if success:
print("Success: " + success)
if error:
print("Error: " + error)