diff --git a/network/cloud/v1alpha1/autogen.md b/network/cloud/v1alpha1/autogen.md index 9264f194..d3ef9883 100644 --- a/network/cloud/v1alpha1/autogen.md +++ b/network/cloud/v1alpha1/autogen.md @@ -4963,6 +4963,7 @@ SubnetSpec captures subnet specific configuration | ingress_default_sg_policy_name_ref | [string](#string) | | default ingress stateful security policy for this subnet if configured, is the 1st policy evaluated before other security policies on a given vnic | | egress_default_sg_policy_name_ref | [string](#string) | | default egress stateful security policy for this subnet if configured, is the 1st policy evaluated before other security polices on a given vnic | | remote_subnet | [bool](#bool) | | remote_subnet, if set, indicates that the subnet does not have any IP mappings in local pod and such subnets are used to program all remote pod IP mappings behind it | +| attached_tunnel_interface_name_ref | [string](#string) | | Tunnel interface name associated with the subnet Usually a route/prefix can point to a tunnel as next hope (route.proto) However to handle the situation where subnet is associated with the tunnel interface to allow any learned routes within this subnet to be automatically advertised over to the routing plane (e.g. EVPN) this association needs to be explicit | diff --git a/network/cloud/v1alpha1/gen/cpp/subnet.pb.cc b/network/cloud/v1alpha1/gen/cpp/subnet.pb.cc index 51e59c9f..17ea6bfd 100644 --- a/network/cloud/v1alpha1/gen/cpp/subnet.pb.cc +++ b/network/cloud/v1alpha1/gen/cpp/subnet.pb.cc @@ -48,6 +48,7 @@ constexpr SubnetSpec::SubnetSpec( , v6_route_table_name_ref_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , ingress_default_sg_policy_name_ref_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , egress_default_sg_policy_name_ref_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , attached_tunnel_interface_name_ref_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , v4_prefix_(nullptr) , v6_prefix_(nullptr) , access_encap_(nullptr) @@ -122,6 +123,7 @@ const uint32_t TableStruct_subnet_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(p PROTOBUF_FIELD_OFFSET(::opi_api::network::cloud::v1alpha1::SubnetSpec, ingress_default_sg_policy_name_ref_), PROTOBUF_FIELD_OFFSET(::opi_api::network::cloud::v1alpha1::SubnetSpec, egress_default_sg_policy_name_ref_), PROTOBUF_FIELD_OFFSET(::opi_api::network::cloud::v1alpha1::SubnetSpec, remote_subnet_), + PROTOBUF_FIELD_OFFSET(::opi_api::network::cloud::v1alpha1::SubnetSpec, attached_tunnel_interface_name_ref_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::opi_api::network::cloud::v1alpha1::SubnetStatus, _internal_metadata_), ~0u, // no _extensions_ @@ -134,7 +136,7 @@ const uint32_t TableStruct_subnet_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(p static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, -1, sizeof(::opi_api::network::cloud::v1alpha1::Subnet)}, { 9, -1, -1, sizeof(::opi_api::network::cloud::v1alpha1::SubnetSpec)}, - { 35, -1, -1, sizeof(::opi_api::network::cloud::v1alpha1::SubnetStatus)}, + { 36, -1, -1, sizeof(::opi_api::network::cloud::v1alpha1::SubnetStatus)}, }; static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { @@ -151,7 +153,7 @@ const char descriptor_table_protodef_subnet_2eproto[] PROTOBUF_SECTION_VARIABLE( "lpha1.SubnetSpec\022<\n\006status\030\003 \001(\0132,.opi_a" "pi.network.cloud.v1alpha1.SubnetStatus:<" "\352A9\n%opi_api.network.cloud.v1alpha1/subn" - "et\022\020subnets/{subnet}\"\264\006\n\nSubnetSpec\022\024\n\014v" + "et\022\020subnets/{subnet}\"\340\006\n\nSubnetSpec\022\024\n\014v" "pc_name_ref\030\001 \001(\t\022D\n\tv4_prefix\030\002 \001(\01321.o" "pi_api.network.opinetcommon.v1alpha1.IPv" "4Prefix\022D\n\tv6_prefix\030\003 \001(\01321.opi_api.net" @@ -172,11 +174,12 @@ const char descriptor_table_protodef_subnet_2eproto[] PROTOBUF_SECTION_VARIABLE( "nnected\030\021 \001(\010\022*\n\"ingress_default_sg_poli" "cy_name_ref\030\022 \001(\t\022)\n!egress_default_sg_p" "olicy_name_ref\030\023 \001(\t\022\025\n\rremote_subnet\030\024 " - "\001(\010\"4\n\014SubnetStatus\022\020\n\010hw_index\030\001 \001(\005\022\022\n" - "\nvnic_count\030\002 \001(\005Bl\n\036opi_api.network.clo" - "ud.v1alpha1B\013SubnetProtoP\001Z;github.com/o" - "piproject/opi-api/network/cloud/v1alpha1" - "/gen/gob\006proto3" + "\001(\010\022*\n\"attached_tunnel_interface_name_re" + "f\030\025 \001(\t\"4\n\014SubnetStatus\022\020\n\010hw_index\030\001 \001(" + "\005\022\022\n\nvnic_count\030\002 \001(\005Bl\n\036opi_api.network" + ".cloud.v1alpha1B\013SubnetProtoP\001Z;github.c" + "om/opiproject/opi-api/network/cloud/v1al" + "pha1/gen/gob\006proto3" ; static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_subnet_2eproto_deps[2] = { &::descriptor_table_google_2fapi_2fresource_2eproto, @@ -184,7 +187,7 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor }; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_subnet_2eproto_once; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_subnet_2eproto = { - false, false, 1295, descriptor_table_protodef_subnet_2eproto, "subnet.proto", + false, false, 1339, descriptor_table_protodef_subnet_2eproto, "subnet.proto", &descriptor_table_subnet_2eproto_once, descriptor_table_subnet_2eproto_deps, 2, 3, schemas, file_default_instances, TableStruct_subnet_2eproto::offsets, file_level_metadata_subnet_2eproto, file_level_enum_descriptors_subnet_2eproto, file_level_service_descriptors_subnet_2eproto, @@ -623,6 +626,14 @@ SubnetSpec::SubnetSpec(const SubnetSpec& from) egress_default_sg_policy_name_ref_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_egress_default_sg_policy_name_ref(), GetArenaForAllocation()); } + attached_tunnel_interface_name_ref_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + attached_tunnel_interface_name_ref_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_attached_tunnel_interface_name_ref().empty()) { + attached_tunnel_interface_name_ref_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_attached_tunnel_interface_name_ref(), + GetArenaForAllocation()); + } if (from._internal_has_v4_prefix()) { v4_prefix_ = new ::opi_api::network::opinetcommon::v1alpha1::IPv4Prefix(*from.v4_prefix_); } else { @@ -678,6 +689,10 @@ egress_default_sg_policy_name_ref_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::in #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING egress_default_sg_policy_name_ref_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +attached_tunnel_interface_name_ref_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + attached_tunnel_interface_name_ref_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&v4_prefix_) - reinterpret_cast(this)), 0, static_cast(reinterpret_cast(&remote_subnet_) - @@ -700,6 +715,7 @@ inline void SubnetSpec::SharedDtor() { v6_route_table_name_ref_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ingress_default_sg_policy_name_ref_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); egress_default_sg_policy_name_ref_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + attached_tunnel_interface_name_ref_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete v4_prefix_; if (this != internal_default_instance()) delete v6_prefix_; if (this != internal_default_instance()) delete access_encap_; @@ -734,6 +750,7 @@ void SubnetSpec::Clear() { v6_route_table_name_ref_.ClearToEmpty(); ingress_default_sg_policy_name_ref_.ClearToEmpty(); egress_default_sg_policy_name_ref_.ClearToEmpty(); + attached_tunnel_interface_name_ref_.ClearToEmpty(); if (GetArenaForAllocation() == nullptr && v4_prefix_ != nullptr) { delete v4_prefix_; } @@ -969,6 +986,16 @@ const char* SubnetSpec::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID: } else goto handle_unusual; continue; + // string attached_tunnel_interface_name_ref = 21; + case 21: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 170)) { + auto str = _internal_mutable_attached_tunnel_interface_name_ref(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opi_api.network.cloud.v1alpha1.SubnetSpec.attached_tunnel_interface_name_ref")); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -1166,6 +1193,16 @@ uint8_t* SubnetSpec::_InternalSerialize( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(20, this->_internal_remote_subnet(), target); } + // string attached_tunnel_interface_name_ref = 21; + if (!this->_internal_attached_tunnel_interface_name_ref().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_attached_tunnel_interface_name_ref().data(), static_cast(this->_internal_attached_tunnel_interface_name_ref().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "opi_api.network.cloud.v1alpha1.SubnetSpec.attached_tunnel_interface_name_ref"); + target = stream->WriteStringMaybeAliased( + 21, this->_internal_attached_tunnel_interface_name_ref(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -1271,6 +1308,13 @@ size_t SubnetSpec::ByteSizeLong() const { this->_internal_egress_default_sg_policy_name_ref()); } + // string attached_tunnel_interface_name_ref = 21; + if (!this->_internal_attached_tunnel_interface_name_ref().empty()) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_attached_tunnel_interface_name_ref()); + } + // .opi_api.network.opinetcommon.v1alpha1.IPv4Prefix v4_prefix = 2; if (this->_internal_has_v4_prefix()) { total_size += 1 + @@ -1369,6 +1413,9 @@ void SubnetSpec::MergeFrom(const SubnetSpec& from) { if (!from._internal_egress_default_sg_policy_name_ref().empty()) { _internal_set_egress_default_sg_policy_name_ref(from._internal_egress_default_sg_policy_name_ref()); } + if (!from._internal_attached_tunnel_interface_name_ref().empty()) { + _internal_set_attached_tunnel_interface_name_ref(from._internal_attached_tunnel_interface_name_ref()); + } if (from._internal_has_v4_prefix()) { _internal_mutable_v4_prefix()->::opi_api::network::opinetcommon::v1alpha1::IPv4Prefix::MergeFrom(from._internal_v4_prefix()); } @@ -1452,6 +1499,11 @@ void SubnetSpec::InternalSwap(SubnetSpec* other) { &egress_default_sg_policy_name_ref_, lhs_arena, &other->egress_default_sg_policy_name_ref_, rhs_arena ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &attached_tunnel_interface_name_ref_, lhs_arena, + &other->attached_tunnel_interface_name_ref_, rhs_arena + ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(SubnetSpec, remote_subnet_) + sizeof(SubnetSpec::remote_subnet_) diff --git a/network/cloud/v1alpha1/gen/cpp/subnet.pb.h b/network/cloud/v1alpha1/gen/cpp/subnet.pb.h index 50ba3515..94efb198 100644 --- a/network/cloud/v1alpha1/gen/cpp/subnet.pb.h +++ b/network/cloud/v1alpha1/gen/cpp/subnet.pb.h @@ -409,6 +409,7 @@ class SubnetSpec final : kV6RouteTableNameRefFieldNumber = 8, kIngressDefaultSgPolicyNameRefFieldNumber = 18, kEgressDefaultSgPolicyNameRefFieldNumber = 19, + kAttachedTunnelInterfaceNameRefFieldNumber = 21, kV4PrefixFieldNumber = 2, kV6PrefixFieldNumber = 3, kAccessEncapFieldNumber = 13, @@ -636,6 +637,20 @@ class SubnetSpec final : std::string* _internal_mutable_egress_default_sg_policy_name_ref(); public: + // string attached_tunnel_interface_name_ref = 21; + void clear_attached_tunnel_interface_name_ref(); + const std::string& attached_tunnel_interface_name_ref() const; + template + void set_attached_tunnel_interface_name_ref(ArgT0&& arg0, ArgT... args); + std::string* mutable_attached_tunnel_interface_name_ref(); + PROTOBUF_NODISCARD std::string* release_attached_tunnel_interface_name_ref(); + void set_allocated_attached_tunnel_interface_name_ref(std::string* attached_tunnel_interface_name_ref); + private: + const std::string& _internal_attached_tunnel_interface_name_ref() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_attached_tunnel_interface_name_ref(const std::string& value); + std::string* _internal_mutable_attached_tunnel_interface_name_ref(); + public: + // .opi_api.network.opinetcommon.v1alpha1.IPv4Prefix v4_prefix = 2; bool has_v4_prefix() const; private: @@ -763,6 +778,7 @@ class SubnetSpec final : ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr v6_route_table_name_ref_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr ingress_default_sg_policy_name_ref_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr egress_default_sg_policy_name_ref_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr attached_tunnel_interface_name_ref_; ::opi_api::network::opinetcommon::v1alpha1::IPv4Prefix* v4_prefix_; ::opi_api::network::opinetcommon::v1alpha1::IPv6Prefix* v6_prefix_; ::opi_api::network::opinetcommon::v1alpha1::Encap* access_encap_; @@ -2333,6 +2349,57 @@ inline void SubnetSpec::set_remote_subnet(bool value) { // @@protoc_insertion_point(field_set:opi_api.network.cloud.v1alpha1.SubnetSpec.remote_subnet) } +// string attached_tunnel_interface_name_ref = 21; +inline void SubnetSpec::clear_attached_tunnel_interface_name_ref() { + attached_tunnel_interface_name_ref_.ClearToEmpty(); +} +inline const std::string& SubnetSpec::attached_tunnel_interface_name_ref() const { + // @@protoc_insertion_point(field_get:opi_api.network.cloud.v1alpha1.SubnetSpec.attached_tunnel_interface_name_ref) + return _internal_attached_tunnel_interface_name_ref(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SubnetSpec::set_attached_tunnel_interface_name_ref(ArgT0&& arg0, ArgT... args) { + + attached_tunnel_interface_name_ref_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opi_api.network.cloud.v1alpha1.SubnetSpec.attached_tunnel_interface_name_ref) +} +inline std::string* SubnetSpec::mutable_attached_tunnel_interface_name_ref() { + std::string* _s = _internal_mutable_attached_tunnel_interface_name_ref(); + // @@protoc_insertion_point(field_mutable:opi_api.network.cloud.v1alpha1.SubnetSpec.attached_tunnel_interface_name_ref) + return _s; +} +inline const std::string& SubnetSpec::_internal_attached_tunnel_interface_name_ref() const { + return attached_tunnel_interface_name_ref_.Get(); +} +inline void SubnetSpec::_internal_set_attached_tunnel_interface_name_ref(const std::string& value) { + + attached_tunnel_interface_name_ref_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* SubnetSpec::_internal_mutable_attached_tunnel_interface_name_ref() { + + return attached_tunnel_interface_name_ref_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* SubnetSpec::release_attached_tunnel_interface_name_ref() { + // @@protoc_insertion_point(field_release:opi_api.network.cloud.v1alpha1.SubnetSpec.attached_tunnel_interface_name_ref) + return attached_tunnel_interface_name_ref_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void SubnetSpec::set_allocated_attached_tunnel_interface_name_ref(std::string* attached_tunnel_interface_name_ref) { + if (attached_tunnel_interface_name_ref != nullptr) { + + } else { + + } + attached_tunnel_interface_name_ref_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), attached_tunnel_interface_name_ref, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (attached_tunnel_interface_name_ref_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + attached_tunnel_interface_name_ref_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opi_api.network.cloud.v1alpha1.SubnetSpec.attached_tunnel_interface_name_ref) +} + // ------------------------------------------------------------------- // SubnetStatus diff --git a/network/cloud/v1alpha1/gen/go/subnet.pb.go b/network/cloud/v1alpha1/gen/go/subnet.pb.go index 209e4ba3..5ad63fdf 100644 --- a/network/cloud/v1alpha1/gen/go/subnet.pb.go +++ b/network/cloud/v1alpha1/gen/go/subnet.pb.go @@ -172,6 +172,12 @@ type SubnetSpec struct { // mappings in local pod and such subnets are used to program all remote // pod IP mappings behind it RemoteSubnet bool `protobuf:"varint,20,opt,name=remote_subnet,json=remoteSubnet,proto3" json:"remote_subnet,omitempty"` + // Tunnel interface name associated with the subnet + // Usually a route/prefix can point to a tunnel as next hope (route.proto) + // However to handle the situation where subnet is associated with the tunnel interface + // to allow any learned routes within this subnet to be automatically advertised + // over to the routing plane (e.g. EVPN) this association needs to be explicit + AttachedTunnelInterfaceNameRef string `protobuf:"bytes,21,opt,name=attached_tunnel_interface_name_ref,json=attachedTunnelInterfaceNameRef,proto3" json:"attached_tunnel_interface_name_ref,omitempty"` } func (x *SubnetSpec) Reset() { @@ -346,6 +352,13 @@ func (x *SubnetSpec) GetRemoteSubnet() bool { return false } +func (x *SubnetSpec) GetAttachedTunnelInterfaceNameRef() string { + if x != nil { + return x.AttachedTunnelInterfaceNameRef + } + return "" +} + // operational status of the subnet, if any type SubnetStatus struct { state protoimpl.MessageState @@ -427,7 +440,7 @@ var file_subnet_proto_rawDesc = []byte{ 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x12, 0x10, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x7d, - 0x22, 0xc2, 0x09, 0x0a, 0x0a, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, + 0x22, 0x8e, 0x0a, 0x0a, 0x0a, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x20, 0x0a, 0x0c, 0x76, 0x70, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x70, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x66, 0x12, 0x4e, 0x0a, 0x09, 0x76, 0x34, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, @@ -503,19 +516,24 @@ var file_subnet_proto_rawDesc = []byte{ 0x74, 0x53, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x66, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, - 0x75, 0x62, 0x6e, 0x65, 0x74, 0x22, 0x48, 0x0a, 0x0c, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x77, 0x5f, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x68, 0x77, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x6e, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x76, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, - 0x6c, 0x0a, 0x1e, 0x6f, 0x70, 0x69, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x42, 0x0b, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x69, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6f, 0x70, 0x69, 0x2d, 0x61, 0x70, 0x69, 0x2f, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x62, 0x6e, 0x65, 0x74, 0x12, 0x4a, 0x0a, 0x22, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, + 0x64, 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x15, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x1e, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, + 0x66, 0x22, 0x48, 0x0a, 0x0c, 0x53, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x77, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x07, 0x68, 0x77, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1d, 0x0a, 0x0a, + 0x76, 0x6e, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x09, 0x76, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x6c, 0x0a, 0x1e, 0x6f, + 0x70, 0x69, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, 0x53, + 0x75, 0x62, 0x6e, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x69, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x2f, 0x6f, 0x70, 0x69, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/network/cloud/v1alpha1/gen/java/opi_api/network/cloud/v1alpha1/SubnetProto.java b/network/cloud/v1alpha1/gen/java/opi_api/network/cloud/v1alpha1/SubnetProto.java index cccddcab..bc6c0339 100644 --- a/network/cloud/v1alpha1/gen/java/opi_api/network/cloud/v1alpha1/SubnetProto.java +++ b/network/cloud/v1alpha1/gen/java/opi_api/network/cloud/v1alpha1/SubnetProto.java @@ -45,7 +45,7 @@ public static void registerAllExtensions( "lpha1.SubnetSpec\022<\n\006status\030\003 \001(\0132,.opi_a" + "pi.network.cloud.v1alpha1.SubnetStatus:<" + "\352A9\n%opi_api.network.cloud.v1alpha1/subn" + - "et\022\020subnets/{subnet}\"\264\006\n\nSubnetSpec\022\024\n\014v" + + "et\022\020subnets/{subnet}\"\340\006\n\nSubnetSpec\022\024\n\014v" + "pc_name_ref\030\001 \001(\t\022D\n\tv4_prefix\030\002 \001(\01321.o" + "pi_api.network.opinetcommon.v1alpha1.IPv" + "4Prefix\022D\n\tv6_prefix\030\003 \001(\01321.opi_api.net" + @@ -66,11 +66,12 @@ public static void registerAllExtensions( "nnected\030\021 \001(\010\022*\n\"ingress_default_sg_poli" + "cy_name_ref\030\022 \001(\t\022)\n!egress_default_sg_p" + "olicy_name_ref\030\023 \001(\t\022\025\n\rremote_subnet\030\024 " + - "\001(\010\"4\n\014SubnetStatus\022\020\n\010hw_index\030\001 \001(\005\022\022\n" + - "\nvnic_count\030\002 \001(\005Bl\n\036opi_api.network.clo" + - "ud.v1alpha1B\013SubnetProtoP\001Z;github.com/o" + - "piproject/opi-api/network/cloud/v1alpha1" + - "/gen/gob\006proto3" + "\001(\010\022*\n\"attached_tunnel_interface_name_re" + + "f\030\025 \001(\t\"4\n\014SubnetStatus\022\020\n\010hw_index\030\001 \001(" + + "\005\022\022\n\nvnic_count\030\002 \001(\005Bl\n\036opi_api.network" + + ".cloud.v1alpha1B\013SubnetProtoP\001Z;github.c" + + "om/opiproject/opi-api/network/cloud/v1al" + + "pha1/gen/gob\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -89,7 +90,7 @@ public static void registerAllExtensions( internal_static_opi_api_network_cloud_v1alpha1_SubnetSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_opi_api_network_cloud_v1alpha1_SubnetSpec_descriptor, - new java.lang.String[] { "VpcNameRef", "V4Prefix", "V6Prefix", "Ipv4VirtualRouterIp", "Ipv6VirtualRouterIp", "VirtualRouterMac", "V4RouteTableNameRef", "V6RouteTableNameRef", "IngessV4SecurityPolicyNameRef", "IngressV6SecurityPolicyNameRef", "EgressV4SecurityPolicyNameRef", "EgressV6SecurityPolicyNameRef", "AccessEncap", "FabricEncap", "HostInterfaceNameRef", "Tos", "Connected", "IngressDefaultSgPolicyNameRef", "EgressDefaultSgPolicyNameRef", "RemoteSubnet", }); + new java.lang.String[] { "VpcNameRef", "V4Prefix", "V6Prefix", "Ipv4VirtualRouterIp", "Ipv6VirtualRouterIp", "VirtualRouterMac", "V4RouteTableNameRef", "V6RouteTableNameRef", "IngessV4SecurityPolicyNameRef", "IngressV6SecurityPolicyNameRef", "EgressV4SecurityPolicyNameRef", "EgressV6SecurityPolicyNameRef", "AccessEncap", "FabricEncap", "HostInterfaceNameRef", "Tos", "Connected", "IngressDefaultSgPolicyNameRef", "EgressDefaultSgPolicyNameRef", "RemoteSubnet", "AttachedTunnelInterfaceNameRef", }); internal_static_opi_api_network_cloud_v1alpha1_SubnetStatus_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_opi_api_network_cloud_v1alpha1_SubnetStatus_fieldAccessorTable = new diff --git a/network/cloud/v1alpha1/gen/java/opi_api/network/cloud/v1alpha1/SubnetSpec.java b/network/cloud/v1alpha1/gen/java/opi_api/network/cloud/v1alpha1/SubnetSpec.java index 289b3bd6..c09fa172 100644 --- a/network/cloud/v1alpha1/gen/java/opi_api/network/cloud/v1alpha1/SubnetSpec.java +++ b/network/cloud/v1alpha1/gen/java/opi_api/network/cloud/v1alpha1/SubnetSpec.java @@ -32,6 +32,7 @@ private SubnetSpec() { hostInterfaceNameRef_ = com.google.protobuf.LazyStringArrayList.EMPTY; ingressDefaultSgPolicyNameRef_ = ""; egressDefaultSgPolicyNameRef_ = ""; + attachedTunnelInterfaceNameRef_ = ""; } @java.lang.Override @@ -222,6 +223,12 @@ private SubnetSpec( remoteSubnet_ = input.readBool(); break; } + case 170: { + java.lang.String s = input.readStringRequireUtf8(); + + attachedTunnelInterfaceNameRef_ = s; + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -1080,6 +1087,60 @@ public boolean getRemoteSubnet() { return remoteSubnet_; } + public static final int ATTACHED_TUNNEL_INTERFACE_NAME_REF_FIELD_NUMBER = 21; + private volatile java.lang.Object attachedTunnelInterfaceNameRef_; + /** + *
+   * Tunnel interface name associated with the subnet
+   * Usually a route/prefix can point to a tunnel as next hope (route.proto)
+   * However to handle the situation where subnet is associated with the tunnel interface
+   * to allow any learned routes within this subnet to be automatically advertised
+   * over to the routing plane (e.g. EVPN) this association needs to be explicit
+   * 
+ * + * string attached_tunnel_interface_name_ref = 21; + * @return The attachedTunnelInterfaceNameRef. + */ + @java.lang.Override + public java.lang.String getAttachedTunnelInterfaceNameRef() { + java.lang.Object ref = attachedTunnelInterfaceNameRef_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attachedTunnelInterfaceNameRef_ = s; + return s; + } + } + /** + *
+   * Tunnel interface name associated with the subnet
+   * Usually a route/prefix can point to a tunnel as next hope (route.proto)
+   * However to handle the situation where subnet is associated with the tunnel interface
+   * to allow any learned routes within this subnet to be automatically advertised
+   * over to the routing plane (e.g. EVPN) this association needs to be explicit
+   * 
+ * + * string attached_tunnel_interface_name_ref = 21; + * @return The bytes for attachedTunnelInterfaceNameRef. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAttachedTunnelInterfaceNameRefBytes() { + java.lang.Object ref = attachedTunnelInterfaceNameRef_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attachedTunnelInterfaceNameRef_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -1154,6 +1215,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (remoteSubnet_ != false) { output.writeBool(20, remoteSubnet_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attachedTunnelInterfaceNameRef_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 21, attachedTunnelInterfaceNameRef_); + } unknownFields.writeTo(output); } @@ -1258,6 +1322,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(20, remoteSubnet_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attachedTunnelInterfaceNameRef_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, attachedTunnelInterfaceNameRef_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1325,6 +1392,8 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getEgressDefaultSgPolicyNameRef())) return false; if (getRemoteSubnet() != other.getRemoteSubnet()) return false; + if (!getAttachedTunnelInterfaceNameRef() + .equals(other.getAttachedTunnelInterfaceNameRef())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1396,6 +1465,8 @@ public int hashCode() { hash = (37 * hash) + REMOTE_SUBNET_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getRemoteSubnet()); + hash = (37 * hash) + ATTACHED_TUNNEL_INTERFACE_NAME_REF_FIELD_NUMBER; + hash = (53 * hash) + getAttachedTunnelInterfaceNameRef().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1589,6 +1660,8 @@ public Builder clear() { remoteSubnet_ = false; + attachedTunnelInterfaceNameRef_ = ""; + return this; } @@ -1672,6 +1745,7 @@ public opi_api.network.cloud.v1alpha1.SubnetSpec buildPartial() { result.ingressDefaultSgPolicyNameRef_ = ingressDefaultSgPolicyNameRef_; result.egressDefaultSgPolicyNameRef_ = egressDefaultSgPolicyNameRef_; result.remoteSubnet_ = remoteSubnet_; + result.attachedTunnelInterfaceNameRef_ = attachedTunnelInterfaceNameRef_; onBuilt(); return result; } @@ -1820,6 +1894,10 @@ public Builder mergeFrom(opi_api.network.cloud.v1alpha1.SubnetSpec other) { if (other.getRemoteSubnet() != false) { setRemoteSubnet(other.getRemoteSubnet()); } + if (!other.getAttachedTunnelInterfaceNameRef().isEmpty()) { + attachedTunnelInterfaceNameRef_ = other.attachedTunnelInterfaceNameRef_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -4175,6 +4253,122 @@ public Builder clearRemoteSubnet() { onChanged(); return this; } + + private java.lang.Object attachedTunnelInterfaceNameRef_ = ""; + /** + *
+     * Tunnel interface name associated with the subnet
+     * Usually a route/prefix can point to a tunnel as next hope (route.proto)
+     * However to handle the situation where subnet is associated with the tunnel interface
+     * to allow any learned routes within this subnet to be automatically advertised
+     * over to the routing plane (e.g. EVPN) this association needs to be explicit
+     * 
+ * + * string attached_tunnel_interface_name_ref = 21; + * @return The attachedTunnelInterfaceNameRef. + */ + public java.lang.String getAttachedTunnelInterfaceNameRef() { + java.lang.Object ref = attachedTunnelInterfaceNameRef_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attachedTunnelInterfaceNameRef_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Tunnel interface name associated with the subnet
+     * Usually a route/prefix can point to a tunnel as next hope (route.proto)
+     * However to handle the situation where subnet is associated with the tunnel interface
+     * to allow any learned routes within this subnet to be automatically advertised
+     * over to the routing plane (e.g. EVPN) this association needs to be explicit
+     * 
+ * + * string attached_tunnel_interface_name_ref = 21; + * @return The bytes for attachedTunnelInterfaceNameRef. + */ + public com.google.protobuf.ByteString + getAttachedTunnelInterfaceNameRefBytes() { + java.lang.Object ref = attachedTunnelInterfaceNameRef_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attachedTunnelInterfaceNameRef_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Tunnel interface name associated with the subnet
+     * Usually a route/prefix can point to a tunnel as next hope (route.proto)
+     * However to handle the situation where subnet is associated with the tunnel interface
+     * to allow any learned routes within this subnet to be automatically advertised
+     * over to the routing plane (e.g. EVPN) this association needs to be explicit
+     * 
+ * + * string attached_tunnel_interface_name_ref = 21; + * @param value The attachedTunnelInterfaceNameRef to set. + * @return This builder for chaining. + */ + public Builder setAttachedTunnelInterfaceNameRef( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + attachedTunnelInterfaceNameRef_ = value; + onChanged(); + return this; + } + /** + *
+     * Tunnel interface name associated with the subnet
+     * Usually a route/prefix can point to a tunnel as next hope (route.proto)
+     * However to handle the situation where subnet is associated with the tunnel interface
+     * to allow any learned routes within this subnet to be automatically advertised
+     * over to the routing plane (e.g. EVPN) this association needs to be explicit
+     * 
+ * + * string attached_tunnel_interface_name_ref = 21; + * @return This builder for chaining. + */ + public Builder clearAttachedTunnelInterfaceNameRef() { + + attachedTunnelInterfaceNameRef_ = getDefaultInstance().getAttachedTunnelInterfaceNameRef(); + onChanged(); + return this; + } + /** + *
+     * Tunnel interface name associated with the subnet
+     * Usually a route/prefix can point to a tunnel as next hope (route.proto)
+     * However to handle the situation where subnet is associated with the tunnel interface
+     * to allow any learned routes within this subnet to be automatically advertised
+     * over to the routing plane (e.g. EVPN) this association needs to be explicit
+     * 
+ * + * string attached_tunnel_interface_name_ref = 21; + * @param value The bytes for attachedTunnelInterfaceNameRef to set. + * @return This builder for chaining. + */ + public Builder setAttachedTunnelInterfaceNameRefBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + attachedTunnelInterfaceNameRef_ = value; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/network/cloud/v1alpha1/gen/java/opi_api/network/cloud/v1alpha1/SubnetSpecOrBuilder.java b/network/cloud/v1alpha1/gen/java/opi_api/network/cloud/v1alpha1/SubnetSpecOrBuilder.java index d6483054..4a179c17 100644 --- a/network/cloud/v1alpha1/gen/java/opi_api/network/cloud/v1alpha1/SubnetSpecOrBuilder.java +++ b/network/cloud/v1alpha1/gen/java/opi_api/network/cloud/v1alpha1/SubnetSpecOrBuilder.java @@ -563,4 +563,32 @@ public interface SubnetSpecOrBuilder extends * @return The remoteSubnet. */ boolean getRemoteSubnet(); + + /** + *
+   * Tunnel interface name associated with the subnet
+   * Usually a route/prefix can point to a tunnel as next hope (route.proto)
+   * However to handle the situation where subnet is associated with the tunnel interface
+   * to allow any learned routes within this subnet to be automatically advertised
+   * over to the routing plane (e.g. EVPN) this association needs to be explicit
+   * 
+ * + * string attached_tunnel_interface_name_ref = 21; + * @return The attachedTunnelInterfaceNameRef. + */ + java.lang.String getAttachedTunnelInterfaceNameRef(); + /** + *
+   * Tunnel interface name associated with the subnet
+   * Usually a route/prefix can point to a tunnel as next hope (route.proto)
+   * However to handle the situation where subnet is associated with the tunnel interface
+   * to allow any learned routes within this subnet to be automatically advertised
+   * over to the routing plane (e.g. EVPN) this association needs to be explicit
+   * 
+ * + * string attached_tunnel_interface_name_ref = 21; + * @return The bytes for attachedTunnelInterfaceNameRef. + */ + com.google.protobuf.ByteString + getAttachedTunnelInterfaceNameRefBytes(); } diff --git a/network/cloud/v1alpha1/gen/python/subnet_pb2.py b/network/cloud/v1alpha1/gen/python/subnet_pb2.py index df2a54d5..56453b7f 100644 --- a/network/cloud/v1alpha1/gen/python/subnet_pb2.py +++ b/network/cloud/v1alpha1/gen/python/subnet_pb2.py @@ -16,7 +16,7 @@ from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0csubnet.proto\x12\x1eopi_api.network.cloud.v1alpha1\x1a\x12networktypes.proto\x1a\x19google/api/resource.proto\"\xcc\x01\n\x06Subnet\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x38\n\x04spec\x18\x02 \x01(\x0b\x32*.opi_api.network.cloud.v1alpha1.SubnetSpec\x12<\n\x06status\x18\x03 \x01(\x0b\x32,.opi_api.network.cloud.v1alpha1.SubnetStatus:<\xea\x41\x39\n%opi_api.network.cloud.v1alpha1/subnet\x12\x10subnets/{subnet}\"\xb4\x06\n\nSubnetSpec\x12\x14\n\x0cvpc_name_ref\x18\x01 \x01(\t\x12\x44\n\tv4_prefix\x18\x02 \x01(\x0b\x32\x31.opi_api.network.opinetcommon.v1alpha1.IPv4Prefix\x12\x44\n\tv6_prefix\x18\x03 \x01(\x0b\x32\x31.opi_api.network.opinetcommon.v1alpha1.IPv6Prefix\x12\x1e\n\x16ipv4_virtual_router_ip\x18\x04 \x01(\r\x12\x1e\n\x16ipv6_virtual_router_ip\x18\x05 \x01(\x0c\x12\x1a\n\x12virtual_router_mac\x18\x06 \x01(\x0c\x12\x1f\n\x17v4_route_table_name_ref\x18\x07 \x01(\t\x12\x1f\n\x17v6_route_table_name_ref\x18\x08 \x01(\t\x12*\n\"ingess_v4_security_policy_name_ref\x18\t \x03(\t\x12+\n#ingress_v6_security_policy_name_ref\x18\n \x03(\t\x12*\n\"egress_v4_security_policy_name_ref\x18\x0b \x03(\t\x12*\n\"egress_v6_security_policy_name_ref\x18\x0c \x03(\t\x12\x42\n\x0c\x61\x63\x63\x65ss_encap\x18\r \x01(\x0b\x32,.opi_api.network.opinetcommon.v1alpha1.Encap\x12\x42\n\x0c\x66\x61\x62ric_encap\x18\x0e \x01(\x0b\x32,.opi_api.network.opinetcommon.v1alpha1.Encap\x12\x1f\n\x17host_interface_name_ref\x18\x0f \x03(\t\x12\x0b\n\x03tos\x18\x10 \x01(\x05\x12\x11\n\tconnected\x18\x11 \x01(\x08\x12*\n\"ingress_default_sg_policy_name_ref\x18\x12 \x01(\t\x12)\n!egress_default_sg_policy_name_ref\x18\x13 \x01(\t\x12\x15\n\rremote_subnet\x18\x14 \x01(\x08\"4\n\x0cSubnetStatus\x12\x10\n\x08hw_index\x18\x01 \x01(\x05\x12\x12\n\nvnic_count\x18\x02 \x01(\x05\x42l\n\x1eopi_api.network.cloud.v1alpha1B\x0bSubnetProtoP\x01Z;github.com/opiproject/opi-api/network/cloud/v1alpha1/gen/gob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0csubnet.proto\x12\x1eopi_api.network.cloud.v1alpha1\x1a\x12networktypes.proto\x1a\x19google/api/resource.proto\"\xcc\x01\n\x06Subnet\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x38\n\x04spec\x18\x02 \x01(\x0b\x32*.opi_api.network.cloud.v1alpha1.SubnetSpec\x12<\n\x06status\x18\x03 \x01(\x0b\x32,.opi_api.network.cloud.v1alpha1.SubnetStatus:<\xea\x41\x39\n%opi_api.network.cloud.v1alpha1/subnet\x12\x10subnets/{subnet}\"\xe0\x06\n\nSubnetSpec\x12\x14\n\x0cvpc_name_ref\x18\x01 \x01(\t\x12\x44\n\tv4_prefix\x18\x02 \x01(\x0b\x32\x31.opi_api.network.opinetcommon.v1alpha1.IPv4Prefix\x12\x44\n\tv6_prefix\x18\x03 \x01(\x0b\x32\x31.opi_api.network.opinetcommon.v1alpha1.IPv6Prefix\x12\x1e\n\x16ipv4_virtual_router_ip\x18\x04 \x01(\r\x12\x1e\n\x16ipv6_virtual_router_ip\x18\x05 \x01(\x0c\x12\x1a\n\x12virtual_router_mac\x18\x06 \x01(\x0c\x12\x1f\n\x17v4_route_table_name_ref\x18\x07 \x01(\t\x12\x1f\n\x17v6_route_table_name_ref\x18\x08 \x01(\t\x12*\n\"ingess_v4_security_policy_name_ref\x18\t \x03(\t\x12+\n#ingress_v6_security_policy_name_ref\x18\n \x03(\t\x12*\n\"egress_v4_security_policy_name_ref\x18\x0b \x03(\t\x12*\n\"egress_v6_security_policy_name_ref\x18\x0c \x03(\t\x12\x42\n\x0c\x61\x63\x63\x65ss_encap\x18\r \x01(\x0b\x32,.opi_api.network.opinetcommon.v1alpha1.Encap\x12\x42\n\x0c\x66\x61\x62ric_encap\x18\x0e \x01(\x0b\x32,.opi_api.network.opinetcommon.v1alpha1.Encap\x12\x1f\n\x17host_interface_name_ref\x18\x0f \x03(\t\x12\x0b\n\x03tos\x18\x10 \x01(\x05\x12\x11\n\tconnected\x18\x11 \x01(\x08\x12*\n\"ingress_default_sg_policy_name_ref\x18\x12 \x01(\t\x12)\n!egress_default_sg_policy_name_ref\x18\x13 \x01(\t\x12\x15\n\rremote_subnet\x18\x14 \x01(\x08\x12*\n\"attached_tunnel_interface_name_ref\x18\x15 \x01(\t\"4\n\x0cSubnetStatus\x12\x10\n\x08hw_index\x18\x01 \x01(\x05\x12\x12\n\nvnic_count\x18\x02 \x01(\x05\x42l\n\x1eopi_api.network.cloud.v1alpha1B\x0bSubnetProtoP\x01Z;github.com/opiproject/opi-api/network/cloud/v1alpha1/gen/gob\x06proto3') @@ -53,7 +53,7 @@ _SUBNET._serialized_start=96 _SUBNET._serialized_end=300 _SUBNETSPEC._serialized_start=303 - _SUBNETSPEC._serialized_end=1123 - _SUBNETSTATUS._serialized_start=1125 - _SUBNETSTATUS._serialized_end=1177 + _SUBNETSPEC._serialized_end=1167 + _SUBNETSTATUS._serialized_start=1169 + _SUBNETSTATUS._serialized_end=1221 # @@protoc_insertion_point(module_scope) diff --git a/network/cloud/v1alpha1/subnet.proto b/network/cloud/v1alpha1/subnet.proto index d0b0afe7..e7140e4f 100644 --- a/network/cloud/v1alpha1/subnet.proto +++ b/network/cloud/v1alpha1/subnet.proto @@ -103,6 +103,12 @@ message SubnetSpec { // mappings in local pod and such subnets are used to program all remote // pod IP mappings behind it bool remote_subnet = 20; + // Tunnel interface name associated with the subnet + // Usually a route/prefix can point to a tunnel as next hope (route.proto) + // However to handle the situation where subnet is associated with the tunnel interface + // to allow any learned routes within this subnet to be automatically advertised + // over to the routing plane (e.g. EVPN) this association needs to be explicit + string attached_tunnel_interface_name_ref = 21; } // operational status of the subnet, if any