示例#1
0
    def _get_namespace_labels(pod_namespace):
        labels = {}

        # Get the explicit labels on a pod.
        ns = NamespaceKM.find_by_name_or_uuid(pod_namespace)
        if ns and ns.labels:
            labels = dict(ns.labels)

        # Append the implicit namespace tag to a pod.
        labels['namespace'] = pod_namespace

        return labels
示例#2
0
    def _get_namespace_labels(pod_namespace):
        labels = {}

        # Get the explicit labels on a pod.
        ns = NamespaceKM.find_by_name_or_uuid(pod_namespace)
        if ns and ns.labels:
            labels = dict(ns.labels)

        # Append the implicit namespace tag to a pod.
        labels['namespace'] = pod_namespace

        return labels
 def _get_namespace(self, ns_name):
     return NamespaceKM.find_by_name_or_uuid(ns_name)
 def _get_namespace(self, ns_name):
     """
     Get namesapce object from cache.
     """
     return NamespaceKM.find_by_name_or_uuid(ns_name)
 def _get_namespace(pod_namespace):
     return NamespaceKM.find_by_name_or_uuid(pod_namespace)
示例#6
0
 def _get_namespace(service_namespace):
     return NamespaceKM.find_by_name_or_uuid(service_namespace)
示例#7
0
 def _get_namespace(pod_namespace):
     return NamespaceKM.find_by_name_or_uuid(pod_namespace)
 def _get_namespace(self, ns_name):
     """
     Get namesapce object from cache.
     """
     return NamespaceKM.find_by_name_or_uuid(ns_name)
 def _get_namespace(self, ns_name):
     return NamespaceKM.find_by_name_or_uuid(ns_name)
示例#10
0
 def _get_namespace(service_namespace):
     return NamespaceKM.find_by_name_or_uuid(service_namespace)