예제 #1
0
class NamespaceApp(object):
    def __init__(self):
        self._ns_manager = NamespaceManager()

    def list_namespaces(self):
        return self._ns_manager.get_all_namespaces()

    def get_namespace(self, namespace):
        return self._ns_manager.get_namespace(namespace)

    def list_namespaces_ips(self):
        return self._ns_manager.get_all_namespaces_ips()

    def discover_namespaces(self):
        self._ns_manager.discover_namespaces()
예제 #2
0
 def rediscover_namespaces(self):
     self._ns_list, self._ns_iterface_map = None, None
     mngr = NamespaceManager()
     mngr.discover_namespaces()
     self._ns_list = mngr.get_all_namespaces()
     self._ns_iterface_map = mngr.get_namespace_interface_map()