def disk_param(name, size, snapshot_profile, cmdline=None, kernel=None):
        """ Return disk parameter structure. """
        disk_params = {}

        if cmdline:
            disk_params['cmdline'] = cmdline

        if kernel:
            disk_params['kernel'] = kernel

        if name:
            disk_params['name'] = name

        if snapshot_profile is not None:
            disk_params['snapshot_profile'] = snapshot_profile

        if size:
            disk_params['size'] = size

        return disk_params
def disk_param ( name , size , snapshot_profile , cmdline = None , kernel = None ) : disk_params = { } if cmdline : disk_params [ 'cmdline' ] = cmdline if kernel : disk_params [ 'kernel' ] = kernel if name : disk_params [ 'name' ] = name if snapshot_profile is not None : disk_params [ 'snapshot_profile' ] = snapshot_profile if size : disk_params [ 'size' ] = size return disk_params
Return disk parameter structure.