github.com/microsoft/moc@v0.17.1/rpc/nodeagent/network/virtualnetwork/moc_nodeagent_virtualnetwork.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/network"; 6 package moc.nodeagent.network; 7 8 import "google/protobuf/wrappers.proto"; 9 import "google/protobuf/empty.proto"; 10 import "moc_common_common.proto"; 11 import "moc_common_networkcommon.proto"; 12 import "moc_common_notification.proto"; 13 14 enum VirtualNetworkType { 15 NAT = 0; 16 Transparent = 1; 17 L2Bridge = 2; 18 L2Tunnel = 3; 19 ICS = 4; 20 Private = 5; 21 Overlay = 6; 22 Internal = 7; 23 Mirrored = 8; 24 } 25 26 message VirtualNetworkRequest { 27 repeated VirtualNetwork VirtualNetworks = 1; 28 Operation OperationType = 2; 29 } 30 31 message VirtualNetworkResponse { 32 repeated VirtualNetwork VirtualNetworks = 1; 33 google.protobuf.BoolValue Result = 2; 34 string Error = 3; 35 } 36 37 message VirtualNetwork { 38 reserved 7; 39 string name = 1; 40 string id = 2; 41 repeated Ipam ipams = 3; 42 Dns dns = 4 [(sensitive) = true]; 43 VirtualNetworkType type = 5; 44 MacPool macPool = 6; 45 Status status = 8; 46 Entity entity = 9; 47 Tags tags = 10; 48 } 49 50 message MacRange { 51 string startMacAddress = 1 [(sensitive) = true]; 52 string endMacAddress = 2 [(sensitive) = true]; 53 } 54 message MacPool { 55 repeated MacRange ranges = 1; 56 } 57 58 message Subnet { 59 string name = 1; 60 string id = 2; 61 string cidr = 3 [(sensitive) = true]; 62 repeated Route routes = 4; 63 IPAllocationMethod allocation = 5; 64 uint32 vlan = 6; 65 } 66 message Ipam { 67 string type = 1; 68 repeated Subnet subnets = 2; 69 } 70 71 service VirtualNetworkAgent { 72 rpc Invoke(VirtualNetworkRequest) returns (VirtualNetworkResponse) {} 73 rpc CheckNotification(google.protobuf.Empty) returns (NotificationResponse) {} 74 } 75