From 92435df75a611c473b104232704213b5f1065426 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Thu, 10 Aug 2023 01:47:41 -0700 Subject: [PATCH] feat: add fields related to PBR and NCC routes to API PiperOrigin-RevId: 555412817 --- google/cloud/networkmanagement/v1/trace.proto | 52 +++++++++++++++++-- .../networkmanagement/v1beta1/trace.proto | 52 +++++++++++++++++-- 2 files changed, 94 insertions(+), 10 deletions(-) diff --git a/google/cloud/networkmanagement/v1/trace.proto b/google/cloud/networkmanagement/v1/trace.proto index 292bcd960f17e..0527063f41f9e 100644 --- a/google/cloud/networkmanagement/v1/trace.proto +++ b/google/cloud/networkmanagement/v1/trace.proto @@ -363,6 +363,9 @@ message RouteInfo { // A dynamic route received from peering network. PEERING_DYNAMIC = 6; + + // Policy based route. + POLICY_BASED = 7; } // Type of next hop: @@ -408,6 +411,21 @@ message RouteInfo { // [router appliance // instance](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/ra-overview). NEXT_HOP_ROUTER_APPLIANCE = 11; + + // Next hop is an NCC hub. + NEXT_HOP_NCC_HUB = 12; + } + + // Indicates where routes are applicable. + enum RouteScope { + // Unspecified scope. Default value. + ROUTE_SCOPE_UNSPECIFIED = 0; + + // Route is applicable to packets in Network. + NETWORK = 1; + + // Route is applicable to packets using NCC Hub's routing table. + NCC_HUB = 2; } // Type of route. @@ -416,13 +434,16 @@ message RouteInfo { // Type of next hop. NextHopType next_hop_type = 9; - // Name of a Compute Engine route. + // Indicates where route is applicable. + RouteScope route_scope = 14; + + // Name of a route. string display_name = 1; - // URI of a Compute Engine route. - // Dynamic route from cloud router does not have a URI. + // URI of a route. + // Dynamic, peering static and peering dynamic routes do not have an URI. // Advertised route from Google Cloud VPC to on-premises network also does - // not have a URI. + // not have an URI. string uri = 2; // Destination IP range of the route. @@ -431,7 +452,7 @@ message RouteInfo { // Next hop of the route. string next_hop = 4; - // URI of a Compute Engine network. + // URI of a Compute Engine network. NETWORK routes only. string network_uri = 5; // Priority of the route. @@ -439,6 +460,24 @@ message RouteInfo { // Instance tags of the route. repeated string instance_tags = 7; + + // Source IP address range of the route. Policy based routes only. + string src_ip_range = 10; + + // Destination port ranges of the route. Policy based routes only. + repeated string dest_port_ranges = 11; + + // Source port ranges of the route. Policy based routes only. + repeated string src_port_ranges = 12; + + // Protocols of the route. Policy based routes only. + repeated string protocols = 13; + + // URI of a NCC Hub. NCC_HUB routes only. + optional string ncc_hub_uri = 15; + + // URI of a NCC Spoke. NCC_HUB routes only. + optional string ncc_spoke_uri = 16; } // For display only. Metadata associated with a Compute Engine forwarding rule. @@ -724,6 +763,9 @@ message ForwardInfo { // Forwarded to a VPC network in another project. ANOTHER_PROJECT = 7; + + // Forwarded to an NCC Hub. + NCC_HUB = 8; } // Target type where this packet is forwarded to. diff --git a/google/cloud/networkmanagement/v1beta1/trace.proto b/google/cloud/networkmanagement/v1beta1/trace.proto index 4980586c696a3..dce186f3adf8a 100644 --- a/google/cloud/networkmanagement/v1beta1/trace.proto +++ b/google/cloud/networkmanagement/v1beta1/trace.proto @@ -363,6 +363,9 @@ message RouteInfo { // A dynamic route received from peering network. PEERING_DYNAMIC = 6; + + // Policy based route. + POLICY_BASED = 7; } // Type of next hop: @@ -408,6 +411,21 @@ message RouteInfo { // [router appliance // instance](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/ra-overview). NEXT_HOP_ROUTER_APPLIANCE = 11; + + // Next hop is an NCC hub. + NEXT_HOP_NCC_HUB = 12; + } + + // Indicates where routes are applicable. + enum RouteScope { + // Unspecified scope. Default value. + ROUTE_SCOPE_UNSPECIFIED = 0; + + // Route is applicable to packets in Network. + NETWORK = 1; + + // Route is applicable to packets using NCC Hub's routing table. + NCC_HUB = 2; } // Type of route. @@ -416,13 +434,16 @@ message RouteInfo { // Type of next hop. NextHopType next_hop_type = 9; - // Name of a Compute Engine route. + // Indicates where route is applicable. + RouteScope route_scope = 14; + + // Name of a route. string display_name = 1; - // URI of a Compute Engine route. - // Dynamic route from cloud router does not have a URI. + // URI of a route. + // Dynamic, peering static and peering dynamic routes do not have an URI. // Advertised route from Google Cloud VPC to on-premises network also does - // not have a URI. + // not have an URI. string uri = 2; // Destination IP range of the route. @@ -431,7 +452,7 @@ message RouteInfo { // Next hop of the route. string next_hop = 4; - // URI of a Compute Engine network. + // URI of a Compute Engine network. NETWORK routes only. string network_uri = 5; // Priority of the route. @@ -439,6 +460,24 @@ message RouteInfo { // Instance tags of the route. repeated string instance_tags = 7; + + // Source IP address range of the route. Policy based routes only. + string src_ip_range = 10; + + // Destination port ranges of the route. Policy based routes only. + repeated string dest_port_ranges = 11; + + // Source port ranges of the route. Policy based routes only. + repeated string src_port_ranges = 12; + + // Protocols of the route. Policy based routes only. + repeated string protocols = 13; + + // URI of a NCC Hub. NCC_HUB routes only. + optional string ncc_hub_uri = 15; + + // URI of a NCC Spoke. NCC_HUB routes only. + optional string ncc_spoke_uri = 16; } // For display only. Metadata associated with a Compute Engine forwarding rule. @@ -724,6 +763,9 @@ message ForwardInfo { // Forwarded to a VPC network in another project. ANOTHER_PROJECT = 7; + + // Forwarded to an NCC Hub. + NCC_HUB = 8; } // Target type where this packet is forwarded to.