def list_databases(self, limit=None, marker=None, include_marker=False): dblist_page, next_marker = pagination.paginate_list( self._get_database_names(), limit, marker, include_marker) result = [ models.OracleSchema(name).serialize() for name in dblist_page ] return result, next_marker
def list_users(self, context, limit=None, marker=None, include_marker=False): users = [user.serialize() for user in self._list_buckets()] return pagination.paginate_list(users, limit, marker, include_marker)
def list_users(self, limit=None, marker=None, include_marker=False): LOG.debug("Listing users (limit of %s, marker %s, " "%s marker)." % (limit, marker, ('including' if include_marker else 'not including'))) user_names = [] with self.cursor(self.database_name) as cursor: q = sql_query.Query(columns=['GRANTEE'], tables=['DBA_ROLE_PRIVS'], where=[ "GRANTED_ROLE = '%s'" % self.cloud_role_name, "GRANTEE != 'SYS'" ]) cursor.execute(str(q)) for row in cursor: user_names.append(row[0]) user_list_page, next_marker = pagination.paginate_list( list(set(user_names)), limit, marker, include_marker) users_page = [] for user_name in user_list_page: user = models.OracleUser(user_name) user.databases = self.database_name users_page.append(user.serialize()) LOG.debug("Successfully listed users. " "Users: %s (next marker %s)." % (user_list_page, next_marker)) return users_page, marker
def list_databases(self, context, limit=None, marker=None, include_marker=False): with CassandraLocalhostConnection(self.__admin_user) as client: databases = [keyspace.serialize() for keyspace in self._get_available_keyspaces(client)] return pagination.paginate_list(databases, limit, marker, include_marker)
def list_users(self, limit=None, marker=None, include_marker=False): LOG.debug("Listing users (limit of %s, marker %s, " "%s marker)." % (limit, marker, ('including' if include_marker else 'not including'))) user_names = [] with self.cursor(self.database_name) as cursor: q = sql_query.Query( columns=['GRANTEE'], tables=['DBA_ROLE_PRIVS'], where=["GRANTED_ROLE = '%s'" % self.cloud_role_name, "GRANTEE != 'SYS'"] ) cursor.execute(str(q)) for row in cursor: user_names.append(row[0]) user_list_page, next_marker = pagination.paginate_list( list(set(user_names)), limit, marker, include_marker) users_page = [] for user_name in user_list_page: user = models.OracleUser(user_name) user.databases = self.database_name users_page.append(user.serialize()) LOG.debug("Successfully listed users. " "Users: %s (next marker %s)." % (user_list_page, next_marker)) return users_page, marker
def list_users(self, context, limit=None, marker=None, include_marker=False): """ List all non-superuser accounts. Omit names on the ignored list. Return an empty set if None. """ users = [user.serialize() for user in self._get_listed_users(self.client)] return pagination.paginate_list(users, limit, marker, include_marker)
def list_databases(self, limit=None, marker=None, include_marker=False): """Lists the databases.""" db_names = self.list_database_names() for hidden in IGNORED_DBS: if hidden in db_names: db_names.remove(hidden) databases = [models.MongoDBSchema(db_name).serialize() for db_name in db_names] LOG.debug("databases = " + str(databases)) return pagination.paginate_list(databases, limit, marker, include_marker)
def list_databases(self, limit=None, marker=None, include_marker=False): '''Lists all the CouchDB databases.''' databases = [] db_names = self.list_database_names() pag_dblist, marker = pagination.paginate_list(db_names, limit, marker, include_marker) databases = [models.CouchDBSchema(db_name).serialize() for db_name in pag_dblist] LOG.debug('databases = ' + str(databases)) return databases, marker
def list_users(self, context, limit=None, marker=None, include_marker=False): """ List all non-superuser accounts. Omit names on the ignored list. Return an empty set if None. """ with CassandraLocalhostConnection(self.__admin_user) as client: users = [user.serialize() for user in self._get_listed_users(client)] return pagination.paginate_list(users, limit, marker, include_marker)
def list_databases(self, limit=None, marker=None, include_marker=False): """Lists the databases.""" db_names = self.list_database_names() for hidden in cfg.get_ignored_dbs(manager=MANAGER): if hidden in db_names: db_names.remove(hidden) databases = [models.MongoDBSchema(db_name).serialize() for db_name in db_names] LOG.debug('databases = ' + str(databases)) return pagination.paginate_list(databases, limit, marker, include_marker)
def list_databases(self, limit=None, marker=None, include_marker=False): """Lists the databases.""" db_names = self.list_database_names() for hidden in IGNORED_DBS: if hidden in db_names: db_names.remove(hidden) databases = [models.MongoDBSchema(db_name).serialize() for db_name in db_names] LOG.debug('databases = ' + str(databases)) return pagination.paginate_list(databases, limit, marker, include_marker)
def list_users(self, limit=None, marker=None, include_marker=False): """Get a list of all users.""" users = [] with MongoDBClient(self._admin_user()) as admin_client: for user_info in admin_client.admin.system.users.find(): user = models.MongoDBUser(name=user_info['_id']) user.roles = user_info['roles'] if self._is_modifiable_user(user.name): users.append(user.serialize()) LOG.debug('users = ' + str(users)) return pagination.paginate_list(users, limit, marker, include_marker)
def list_users(self, limit=None, marker=None, include_marker=False): """Get a list of all users.""" users = [] with MongoDBClient(self._admin_user()) as admin_client: for user_info in admin_client.admin.system.users.find(): user = models.MongoDBUser(name=user_info["_id"]) user.roles = user_info["roles"] if user.name not in IGNORED_USERS: users.append(user.serialize()) LOG.debug("users = " + str(users)) return pagination.paginate_list(users, limit, marker, include_marker)
def list_databases(self, context, limit=None, marker=None, include_marker=False): with CassandraLocalhostConnection(self.__admin_user) as client: databases = [ keyspace.serialize() for keyspace in self._get_available_keyspaces(client) ] return pagination.paginate_list(databases, limit, marker, include_marker)
def _list_databases(self, limit=None, marker=None, include_marker=False): LOG.debug("Listing databases (limit of %s, marker %s, " "%s marker)." % (limit, marker, ('including' if include_marker else 'not including'))) db_list_page, next_marker = pagination.paginate_list( self._get_database_names(), limit, marker, include_marker) result = [models.OracleSchema(name).serialize() for name in db_list_page] LOG.debug("Successfully listed databases. " "Databases: %s (next marker %s)." % (db_list_page, next_marker)) return result, next_marker
def _list_databases(self, limit=None, marker=None, include_marker=False): LOG.debug("Listing databases (limit of %s, marker %s, " "%s marker)." % (limit, marker, ('including' if include_marker else 'not including'))) db_list_page, next_marker = pagination.paginate_list( self._get_database_names(), limit, marker, include_marker) result = [ models.OracleSchema(name).serialize() for name in db_list_page ] LOG.debug("Successfully listed databases. " "Databases: %s (next marker %s)." % (db_list_page, next_marker)) return result, next_marker
def list_users(self, context, limit=None, marker=None, include_marker=False): """ List all non-superuser accounts. Omit names on the ignored list. Return an empty set if None. """ with CassandraLocalhostConnection(self.__admin_user) as client: users = [ user.serialize() for user in self._get_listed_users(client) ] return pagination.paginate_list(users, limit, marker, include_marker)
def list_databases(self, limit=None, marker=None, include_marker=False): dblist_page, next_marker = pagination.paginate_list( self._get_database_names(), limit, marker, include_marker) result = [models.OracleSchema(name).serialize() for name in dblist_page] return result, next_marker
def list_databases(self, context, limit=None, marker=None, include_marker=False): databases = [keyspace.serialize() for keyspace in self._get_available_keyspaces(self.client)] return pagination.paginate_list(databases, limit, marker, include_marker)
def _do_paginate_list(self, limit=None, marker=None, include_marker=False): li = ['a', 'b', 'c', 'd', 'e'] return pagination.paginate_list(li, limit, marker, include_marker)