Deduplicate keypair notification samples

This patch refactors the sample files of keypair-create, keypair-delete
and keypair-import notifications to use a common KeypairPayload sample
data.

Change-Id: Ic8f2d51fe4922cd7633b0d77dc86702798bae1d6
This commit is contained in:
Előd Illés 2017-11-20 16:30:21 +01:00
parent 57bf7f49cf
commit de9ce26c73
7 changed files with 20 additions and 63 deletions

View File

@ -0,0 +1,12 @@
{
"nova_object.version": "1.0",
"nova_object.namespace": "nova",
"nova_object.name": "KeypairPayload",
"nova_object.data": {
"user_id": "fake",
"name": "my-key",
"fingerprint": "1e:2c:9b:56:79:4b:45:77:f9:ca:7a:98:2c:b0:d5:3c",
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDx8nkQv/zgGgB4rMYmIf+6A4l6Rr+o/6lHBQdW5aYd44bd8JttDCE/F/pNRr0lRE+PiqSPO8nDPHw0010JeMH9gYgnnFlyY3/OcJ02RhIPyyxYpv9FhY+2YiUkpwFOcLImyrxEsYXpD/0d3ac30bNH6Sw9JD9UZHYcpSxsIbECHw== Generated-by-Nova",
"type": "ssh"
}
}

View File

@ -1,17 +1,6 @@
{
"priority": "INFO",
"payload": {
"nova_object.version": "1.0",
"nova_object.namespace": "nova",
"nova_object.name": "KeypairPayload",
"nova_object.data": {
"user_id": "fake",
"name": "my-key",
"fingerprint": "1e:2c:9b:56:79:4b:45:77:f9:ca:7a:98:2c:b0:d5:3c",
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDx8nkQv/zgGgB4rMYmIf+6A4l6Rr+o/6lHBQdW5aYd44bd8JttDCE/F/pNRr0lRE+PiqSPO8nDPHw0010JeMH9gYgnnFlyY3/OcJ02RhIPyyxYpv9FhY+2YiUkpwFOcLImyrxEsYXpD/0d3ac30bNH6Sw9JD9UZHYcpSxsIbECHw== Generated-by-Nova",
"type": "ssh"
}
},
"payload": {"$ref": "common_payloads/KeypairPayload.json#"},
"event_type": "keypair.create.end",
"publisher_id": "nova-api:fake-mini"
}

View File

@ -1,15 +1,10 @@
{
"priority": "INFO",
"payload": {
"nova_object.version": "1.0",
"nova_object.namespace": "nova",
"nova_object.name": "KeypairPayload",
"$ref": "common_payloads/KeypairPayload.json#",
"nova_object.data": {
"user_id": "fake",
"name": "my-key",
"fingerprint": null,
"public_key": null,
"type": "ssh"
"public_key": null
}
},
"event_type": "keypair.create.start",

View File

@ -1,17 +1,6 @@
{
"priority": "INFO",
"payload": {
"nova_object.version": "1.0",
"nova_object.namespace": "nova",
"nova_object.name": "KeypairPayload",
"nova_object.data": {
"user_id": "fake",
"name": "my-key",
"fingerprint": "1e:2c:9b:56:79:4b:45:77:f9:ca:7a:98:2c:b0:d5:3c",
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDx8nkQv/zgGgB4rMYmIf+6A4l6Rr+o/6lHBQdW5aYd44bd8JttDCE/F/pNRr0lRE+PiqSPO8nDPHw0010JeMH9gYgnnFlyY3/OcJ02RhIPyyxYpv9FhY+2YiUkpwFOcLImyrxEsYXpD/0d3ac30bNH6Sw9JD9UZHYcpSxsIbECHw== Generated-by-Nova",
"type": "ssh"
}
},
"payload": {"$ref": "common_payloads/KeypairPayload.json#"},
"event_type": "keypair.delete.end",
"publisher_id": "nova-api:fake-mini"
}

View File

@ -1,17 +1,6 @@
{
"priority": "INFO",
"payload": {
"nova_object.version": "1.0",
"nova_object.namespace": "nova",
"nova_object.name": "KeypairPayload",
"nova_object.data": {
"user_id": "fake",
"name": "my-key",
"fingerprint": "1e:2c:9b:56:79:4b:45:77:f9:ca:7a:98:2c:b0:d5:3c",
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDx8nkQv/zgGgB4rMYmIf+6A4l6Rr+o/6lHBQdW5aYd44bd8JttDCE/F/pNRr0lRE+PiqSPO8nDPHw0010JeMH9gYgnnFlyY3/OcJ02RhIPyyxYpv9FhY+2YiUkpwFOcLImyrxEsYXpD/0d3ac30bNH6Sw9JD9UZHYcpSxsIbECHw== Generated-by-Nova",
"type": "ssh"
}
},
"payload": {"$ref": "common_payloads/KeypairPayload.json#"},
"event_type": "keypair.delete.start",
"publisher_id": "nova-api:fake-mini"
}

View File

@ -1,17 +1,6 @@
{
"priority": "INFO",
"payload": {
"nova_object.version": "1.0",
"nova_object.namespace": "nova",
"nova_object.name": "KeypairPayload",
"nova_object.data": {
"user_id": "fake",
"name": "my-key",
"fingerprint": "1e:2c:9b:56:79:4b:45:77:f9:ca:7a:98:2c:b0:d5:3c",
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDx8nkQv/zgGgB4rMYmIf+6A4l6Rr+o/6lHBQdW5aYd44bd8JttDCE/F/pNRr0lRE+PiqSPO8nDPHw0010JeMH9gYgnnFlyY3/OcJ02RhIPyyxYpv9FhY+2YiUkpwFOcLImyrxEsYXpD/0d3ac30bNH6Sw9JD9UZHYcpSxsIbECHw== Generated-by-Nova",
"type": "ssh"
}
},
"payload": {"$ref": "common_payloads/KeypairPayload.json#"},
"event_type": "keypair.import.end",
"publisher_id": "nova-api:fake-mini"
}

View File

@ -1,15 +1,9 @@
{
"priority": "INFO",
"payload": {
"nova_object.version": "1.0",
"nova_object.namespace": "nova",
"nova_object.name": "KeypairPayload",
"$ref": "common_payloads/KeypairPayload.json#",
"nova_object.data": {
"user_id": "fake",
"name": "my-key",
"fingerprint": null,
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDx8nkQv/zgGgB4rMYmIf+6A4l6Rr+o/6lHBQdW5aYd44bd8JttDCE/F/pNRr0lRE+PiqSPO8nDPHw0010JeMH9gYgnnFlyY3/OcJ02RhIPyyxYpv9FhY+2YiUkpwFOcLImyrxEsYXpD/0d3ac30bNH6Sw9JD9UZHYcpSxsIbECHw== Generated-by-Nova",
"type": "ssh"
"fingerprint": null
}
},
"event_type": "keypair.import.start",