示例#1
0
    def test_list(self):
        connection = Connection.make_connection(tc.hostname, tc.admin,
                                                tc.password)

        names = Server.list(connection)
        self.assertGreater(len(names), 3)
        self.assertIn("Default|Manage", names)
示例#2
0
    def servers(self, connection=None):
        """
        Get a list of the servers in the local cluster.
        """
        if connection is None:
            connection = self.connection

        return Server.list(connection)
示例#3
0
    def servers(self, connection=None):
        """
        Get a list of the servers in the local cluster.
        """
        if connection is None:
            connection = self.connection

        return Server.list(connection)
示例#4
0
    def list(self, args, config, connection):
        stype = args['type']
        if stype == None:
            slist = Server.list(connection)
        elif stype == 'http':
            slist = HttpServer.list(connection)
        elif stype == 'odbc':
            slist = OdbcServer.list(connection)
        elif stype == 'xdbc':
            slist = XdbcServer.list(connection)
        elif stype == 'webdav':
            slist = WebDAVServer.list(connection)
        else:
            print("Unexpected server type: {0}".format(stype))
            sys.exit(1)

        names = []
        for key in slist:
            (group,name) = key.split('|')
            if group == args['group']:
                names.append(name)

        print(json.dumps(names,sort_keys=True, indent=2))
示例#5
0
    def list(self, args, config, connection):
        stype = args['type']
        if stype == None:
            slist = Server.list(connection)
        elif stype == 'http':
            slist = HttpServer.list(connection)
        elif stype == 'odbc':
            slist = OdbcServer.list(connection)
        elif stype == 'xdbc':
            slist = XdbcServer.list(connection)
        elif stype == 'webdav':
            slist = WebDAVServer.list(connection)
        else:
            print("Unexpected server type: {0}".format(stype))
            sys.exit(1)

        names = []
        for key in slist:
            (group, name) = key.split('|')
            if group == args['group']:
                names.append(name)

        print(json.dumps(names, sort_keys=True, indent=2))
    def servers(self, connection=None):
        if connection is None:
            connection = self.connection

        return Server.list(connection)
示例#7
0
    def servers(self, connection=None):
        if connection is None:
            connection = self.connection

        return Server.list(connection)
示例#8
0
    def test_list(self):
        connection = Connection.make_connection(tc.hostname, tc.admin, tc.password)

        names = Server.list(connection)
        self.assertGreater(len(names), 3)
        self.assertIn("Default|Manage", names)
示例#9
0
 def test_list(self):
     names = Server.list(self.connection)
     assert len(names) > 3
     assert "Default|Manage" in names
示例#10
0
 def test_list(self):
     names = Server.list(self.connection)
     assert len(names) > 3
     assert "Default|Manage" in names