yapapi icon indicating copy to clipboard operation
yapapi copied to clipboard

analyze the `vm.repo` et al

Open shadeofblue opened this issue 2 years ago • 2 comments

  • consider async/non-async
  • do we want to distinguish between image and image_hash in the function signature

related: https://github.com/golemfactory/yapapi/pull/1044

shadeofblue avatar Nov 21 '22 05:11 shadeofblue

Suggestion:

# This can create any payload, and is rarely used directly
payload = Payload(**kwargs)

# Creates VM payloads and uses internally Payload()
# (this is a non-async replacement for `vm.repo()`)
payload = Payload.vm(image_hash, **kwargs)

# Other functions might be implemented in the future
payload = Payload.whatever(any, args)

also related: #404

johny-b avatar Nov 21 '22 09:11 johny-b

#1044 now distinguishes between image_hash and image_name

cryptobench avatar Nov 21 '22 10:11 cryptobench