From d4778c04e5db3b52a52cb18b9ecb647967c9b80e Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Wed, 11 Oct 2023 20:58:09 +0200 Subject: [PATCH] add dry_run_desktop --- oc/od/composer.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/oc/od/composer.py b/oc/od/composer.py index 0cf8f3f..c3f975b 100755 --- a/oc/od/composer.py +++ b/oc/od/composer.py @@ -621,24 +621,18 @@ def createdesktop( authinfo:AuthInfo, userinfo:AuthUser, args ): return myDesktop -def sampledesktop(userid:str='dry_run123'): +def sampledesktop(authinfo:AuthInfo, userinfo:AuthUser): - assert_type( userid, str ) - # fake an authinfo object - authinfo = AuthInfo( provider='anonymous') - # fake an userinfo object - userinfo = AuthUser( { 'userid':userid, 'name': 'anonymous' } ) - kwargs = {} myCreateDesktopArguments = createDesktopArguments( authinfo, userinfo, kwargs ) # new Orchestrator Object myOrchestrator = selectOrchestrator() myOrchestrator.desktoplaunchprogress = None - + # dry_run myCreateDesktopArguments['dry_run'] = 'All' # Create the desktop - jsonDesktop = myOrchestrator.createdesktop( userinfo=userinfo, authinfo=authinfo, **myCreateDesktopArguments ) + jsonDesktop = myOrchestrator.createdesktop( authinfo, userinfo, **myCreateDesktopArguments ) return jsonDesktop