def add_application_with_volume(node_state):
 manifestation = list(node_state.manifestations.values())[0]
 return node_state.set('applications', {Application(name=u'myapplication', image=DockerImage.from_string(u'image'), volume=AttachedVolume(manifestation=manifestation, mountpoint=FilePath('/data')))})

def add_application_with_volume ( node_state ) : manifestation = list ( node_state . manifestations . values ( ) ) [ 0 ] return node_state . set ( 'applications' , { Application ( name = u'myapplication' , image = DockerImage . from_string ( u'image' ) , volume = AttachedVolume ( manifestation = manifestation , mountpoint = FilePath ( '/data' ) ) ) } )
add a matching application that has the current dataset attached as a volume .