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_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)
def _get_namespace(service_namespace): return NamespaceKM.find_by_name_or_uuid(service_namespace)
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)
def _get_namespace(service_namespace): return NamespaceKM.find_by_name_or_uuid(service_namespace)