Skip to content

Commit

Permalink
Merge branch 'main' into 209-expose-metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
yitsushi authored Jan 26, 2022
2 parents e60a8d2 + 054c6c3 commit 6903ad8
Show file tree
Hide file tree
Showing 50 changed files with 551 additions and 555 deletions.
6 changes: 6 additions & 0 deletions api/events/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ type MicroVMSpecCreated struct {
ID string
// Namespace is the namespace of the created microvm.
Namespace string
// UID is the unique id of the created microvm.
UID string
}

// MicroVMSpecUpdated is an event for when a microvm spec is updated.
Expand All @@ -14,6 +16,8 @@ type MicroVMSpecUpdated struct {
ID string
// Namespace is the namespace of the updated microvm.
Namespace string
// UID is the unique id of the updated microvm.
UID string
}

// MicroVMSpecDeleted is an event for when a microvm spec is deleted.
Expand All @@ -22,4 +26,6 @@ type MicroVMSpecDeleted struct {
ID string
// Namespace is the namespace of the deleted microvm.
Namespace string
// UID is the unique id of the deleted microvm.
UID string
}
191 changes: 85 additions & 106 deletions api/services/microvm/v1alpha1/microvms.pb.go

Large diffs are not rendered by default.

84 changes: 22 additions & 62 deletions api/services/microvm/v1alpha1/microvms.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions api/services/microvm/v1alpha1/microvms.proto
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ service MicroVM {
}
rpc DeleteMicroVM(DeleteMicroVMRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1alpha1/microvm/{namespace}/{id}"
delete: "/v1alpha1/microvm/{uid}"
};
}
rpc GetMicroVM(GetMicroVMRequest) returns (GetMicroVMResponse) {
option (google.api.http) = {
get: "/v1alpha1/microvm/{namespace}/{id}"
get: "/v1alpha1/microvm/{uid}"
};
}
rpc ListMicroVMs(ListMicroVMsRequest) returns (ListMicroVMsResponse) {
Expand All @@ -56,13 +56,11 @@ message CreateMicroVMResponse {
}

message DeleteMicroVMRequest {
string id = 1;
string namespace = 2;
string uid = 1;
}

message GetMicroVMRequest {
string id = 1;
string namespace = 2;
string uid = 1;
}

message GetMicroVMResponse {
Expand Down
22 changes: 7 additions & 15 deletions api/services/microvm/v1alpha1/microvms.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
]
}
},
"/v1alpha1/microvm/{namespace}/{id}": {
"/v1alpha1/microvm/{uid}": {
"get": {
"operationId": "MicroVM_GetMicroVM",
"responses": {
Expand All @@ -88,13 +88,7 @@
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "id",
"name": "uid",
"in": "path",
"required": true,
"type": "string"
Expand Down Expand Up @@ -122,13 +116,7 @@
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "id",
"name": "uid",
"in": "path",
"required": true,
"type": "string"
Expand Down Expand Up @@ -333,6 +321,10 @@
"type": "string",
"format": "date-time",
"description": "DeletedAt indicates the time the microvm was marked as deleted."
},
"uid": {
"type": "string",
"description": "UID is a globally unique identifier of the microvm."
}
},
"description": "MicroVMSpec represents the specification for a microvm."
Expand Down
Loading

0 comments on commit 6903ad8

Please sign in to comment.