def get_storage_profile_spec(session, storage_policy):
    profile_id = pbm.get_profile_id_by_name(session, storage_policy)
    if profile_id:
        client_factory = session.vim.client.factory
        storage_profile_spec = client_factory.create(
            'ns0:VirtualMachineDefinedProfileSpec')
        storage_profile_spec.profileId = profile_id.uniqueId
        return storage_profile_spec
Gets the vm profile spec configured for storage policy.
dataset/ETHPy150Open openstack/nova/nova/virt/vmwareapi/vm_util.py/get_storage_profile_spec