Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Precheck RPC for various resources #269

Merged
merged 3 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (

require (
golang.org/x/net v0.26.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d // indirect
)

replace (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1521,8 +1521,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130/go.
google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5/go.mod h1:zBEcrKX2ZOcEkHWxBPAIvYUWOKKMIhYcmNiUIu2ji3I=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 h1:Di6ANFilr+S60a4S61ZM00vLdw0IrQOSMS2/6mrnOU0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d h1:k3zyW3BYYR30e8v3x0bTDdE9vpYFjZHK+HcyqkrppWk=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY=
google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=
google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ message VirtualMachineReference {
string realizedName = 3;
}

message AvailabilitySetPrecheckRequest {
repeated AvailabilitySet AvailabilitySets = 1;
}

message AvailabilitySetPrecheckResponse {
// The precheck result: true if the precheck criteria is passed; otherwise, false
google.protobuf.BoolValue Result = 1;

// The error message if the precheck is not passed; otherwise, empty string
string Error = 2;
}

// avset structure is a flattened version of the model in the Azure sdk for go at
// https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/resourcemanager/compute/armcompute/models.go
message AvailabilitySet {
Expand All @@ -40,6 +52,9 @@ message AvailabilitySet {

service AvailabilitySetAgent {
rpc Invoke(AvailabilitySetRequest) returns (AvailabilitySetResponse) {}

// Prechecks whether the system is able to create specified availability set (but does not actually create them).
rpc Precheck(AvailabilitySetPrecheckRequest) returns (AvailabilitySetPrecheckResponse) {}
}


Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ message GalleryImageResponse {
string Error = 3;
}

message GalleryImagePrecheckRequest {
repeated GalleryImage GalleryImages = 1;
}

message GalleryImagePrecheckResponse {
// The precheck result: true if the precheck criteria is passed; otherwise, false
google.protobuf.BoolValue Result = 1;

// The error message if the precheck is not passed; otherwise, empty string
string Error = 2;
}

message SFSImageProperties {
string catalogName = 1;
string audience = 2;
Expand Down Expand Up @@ -69,4 +81,7 @@ message GalleryImage {

service GalleryImageAgent {
rpc Invoke(GalleryImageRequest) returns (GalleryImageResponse) {}

// Prechecks whether the system is able to create specified gallery images (but does not actually create them).
rpc Precheck(GalleryImagePrecheckRequest) returns (GalleryImagePrecheckResponse) {}
}
199 changes: 165 additions & 34 deletions rpc/cloudagent/compute/moc_cloudagent_availabilityset.pb.go

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

Loading
Loading