Skip to content

Commit

Permalink
feat: add fields related to PBR and NCC routes to API
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 555412817
  • Loading branch information
Google APIs authored and Copybara-Service committed Aug 10, 2023
1 parent 76abecc commit 92435df
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 10 deletions.
52 changes: 47 additions & 5 deletions google/cloud/networkmanagement/v1/trace.proto
Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -431,14 +452,32 @@ 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.
int32 priority = 6;

// 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.
Expand Down Expand Up @@ -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.
Expand Down
52 changes: 47 additions & 5 deletions google/cloud/networkmanagement/v1beta1/trace.proto
Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -431,14 +452,32 @@ 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.
int32 priority = 6;

// 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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 92435df

Please sign in to comment.