Skip to content

Commit

Permalink
Initial draft
Browse files Browse the repository at this point in the history
  • Loading branch information
mjethwa-msft committed Jun 5, 2024
1 parent cf47788 commit a24a3e9
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,32 @@ message LoadbalancerInboundNatRule {
Protocol protocol = 4;
}

message LoadbalancerOutboundNatRule {
string name = 1;
uint32 frontendPort = 2;
uint32 backendPort = 3;
Protocol protocol = 4;
}

message LoadBalancingRule {
uint32 frontendPort = 1;
uint32 backendPort = 2;
Protocol protocol = 3;
}

message FrontEndIpConfiguration {
string privateIPAddress; // required if using subnet
IPAllocationMethod allocationMethod; // required
string subnetRef; // required if using privateIPAddress. Pass just the name or fully qualified ref?
PublicIPAddressReference publicIPAddress; // required if not using privateIP and a subnet. resourceRef to publicIPAddress

repeated LoadbalancerInboundNatRule inboundNatRules = 13; //read-only
repeated LoadbalancerOutboundNatRule outboundNatRules = 6; //read-only
repeated LoadBalancingRule loadbalancingrules = 6; //read-only

LoadBalancerVipConfigurationState ConfigurationState // Do we need to surface this?
}

message LoadBalancer {
string name = 1;
string id = 2;
Expand All @@ -47,6 +67,8 @@ message LoadBalancer {
Tags tags = 11;
uint32 replicationCount = 12;
repeated LoadbalancerInboundNatRule inboundNatRules = 13;
repeated FrontEndIpConfiguration = 14;
string useSDN = 15;
}

service LoadBalancerAgent {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the Apache v2.0 license.

syntax = "proto3";
option go_package = "github.com/microsoft/moc/rpc/cloudagent/network";
package moc.cloudagent.network;

import "google/protobuf/wrappers.proto";
import "moc_common_common.proto";
import "moc_common_networkcommon.proto";

message PublicIPAddressRequest {
repeated PublicIPAddress PublicIPAddresss = 1;
Operation OperationType = 2;
}

message PublicIPAddressResponse {
repeated PublicIPAddress PublicIPAddresss = 1;
google.protobuf.BoolValue Result = 2;
string Error = 3;
}

IPAddress *string `json:"ipAddress,omitempty"`

PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`

PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`

IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`

DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`

IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`

DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`

message PublicIPAddress {
string name = 1;
string id = 2;
string ipAddress = 3 [(sensitive) = true];
IPAllocationMethod allocation = 4;
IPVersion ipVersion = 5;
uint32 idleTimeoutInMinutes = 6;
string domainNameLabel = 7;
string fqdn = 8;
string reverseFqdn = 9;
string locationName = 10;
Status status = 11;
Tags tags = 12;
}

service PublicIPAddressAgent {
rpc Invoke(PublicIPAddressRequest) returns (PublicIPAddressResponse) {}
}

9 changes: 9 additions & 0 deletions rpc/common/moc_common_networkcommon.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ enum IPPoolType {
VIPPool = 1;
}

enum IPVersion {
IPv4 = 0;
IPv6 = 1;
}

message IPPoolInfo {
string used = 1;
string available = 2;
Expand Down Expand Up @@ -60,4 +65,8 @@ message ResourceReference {

message NetworkSecurityGroupReference {
ResourceReference resourceRef = 1;
}

message PublicIPAddressReference {
ResourceReference resourceRef = 1;
}

0 comments on commit a24a3e9

Please sign in to comment.