Skip to content

Commit

Permalink
Merge pull request #160 from algamaes/algamaes/add_hypervguestagent
Browse files Browse the repository at this point in the history
Changes for HyperVSocket Agents
  • Loading branch information
algamaes committed Jul 19, 2023
2 parents 4fba3cc + 58dc7e7 commit fa67b40
Show file tree
Hide file tree
Showing 21 changed files with 3,020 additions and 448 deletions.
265 changes: 142 additions & 123 deletions rpc/cloudagent/compute/moc_cloudagent_virtualmachine.pb.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ message VirtualMachine {
PowerState powerState = 14;
SecurityConfiguration security = 15;
Tags tags = 16;
GuestAgentConfiguration guestAgent = 17;
VirtualMachineAgentInstanceView guestAgentInstanceView = 18;
}

message VirtualMachineOperationRequest {
Expand Down
33 changes: 15 additions & 18 deletions rpc/common/admin/moc_common_validation.pb.go

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

3 changes: 0 additions & 3 deletions rpc/common/admin/validation/moc_common_validation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ syntax = "proto3";
option go_package = "github.com/microsoft/moc/rpc/common/admin";
package moc.common.admin;

import "google/protobuf/wrappers.proto";

enum ValidationOperation {
VALIDATE = 0;
}
Expand All @@ -20,4 +18,3 @@ message ValidationResponse {
service ValidationAgent {
rpc Invoke(ValidationRequest) returns (ValidationResponse) {}
}

183 changes: 93 additions & 90 deletions rpc/common/moc_common_common.pb.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions rpc/common/moc_common_common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ enum ClientType {
ADMIN = 3;
BAREMETAL = 4;
LOADBALANCER = 5;
HOST = 6;
}

enum AuthenticationType {
Expand Down
388 changes: 299 additions & 89 deletions rpc/common/moc_common_computecommon.pb.go

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions rpc/common/moc_common_computecommon.proto
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ enum VirtualMachineRunCommandExecutionState {
ExecutionState_UNKNOWN = 0;
ExecutionState_FAILED = 1;
ExecutionState_SUCCEEDED = 2;
ExecutionState_PENDING = 3;
ExecutionState_REBOOTING = 4;
}

message VirtualMachineRunCommandInputParameter {
Expand All @@ -154,6 +156,30 @@ message VirtualMachineCapabilities {
bool IsolatedVmCapable = 1;
}

message InstanceViewStatus {
enum StatusLevelType {
Unknown = 0;
Info = 1 ;
Warning = 2;
Error = 3;
}

string code = 1;
StatusLevelType level = 2;
string displayStatus = 3;
string message = 4;
string time = 5;
}

message VirtualMachineAgentInstanceView {
string vmAgentVersion = 1;
repeated InstanceViewStatus statuses = 2;
}

message GuestAgentConfiguration {
bool enabled = 1;
}

/* Values fetched from Win32_Processor class.
Documentation here:
https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-processor#properties */
Expand Down
28 changes: 28 additions & 0 deletions rpc/gen_proto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ protoc -I $Agent/$Module/keyvault -I ./common -I $Agent/$Module/keyvault/secret
protoc -I $Agent/$Module/authentication -I ./common -I $Agent/$Module/identity $Agent/$Module/authentication/moc_nodeagent_authentication.proto --go_out=plugins=grpc:../bld/gen/
protoc -I $Agent/$Module/certificate -I ./common -I $Agent/$Module/certificate $Agent/$Module/certificate/moc_nodeagent_certificate.proto --go_out=plugins=grpc:../bld/gen/

Module="node"
echo "Generating $Agent/$Module protoc"
protoc -I $Agent/$Module/host -I ./common $Agent/$Module/host/moc_nodeagent_host.proto --go_out=plugins=grpc:../bld/gen/

####

Agent="lbagent"
Expand Down Expand Up @@ -88,6 +92,20 @@ protoc -I $Agent/$Module -I ./common $Agent/$Module/$ChildModule/moc_ipaddress_$

####

Agent="mochostagent"
echo "Generating Protoc for $Agent"

Module="admin"
echo "Generating $Agent/$Module protoc"
protoc -I $Agent/$Module/exec -I ./common $Agent/$Module/exec/moc_mochostagent_exec.proto --go_out=plugins=grpc:../bld/gen/

# Generate compute agent protoc
Module="compute"
echo "Generating $Agent/$Module protoc"
protoc -I $Agent/$Module/virtualmachine -I ./common $Agent/$Module/virtualmachine/moc_mochostagent_virtualmachine.proto --go_out=plugins=grpc:../bld/gen/

####

Agent="guestagent"
echo "Generating Protoc for $Agent"
Module="admin"
Expand All @@ -98,6 +116,16 @@ protoc -I $Agent/$Module -I ./common $Agent/$Module/$ChildModule/moc_guestagent_

####

Agent="mocguestagent"
echo "Generating Protoc for $Agent"
Module="compute"
echo "Generating $Module protoc"
ChildModule="virtualmachine"
echo "Generating $Module/$ChildModule protoc"
protoc -I $Agent/$Module -I ./common $Agent/$Module/$ChildModule/moc_mocguestagent_${ChildModule}.proto --go_out=plugins=grpc:../bld/gen/

####

Agent="cloudagent"
echo "Generating Protoc for $Agent"
Module="admin"
Expand Down
4 changes: 2 additions & 2 deletions rpc/lbagent/moc_lbagent_agent.pb.go

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

Loading

0 comments on commit fa67b40

Please sign in to comment.