Example #1
0
    def update_attributes(self, context, username, hostname, user_attrs):
        new_name = user_attrs.get('name')
        if new_name:
            raise exception.UnprocessableEntity(_("Users cannot be renamed."))

        new_password = user_attrs.get('password')
        if new_password:
            user = models.CouchbaseUser(username, password=new_password)
            self._edit_bucket(user)
Example #2
0
 def get_cluster_admin(self):
     cluster_password = CouchbaseRootAccess.get_password()
     return models.CouchbaseUser(self._ADMIN_USER, cluster_password)
Example #3
0
 def _list_buckets(self):
     bucket_list = self.run_bucket_list()
     return [
         models.CouchbaseUser(item)
         for item in self._parse_bucket_list(bucket_list)
     ]