Skip to content

Commit

Permalink
add dry_run_desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandredevely committed Oct 11, 2023
1 parent 2ffa45d commit d4778c0
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions oc/od/composer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit d4778c0

Please sign in to comment.