Skip to content

Commit

Permalink
feat: Add LocationMetadata message
Browse files Browse the repository at this point in the history
feat: Add RoutingVPC.required_for_new_site_to_site_data_transfer_spokes field
docs: Update comments to reflect that spokes can now be created with data transfer disabled

PiperOrigin-RevId: 426937195
  • Loading branch information
Google APIs authored and Copybara-Service committed Feb 7, 2022
1 parent 4b7b038 commit cb96586
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 35 deletions.
4 changes: 2 additions & 2 deletions google/cloud/networkconnectivity/v1/common.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -16,9 +16,9 @@ syntax = "proto3";

package google.cloud.networkconnectivity.v1;

import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";

option csharp_namespace = "Google.Cloud.NetworkConnectivity.V1";
option go_package = "google.golang.org/genproto/googleapis/cloud/networkconnectivity/v1;networkconnectivity";
Expand Down
92 changes: 59 additions & 33 deletions google/cloud/networkconnectivity/v1/hub.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -164,9 +164,39 @@ service HubService {
}
}

// The State enum represents the lifecycle stage of a Network Connectivity
// Center resource.
enum State {
// No state information available
STATE_UNSPECIFIED = 0;

// The resource's create operation is in progress
CREATING = 1;

// The resource is active
ACTIVE = 2;

// The resource's Delete operation is in progress
DELETING = 3;
}

// Supported features for a location
enum LocationFeature {
// No publicly supported feature in this location
LOCATION_FEATURE_UNSPECIFIED = 0;

// Site-to-cloud spokes are supported in this location
SITE_TO_CLOUD_SPOKES = 1;

// Site-to-site spokes are supported in this location
SITE_TO_SITE_SPOKES = 2;
}

// A hub is a collection of spokes. A single hub can contain spokes from
// multiple regions. However, all of a hub's spokes must be associated with
// resources that reside in the same VPC network.
// multiple regions. However, if any of a hub's spokes use the data transfer
// feature, the resources associated with those spokes must all reside in the
// same VPC network. Spokes that do not use data transfer can be associated
// with any VPC network in your project.
message Hub {
option (google.api.resource) = {
type: "networkconnectivity.googleapis.com/Hub"
Expand Down Expand Up @@ -200,38 +230,27 @@ message Hub {
// Output only. The current lifecycle state of this hub.
State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY];

// The VPC network associated with this hub's spokes. All of the VPN tunnels,
// VLAN attachments, and router appliance instances referenced by this hub's
// spokes must belong to this VPC network.
// The VPC networks associated with this hub's spokes.
//
// This field is read-only. Network Connectivity Center automatically
// populates it based on the set of spokes attached to the hub.
repeated RoutingVPC routing_vpcs = 10;
}

// The State enum represents the lifecycle stage of a Network Connectivity
// Center resource.
enum State {
// No state information available
STATE_UNSPECIFIED = 0;

// The resource's create operation is in progress
CREATING = 1;

// The resource is active
ACTIVE = 2;

// The resource's Delete operation is in progress
DELETING = 3;
}

// RoutingVPC contains information about the VPC network that is associated with
// a hub's spokes.
// RoutingVPC contains information about the VPC networks that are associated
// with a hub's spokes.
message RoutingVPC {
// The URI of the VPC network.
string uri = 1 [(google.api.resource_reference) = {
type: "compute.googleapis.com/Network"
}];

// Output only. If true, indicates that this VPC network is currently associated with
// spokes that use the data transfer feature (spokes where the
// site_to_site_data_transfer field is set to true). If you create new spokes
// that use data transfer, they must be associated with this VPC network. At
// most, one VPC network will have this field set to true.
bool required_for_new_site_to_site_data_transfer_spokes = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// A spoke represents a connection between your Google Cloud network resources
Expand Down Expand Up @@ -577,8 +596,8 @@ message LinkedVpnTunnels {
}];

// A value that controls whether site-to-site data transfer is enabled for
// these resources. This field is set to false by default, but you must set it
// to true. Note that data transfer is available only in supported locations.
// these resources. Data transfer is available only in [supported
// locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
bool site_to_site_data_transfer = 2;
}

Expand All @@ -593,21 +612,22 @@ message LinkedInterconnectAttachments {
}];

// A value that controls whether site-to-site data transfer is enabled for
// these resources. This field is set to false by default, but you must set it
// to true. Note that data transfer is available only in supported locations.
// these resources. Data transfer is available only in [supported
// locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
bool site_to_site_data_transfer = 2;
}

// A collection of router appliance instances. If you have multiple router
// appliance instances connected to the same site, they should all be attached
// to the same spoke.
// A collection of router appliance instances. If you configure multiple router
// appliance instances to receive data from the same set of sites outside of
// Google Cloud, we recommend that you associate those instances with the same
// spoke.
message LinkedRouterApplianceInstances {
// The list of router appliance instances.
repeated RouterApplianceInstance instances = 1;

// A value that controls whether site-to-site data transfer is enabled for
// these resources. This field is set to false by default, but you must set it
// to true. Note that data transfer is available only in supported locations.
// these resources. Data transfer is available only in [supported
// locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
bool site_to_site_data_transfer = 2;
}

Expand All @@ -624,3 +644,9 @@ message RouterApplianceInstance {
// The IP address on the VM to use for peering.
string ip_address = 3;
}

// Metadata about locations
message LocationMetadata {
// List of supported features
repeated LocationFeature location_features = 1;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ apis:
- name: google.cloud.networkconnectivity.v1.HubService

types:
- name: google.cloud.networkconnectivity.v1.LocationMetadata
- name: google.cloud.networkconnectivity.v1.OperationMetadata

documentation:
Expand Down

0 comments on commit cb96586

Please sign in to comment.