code: def post(method, hmc, uri, uri_parms, body, logon_required,
               wait_for_completion):
          
          assert wait_for_completion is True  # async not supported yet
          partition_uri = re.sub('/virtual-functions$', '', uri)
          try:
              partition = hmc.lookup_by_uri(partition_uri)
          except KeyError:
              raise InvalidResourceError(method, uri)
          cpc = partition.manager.parent
          assert cpc.dpm_enabled
          check_valid_cpc_status(method, uri, cpc)
          check_partition_status(method, uri, partition,
                                 invalid_statuses=['starting', 'stopping'])
          check_required_fields(method, uri, body, ['name'])
  
          new_vf = partition.virtual_functions.add(body)
          return {'element-uri': new_vf.uri}
docs: Operation: Create Virtual Function (requires DPM mode).