File tree Expand file tree Collapse file tree 5 files changed +55
-3
lines changed
src/kubernetes_api_objects Expand file tree Collapse file tree 5 files changed +55
-3
lines changed Original file line number Diff line number Diff line change 34
34
source ../tools/activate
35
35
vargo build --release
36
36
- name : Verify fluent controller
37
- run : VERUS_DIR="$(dirname "${PWD}")/verus" ./build.sh fluent_controller.rs --time
37
+ run : VERUS_DIR="$(dirname "${PWD}")/verus" ./build.sh fluent_controller.rs --time --rlimit 20
38
38
rabbitmq-verification :
39
39
runs-on : ubuntu-20.04
40
40
steps :
57
57
source ../tools/activate
58
58
vargo build --release
59
59
- name : Verify rabbitmq controller
60
- run : VERUS_DIR="$(dirname "${PWD}")/verus" ./build.sh rabbitmq_controller.rs --time
60
+ run : VERUS_DIR="$(dirname "${PWD}")/verus" ./build.sh rabbitmq_controller.rs --time --rlimit 20
61
61
zookeeper-verification :
62
62
runs-on : ubuntu-20.04
63
63
steps :
80
80
source ../tools/activate
81
81
vargo build --release
82
82
- name : Verify zookeeper controller
83
- run : VERUS_DIR="$(dirname "${PWD}")/verus" ./build.sh zookeeper_controller.rs --time
83
+ run : VERUS_DIR="$(dirname "${PWD}")/verus" ./build.sh zookeeper_controller.rs --time --rlimit 20
84
84
unit-tests :
85
85
runs-on : ubuntu-20.04
86
86
steps :
Original file line number Diff line number Diff line change @@ -185,6 +185,33 @@ impl ContainerPort {
185
185
self . inner. name = Some ( name. into_rust_string( ) ) ;
186
186
}
187
187
188
+ #[ verifier( external_body) ]
189
+ pub fn name( & self ) -> ( name: Option <String >)
190
+ ensures opt_string_to_view( & name) == self @. name,
191
+ {
192
+ match & self . inner. name {
193
+ Some ( s) => Some ( String :: from_rust_string( s. clone( ) ) ) ,
194
+ None => None ,
195
+ }
196
+ }
197
+
198
+ #[ verifier( external_body) ]
199
+ pub fn container_port( & self ) -> ( container_port: i32 )
200
+ ensures container_port == self @. container_port,
201
+ {
202
+ self . inner. container_port
203
+ }
204
+
205
+ #[ verifier( external_body) ]
206
+ pub fn protocol( & self ) -> ( protocol: Option <String >)
207
+ ensures opt_string_to_view( & protocol) == self @. protocol,
208
+ {
209
+ match & self . inner. protocol {
210
+ Some ( s) => Some ( String :: from_rust_string( s. clone( ) ) ) ,
211
+ None => None ,
212
+ }
213
+ }
214
+
188
215
#[ verifier( external) ]
189
216
pub fn from_kube( inner: deps_hack:: k8s_openapi:: api:: core:: v1:: ContainerPort ) -> ContainerPort { ContainerPort { inner: inner } }
190
217
Original file line number Diff line number Diff line change @@ -266,6 +266,13 @@ impl ServicePort {
266
266
self . inner. app_protocol = Some ( app_protocol. into_rust_string( ) ) ;
267
267
}
268
268
269
+ #[ verifier( external_body) ]
270
+ pub fn set_protocol( & mut self , protocol: String )
271
+ ensures self @ == old( self ) @. set_protocol( protocol@) ,
272
+ {
273
+ self . inner. protocol = Some ( protocol. into_rust_string( ) ) ;
274
+ }
275
+
269
276
#[ verifier( external) ]
270
277
pub fn from_kube( inner: deps_hack:: k8s_openapi:: api:: core:: v1:: ServicePort ) -> ServicePort { ServicePort { inner: inner } }
271
278
Original file line number Diff line number Diff line change @@ -183,13 +183,15 @@ impl LifecycleHandlerView {
183
183
pub struct ContainerPortView {
184
184
pub container_port: int,
185
185
pub name: Option <StringView >,
186
+ pub protocol: Option <StringView >,
186
187
}
187
188
188
189
impl ContainerPortView {
189
190
pub open spec fn default ( ) -> ContainerPortView {
190
191
ContainerPortView {
191
192
container_port: 0 , // TODO: is this the correct default value?
192
193
name: None ,
194
+ protocol: None ,
193
195
}
194
196
}
195
197
@@ -206,6 +208,13 @@ impl ContainerPortView {
206
208
..self
207
209
}
208
210
}
211
+
212
+ pub open spec fn set_protocol( self , protocol: StringView ) -> ContainerPortView {
213
+ ContainerPortView {
214
+ protocol: Some ( protocol) ,
215
+ ..self
216
+ }
217
+ }
209
218
}
210
219
211
220
pub struct VolumeMountView {
Original file line number Diff line number Diff line change @@ -192,6 +192,7 @@ pub struct ServicePortView {
192
192
pub name: Option <StringView >,
193
193
pub port: int,
194
194
pub app_protocol: Option <StringView >,
195
+ pub protocol: Option <StringView >,
195
196
}
196
197
197
198
impl ServicePortView {
@@ -200,6 +201,7 @@ impl ServicePortView {
200
201
name: None ,
201
202
port: 0 , // TODO: is this the correct default value?
202
203
app_protocol: None ,
204
+ protocol: None ,
203
205
}
204
206
}
205
207
@@ -223,6 +225,13 @@ impl ServicePortView {
223
225
..self
224
226
}
225
227
}
228
+
229
+ pub open spec fn set_protocol( self , protocol: StringView ) -> ServicePortView {
230
+ ServicePortView {
231
+ protocol: Some ( protocol) ,
232
+ ..self
233
+ }
234
+ }
226
235
}
227
236
228
237
}
You can’t perform that action at this time.
0 commit comments