当前位置: 首页>>代码示例>>Python>>正文


Python VncKubernetesConfig.label_cache方法代码示例

本文整理汇总了Python中vnc_kubernetes_config.VncKubernetesConfig.label_cache方法的典型用法代码示例。如果您正苦于以下问题:Python VncKubernetesConfig.label_cache方法的具体用法?Python VncKubernetesConfig.label_cache怎么用?Python VncKubernetesConfig.label_cache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vnc_kubernetes_config.VncKubernetesConfig的用法示例。


在下文中一共展示了VncKubernetesConfig.label_cache方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from vnc_kubernetes_config import VncKubernetesConfig [as 别名]
# 或者: from vnc_kubernetes_config.VncKubernetesConfig import label_cache [as 别名]
 def __init__(self, network_policy_mgr):
     self._k8s_event_type = 'Namespace'
     super(VncNamespace,self).__init__(self._k8s_event_type)
     self._name = type(self).__name__
     self._network_policy_mgr = network_policy_mgr
     self._vnc_lib = vnc_kube_config.vnc_lib()
     self._ns_sg = {}
     self._label_cache = vnc_kube_config.label_cache()
     self._logger = vnc_kube_config.logger()
     self._queue = vnc_kube_config.queue()
开发者ID:cijohnson,项目名称:contrail-controller,代码行数:12,代码来源:vnc_namespace.py

示例2: __init__

# 需要导入模块: from vnc_kubernetes_config import VncKubernetesConfig [as 别名]
# 或者: from vnc_kubernetes_config.VncKubernetesConfig import label_cache [as 别名]
 def __init__(self):
     super(VncNetworkPolicy,self).__init__('NetworkPolicy')
     self._name = type(self).__name__
     self._queue = vnc_kube_config.queue()
     self._ingress_ns_label_cache = {}
     self._ingress_pod_label_cache = {}
     self._np_pod_label_cache = {}
     self._default_ns_sgs = {}
     self._vnc_lib = vnc_kube_config.vnc_lib()
     self._label_cache = vnc_kube_config.label_cache()
     self._build_np_cache()
     self._logger = vnc_kube_config.logger()
     self._logger.info("VncNetworkPolicy init done.")
开发者ID:cijohnson,项目名称:contrail-controller,代码行数:15,代码来源:vnc_network_policy.py

示例3: __init__

# 需要导入模块: from vnc_kubernetes_config import VncKubernetesConfig [as 别名]
# 或者: from vnc_kubernetes_config.VncKubernetesConfig import label_cache [as 别名]
    def __init__(self, ingress_mgr):
        self._k8s_event_type = 'Service'
        super(VncService,self).__init__(self._k8s_event_type)
        self._name = type(self).__name__
        self._ingress_mgr = ingress_mgr
        self._vnc_lib = vnc_kube_config.vnc_lib()
        self._label_cache = vnc_kube_config.label_cache()
        self._labels = XLabelCache(self._k8s_event_type)
        self._labels.reset_resource()
        self._args = vnc_kube_config.args()
        self.logger = vnc_kube_config.logger()
        self._queue = vnc_kube_config.queue()
        self.kube = vnc_kube_config.kube()
        self._fip_pool_obj = None

        # Cache kubernetes API server params.
        self._kubernetes_api_server = self._args.kubernetes_api_server
        self._kubernetes_api_secure_port =\
            int(self._args.kubernetes_api_secure_port)

        # Cache kuberneter service name.
        self._kubernetes_service_name = self._args.kubernetes_service_name

        # Config knob to control enable/disable of link local service.
        if self._args.api_service_link_local == 'True':
            api_service_ll_enable = True
        else:
            api_service_ll_enable = False

        # If Kubernetes API server info is incomplete, disable link-local create,
        # as create is not possible.
        if not self._kubernetes_api_server:
            self._create_linklocal = False
        elif vnc_kube_config.is_cluster_network_configured() and\
             DBBaseKM.is_nested():
            # In nested mode, if cluster network is configured, then the k8s api
            # server is in the same network as the k8s cluster. So there is no
            # need for link local.
            self._create_linklocal = False
        else:
            self._create_linklocal = api_service_ll_enable

        self.service_lb_mgr = importutils.import_object(
            'kube_manager.vnc.loadbalancer.ServiceLbManager')
        self.service_ll_mgr = importutils.import_object(
            'kube_manager.vnc.loadbalancer.ServiceLbListenerManager')
        self.service_lb_pool_mgr = importutils.import_object(
            'kube_manager.vnc.loadbalancer.ServiceLbPoolManager')
        self.service_lb_member_mgr = importutils.import_object(
            'kube_manager.vnc.loadbalancer.ServiceLbMemberManager')
开发者ID:Juniper,项目名称:contrail-controller,代码行数:52,代码来源:vnc_service.py

示例4: __init__

# 需要导入模块: from vnc_kubernetes_config import VncKubernetesConfig [as 别名]
# 或者: from vnc_kubernetes_config.VncKubernetesConfig import label_cache [as 别名]
 def __init__(self):
     self._k8s_event_type = 'Ingress'
     super(VncIngress,self).__init__(self._k8s_event_type)
     self._name = type(self).__name__
     self._args = vnc_kube_config.args()
     self._queue = vnc_kube_config.queue()
     self._vnc_lib = vnc_kube_config.vnc_lib()
     self._logger = vnc_kube_config.logger()
     self._kube = vnc_kube_config.kube()
     self._label_cache = vnc_kube_config.label_cache()
     self._service_fip_pool = vnc_kube_config.service_fip_pool()
     self._ingress_label_cache = {}
     self._default_vn_obj = None
     self._fip_pool_obj = None
     self.service_lb_mgr = ServiceLbManager()
     self.service_ll_mgr = ServiceLbListenerManager()
     self.service_lb_pool_mgr = ServiceLbPoolManager()
     self.service_lb_member_mgr = ServiceLbMemberManager()
开发者ID:cijohnson,项目名称:contrail-controller,代码行数:20,代码来源:vnc_ingress.py


注:本文中的vnc_kubernetes_config.VncKubernetesConfig.label_cache方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。