#NEWLINE# def export( self ) : #NEWLINE# #INDENT# 'Serializes to JSON.' #NEWLINE# fields = [ 'id' , 'host' , 'port' , 'user' ] #NEWLINE# out = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for field in fields : #NEWLINE# #INDENT# out [ field ] = getattr ( self , field , None ) #NEWLINE# #UNINDENT# out [ 'mountOptions' ] = self . mount_opts #NEWLINE# out [ 'mountPoint' ] = self . mount_point #NEWLINE# out [ 'beforeMount' ] = field . cmd_before_mount #NEWLINE# out [ 'authType' ] = self . auth_method #NEWLINE# out [ 'sshKey' ] = self . ssh_key #NEWLINE# return json . dumps ( out , indent = 4 )