Merge branch 'stable-3.0' into stable-3.1

* stable-3.0:
  Doc: Fix SSH keys documentation
  REST: Fix bad content type description
  Add reference to remove-notedb-refs.sh script

Change-Id: I3f541bb89ca7df8b4392a42de5bdd4b033408ebc
This commit is contained in:
David Pursehouse 2019-12-02 10:28:16 +09:00
commit 677b9f4759
4 changed files with 17 additions and 10 deletions

View File

@ -192,3 +192,10 @@ section serves primarily as a reference.
of all changes in NoteDb is accurate, and so is only safe once all changes are
NoteDb primary. Otherwise, reading changes only from NoteDb might result in
inaccurate results, and writing to NoteDb would compound the problem. +
== NoteDB to ReviewDB rollback
In case of rollback from NoteDB to ReviewDB, all the meta refs and the
sequence ref need to be removed.
The [remove-notedb-refs.sh](https://gerrit.googlesource.com/gerrit/+/refs/heads/master/contrib/remove-notedb-refs.sh)
script has been written to automate this process.

View File

@ -733,8 +733,8 @@ link:#ssh-key-info[SshKeyInfo] entities.
[
{
"seq": 1,
"ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw\u003d\u003d john.doe@example.com",
"encoded_key": "AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw\u003d\u003d",
"ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw== john.doe@example.com",
"encoded_key": "AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw==",
"algorithm": "ssh-rsa",
"comment": "john.doe@example.com",
"valid": true
@ -767,8 +767,8 @@ describes the SSH key.
)]}'
{
"seq": 1,
"ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw\u003d\u003d john.doe@example.com",
"encoded_key": "AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw\u003d\u003d",
"ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw== john.doe@example.com",
"encoded_key": "AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw==",
"algorithm": "ssh-rsa",
"comment": "john.doe@example.com",
"valid": true
@ -791,9 +791,9 @@ key is persisted.
.Request
----
POST /accounts/self/sshkeys HTTP/1.0
Content-Type: plain/text
Content-Type: text/plain
AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw\u003d\u003d
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw== john.doe@example.com
----
As response an link:#ssh-key-info[SshKeyInfo] entity is returned that
@ -808,8 +808,8 @@ describes the new SSH key.
)]}'
{
"seq": 2,
"ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw\u003d\u003d john.doe@example.com",
"encoded_key": "AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw\u003d\u003d",
"ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw== john.doe@example.com",
"encoded_key": "AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw==",
"algorithm": "ssh-rsa",
"comment": "john.doe@example.com",
"valid": true

View File

@ -275,7 +275,7 @@ final class SetAccountCommand extends SshCommand {
throws RestApiException, IOException, ConfigInvalidException, PermissionBackendException {
for (String sshKey : sshKeys) {
SshKeyInput in = new SshKeyInput();
in.raw = RawInputUtil.create(sshKey.getBytes(UTF_8), "plain/text");
in.raw = RawInputUtil.create(sshKey.getBytes(UTF_8), "text/plain");
addSshKey.apply(rsrc, in);
}
}

View File

@ -2342,7 +2342,7 @@
method: 'POST',
url: '/accounts/self/sshkeys',
body: key,
contentType: 'plain/text',
contentType: 'text/plain',
reportUrlAsIs: true,
};
return this._restApiHelper.send(req)