本文整理汇总了Python中kube_manager.vnc.vnc_kubernetes_config.VncKubernetesConfig.get_configured_project_name方法的典型用法代码示例。如果您正苦于以下问题:Python VncKubernetesConfig.get_configured_project_name方法的具体用法?Python VncKubernetesConfig.get_configured_project_name怎么用?Python VncKubernetesConfig.get_configured_project_name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kube_manager.vnc.vnc_kubernetes_config.VncKubernetesConfig
的用法示例。
在下文中一共展示了VncKubernetesConfig.get_configured_project_name方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from kube_manager.vnc.vnc_kubernetes_config import VncKubernetesConfig [as 别名]
# 或者: from kube_manager.vnc.vnc_kubernetes_config.VncKubernetesConfig import get_configured_project_name [as 别名]
def __init__(self):
self._name = type(self).__name__
self._vnc_lib = vnc_kube_config.vnc_lib()
self._logger = vnc_kube_config.logger()
self.proj_obj = None
proj_name = vnc_kube_config.get_configured_project_name()
if not vnc_kube_config.is_global_tags() and proj_name:
proj_fq_name = vnc_kube_config.cluster_project_fq_name()
try:
self.proj_obj = self._vnc_lib.project_read(fq_name=proj_fq_name)
except NoIdError as e:
self._logger.error(
"Unable to locate project object for [%s]"
". Error [%s]" %\
(proj_fq_name, str(e)))
self._logger.debug(
"All tags for this cluster will created with be in "
"global space as project object was not found.")
else:
self._logger.debug(
"All tags will be created within the scope of project [%s]"%\
(proj_fq_name))