forked from kubevirt/kubevirt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hooks: add hooks api proto specification
- Loading branch information
Showing
10 changed files
with
333 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
syntax = "proto3"; | ||
|
||
package kubevirt.hooks.v1alpha; | ||
|
||
service Hook { | ||
rpc Info (InfoParams) returns (InfoResult); | ||
rpc OnDefineDomain (OnDefineDomainParams) returns (OnDefineDomainResult); | ||
} | ||
|
||
message InfoParams { | ||
// supportedVersions is a list of versions supported by client | ||
repeated string supportedVersions = 1; | ||
} | ||
|
||
message InfoResult { | ||
// name of the hook used by virt-launcher to compare it with requested hooks | ||
string name = 1; | ||
// priority is used to sort hooks prior to their execution (second key is the name) | ||
uint32 priority = 2; | ||
// hookPoints is a list of subscribed hook points | ||
repeated string hookPoints = 3; | ||
// version is choosen from passed supportedVersions, this version will be used for communication | ||
string version = 4; | ||
} | ||
|
||
message OnDefineDomainParams { | ||
// domainXML is original libvirt domain specification, it is XML passed as string | ||
string domainXML = 1; | ||
// vm is VirtualMachine is object of virtual machine currently processed by virt-launcher, it is encoded as JSON and passed as string | ||
string vm = 2; | ||
} | ||
|
||
message OnDefineDomainResult { | ||
// domainXML is processed libvirt domain specification, it is XML passed as string | ||
string domainXML = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package v1alpha | ||
|
||
const Version = "v1alpha" | ||
|
||
const ( | ||
OnDefineDomainHookPointName = "OnDefineDomain" | ||
) |