'Return the parameters for creating the vdisk.
Takes volume type and defaults from config options into account.'

def get_vdisk_params(self, config, state, type_id, volume_type=None, volume_metadata=None):

    opts = self.build_default_opts(config)
    ctxt = context.get_admin_context()
    if ((volume_type is None) and (type_id is not None)):
        volume_type = volume_types.get_volume_type(ctxt, type_id)
    if volume_type:
        qos_specs_id = volume_type.get('qos_specs_id')
        specs = dict(volume_type).get('extra_specs')
        if (qos_specs_id is not None):
            kvs = qos_specs.get_qos_specs(ctxt, qos_specs_id)['specs']
            specs.update(kvs)
        opts = self._get_opts_from_specs(opts, specs)
    if ((opts['qos'] is None) and config.storwize_svc_allow_tenant_qos and volume_metadata):
        qos = self._get_qos_from_volume_metadata(volume_metadata)
        if (len(qos) != 0):
            opts['qos'] = qos
    self.check_vdisk_opts(state, opts)
    return opts
