@@ -208,6 +208,9 @@ def init_service(*args, **kwargs):
208208def get_service_addon_name ():
209209 """Name of addon which initialized service connection.
210210
211+ Service context must be initialized to be able to use this function. Call
212+ 'init_service' on you service start to do so.
213+
211214 Returns:
212215 Union[str, None]: Name of addon or None.
213216 """
@@ -218,16 +221,35 @@ def get_service_addon_name():
218221def get_service_addon_version ():
219222 """Version of addon which initialized service connection.
220223
224+ Service context must be initialized to be able to use this function. Call
225+ 'init_service' on you service start to do so.
226+
221227 Returns:
222228 Union[str, None]: Version of addon or None.
223229 """
224230
225231 return ServiceContext .addon_version
226232
227233
234+ def get_service_name ():
235+ """Name of service.
236+
237+ Service context must be initialized to be able to use this function. Call
238+ 'init_service' on you service start to do so.
239+
240+ Returns:
241+ Union[str, None]: Name of service if service was registered.
242+ """
243+
244+ return ServiceContext .service_name
245+
246+
228247def get_service_addon_settings ():
229248 """Addon settings of service which initialized service.
230249
250+ Service context must be initialized to be able to use this function. Call
251+ 'init_service' on you service start to do so.
252+
231253 Returns:
232254 Dict[str, Any]: Addon settings.
233255
@@ -309,6 +331,11 @@ def get_server_api_connection():
309331 return GlobalContext .get_server_api_connection ()
310332
311333
334+ def get_site_id ():
335+ con = get_server_api_connection ()
336+ return con .get_site_id ()
337+
338+
312339def set_site_id (site_id ):
313340 """Set site id of already connected client connection.
314341
@@ -322,6 +349,19 @@ def set_site_id(site_id):
322349 con .set_site_id (site_id )
323350
324351
352+ def get_client_version ():
353+ """Version of client used to connect to server.
354+
355+ Client version is AYON client build desktop application.
356+
357+ Returns:
358+ str: Client version string used in connection.
359+ """
360+
361+ con = get_server_api_connection ()
362+ return con .get_client_version ()
363+
364+
325365def set_client_version (client_version ):
326366 """Set version of already connected client connection.
327367
@@ -335,6 +375,32 @@ def set_client_version(client_version):
335375 con .set_client_version (client_version )
336376
337377
378+ def get_default_settings_variant ():
379+ """Default variant used for settings.
380+
381+ Returns:
382+ Union[str, None]: name of variant or None.
383+ """
384+
385+ con = get_server_api_connection ()
386+ return con .get_client_version ()
387+
388+
389+ def set_default_settings_variant (variant ):
390+ """Change default variant for addon settings.
391+
392+ Note:
393+ It is recommended to set only 'production' or 'staging' variants
394+ as default variant.
395+
396+ Args:
397+ variant (Union[str, None]): Settings variant name.
398+ """
399+
400+ con = get_server_api_connection ()
401+ return con .set_default_settings_variant (variant )
402+
403+
338404def get_base_url ():
339405 con = get_server_api_connection ()
340406 return con .get_base_url ()
@@ -495,31 +561,61 @@ def get_project_anatomy_preset(*args, **kwargs):
495561 return con .get_project_anatomy_preset (* args , ** kwargs )
496562
497563
498- def get_full_production_settings (* args , ** kwargs ):
564+ def get_project_roots_by_site (* args , ** kwargs ):
499565 con = get_server_api_connection ()
500- return con .get_full_production_settings (* args , ** kwargs )
566+ return con .get_project_roots (* args , ** kwargs )
501567
502568
503- def get_production_settings (* args , ** kwargs ):
569+ def get_project_roots_for_site (* args , ** kwargs ):
504570 con = get_server_api_connection ()
505- return con .get_production_settings (* args , ** kwargs )
571+ return con .get_project_roots_for_site (* args , ** kwargs )
506572
507573
508- def get_full_project_settings (* args , ** kwargs ):
574+ def get_addon_settings_schema (* args , ** kwargs ):
509575 con = get_server_api_connection ()
510- return con .get_full_project_settings (* args , ** kwargs )
576+ return con .get_addon_settings_schema (* args , ** kwargs )
511577
512578
513- def get_project_settings (* args , ** kwargs ):
579+ def get_addon_site_settings_schema (* args , ** kwargs ):
514580 con = get_server_api_connection ()
515- return con .get_project_settings (* args , ** kwargs )
581+ return con .get_addon_site_settings_schema (* args , ** kwargs )
582+
583+
584+ def get_addon_studio_settings (* args , ** kwargs ):
585+ con = get_server_api_connection ()
586+ return con .get_addon_studio_settings (* args , ** kwargs )
587+
588+
589+ def get_addon_project_settings (* args , ** kwargs ):
590+ con = get_server_api_connection ()
591+ return con .get_addon_project_settings (* args , ** kwargs )
516592
517593
518594def get_addon_settings (* args , ** kwargs ):
519595 con = get_server_api_connection ()
520596 return con .get_addon_settings (* args , ** kwargs )
521597
522598
599+ def get_addon_site_settings (* args , ** kwargs ):
600+ con = get_server_api_connection ()
601+ return con .get_addon_site_settings (* args , ** kwargs )
602+
603+
604+ def get_addons_studio_settings (* args , ** kwargs ):
605+ con = get_server_api_connection ()
606+ return con .get_addons_studio_settings (* args , ** kwargs )
607+
608+
609+ def get_addons_project_settings (* args , ** kwargs ):
610+ con = get_server_api_connection ()
611+ return con .get_addons_project_settings (* args , ** kwargs )
612+
613+
614+ def get_addons_settings (* args , ** kwargs ):
615+ con = get_server_api_connection ()
616+ return con .get_addons_settings (* args , ** kwargs )
617+
618+
523619def get_project (* args , ** kwargs ):
524620 con = get_server_api_connection ()
525621 return con .get_project (* args , ** kwargs )
0 commit comments