github.com/microsoft/moc@v0.17.1/rpc/nodeagent/compute/virtualmachine/moc_nodeagent_virtualmachine.proto (about) 1 // Copyright (c) Microsoft Corporation. 2 // Licensed under the Apache v2.0 license. 3 4 syntax = "proto3"; 5 option go_package = "github.com/microsoft/moc/rpc/nodeagent/compute"; 6 7 package moc.nodeagent.compute; 8 import "google/protobuf/empty.proto"; 9 import "google/protobuf/wrappers.proto"; 10 import "moc_common_common.proto"; 11 import "moc_common_computecommon.proto"; 12 import "moc_common_notification.proto"; 13 14 message VirtualMachineRequest { 15 repeated VirtualMachine VirtualMachineSystems = 1; 16 Operation OperationType = 2; 17 } 18 19 message VirtualMachineResponse { 20 repeated VirtualMachine VirtualMachineSystems = 1; 21 google.protobuf.BoolValue Result = 2; 22 string Error = 3; 23 } 24 25 message SSHPublicKey { 26 string keydata = 1 [(sensitive) = true]; 27 } 28 29 message Disk { 30 // reference to the virtual hard disk managed by storage 31 string diskname = 1; 32 } 33 34 message SharedFolder { 35 // reference to the shared folder managed by storage 36 string sharedfolderreference = 1; 37 string guestmountpath = 2; 38 } 39 40 message StorageConfiguration { 41 Disk osdisk = 1; 42 repeated Disk datadisks = 2; 43 string vmConfigContainerName = 3; // Name of the storage container that hosts the VM configuration file 44 repeated SharedFolder sharedFolders = 4; 45 } 46 47 message NetworkInterface { 48 // reference to network interface managed by network 49 string networkInterfaceName = 1; 50 } 51 52 message NetworkConfiguration { 53 repeated NetworkInterface interfaces = 1; 54 } 55 56 message UserConfiguration { 57 string username = 1 [(sensitive) = true]; 58 string password = 2 [(sensitive) = true]; 59 UserType usertype = 3; 60 } 61 62 message RDPConfiguration { 63 bool disableRDP = 1; 64 uint32 port = 2; 65 } 66 67 message LinuxConfiguration { 68 bool disablePasswordAuthentication = 1; 69 CloudInitDataSource cloudInitDataSource = 2; 70 } 71 72 message WindowsConfiguration { 73 bool enableAutomaticUpdates = 1; 74 string timeZone = 2; 75 RDPConfiguration RDPConfiguration = 3; 76 WinRMConfiguration WinRMConfiguration = 4; 77 } 78 79 message OperatingSystemConfiguration { 80 string computerName = 1; 81 UserConfiguration administrator = 2; 82 repeated UserConfiguration users = 3; 83 string customData = 4 [(sensitive) = true]; 84 repeated SSHPublicKey publickeys = 5; 85 OperatingSystemType ostype = 6; 86 // bootstrap engine can be cloud-init, Windows answer files, ... 87 OperatingSystemBootstrapEngine osBootstrapEngine = 7; 88 LinuxConfiguration linuxConfiguration = 8; 89 WindowsConfiguration windowsConfiguration = 9; 90 ProxyConfiguration proxyConfiguration = 10; 91 } 92 93 message HardwareConfiguration { 94 VirtualMachineSizeType VMSize = 1; 95 VirtualMachineCustomSize customSize = 2; 96 DynamicMemoryConfiguration dynamicMemoryConfiguration = 3; 97 } 98 99 message UefiSettings { 100 bool secureBootEnabled = 1; 101 } 102 103 message SecurityConfiguration { 104 bool enableTPM = 1; 105 UefiSettings uefiSettings = 2; 106 SecurityType securityType = 3; 107 } 108 109 message VirtualMachine { 110 string name = 1; 111 string id = 2; 112 StorageConfiguration storage = 3; 113 OperatingSystemConfiguration os = 4; 114 NetworkConfiguration network = 5; 115 HardwareConfiguration hardware = 6; 116 Status status = 7; 117 bool disableHighAvailability = 8; 118 repeated string allowedOwnerNodes = 9; 119 PowerState powerState = 10; 120 SecurityConfiguration security = 11; 121 Entity entity = 12; 122 HighAvailabilityState highAvailabilityState = 13; 123 Tags tags = 14; 124 GuestAgentConfiguration guestAgent = 15; 125 VirtualMachineAgentInstanceView guestAgentInstanceView = 16; 126 } 127 128 message VirtualMachineOperationRequest { 129 repeated VirtualMachine VirtualMachines = 1; 130 VirtualMachineOperation OperationType = 2; 131 } 132 133 message VirtualMachineOperationResponse { 134 repeated VirtualMachine VirtualMachines = 1; 135 google.protobuf.BoolValue Result = 2; 136 string Error = 3; 137 } 138 139 message VirtualMachineRunCommandRequest { 140 VirtualMachine VirtualMachine = 1; 141 VirtualMachineRunCommandScriptSource Source = 2; 142 repeated VirtualMachineRunCommandInputParameter RunCommandInputParameters = 3; 143 string RunAsUser = 4 [(sensitive) = true]; 144 string RunAsPassword = 5 [(sensitive) = true]; 145 } 146 147 message VirtualMachineRunCommandResponse { 148 VirtualMachine VirtualMachine = 1; 149 VirtualMachineRunCommandInstanceView InstanceView = 2; 150 } 151 152 service VirtualMachineAgent { 153 rpc Invoke(VirtualMachineRequest) returns (VirtualMachineResponse) {} 154 rpc Operate(VirtualMachineOperationRequest) returns (VirtualMachineOperationResponse) {} 155 rpc CheckNotification(google.protobuf.Empty) returns (NotificationResponse) {} 156 rpc RunCommand(VirtualMachineRunCommandRequest) returns (VirtualMachineRunCommandResponse) {} 157 } 158