@@ -92,8 +92,8 @@ pub async fn sandbox_provider_list(
9292 let mut client = grpc_client ( server, tls) . await ?;
9393 let response = client
9494 . list_sandbox_providers ( ListSandboxProvidersRequest {
95- sandbox_name : name. to_string ( ) ,
96- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
95+ sandbox : ( name) . to_string ( ) ,
96+ workspace : ( workspace) . to_string ( ) ,
9797 } )
9898 . await
9999 . into_diagnostic ( ) ?;
@@ -127,8 +127,8 @@ pub async fn sandbox_provider_attach(
127127 // Fetch current sandbox to get resource_version for CAS
128128 let sandbox = client
129129 . get_sandbox ( GetSandboxRequest {
130- name : name. to_string ( ) ,
131- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
130+ sandbox : ( name) . to_string ( ) ,
131+ workspace : ( workspace) . to_string ( ) ,
132132 } )
133133 . await
134134 . map_err ( |status| miette ! ( "provider attachment lookup failed ({})" , status. code( ) ) ) ?
@@ -141,10 +141,10 @@ pub async fn sandbox_provider_attach(
141141 let response = match client
142142 . attach_sandbox_provider ( AttachSandboxProviderRequest {
143143 request_id : String :: new ( ) ,
144- sandbox_name : name. to_string ( ) ,
144+ sandbox : ( name) . to_string ( ) ,
145+ workspace : ( workspace) . to_string ( ) ,
145146 provider_name : provider. to_string ( ) ,
146147 expected_resource_version : resource_version,
147- workspace_scope : Some ( openshell_core:: proto:: workspace_selector ( workspace) ) ,
148148 } )
149149 . await
150150 {
@@ -198,8 +198,8 @@ pub async fn sandbox_provider_detach(
198198 // Fetch current sandbox to get resource_version for CAS
199199 let sandbox = client
200200 . get_sandbox ( GetSandboxRequest {
201- name : name. to_string ( ) ,
202- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
201+ sandbox : ( name) . to_string ( ) ,
202+ workspace : ( workspace) . to_string ( ) ,
203203 } )
204204 . await
205205 . map_err ( |status| miette ! ( "provider detachment lookup failed ({})" , status. code( ) ) ) ?
@@ -212,10 +212,10 @@ pub async fn sandbox_provider_detach(
212212 let response = match client
213213 . detach_sandbox_provider ( DetachSandboxProviderRequest {
214214 request_id : String :: new ( ) ,
215- sandbox_name : name. to_string ( ) ,
215+ sandbox : ( name) . to_string ( ) ,
216+ workspace : ( workspace) . to_string ( ) ,
216217 provider_name : provider. to_string ( ) ,
217218 expected_resource_version : resource_version,
218- workspace_scope : Some ( openshell_core:: proto:: workspace_selector ( workspace) ) ,
219219 } )
220220 . await
221221 {
@@ -550,7 +550,7 @@ async fn auto_create_provider(
550550 profile_workspace : workspace. to_string ( ) ,
551551 credential_handles : HashMap :: new ( ) ,
552552 } ) ,
553- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
553+ workspace : ( workspace) . to_string ( ) ,
554554 } ;
555555
556556 let response = client. create_provider ( request) . await . map_err ( |status| {
@@ -599,7 +599,7 @@ async fn auto_create_provider(
599599 profile_workspace : workspace. to_string ( ) ,
600600 credential_handles : HashMap :: new ( ) ,
601601 } ) ,
602- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
602+ workspace : ( workspace) . to_string ( ) ,
603603 } ;
604604
605605 match client. create_provider ( request) . await {
@@ -735,7 +735,7 @@ async fn rollback_provider_create_after_gcloud_adc_failure(
735735 request_id : String :: new ( ) ,
736736 allow_missing : true ,
737737 name : provider_name. to_string ( ) ,
738- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
738+ workspace : ( workspace) . to_string ( ) ,
739739 } )
740740 . await
741741 {
@@ -1202,7 +1202,7 @@ pub async fn provider_create_with_options(options: ProviderCreateOptions<'_>) ->
12021202 profile_workspace : profile_workspace. to_string ( ) ,
12031203 credential_handles : HashMap :: new ( ) ,
12041204 } ) ,
1205- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
1205+ workspace : ( workspace) . to_string ( ) ,
12061206 } )
12071207 . await
12081208 . into_diagnostic ( ) ?;
@@ -1233,7 +1233,7 @@ pub async fn provider_create_with_options(options: ProviderCreateOptions<'_>) ->
12331233 "refresh_token" . to_string( ) ,
12341234 ] ,
12351235 expiration_time : None ,
1236- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
1236+ workspace : ( workspace) . to_string ( ) ,
12371237 } )
12381238 . await
12391239 {
@@ -1252,7 +1252,7 @@ pub async fn provider_create_with_options(options: ProviderCreateOptions<'_>) ->
12521252 request_id : String :: new ( ) ,
12531253 provider : provider_name. clone ( ) ,
12541254 credential_key : adc_credential_key,
1255- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
1255+ workspace : ( workspace) . to_string ( ) ,
12561256 } )
12571257 . await
12581258 {
@@ -1293,7 +1293,7 @@ pub async fn provider_get(
12931293 let response = client
12941294 . get_provider ( GetProviderRequest {
12951295 name : name. to_string ( ) ,
1296- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
1296+ workspace : ( workspace) . to_string ( ) ,
12971297 } )
12981298 . await
12991299 . into_diagnostic ( ) ?;
@@ -1826,7 +1826,7 @@ pub async fn provider_refresh_status(
18261826 . get_provider_refresh_status ( GetProviderRefreshStatusRequest {
18271827 provider : name. to_string ( ) ,
18281828 credential_key : credential_key. unwrap_or_default ( ) . to_string ( ) ,
1829- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
1829+ workspace : ( workspace) . to_string ( ) ,
18301830 } )
18311831 . await
18321832 . into_diagnostic ( ) ?
@@ -1912,7 +1912,7 @@ pub async fn provider_refresh_config(
19121912 . map ( openshell_core:: time:: timestamp_from_millis)
19131913 . transpose ( )
19141914 . into_diagnostic ( ) ?,
1915- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
1915+ workspace : ( workspace) . to_string ( ) ,
19161916 } )
19171917 . await
19181918 . into_diagnostic ( ) ?
@@ -1942,7 +1942,7 @@ pub async fn provider_rotate(
19421942 request_id : String :: new ( ) ,
19431943 provider : name. to_string ( ) ,
19441944 credential_key : credential_key. to_string ( ) ,
1945- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
1945+ workspace : ( workspace) . to_string ( ) ,
19461946 } )
19471947 . await
19481948 . into_diagnostic ( ) ?
@@ -1981,7 +1981,7 @@ pub async fn provider_refresh_delete(
19811981 allow_missing : true ,
19821982 provider : name. to_string ( ) ,
19831983 credential_key : credential_key. to_string ( ) ,
1984- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
1984+ workspace : ( workspace) . to_string ( ) ,
19851985 } )
19861986 . await
19871987 . into_diagnostic ( ) ?
@@ -2358,7 +2358,7 @@ pub async fn provider_update(options: ProviderUpdateOptions<'_>) -> Result<()> {
23582358 let existing = match client
23592359 . get_provider ( GetProviderRequest {
23602360 name : name. to_string ( ) ,
2361- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
2361+ workspace : ( workspace) . to_string ( ) ,
23622362 } )
23632363 . await
23642364 {
@@ -2454,7 +2454,7 @@ pub async fn provider_update(options: ProviderUpdateOptions<'_>) -> Result<()> {
24542454 } )
24552455 . collect :: < Result < HashMap < _ , _ > , _ > > ( )
24562456 . into_diagnostic ( ) ?,
2457- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
2457+ workspace : ( workspace) . to_string ( ) ,
24582458 clear_credential_expiration_keys,
24592459 } )
24602460 . await
@@ -2496,7 +2496,7 @@ pub async fn provider_delete(
24962496 request_id : String :: new ( ) ,
24972497 allow_missing : true ,
24982498 name : name. clone ( ) ,
2499- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
2499+ workspace : ( workspace) . to_string ( ) ,
25002500 } )
25012501 . await
25022502 {
0 commit comments