@@ -64,8 +64,8 @@ pub async fn sandbox_provider_list(
6464 let mut client = grpc_client ( server, tls) . await ?;
6565 let response = client
6666 . list_sandbox_providers ( ListSandboxProvidersRequest {
67- sandbox_name : name. to_string ( ) ,
68- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
67+ sandbox : ( name) . to_string ( ) ,
68+ workspace : ( workspace) . to_string ( ) ,
6969 } )
7070 . await
7171 . into_diagnostic ( ) ?;
@@ -96,8 +96,8 @@ pub async fn sandbox_provider_attach(
9696 // Fetch current sandbox to get resource_version for CAS
9797 let sandbox = client
9898 . get_sandbox ( GetSandboxRequest {
99- name : name. to_string ( ) ,
100- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
99+ sandbox : ( name) . to_string ( ) ,
100+ workspace : ( workspace) . to_string ( ) ,
101101 } )
102102 . await
103103 . into_diagnostic ( ) ?
@@ -110,10 +110,10 @@ pub async fn sandbox_provider_attach(
110110 let response = match client
111111 . attach_sandbox_provider ( AttachSandboxProviderRequest {
112112 request_id : String :: new ( ) ,
113- sandbox_name : name. to_string ( ) ,
113+ sandbox : ( name) . to_string ( ) ,
114+ workspace : ( workspace) . to_string ( ) ,
114115 provider_name : provider. to_string ( ) ,
115116 expected_resource_version : resource_version,
116- workspace_scope : Some ( openshell_core:: proto:: workspace_selector ( workspace) ) ,
117117 } )
118118 . await
119119 {
@@ -153,8 +153,8 @@ pub async fn sandbox_provider_detach(
153153 // Fetch current sandbox to get resource_version for CAS
154154 let sandbox = client
155155 . get_sandbox ( GetSandboxRequest {
156- name : name. to_string ( ) ,
157- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
156+ sandbox : ( name) . to_string ( ) ,
157+ workspace : ( workspace) . to_string ( ) ,
158158 } )
159159 . await
160160 . into_diagnostic ( ) ?
@@ -167,10 +167,10 @@ pub async fn sandbox_provider_detach(
167167 let response = match client
168168 . detach_sandbox_provider ( DetachSandboxProviderRequest {
169169 request_id : String :: new ( ) ,
170- sandbox_name : name. to_string ( ) ,
170+ sandbox : ( name) . to_string ( ) ,
171+ workspace : ( workspace) . to_string ( ) ,
171172 provider_name : provider. to_string ( ) ,
172173 expected_resource_version : resource_version,
173- workspace_scope : Some ( openshell_core:: proto:: workspace_selector ( workspace) ) ,
174174 } )
175175 . await
176176 {
@@ -498,7 +498,7 @@ async fn auto_create_provider(
498498 profile_workspace : workspace. to_string ( ) ,
499499 credential_handles : HashMap :: new ( ) ,
500500 } ) ,
501- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
501+ workspace : ( workspace) . to_string ( ) ,
502502 } ;
503503
504504 let response = client. create_provider ( request) . await . map_err ( |status| {
@@ -547,7 +547,7 @@ async fn auto_create_provider(
547547 profile_workspace : workspace. to_string ( ) ,
548548 credential_handles : HashMap :: new ( ) ,
549549 } ) ,
550- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
550+ workspace : ( workspace) . to_string ( ) ,
551551 } ;
552552
553553 match client. create_provider ( request) . await {
@@ -683,7 +683,7 @@ async fn rollback_provider_create_after_gcloud_adc_failure(
683683 request_id : String :: new ( ) ,
684684 allow_missing : true ,
685685 name : provider_name. to_string ( ) ,
686- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
686+ workspace : ( workspace) . to_string ( ) ,
687687 } )
688688 . await
689689 {
@@ -1138,7 +1138,7 @@ pub async fn provider_create_with_options(options: ProviderCreateOptions<'_>) ->
11381138 profile_workspace : profile_workspace. to_string ( ) ,
11391139 credential_handles : HashMap :: new ( ) ,
11401140 } ) ,
1141- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
1141+ workspace : ( workspace) . to_string ( ) ,
11421142 } )
11431143 . await
11441144 . into_diagnostic ( ) ?;
@@ -1169,7 +1169,7 @@ pub async fn provider_create_with_options(options: ProviderCreateOptions<'_>) ->
11691169 "refresh_token" . to_string( ) ,
11701170 ] ,
11711171 expiration_time : None ,
1172- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
1172+ workspace : ( workspace) . to_string ( ) ,
11731173 } )
11741174 . await
11751175 {
@@ -1188,7 +1188,7 @@ pub async fn provider_create_with_options(options: ProviderCreateOptions<'_>) ->
11881188 request_id : String :: new ( ) ,
11891189 provider : provider_name. clone ( ) ,
11901190 credential_key : adc_credential_key,
1191- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
1191+ workspace : ( workspace) . to_string ( ) ,
11921192 } )
11931193 . await
11941194 {
@@ -1229,7 +1229,7 @@ pub async fn provider_get(
12291229 let response = client
12301230 . get_provider ( GetProviderRequest {
12311231 name : name. to_string ( ) ,
1232- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
1232+ workspace : ( workspace) . to_string ( ) ,
12331233 } )
12341234 . await
12351235 . into_diagnostic ( ) ?;
@@ -1762,7 +1762,7 @@ pub async fn provider_refresh_status(
17621762 . get_provider_refresh_status ( GetProviderRefreshStatusRequest {
17631763 provider : name. to_string ( ) ,
17641764 credential_key : credential_key. unwrap_or_default ( ) . to_string ( ) ,
1765- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
1765+ workspace : ( workspace) . to_string ( ) ,
17661766 } )
17671767 . await
17681768 . into_diagnostic ( ) ?
@@ -1848,7 +1848,7 @@ pub async fn provider_refresh_config(
18481848 . map ( openshell_core:: time:: timestamp_from_millis)
18491849 . transpose ( )
18501850 . into_diagnostic ( ) ?,
1851- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
1851+ workspace : ( workspace) . to_string ( ) ,
18521852 } )
18531853 . await
18541854 . into_diagnostic ( ) ?
@@ -1878,7 +1878,7 @@ pub async fn provider_rotate(
18781878 request_id : String :: new ( ) ,
18791879 provider : name. to_string ( ) ,
18801880 credential_key : credential_key. to_string ( ) ,
1881- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
1881+ workspace : ( workspace) . to_string ( ) ,
18821882 } )
18831883 . await
18841884 . into_diagnostic ( ) ?
@@ -1917,7 +1917,7 @@ pub async fn provider_refresh_delete(
19171917 allow_missing : true ,
19181918 provider : name. to_string ( ) ,
19191919 credential_key : credential_key. to_string ( ) ,
1920- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
1920+ workspace : ( workspace) . to_string ( ) ,
19211921 } )
19221922 . await
19231923 . into_diagnostic ( ) ?
@@ -2288,7 +2288,7 @@ pub async fn provider_update(options: ProviderUpdateOptions<'_>) -> Result<()> {
22882288 let existing = match client
22892289 . get_provider ( GetProviderRequest {
22902290 name : name. to_string ( ) ,
2291- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
2291+ workspace : ( workspace) . to_string ( ) ,
22922292 } )
22932293 . await
22942294 {
@@ -2384,7 +2384,7 @@ pub async fn provider_update(options: ProviderUpdateOptions<'_>) -> Result<()> {
23842384 } )
23852385 . collect :: < Result < HashMap < _ , _ > , _ > > ( )
23862386 . into_diagnostic ( ) ?,
2387- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
2387+ workspace : ( workspace) . to_string ( ) ,
23882388 clear_credential_expiration_keys,
23892389 } )
23902390 . await
@@ -2417,7 +2417,7 @@ pub async fn provider_delete(
24172417 request_id : String :: new ( ) ,
24182418 allow_missing : true ,
24192419 name : name. clone ( ) ,
2420- workspace_scope : Some ( openshell_core :: proto :: workspace_selector ( workspace) ) ,
2420+ workspace : ( workspace) . to_string ( ) ,
24212421 } )
24222422 . await
24232423 {
0 commit comments