Skip to content

Commit 1fdc706

Browse files
dgnemoAalyria Technologies, Inc
and
Aalyria Technologies, Inc
authored
Merge pull request #57 from aalyria/A22FDDD72E60FFA059864CEEB524C75E
* Project import generated by Copybara. GitOrigin-RevId: d90a252876b89d8bae5d8bb12af90e42691f14f3 --------- Co-authored-by: Aalyria Technologies, Inc <[email protected]>
2 parents f9a0e37 + 02ea8d4 commit 1fdc706

26 files changed

+1849
-575
lines changed

WORKSPACE

+22
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,13 @@ gazelle_dependencies()
146146
#
147147
# Downloads are not cached in version control mode.
148148

149+
go_repository(
150+
name = "com_github_bufbuild_protocompile",
151+
importpath = "github.com/bufbuild/protocompile",
152+
sum = "h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY=",
153+
version = "v0.6.0",
154+
)
155+
149156
go_repository(
150157
name = "com_github_urfave_cli_v2",
151158
importpath = "github.com/urfave/cli/v2",
@@ -188,6 +195,13 @@ go_repository(
188195
version = "v1.0.3",
189196
)
190197

198+
go_repository(
199+
name = "com_github_fullstorydev_grpcurl",
200+
importpath = "github.com/fullstorydev/grpcurl",
201+
sum = "h1:xJWosq3BQovQ4QrdPO72OrPiWuGgEsxY8ldYsJbPrqI=",
202+
version = "v1.8.7",
203+
)
204+
191205
go_repository(
192206
name = "com_github_go_logr_logr",
193207
importpath = "github.com/go-logr/logr",
@@ -223,6 +237,14 @@ go_repository(
223237
version = "v2.15.2",
224238
)
225239

240+
go_repository(
241+
name = "com_github_jhump_protoreflect",
242+
build_file_proto_mode = "legacy",
243+
importpath = "github.com/jhump/protoreflect",
244+
sum = "h1:7YppbATX94jEt9KLAc5hICx4h6Yt3SaavhQRsIUEHP0=",
245+
version = "v1.15.2",
246+
)
247+
226248
go_repository(
227249
name = "com_github_jonboulle_clockwork",
228250
importpath = "github.com/jonboulle/clockwork",

api/common/wireless_transceiver.proto

+14
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,20 @@ message TransceiverModel {
4444

4545
// Supported MAC-layer parameters.
4646
repeated WirelessMac macs = 6;
47+
48+
message Impairment {
49+
// Unique identifier, within the list of impairments for this transceiver.
50+
optional string id = 1;
51+
// Time this impairment was added to the interface model.
52+
optional int64 timestamp_usec = 3;
53+
// The reason for this impairment.
54+
optional string reason = 4;
55+
}
56+
57+
// Multiple operational impairements can be recorded by different actors
58+
// (e.g. network operators, monitoring sub-systems inside the agent).
59+
// Spacetime will avoid the use of any transceiver that contains impairments.
60+
repeated Impairment operational_impairments = 7;
4761
}
4862

4963
// Uniquely identifies a temporospatial transceiver model.

api/common/wireless_transmitter.proto

+3-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ message TxChannels {
4343

4444
// Models a wireless transmitter.
4545
message TransmitterDefinition {
46-
reserved 1, 3 to 12, 16, 17 to max;
46+
reserved 1, 3 to 12, 16, 18 to max;
4747

4848
// An optional friendly, human-readable string.
4949
optional string name = 2;
@@ -58,6 +58,8 @@ message TransmitterDefinition {
5858
// wireless transmission is created or modified prior to the input of
5959
// the platform antenna that propagates the signal.
6060
repeated TransmitSignalProcessor signal_processing_step = 15;
61+
62+
optional string coverage_heatmap_id = 17;
6163
}
6264

6365
// Defines how a wireless signal is created, modified, or propagated.

api/nbi/v1alpha/BUILD

-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ proto_library(
3131
"//api/nbi/v1alpha/resources:nbi_resources_proto",
3232
"@com_google_protobuf//:duration_proto",
3333
"@com_google_protobuf//:timestamp_proto",
34-
"@go_googleapis//google/api:annotations_proto",
3534
"@go_googleapis//google/type:interval_proto",
3635
],
3736
)
@@ -43,7 +42,6 @@ cpp_grpc_library(
4342
deps = [
4443
"//api/common:common_cpp_proto",
4544
"//api/nbi/v1alpha/resources:nbi_resources_cpp_grpc",
46-
"@com_google_googleapis//google/api:annotations_cc_proto",
4745
"@com_google_googleapis//google/rpc:code_cc_proto",
4846
"@com_google_googleapis//google/type:interval_cc_proto",
4947
],
@@ -57,7 +55,6 @@ go_proto_library(
5755
deps = [
5856
"//api/common:common_go_proto",
5957
"//api/nbi/v1alpha/resources:nbi_resources_go_grpc",
60-
"@go_googleapis//google/api:annotations_go_proto",
6158
"@go_googleapis//google/rpc:code_go_proto",
6259
"@go_googleapis//google/type:interval_go_proto",
6360
],
@@ -81,6 +78,5 @@ python_grpc_library(
8178
deps = [
8279
"//api/common:common_python_proto",
8380
"//api/nbi/v1alpha/resources:nbi_resources_python_grpc",
84-
"@com_google_googleapis//google/api:annotations_py_proto",
8581
],
8682
)

api/nbi/v1alpha/nbi.proto

+12-40
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import "api/nbi/v1alpha/resources/network_link.proto";
3232
import "api/nbi/v1alpha/resources/scenario_settings.proto";
3333
import "api/nbi/v1alpha/resources/service_request.proto";
3434
import "api/nbi/v1alpha/resources/wireless_interference.proto";
35-
import "google/api/annotations.proto";
3635
import "google/type/interval.proto";
3736

3837
option java_package = "com.aalyria.spacetime.api.nbi.v1alpha";
@@ -123,60 +122,33 @@ message Entity {
123122
}
124123

125124
service NetOps {
126-
// Creates a Spacetime Entity using the app: 'Spacetime Netops'.
127-
rpc CreateEntity(CreateEntityRequest) returns (Entity) {
128-
option (google.api.http) = {
129-
post: "/v1/entities/type/{type=*}"
130-
body: "entity"
131-
};
132-
}
125+
rpc GetEntity(GetEntityRequest) returns (Entity) {}
133126

134-
// Updates a Spacetime Entity using the app: 'Spacetime Netops'.
135-
rpc UpdateEntity(UpdateEntityRequest) returns (Entity) {
136-
option (google.api.http) = {
137-
put: "/v1/entities/type/{type=*}/id/{id=*}"
138-
body: "entity"
139-
};
140-
}
127+
rpc CreateEntity(CreateEntityRequest) returns (Entity) {}
141128

142-
// Lists all specified entities of the selected type.
143-
// TODO: implement pagination
144-
rpc ListEntities(ListEntitiesRequest) returns (ListEntitiesResponse) {
145-
option (google.api.http) = {
146-
get: "/v1/entities"
147-
};
148-
}
129+
rpc UpdateEntity(UpdateEntityRequest) returns (Entity) {}
130+
131+
rpc ListEntities(ListEntitiesRequest) returns (ListEntitiesResponse) {}
149132

150-
// Lists all specified entities of the selected type over the provided time
151-
// interval.
152-
// TODO: implement pagination
153133
rpc ListEntitiesOverTime(ListEntitiesOverTimeRequest)
154-
returns (ListEntitiesOverTimeResponse) {
155-
option (google.api.http) = {
156-
get: "/v1/entities/over_time"
157-
};
158-
}
134+
returns (ListEntitiesOverTimeResponse) {}
159135

160-
// Deletes an Entity.
161-
rpc DeleteEntity(DeleteEntityRequest) returns (DeleteEntityResponse) {
162-
option (google.api.http) = {
163-
delete: "/v1/entities/type/{type=*}/id/{id=*}/commit_timestamp/{commit_timestamp=*}"
164-
};
165-
}
136+
rpc DeleteEntity(DeleteEntityRequest) returns (DeleteEntityResponse) {}
166137

167138
// Loads a scenario specified as a
168139
// com.aalyria.resources.ScenarioSettings proto.
169140
// Deprecated. This endpoint is in the process of being replaced by a
170141
// more general purpose interface.
171142
rpc LoadScenario(LoadScenarioRequest) returns (LoadScenarioResponse) {
172143
option deprecated = true;
173-
option (google.api.http) = {
174-
post: "/v1/load_scenario"
175-
body: "scenario_settings"
176-
};
177144
}
178145
}
179146

147+
message GetEntityRequest {
148+
optional EntityType type = 1;
149+
optional string id = 2;
150+
}
151+
180152
// The id can be omitted, in which case a unique ID will be generated
181153
// by the backend.
182154
message CreateEntityRequest {

api/nbi/v1alpha/resources/network_link.proto

+5-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ enum Accessibility {
108108

109109
// A modeled, physical-layer wireless link budget.
110110
message WirelessLinkBudget {
111-
reserved 10 to 14, 16 to max;
111+
reserved 10 to 14, 17 to max;
112112

113113
// The transmitter antenna's gain in the link direction, in dB.
114114
optional double transmitter_antenna_gain_in_link_direction_db = 1;
@@ -138,6 +138,10 @@ message WirelessLinkBudget {
138138

139139
// The carrier to noise ratio.
140140
optional double carrier_to_noise_db = 8;
141+
142+
// The carrier to noise-plus-interference ratio (C / (N + I)),
143+
// in dB.
144+
optional double carrier_to_noise_plus_interference_db = 16;
141145

142146
// The carrier to noise density, in dB/Hz.
143147
optional double carrier_to_noise_density_db_per_hz = 9;

auth/BUILD

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Copyright 2023 Aalyria Technologies, Inc., and its affiliates.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
16+
17+
go_library(
18+
name = "auth",
19+
srcs = [
20+
"auth.go",
21+
"doc.go",
22+
],
23+
importpath = "aalyria.com/spacetime/auth",
24+
visibility = ["//visibility:public"],
25+
deps = [
26+
"@com_github_golang_jwt_jwt_v5//:jwt",
27+
"@com_github_jonboulle_clockwork//:clockwork",
28+
"@org_golang_google_grpc//credentials",
29+
"@org_golang_x_oauth2//:oauth2",
30+
"@org_golang_x_oauth2//jwt",
31+
],
32+
)
33+
34+
go_test(
35+
name = "auth_test",
36+
srcs = ["auth_test.go"],
37+
embed = [":auth"],
38+
tags = ["block-network"],
39+
deps = [
40+
"//auth/authtest",
41+
"@com_github_jonboulle_clockwork//:clockwork",
42+
],
43+
)

0 commit comments

Comments
 (0)