Skip to content

Commit

Permalink
Allow dynamic spefifying of volume size
Browse files Browse the repository at this point in the history
  • Loading branch information
nikromen committed Sep 9, 2024
1 parent 9960578 commit 8b429d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions resalloc_ibm_cloud/argparsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ def vm_arg_parser():
),
required=True,
)
parser_create.add_argument(
"--additional-volume-size",
type=int,
help="Allocate additional volume of given size in GB",
required=True,
)
parser_delete = subparsers.add_parser(
"delete", help="Delete instance by it's name from IBM Cloud"
)
Expand Down
2 changes: 1 addition & 1 deletion resalloc_ibm_cloud/ibm_cloud_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def create_instance(service, instance_name, opts):
{
"volume": {
"name": instance_name + "-swap",
"capacity": 168,
"capacity": opts.additional_volume_size,
"profile": {"name": "general-purpose"},
},
"delete_volume_on_instance_delete": True,
Expand Down

0 comments on commit 8b429d0

Please sign in to comment.