@@ -100,7 +100,7 @@ def _to_snake_case(string: str) -> str:
100100
101101async def create_service_and_get_id (
102102 create_service_data : AioDockerServiceSpec | dict [str , Any ],
103- docker_hub_registry_settings : RegistrySettings | None ,
103+ registry_settings : RegistrySettings | None ,
104104) -> ServiceId :
105105 # NOTE: ideally the argument should always be AioDockerServiceSpec
106106 # but for that we need get_dynamic_proxy_spec to return that type
@@ -109,13 +109,13 @@ async def create_service_and_get_id(
109109 create_service_data , by_alias = True , exclude_unset = True
110110 )
111111 kwargs = {_to_snake_case (k ): v for k , v in kwargs .items ()}
112- if docker_hub_registry_settings :
112+ if registry_settings :
113113 kwargs ["auth" ] = {
114- "username" : docker_hub_registry_settings .REGISTRY_USER ,
115- "password" : docker_hub_registry_settings .REGISTRY_PW .get_secret_value (),
116- "serveraddress" : docker_hub_registry_settings .resolved_registry_url ,
114+ "username" : registry_settings .REGISTRY_USER ,
115+ "password" : registry_settings .REGISTRY_PW .get_secret_value (),
116+ "serveraddress" : registry_settings .resolved_registry_url ,
117117 }
118- kwargs ["registry" ] = docker_hub_registry_settings .resolved_registry_url
118+ kwargs ["registry" ] = registry_settings .resolved_registry_url
119119
120120 logging .debug ("Creating service with\n %s" , json_dumps (kwargs , indent = 1 ))
121121 service_start_result = await client .services .create (** kwargs )
0 commit comments