@@ -10,8 +10,6 @@ use nexus_db_model::SledCpuFamily as DbSledCpuFamily;
1010use  nexus_db_model:: SledSystemHardware ; 
1111use  nexus_db_model:: SledUpdate ; 
1212use  nexus_lockstep_client:: types:: SledId ; 
13- use  nexus_sled_agent_shared:: inventory:: SledCpuFamily ; 
14- use  nexus_sled_agent_shared:: inventory:: SledRole ; 
1513use  nexus_test_utils:: TEST_SUITE_PASSWORD ; 
1614use  nexus_test_utils:: http_testing:: AuthnMode ; 
1715use  nexus_test_utils:: http_testing:: NexusRequest ; 
@@ -21,11 +19,10 @@ use nexus_test_utils_macros::nexus_test;
2119use  nexus_types:: external_api:: params; 
2220use  nexus_types:: external_api:: shared:: UninitializedSled ; 
2321use  nexus_types:: external_api:: views:: Rack ; 
24- use  nexus_types:: internal_api:: params:: SledAgentInfo ; 
2522use  omicron_common:: api:: external:: ByteCount ; 
2623use  omicron_common:: api:: external:: Generation ; 
24+ use  omicron_uuid_kinds:: SledUuid ; 
2725use  std:: time:: Duration ; 
28- use  uuid:: Uuid ; 
2926
3027type  ControlPlaneTestContext  =
3128    nexus_test_utils:: ControlPlaneTestContext < omicron_nexus:: Server > ; 
@@ -106,7 +103,7 @@ async fn test_sled_list_uninitialized(cptestctx: &ControlPlaneTestContext) {
106103        . wait_for_at_least_one_inventory_collection ( Duration :: from_secs ( 60 ) ) 
107104        . await ; 
108105
109-     let  internal_client = & cptestctx. internal_client ; 
106+     let  internal_client = cptestctx. internal_client ( ) ; 
110107    let  external_client = & cptestctx. external_client ; 
111108    let  list_url = "/v1/system/hardware/sleds-uninitialized" ; 
112109    let  mut  uninitialized_sleds =
@@ -127,28 +124,20 @@ async fn test_sled_list_uninitialized(cptestctx: &ControlPlaneTestContext) {
127124    // Insert one of these fake sleds into the `sled` table. 
128125    // Just pick some random fields other than `baseboard` 
129126    let  baseboard = uninitialized_sleds. pop ( ) . unwrap ( ) . baseboard ; 
130-     let  sled_uuid = Uuid :: new_v4 ( ) ; 
131-     let  sa = SledAgentInfo  { 
127+     let  sled_uuid = SledUuid :: new_v4 ( ) ; 
128+     let  sa = nexus_client :: types :: SledAgentInfo  { 
132129        sa_address :  "[fd00:1122:3344:0100::1]:8080" . parse ( ) . unwrap ( ) , 
133130        repo_depot_port :  8081 , 
134-         role :  SledRole :: Gimlet , 
135-         baseboard, 
131+         role :  nexus_client :: types :: SledRole :: Gimlet , 
132+         baseboard :  baseboard . into ( ) , 
136133        usable_hardware_threads :  32 , 
137-         usable_physical_ram :  ByteCount :: from_gibibytes_u32 ( 100 ) , 
138-         reservoir_size :  ByteCount :: from_mebibytes_u32 ( 100 ) , 
139-         cpu_family :  SledCpuFamily :: Unknown , 
134+         usable_physical_ram :  ByteCount :: from_gibibytes_u32 ( 100 ) . into ( ) , 
135+         reservoir_size :  ByteCount :: from_mebibytes_u32 ( 100 ) . into ( ) , 
136+         cpu_family :  nexus_client :: types :: SledCpuFamily :: Unknown , 
140137        generation :  Generation :: new ( ) , 
141138        decommissioned :  false , 
142139    } ; 
143-     internal_client
144-         . make_request ( 
145-             Method :: POST , 
146-             format ! ( "/sled-agents/{sled_uuid}" ) . as_str ( ) , 
147-             Some ( & sa) , 
148-             StatusCode :: NO_CONTENT , 
149-         ) 
150-         . await 
151-         . unwrap ( ) ; 
140+     internal_client. sled_agent_put ( & sled_uuid,  & sa) . await . unwrap ( ) ; 
152141
153142    // Ensure there's only one unintialized sled remaining, and it's not 
154143    // the one that was just added into the `sled` table 
0 commit comments