ebsarr / packet

packet, a CLI tool to manage packet.net services
Other
40 stars 14 forks source link

'packet storage create-volume --count 0' #36

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hello! Could you please allow creation of volumes without snapshot usage at all?

ebsarr commented 6 years ago

I am afraid the API does not allow to create a snapshot policy with 0 count. And at least one snapshot policy is a mandatory parameter when creating a volume. See https://www.packet.net/developers/api/volumes/

@vielmetti : Do you have any advise on this ?

ghost commented 6 years ago

Thanks for reply! Well, via Web console it's possible to create Volume without Snapshot Policy. I also tried to remove the Snapshot Policy after creation via 'packet storage delete-snapshot-policy', but don't able to find ID string for '--policy-id'. Where is it?

vielmetti commented 6 years ago

Thanks @ebsarr @inemylostyvyi - I've pinged @mmlb to see what he thinks.

mmlb commented 6 years ago

@ebsarr thankfully the new portal goes straight to api so if in doubt fireup browser console :raised_hands:!! So api will be just fine if you send an empty array for snapshot_policies, it may even be fine if you omit it too.

ebsarr commented 6 years ago

@mmlb thanks. I’ll modify the code to pass an empty slice of snapshot_policies and see how it behaves .

ebsarr commented 6 years ago

@inemylostyvyi : I have addressed the issue in v2.3.1.

ghost commented 6 years ago

@ebsarr Thanks!