Skip to content

Commit

Permalink
feat: add fields related to load balancers to API
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 555407973
  • Loading branch information
Google APIs authored and Copybara-Service committed Aug 10, 2023
1 parent dec8198 commit ecf3eb1
Show file tree
Hide file tree
Showing 4 changed files with 187 additions and 4 deletions.
35 changes: 34 additions & 1 deletion google/cloud/networkmanagement/v1/connectivity_test.proto
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,25 @@ message Endpoint {
NON_GCP_NETWORK = 2;
}

// Type of the target of a forwarding rule.
enum ForwardingRuleTarget {
// Forwarding rule target is unknown.
FORWARDING_RULE_TARGET_UNSPECIFIED = 0;

// Compute Engine instance for protocol forwarding.
INSTANCE = 1;

// Load Balancer. The specific type can be found from [load_balancer_type]
// [google.cloud.networkmanagement.v1.Endpoint.load_balancer_type].
LOAD_BALANCER = 2;

// Classic Cloud VPN Gateway.
VPN_GATEWAY = 3;

// Forwarding Rule is a Private Service Connect endpoint.
PSC = 4;
}

// Wrapper for Cloud Function attributes.
message CloudFunctionEndpoint {
// A [Cloud Function](https://cloud.google.com/functions) name.
Expand All @@ -168,7 +187,8 @@ message Endpoint {

// The IP address of the endpoint, which can be an external or internal IP.
// An IPv6 address is only allowed when the test's destination is a
// [global load balancer VIP](/load-balancing/docs/load-balancing-overview).
// [global load balancer
// VIP](https://cloud.google.com/load-balancing/docs/load-balancing-overview).
string ip_address = 1;

// The IP protocol port of the endpoint.
Expand All @@ -186,6 +206,19 @@ message Endpoint {
// projects/{project}/regions/{region}/forwardingRules/{id}
string forwarding_rule = 13;

// Output only. Specifies the type of the target of the forwarding rule.
optional ForwardingRuleTarget forwarding_rule_target = 14
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. ID of the load balancer the forwarding rule points to. Empty
// for forwarding rules not related to load balancers.
optional string load_balancer_id = 15
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Type of the load balancer the forwarding rule points to.
optional LoadBalancerType load_balancer_type = 16
[(google.api.field_behavior) = OUTPUT_ONLY];

// A cluster URI for [Google Kubernetes Engine
// master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
string gke_master_cluster = 7;
Expand Down
70 changes: 70 additions & 0 deletions google/cloud/networkmanagement/v1/trace.proto
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,9 @@ message LoadBalancerInfo {

// Target Pool as the load balancer's backend.
TARGET_POOL = 2;

// Target Instance as the load balancer's backend.
TARGET_INSTANCE = 3;
}

// Type of the load balancer.
Expand Down Expand Up @@ -644,6 +647,9 @@ message EndpointInfo {

// URI of the network where this packet is sent to.
string destination_network_uri = 7;

// URI of the source telemetry agent this packet originates from.
string source_agent_uri = 8;
}

// Details of the final state "deliver" and associated resource.
Expand All @@ -667,6 +673,21 @@ message DeliverInfo {

// Target is a Cloud SQL instance.
CLOUD_SQL_INSTANCE = 5;

// Target is a published service that uses [Private Service
// Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services).
PSC_PUBLISHED_SERVICE = 6;

// Target is all Google APIs that use [Private Service
// Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis).
PSC_GOOGLE_API = 7;

// Target is a VPC-SC that uses [Private Service
// Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis).
PSC_VPC_SC = 8;

// Target is a serverless network endpoint group.
SERVERLESS_NEG = 9;
}

// Target type where the packet is delivered to.
Expand Down Expand Up @@ -700,6 +721,9 @@ message ForwardInfo {

// Forwarded to a Cloud SQL instance.
CLOUD_SQL_INSTANCE = 6;

// Forwarded to a VPC network in another project.
ANOTHER_PROJECT = 7;
}

// Target type where this packet is forwarded to.
Expand Down Expand Up @@ -896,6 +920,13 @@ message DropInfo {
// Packet could be dropped because the VPC connector is not in a running
// state.
VPC_CONNECTOR_NOT_RUNNING = 24;

// Packet could be dropped because it was sent from a different region
// to a regional forwarding without global access.
FORWARDING_RULE_REGION_MISMATCH = 25;

// Privte Service Connect (PSC) connection is not in accepted state.
PSC_CONNECTION_NOT_ACCEPTED = 26;
}

// Cause that the packet is dropped.
Expand Down Expand Up @@ -999,3 +1030,42 @@ message VpcConnectorInfo {
// Location in which the VPC connector is deployed.
string location = 3;
}

// Type of a load balancer. For more information, see [Summary of Google Cloud
// load
// balancers](https://cloud.google.com/load-balancing/docs/load-balancing-overview#summary-of-google-cloud-load-balancers).
enum LoadBalancerType {
// Forwarding rule points to a different target than a load balancer or a
// load balancer type is unknown.
LOAD_BALANCER_TYPE_UNSPECIFIED = 0;

// Global external HTTP(S) load balancer.
HTTPS_ADVANCED_LOAD_BALANCER = 1;

// Global external HTTP(S) load balancer (classic)
HTTPS_LOAD_BALANCER = 2;

// Regional external HTTP(S) load balancer.
REGIONAL_HTTPS_LOAD_BALANCER = 3;

// Internal HTTP(S) load balancer.
INTERNAL_HTTPS_LOAD_BALANCER = 4;

// External SSL proxy load balancer.
SSL_PROXY_LOAD_BALANCER = 5;

// External TCP proxy load balancer.
TCP_PROXY_LOAD_BALANCER = 6;

// Internal regional TCP proxy load balancer.
INTERNAL_TCP_PROXY_LOAD_BALANCER = 7;

// External TCP/UDP Network load balancer.
NETWORK_LOAD_BALANCER = 8;

// Target-pool based external TCP/UDP Network load balancer.
LEGACY_NETWORK_LOAD_BALANCER = 9;

// Internal TCP/UDP load balancer.
TCP_UDP_INTERNAL_LOAD_BALANCER = 10;
}
32 changes: 32 additions & 0 deletions google/cloud/networkmanagement/v1beta1/connectivity_test.proto
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,25 @@ message Endpoint {
NON_GCP_NETWORK = 2;
}

// Type of the target of a forwarding rule.
enum ForwardingRuleTarget {
// Forwarding rule target is unknown.
FORWARDING_RULE_TARGET_UNSPECIFIED = 0;

// Compute Engine instance for protocol forwarding.
INSTANCE = 1;

// Load Balancer. The specific type can be found from [load_balancer_type]
// [google.cloud.networkmanagement.v1beta1.Endpoint.load_balancer_type].
LOAD_BALANCER = 2;

// Classic Cloud VPN Gateway.
VPN_GATEWAY = 3;

// Forwarding Rule is a Private Service Connect endpoint.
PSC = 4;
}

// Wrapper for Cloud Function attributes.
message CloudFunctionEndpoint {
// A [Cloud Function](https://cloud.google.com/functions) name.
Expand Down Expand Up @@ -187,6 +206,19 @@ message Endpoint {
// projects/{project}/regions/{region}/forwardingRules/{id}
string forwarding_rule = 13;

// Output only. Specifies the type of the target of the forwarding rule.
optional ForwardingRuleTarget forwarding_rule_target = 14
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. ID of the load balancer the forwarding rule points to. Empty
// for forwarding rules not related to load balancers.
optional string load_balancer_id = 15
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Type of the load balancer the forwarding rule points to.
optional LoadBalancerType load_balancer_type = 16
[(google.api.field_behavior) = OUTPUT_ONLY];

// A cluster URI for [Google Kubernetes Engine
// master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).
string gke_master_cluster = 7;
Expand Down
54 changes: 51 additions & 3 deletions google/cloud/networkmanagement/v1beta1/trace.proto
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,9 @@ message LoadBalancerInfo {

// Target Pool as the load balancer's backend.
TARGET_POOL = 2;

// Target Instance as the load balancer's backend.
TARGET_INSTANCE = 3;
}

// Type of the load balancer.
Expand Down Expand Up @@ -671,17 +674,20 @@ message DeliverInfo {
// Target is a Cloud SQL instance.
CLOUD_SQL_INSTANCE = 5;

// Target is a published service using [Private Service
// Target is a published service that uses [Private Service
// Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services).
PSC_PUBLISHED_SERVICE = 6;

// Target is all Google APIs using [Private Service
// Target is all Google APIs that use [Private Service
// Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis).
PSC_GOOGLE_API = 7;

// Target is VPC-SC using [Private Service
// Target is a VPC-SC that uses [Private Service
// Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis).
PSC_VPC_SC = 8;

// Target is a serverless network endpoint group.
SERVERLESS_NEG = 9;
}

// Target type where the packet is delivered to.
Expand Down Expand Up @@ -715,6 +721,9 @@ message ForwardInfo {

// Forwarded to a Cloud SQL instance.
CLOUD_SQL_INSTANCE = 6;

// Forwarded to a VPC network in another project.
ANOTHER_PROJECT = 7;
}

// Target type where this packet is forwarded to.
Expand Down Expand Up @@ -1021,3 +1030,42 @@ message VpcConnectorInfo {
// Location in which the VPC connector is deployed.
string location = 3;
}

// Type of a load balancer. For more information, see [Summary of Google Cloud
// load
// balancers](https://cloud.google.com/load-balancing/docs/load-balancing-overview#summary-of-google-cloud-load-balancers).
enum LoadBalancerType {
// Forwarding rule points to a different target than a load balancer or a
// load balancer type is unknown.
LOAD_BALANCER_TYPE_UNSPECIFIED = 0;

// Global external HTTP(S) load balancer.
HTTPS_ADVANCED_LOAD_BALANCER = 1;

// Global external HTTP(S) load balancer (classic)
HTTPS_LOAD_BALANCER = 2;

// Regional external HTTP(S) load balancer.
REGIONAL_HTTPS_LOAD_BALANCER = 3;

// Internal HTTP(S) load balancer.
INTERNAL_HTTPS_LOAD_BALANCER = 4;

// External SSL proxy load balancer.
SSL_PROXY_LOAD_BALANCER = 5;

// External TCP proxy load balancer.
TCP_PROXY_LOAD_BALANCER = 6;

// Internal regional TCP proxy load balancer.
INTERNAL_TCP_PROXY_LOAD_BALANCER = 7;

// External TCP/UDP Network load balancer.
NETWORK_LOAD_BALANCER = 8;

// Target-pool based external TCP/UDP Network load balancer.
LEGACY_NETWORK_LOAD_BALANCER = 9;

// Internal TCP/UDP load balancer.
TCP_UDP_INTERNAL_LOAD_BALANCER = 10;
}

0 comments on commit ecf3eb1

Please sign in to comment.